W3C home > Mailing lists > Public > www-xsl-fo@w3.org > July 2009

Re: XSL-FO to generate a PDF document

From: ubi_nunes <ubi.nunes@topazsolutions.co.nz>
Date: Wed, 15 Jul 2009 18:59:13 -0700 (PDT)
Message-ID: <24508864.post@talk.nabble.com>
To: www-xsl-fo@w3.org

Tony Graham-3 wrote:
> On Mon, Jul 13 2009 05:01:27 +0100, ubi.nunes@topazsolutions.co.nz wrote:
>> I have to draw cross-line box that will start from the last row of a
>> table
>> and will cover all the white space until the end of the page.
>> I'm using fo:instream-foreign-object and svg to create the cross-line
>> box.
>> My problem is that I don't know the size to the box till the xml elements
>> populates the table and it will be different from xml to xml file that I
>> process.
>> Can anyone help with a code sample?
> You would want to:
>  - Keep the table and the following fo:block together within the page
>  - Allow non-uniform scaling on the fo:instream-foreign-object
>  - Set the content-height to 'scale-to-fit' (probably also for
>    content-width).
> Regards,
> Tony Graham                         Tony.Graham@MenteithConsulting.com
> Director                                  W3C XSL FO SG Invited Expert
> Menteith Consulting Ltd                               XML Guild member
> XML, XSL and XSLT consulting, programming and training
> Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
> Registered in Ireland - No. 428599   http://www.menteithconsulting.com
>   --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
> xmlroff XSL Formatter                               http://xmlroff.org
> xslide Emacs mode                  http://www.menteith.com/wiki/xslide
> Unicode: A Primer                               urn:isbn:0-7645-4625-2

Hi Tony,

Thanks for the suggestion, but unfortunately it didn't work. I have paste
the code I'm trying to get to work. If you can review it and maybe give
another suggestion would be great.

		<fo:flow flow-name="xsl-region-body" font-family="Times" font-size="12pt">
			<fo:block keep-together="always" wrap-option="no-wrap"
				<fo:table table-layout="fixed" width="100%" height="10%"
					<fo:table-column column-width="100.000%" column-number="1"/>
					<fo:table-column column-width="100.000%" column-number="2"/>
					<fo:table-column column-width="100.000%" column-number="3"/>
					<fo:table-column column-width="100.000%" column-number="4"/>
							<fo:table-cell border="1pt solid black" padding="2pt">
								<fo:block>		<xfd:field xpath="processing_type/@code"/>		
							</fo:table-cell><fo:table-cell  border="1pt solid black"
								<fo:block><xfd:field xpath="processing_type"/> </fo:block>
							</fo:table-cell><fo:table-cell border="1pt solid black"
								<fo:block><xfd:field xpath="premises/@id"/> </fo:block>
							</fo:table-cell><fo:table-cell border="1pt solid black"
								<fo:inline wrap-option="wrap">
									<xfd:field xpath="premises/name"/>
					<fo:instream-foreign-object content-width="scale-to-fit"
content-height="scale-to-fit" scaling="non-uniform"> 
						<svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="6.8in"
						<svg:g transform="scale(1, 1)">
						<svg:line x1="0" y1="0" x2="6.8in" y2="10.1in" style="stroke:blue;"/>
						<svg:line x1="0" y1="10.1in" x2="6.8in" y2="0" style="stroke:blue;"/>



View this message in context: http://www.nabble.com/XSL-FO-to-generate-a-PDF-document-tp24455920p24508864.html
Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com.
Received on Thursday, 16 July 2009 01:59:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:32 UTC