Re: printing page numbers
last-page is used to identify a block which appears on the last page of the document, like this: ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=page margin=2.5cm fo:region-body margin-bottom='2.5cm' region-name=body background-color=#cc/ fo:region-after extent='2cm' region-name=footer background-color=#dd/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=page fo:static-content flow-name=footer fo:block this is the page footer, the page number is fo:page-number/ of fo:page-number-citation ref-id=last-page/ /fo:block /fo:static-content fo:flow flow-name=body fo:blockThis will be on page one/fo:block fo:block break-before=page This will be on page two /fo:block fo:block id=last-page/ /fo:flow /fo:page-sequence /fo:root John Farrow Ibex PDF Creator - High speed scalable XSL-FO Visual Programming Ltd mail PO Box 22-222, Khandallah, Wellington, New Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand phone +64 4 479 1738 fax +64 4 479 1294 web http://www.xmlpdf.com/ibex.html - Original Message - From: Jaysheel Bhavsar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 12:10 PM Subject: RE: printing page numbers Dear Manoj, Can you explain what you code does? I am very new to XSL-FO. Can you explain where I should place this code in my xsl sheet, what is last-page Is it a reserve word that keep counts of how many pages it has processed at a given point? Also the code you sent me will it work as is? Thank you. Jaysheel. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 4:36 PM To: [EMAIL PROTECTED] Subject: Re: printing page numbers Yes you can do that. You need to check usage for fo:block id=last-page/ , fo:page-sequence fo:page-number-citation ref-id=last-page/ Thanks Manoj Jaysheel Bhavsar To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: ite.com Subject: printing page numbers 02/15/2005 01:29 PM Please respond to fop-user Hi, I was wondering if I can have Page 1 of 10 printed at the bottom of the page instead of just printing Page 1. One thing is that I don't know how many pages I will have in the pdf, since my content is populated dynamically. Any ideas? If any one have a sample code that will be great. Thank you Jaysheel. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URGENT:::::: OUT OF MEMORY
Hi The images alone take more than half a Gigabyte. I doubt you will find *any* FO processor which will work on this amount of data in a reasonable amount of time. You can try to resort to picewise generation of several PDF and try to get one of the general PDF tools to merge them without running out of memory. Don't expect Acrobat Reader to open the resulting file on a Windows machine with less than 2G memory. I believe commercial FO processors and Acrobat both scale better than you think. Using Ibex (from http://www.xmlpdf.com/ibex.html), and 3000 different 350K jpeg files, and a simple FO file which puts one image per page like this: fo:block fo:external-graphic src=url('.\GUID-11.jpg')/ /fo:block fo:block fo:external-graphic src=url('.\GUID-12.jpg')/ /fo:block It takes 9 minutes (with Java 1.4) to create the PDF file, which just over 1 GB in size. Memory used is less than 256 MB. The .NET version of Ibex takes only 5 minutes. Acrobat will load the PDF and page through it using less than 160 K. Both Ibex and Acrobat don't need to hold more than one image in memory at a time, so don't need to use lots of RAM. Even if you had ten images on each page, the document creation and viewing process would still scale very well. John Farrow Visual Programming Ltd Ibex PDF Creator - High speed scalable XSL-FO mail PO Box 22-222, Khandallah, Wellington, New Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand phone +64 4 479 1738 fax +64 4 479 1294 web http://www.xmlpdf.com - Original Message - From: J.Pietschmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 12, 2005 7:14 AM Subject: Re: URGENT:: OUT OF MEMORY Chandrasekhar Sanku wrote: I need to generate a document with 3000 images (0.2 - 0.5 MB each image approximately) and my intermediate XML file size is 3MB (approx). The images alone take more than half a Gigabyte. I doubt you will find *any* FO processor which will work on this amount of data in a reasonable amount of time. You can try to resort to picewise generation of several PDF and try to get one of the general PDF tools to merge them without running out of memory. Don't expect Acrobat Reader to open the resulting file on a Windows machine with less than 2G memory. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Want to know the normal practice
You data has "Catalog", but you stylesheet matches on "Catalogue" - the spelling is different. Regards John Farrow Visual Programming Ltd mail PO Box 22-222, Khandallah, Wellington, New Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand phone +64 4 479 1738 fax +64 4 479 1294 web http://www.xmlpdf.com - Original Message - From: Manisha Sathe To: [EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 1:36 PM Subject: RE: Want to know the normal practice 1) I am just trying with one sample xml and xls (got from web). 2) Using FopServlet (came with fop- from servlet example) 3) But continuously getting NullPointer Exception at following driver.render(input.getParser(), input.getInputSource()); I am attaching the xml and xsl for the info XML File - data.xml - ?xml version="1.0" encoding="UTF-8"?CatalogueBook TitleMastering EJB/Title AuthorEd Roman/Author Price$45.00/Price/BookBook TitleDesign Patterns/Title AuthorErich Gamma/Author Price$50.00/Price/BookBook TitleEffective Java/Title AuthorJosch Bloch/Author Price$30.00/Price/Book/Catalogue-- XSL File - format.xsl --- ?xml version="1.0" encoding="UTF-8"?xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:java="java" exclude-result-prefixes="fo"xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/!-- = --!-- root element: Catalogue --!-- = --xsl:template match="Catalog"fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" fo:layout-master-set!-- (1. Define the page margins) --fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm"fo:region-body//fo:simple-page-master/fo:layout-master-set!-- (2. For the page layout refer to the master layout)--fo:page-sequence master-reference="simpleA4"fo:flow flow-name="xsl-region-body"fo:block font-size="16pt" font-weight="bold" space-after="5mm"Catalog Information/fo:block!-- (3. Defining the block with table definition to display data -- fo:block font-size="10pt"fo:table table-layout="fixed"fo:table-column column-width="8cm"/fo:table-column column-width="8cm"/fo:table-column column-width="8cm"/fo:table-bodyxsl:apply-templates//fo:table-body/fo:table/fo:block/fo:flow/fo:page-sequence/fo:root/xsl:template!-- = --!-- Book Information --!-- = --xsl:template match="Book" fo:table-rowfo:table-cellfo:block xsl:value-of select="Title"//fo:block/fo:table-cellfo:table-cellfo:block xsl:value-of select="Author"//fo:block/fo:table-cell fo:table-cellfo:block xsl:value-of select="Price"//fo:block/fo:table-cell/fo:table-row/xsl:template/xsl:stylesheet - Pls tell mewhat am i missing now ? If possible whether anybody can provide me the sample xml / xsl files so that i can test it out ? regards Manisha Arun Sinha [EMAIL PROTECTED] wrote: Hi Manisha,Once you have your XML, you can directly use :-fop -xml myxml.xml -xsl myxsl.xsl -pdf mydoc.pdfHope the above helps.Cheers.ArunFrom: Manisha Sathe <[EMAIL PROTECTED]>Reply-To: [EMAIL PROTECTED]To: [EMAIL PROTECTED]Subject: Want to know the normal practiceDate: Sun, 6 Feb 2005 23:14:52 -0800 (PST)I need to pull some data from database and want to show it inside pdf in a tabular form. What is the best way to do it ?1)First create XML and convert it to FO2)Take FO and convert it into PDFIs there any other direct way ? My environment is java / JSP / Struts framework with MSSQL as backend. Is there any example for FOP with Database ?btw, the examples given seems to be using deprecated methods, where can i find latest examples ? (using j2sdk 1.4.2_03)regardsManisha-Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'_MSN Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal haven online.-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] Do you Yahoo!?Yahoo! Search presents - Jib Jab's 'Second Term'
Re: SPAM-LOW: Building FOP
Try editing the FOP build.bat file, remove the @echo off from the first line. Rerun the build.bat and you will see which command fails - this should tell you what the problem is. John Farrow Visual Programming Ltd mail PO Box 22-222, Khandallah, Wellington, New Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand phone +64 4 479 1738 fax +64 4 479 1294 web http://www.xmlpdf.com - Original Message - From: Ganesh Babu Nallamothu, Integra-India [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 5:59 AM Subject: SPAM-LOW: Building FOP Dear all, I am new to java and ant building. I am explaining the way I tried to build the FOP. 1. OS -- Win 2000 2. java version -- 1.4.2_05 3. fop version -- CVS snapshot xml-fop_20040921223357.tar.gz 4. ant version -- 1.6.1 5. extracted the ant zip file into D:\apache-ant-1.6.1 6. extracted the fop zip file into D:\xml-fop 7. Added D:\apache-ant-1.6.1\bin and C:\j2sdk1.4.2_05\bin to system path 8. Added D:\apache-ant-1.6.1 and C:\j2sdk1.4.2_05 to ant_home and java_home respectively in build.bat file Now I have executed the build.bat the result is The system can not find the path specified. Can you all let me know where I went wrong. Regards, Ganesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple q regarding breaks in XSL Fo
An empty block acts as a line break so you can do this: fo:block Joghn Doefo:block/ 123 mary kay st fo:block or maybe this if FOP supports it: fo:block linefeed-treatment=preserve Joghn Doe 123 mary kay st fo:block Visual Programming Ltd mail PO Box 22-222, Khandallah, Wellington, New Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand phone +64 4 479 1738 fax +64 4 479 1294 web http://www.xmlpdf.com - Original Message - From: Subbiah [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 01, 2004 2:35 PM Subject: Simple q regarding breaks in XSL Fo This is my day 2 at FOP , I am trying to make an XSL with the similar output. I had a question regading breaks similar to br in HTML Suppose I want the following output John Doe 123 mary kay Street 1. Do I have to use 2 blocks to get the ouptut ? fo:blockJoghn Doe/fo:block fo:block123 mary kay st/fo:block Or do I put it in a table as 2 rows . advise regards, raman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LPI and CPI vs line-height and font-size
I'm using Acrobat 6.0 Professional, maybe the grid is not in the standard edition. John Visual Programming Ltd mail PO Box 22-222, Khandallah, Wellington, New Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand phone +64 4 479 1738 fax +64 4 479 1294 web http://www.xmlpdf.com - Original Message - From: Zaleski, Matthew (M.E.) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 29, 2004 3:28 AM Subject: RE: LPI and CPI vs line-height and font-size Hrmm. What version of Acrobat are you running? I have Acrobat Standard 6.0 (the one you pay for) and Ctrl-U does nothing. I wandered through the preferences and menus and found nothing to give me a grid. -Original Message- From: john farrow [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 6:21 PM To: [EMAIL PROTECTED] Subject: Re: LPI and CPI vs line-height and font-size That looks like a problem with FOP. By setting line-height=0.125in you should get 8 lines per inch. If you have Acrobat you can press control-U which brings up the grid, so you can measure things without needing to print them. Regards John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LPI and CPI vs line-height and font-size
That looks like a problem with FOP. By setting line-height=0.125in you should get 8 lines per inch. If you have Acrobat you can press control-U which brings up the grid, so you can measure things without needing to print them. Regards John Visual Programming Ltd mail PO Box 22-222, Khandallah, Wellington, New Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand phone +64 4 479 1738 fax +64 4 479 1294 web http://www.xmlpdf.com - Original Message - From: Neil Guinto [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 28, 2004 9:42 AM Subject: LPI and CPI vs line-height and font-size Are they ever the same in meaning? Because I based my presumption on it, otherwise my calculation based on having a similar effect will be wrong then. LPI: 8 = 1/8 in and CPI: 10 = 1/10 in. I verified the result by measuring the printed output on paper. It was printed on a Lexmark Optra S 1250 laser printer. It didn't come out exactly as I expect. I tried it on the following renderers: PDF, PCL, AWT. They all have the same result. I'm using version FOP 0.20.5. Here's a sample of my FO file: ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master margin-right=0.5in margin-left=0.5in margin-bottom=0.0in margin-top=0.0in page-width=11in page-height=8.5in master-name=US Letter Landscape fo:region-body/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence line-height=0.125in font-size=0.1in font-family=Courier master-reference=US Letter Landscape fo:flow flow-name=xsl-region-body fo:block /fo:block fo:block /fo:block fo:block JTRP006 - QPRINT Override w/ Printer File Page: 1/fo:block fo:block /fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block /fo:flow /fo:page-sequence /fo:root - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]