FOP-XSL:dynamic external graphics
Rachael Blank [EMAIL PROTECTED] wrote: Is there a way I can dynamically display images based on an xml tag that I am given? [...] I thought something like this would work: fo:table-cell fo:block white-space-collapse=true xsl:variable name=filepathValue select=concat('file:../default/tra-app/images/',client/id,'logo.gif') / fo:external-graphic src=$filepathValue / Try fo:external-graphic src={$filepathValue}/ here. Attributes of literal elements are by default literal, this means, you generated literally fo:external-graphic src=$filepathValue/ in the output, which is of course not an URL. Enclosing stuff in {} makes it an attribute value template, the stuff within is evaluated as XPath expression. You may also have parts of an attribute be an AVT, like fo:external-graphic src=file:../default/tra-app/images/{client/id}logo.gif/ As a last hint, if every time you get mysterious errors for invalid attribute values, it pays off to invoke the XSLT transformation separately and examine the intermediate FO directly. HTH J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Haw force last page to be blank?
Hi . I have a problem using blank-or-not-blank tries. Im going to create a following print job: first page contains different layout that other pages. even pages are blank odd pages contain text. Document must contain even number of pages. This means that last page must be blank. Have somebody same idea? The best way will be sample file. With Best Regards Dariusz Grabowski - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Haw force last page to be blank?
Dariusz, Try this: fo:page-sequence format=1 initial-page-number={$initial.page.number} force-page-count=end-on-even master-reference=body ... Regards, Etwin - Original Message - From: Dariusz Grabowski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 07, 2001 11:58 AM Subject: Haw force last page to be blank? Hi . I have a problem using blank-or-not-blank tries. Im going to create a following print job: first page contains different layout that other pages. even pages are blank odd pages contain text. Document must contain even number of pages. This means that last page must be blank. Have somebody same idea? The best way will be sample file. With Best Regards Dariusz Grabowski - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
FOP-XSL:dynamic external graphics
Hey I have a problem to data from xml to an xsl - atribute: the xml file is like: ... page homepage table tr td img_homepagehttp://url/111/img_homepage /td /tr tr td img_homepagehttp://url/222/img_homepage /td /tr /table /homepage /page the xsl stylesheet: xsl:template match=img_diagramm xsl:variable name = src xsl:value-of select = . / /xsl:variable fo:table-row fo:table-cell fo:blockfo:external-graphic src={/page/homepage/tr/td/img_homepage}//fo:block /fo:table-cell /fo:table-row /xsl:template . The result : The image http://url/111 is shown twice ! How can I manage it to show both pictures ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FOP-XSL:dynamic external graphics
Hi I have a problem to data from xml to an xsl - atribute: the xml file is like: ... page homepage table tr td img_homepagehttp://url/111/img_homepage /td /tr tr td img_homepagehttp://url/222/img_homepage /td /tr /table /homepage /page the xsl stylesheet: xsl:template match=img_diagramm xsl:variable name = src xsl:value-of select = . / /xsl:variable fo:table-row fo:table-cell fo:blockfo:external-graphic src={/page/homepage/tr/td/img_homepage}//fo:block This will always evaluate to http://url/111;, no matter if the current context is the latter img_homepage /fo:table-cell /fo:table-row /xsl:template . The result : The image http://url/111 is shown twice ! How can I manage it to show both pictures ? e.g. xsl:template match=tr fo:table-row xsl:for-each select=td fo:table-cell xsl:apply-templates select=* / /fo:table-cell /xsl:for-each /fo:table-row /xsl:template xsl:template match=img_diagramm fo:block fo:external-graphic src={.} / /fo:block /xsl:template Hope this helps, Santtu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
FOP-XSL:dynamic external graphics
Hey I have a problem to data from xml to an xsl - atribute: the xml file is like: ... page homepage table tr td img_homepagehttp://url/111/img_homepage /td /tr tr td img_homepagehttp://url/222/img_homepage /td /tr /table /homepage /page the xsl stylesheet: xsl:template match=img_diagramm xsl:variable name = src xsl:value-of select = . / /xsl:variable fo:table-row fo:table-cell fo:blockfo:external-graphic src={/page/homepage/tr/td/img_homepage}//fo:block /fo:table-cell /fo:table-row /xsl:template . The result : The image http://url/111 is shown twice ! How can I manage it to show both pictures ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: FOP-XSL:dynamic external graphics
Yes, it's working ! Thanxs ! k. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 7. Januar 2002 12:28 An: [EMAIL PROTECTED] Betreff: RE: FOP-XSL:dynamic external graphics Hi I have a problem to data from xml to an xsl - atribute: the xml file is like: ... page homepage table tr td img_homepagehttp://url/111/img_homepage /td /tr tr td img_homepagehttp://url/222/img_homepage /td /tr /table /homepage /page the xsl stylesheet: xsl:template match=img_diagramm xsl:variable name = src xsl:value-of select = . / /xsl:variable fo:table-row fo:table-cell fo:blockfo:external-graphic src={/page/homepage/tr/td/img_homepage}//fo:block This will always evaluate to http://url/111;, no matter if the current context is the latter img_homepage /fo:table-cell /fo:table-row /xsl:template . The result : The image http://url/111 is shown twice ! How can I manage it to show both pictures ? e.g. xsl:template match=tr fo:table-row xsl:for-each select=td fo:table-cell xsl:apply-templates select=* / /fo:table-cell /xsl:for-each /fo:table-row /xsl:template xsl:template match=img_diagramm fo:block fo:external-graphic src={.} / /fo:block /xsl:template Hope this helps, Santtu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
How can i optimize memory consumtion?
I need to produce a very large PDF document (about 1300 pages!), no images, just plain text. I set JVM memory parameters (Xms and Xmx) but i can't process this document anyway. Did anyone try to modify sources writing pages to the output stream immediatly instead of buffering them into memory? Luigi_ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Write pdf file to disk
Hi, I have code that creates a pdf file using fop. The problem I am seeing is that I do not know how to define where the pdf file is stored (or indeed, what it should be called). The code I have is shown below... // Transform from fop to pdf XMLReader xmlReader = new SAXParser(); Driver driver = new Driver(); driver.setRenderer(new org.apache.fop.render.pdf.PDFRenderer()); driver.addElementMapping(org.apache.fop.fo.StandardElementMapping); driver.addElementMapping(org.apache.fop.svg.SVGElementMapping); driver.addPropertyList(org.apache.fop.fo.StandardPropertyListMapping); driver.addPropertyList(org.apache.fop.svg.SVGPropertyListMapping); driver.setOutputStream(new BufferedOutputStream(baos)); driver.buildFOTree(xmlReader, new InputSource(formReader)); driver.format(); driver.render(); Any help would be appreciated. Scott Mitchell Experienced Software Developer Liberty Information Technology Direct Line: ++44 (0) 28 9044 5582 Clarendon House Fax: ++44 (0) 28 9044 5511 9-21 Adelaide StreetSwitchboard: ++44 (0) 28 9044 5500 Belfast, Northern Ireland BT2 8DJ Email: [EMAIL PROTECTED] Disclaimer: The contents of this e-mail and attached files in no way reflect any policies of Liberty Information Technology Ltd. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
ODP: Haw force last page to be blank?
Thank you Etwin Its works. With Best Regards Dariusz Grabowski - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
table-cells and clipping (overflow=hidden)
Title: table-cells and clipping (overflow=hidden) Hello, I've got a problem with tables and clipping. In my document, content of a table cell shouldn't exceed the tabel cell. For this reason I tried to use the clip or overflow property, but it doesn't work. Content containing spaces is wrapped, but other content exceed the cell. This is a snippet from my code: ... fo:table-row fo:table-cell fo:block clip=auto overflow=hidden1.7976931348623157E308/fo:block /fo:table-cell fo:table-cell fo:block clip=auto overflow=hiddenyou can't read this/fo:block /fo:table-cell ... Is this my fault or a bug in FOP? I'm not too good in XSL:FO... is there another way of defining things matching my needs? Best regards, Jens Jens von Pilgrim 4flow AG Berlin, Germany
Re: Write pdf file to disk
Scott: Try this: OutputStream stream = new BufferedOutputStream(new FileOutputStream(filePathHere)); driver.setOutputStream(stream); we use a simple random file name generated from: int rndNumber = Math.abs(new Random().nextInt()); randFileName=String.valueOf(rndNumber); OK? Is this what you were asking? -Lou Inexperienced Software Architect Mitchell, Scott(LIT) [EMAIL PROTECTED] on 01/07/2002 07:06:21 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Write pdf file to disk Hi, I have code that creates a pdf file using fop. The problem I am seeing is that I do not know how to define where the pdf file is stored (or indeed, what it should be called). The code I have is shown below... // Transform from fop to pdf XMLReader xmlReader = new SAXParser(); Driver driver = new Driver(); driver.setRenderer(new org.apache.fop.render.pdf.PDFRenderer ()); driver.addElementMapping(org.apache.fop.fo.StandardElementMapping); driver.addElementMapping(org.apache.fop.svg.SVGElementMapping); driver.addPropertyList(org.apache.fop.fo.StandardPropertyListMapping); driver.addPropertyList(org.apache.fop.svg.SVGPropertyListMapping); driver.setOutputStream(new BufferedOutputStream(baos)); driver.buildFOTree(xmlReader, new InputSource(formReader)); driver.format(); driver.render(); Any help would be appreciated. Scott Mitchell Experienced Software Developer Liberty Information Technology Direct Line: ++44 (0) 28 9044 5582 Clarendon House Fax: ++44 (0) 28 9044 5511 9-21 Adelaide StreetSwitchboard: ++44 (0) 28 9044 5500 Belfast, Northern Ireland BT2 8DJ Email: [EMAIL PROTECTED] Disclaimer: The contents of this e-mail and attached files in no way reflect any policies of Liberty Information Technology Ltd. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: How can i optimize memory consumtion?
Try breaking your document into multiple page-sequences. Luigi Savini wrote: I need to produce a very large PDF document (about 1300 pages!), no images, just plain text. I set JVM memory parameters (Xms and Xmx) but i can't process this document anyway. Did anyone try to modify sources writing pages to the output stream immediatly instead of buffering them into memory? Luigi_ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: AW: FOP-XSL:dynamic external graphics
My problem is that I need to change the filepath between environments. (NT and Unix). In all of my Java/JSP code I use an environment-level (Weblogic domain-level) properties file for any values that must change from across environments and which I haven't figured out a way to get by with something relative (IE - absolute URL prefix for HTTPS redirects, absolute filepath to the XSLT stylesheets, etc.). The problem is I have no idea how to get Xalan to read properties from this file, or in any way be aware of it's own context. So I manually change the image source path everytime I upload a build to the Unix box. Not a big deal for me right now since I only have one image in all of my reports. But I imagine it could be a pain if you had a lot more. -Matt Beer, Christian wrote: Hello!! Well, try this one: fo:external-graphic src={$filepathValue} / { and } are kind of escape-chars, that tell xalan to process their content. You can also do this, I think, if you only need the filename one time. fo:external-graphic src={concat('file:../default/tra-app/images/',client/id,'logo.gif')} / Greetz Christian -Ursprüngliche Nachricht- Von: Rachael Blank [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 4. Januar 2002 18:46 An: [EMAIL PROTECTED] Betreff: FOP-XSL:dynamic external graphics Hello and thanks in advance for your help! Is there a way I can dynamically display images based on an xml tag that I am given? I receive the following xml: client id/id ... /client I currently have the following uri specification and it works: fo:external-graphic src=file:../default/tra-app/images/chclogo.gif/ I need the image name (chclogo.gif) to change depending on the clientida number/id/client that I receive in the xml. I thought something like this would work: fo:table-cell fo:block white-space-collapse=true xsl:variable name=filepathValue select=concat('file:../default/tra-app/images/',client/id,'logo.gif') / fo:external-graphic src=$filepathValue / xsl:value-of select=$filepathValue /!--Error checking-- /fo:block /fo:table-cell I am receiving the following error with the above code: Error while creating area : Invalid Image URL - error on relative URL : java.lang.NullPointerException I am sure that I have the correct path (because the $filepathValue displays correctly on the screen via my value-of select statement), but I am thinking it is not possible to pass a variable into the src element of the fo:external-graphic statement. I also made sure this image is correctly named and in the appropriate directory. Any thoughts or alternatives, anyone? Thanks! Rachael Can I - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: How can i optimize memory consumtion?
Does it really work ? I have tried with my own documents, but it seems the memory usage still depends on the total page number. Maybe I use something that bugs memory. I would be glad to hear if it works for you, Luigi. Cyril At 06:52 07/01/2002 -0800, you wrote: Try breaking your document into multiple page-sequences. Luigi Savini wrote: I need to produce a very large PDF document (about 1300 pages!), no images, just plain text. I set JVM memory parameters (Xms and Xmx) but i can't process this document anyway. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: AW: FOP-XSL:dynamic external graphics
Try using xsl:param e.g. xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xsl:output ... xsl:param name=filepathValue/ ... fo:external-graphic src={concat($filepathValue,'anImage.gif')} / Then in your code to do the transform, use ( for TRAX) transformer.setParameter(filepathValue, the path read from properties file) ; transformer.transform(src,dest); Mark Mark Reeves Senior Software Engineer CSU Ltd 0161 277 5240 -Original Message- From: Matt Savino [mailto:[EMAIL PROTECTED]] Sent: 07 January 2002 15:02 To: [EMAIL PROTECTED] Subject: Re: AW: FOP-XSL:dynamic external graphics My problem is that I need to change the filepath between environments. (NT and Unix). In all of my Java/JSP code I use an environment-level (Weblogic domain-level) properties file for any values that must change from across environments and which I haven't figured out a way to get by with something relative (IE - absolute URL prefix for HTTPS redirects, absolute filepath to the XSLT stylesheets, etc.). The problem is I have no idea how to get Xalan to read properties from this file, or in any way be aware of it's own context. So I manually change the image source path everytime I upload a build to the Unix box. Not a big deal for me right now since I only have one image in all of my reports. But I imagine it could be a pain if you had a lot more. -Matt Beer, Christian wrote: Hello!! Well, try this one: fo:external-graphic src={$filepathValue} / { and } are kind of escape-chars, that tell xalan to process their content. You can also do this, I think, if you only need the filename one time. fo:external-graphic src={concat('file:../default/tra-app/images/',client/id,'logo.gif')} / Greetz Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 5718] New: - internal linking between separate page-sequences
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5718. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5718 internal linking between separate page-sequences Summary: internal linking between separate page-sequences Product: Fop Version: all Platform: PC OS/Version: Windows 9x Status: NEW Severity: Major Priority: Other Component: general AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] i'm trying to output a PDF using a style sheet with a single master page and a number of page-sequences (i'm using numerous page sequences because i want to display different information in the page footer depending upon the section). i also want to include a toc on the first page-sequence set which will link to a block WITHIN the relevant page-sequence. however when i try to convert this it complains that The id 'bestandmarsh' already exists in this document. Its fine if i want to link within a page- sequence but seems to get confused with links between page-sequences. Included is a simplified version of the fop input file. any help much appreciated... [this seems to be a similar (but more general) bug to 1231] ?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=A4 fo:region-body margin-bottom=20mm/ fo:region-after extent=20mm/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence country=uk language=en initial-page-number=1 master-name=A4 fo:static-content flow-name=xsl-region-after fo:blockSomething/fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:block fo:basic-link internal-destination=bestandmarshLink: Key Questions/fo:basic-link /fo:block /fo:flow /fo:page-sequence fo:page-sequence country=uk language=en master-name=A4 fo:static-content flow-name=xsl-region-after fo:blockSomething else/fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:block id=bestandmarshDestination: Key Questions/fo:block /fo:flow /fo:page-sequence /fo:root the message i get is: C:\Java\Fop-0.20.1java -cp build\fop.jar;lib\batik.jar;lib\xalan-2.0.0.jar;lib\ xerces-1.2.3.jar;lib\jimi-1.0.jar org.apache.fop.apps.Fop -fo ..\Working\Out\Out .xml -pdf ..\Working\Pdf\Out.pdf FOP 0.20.1 using SAX parser org.apache.xerces.parsers.SAXParser building formatting object tree setting up fonts [1] [2ERROR: The id bestandmarsh already exists in this document Thanks Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Sorry that I am asking here. (Join two XML files /parent-child/)
Look at June/July XML magazine -Original Message- From: IvanLatysh [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 8:56 AM To: [EMAIL PROTECTED] Subject: Sorry that I am asking here. (Join two XML files /parent-child/) If I have 2 xml file, and I need to join this files. [first] ?xml version=1.0 encoding=UTF-8? root record identity1/identity nameJon/name /record /root [end of first] [second] ?xml version=1.0 encoding=UTF-8? root record parent1/parent childrenAlex/children childrenPeter/children /record /root [and of second] And now I need to join this files where parent = identity And output should be like this: ?xml version=1.0 encoding=UTF-8? root record identity1/identity nameJon/name childrenAlex/children childrenPeter/children /record /root Which way I could do this ? Sincerely yours, Ivan Latysh. [EMAIL PROTECTED] http://ivan.yourmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Write pdf file to disk
Thanks Louis. I actually did this after a few hours of messing round with it. Thanks anyway, Scott. -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 1:08 PM To: [EMAIL PROTECTED] Subject: Re: Write pdf file to disk Scott: Try this: OutputStream stream = new BufferedOutputStream(new FileOutputStream(filePathHere)); driver.setOutputStream(stream); we use a simple random file name generated from: int rndNumber = Math.abs(new Random().nextInt()); randFileName=String.valueOf(rndNumber); OK? Is this what you were asking? -Lou Inexperienced Software Architect Mitchell, Scott(LIT) [EMAIL PROTECTED] on 01/07/2002 07:06:21 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Write pdf file to disk Hi, I have code that creates a pdf file using fop. The problem I am seeing is that I do not know how to define where the pdf file is stored (or indeed, what it should be called). The code I have is shown below... // Transform from fop to pdf XMLReader xmlReader = new SAXParser(); Driver driver = new Driver(); driver.setRenderer(new org.apache.fop.render.pdf.PDFRenderer ()); driver.addElementMapping(org.apache.fop.fo.StandardElementMapping); driver.addElementMapping(org.apache.fop.svg.SVGElementMapping); driver.addPropertyList(org.apache.fop.fo.StandardPropertyListMapping); driver.addPropertyList(org.apache.fop.svg.SVGPropertyListMapping); driver.setOutputStream(new BufferedOutputStream(baos)); driver.buildFOTree(xmlReader, new InputSource(formReader)); driver.format(); driver.render(); Any help would be appreciated. Scott Mitchell Experienced Software Developer Liberty Information Technology Direct Line: ++44 (0) 28 9044 5582 Clarendon House Fax: ++44 (0) 28 9044 5511 9-21 Adelaide StreetSwitchboard: ++44 (0) 28 9044 5500 Belfast, Northern Ireland BT2 8DJ Email: [EMAIL PROTECTED] Disclaimer: The contents of this e-mail and attached files in no way reflect any policies of Liberty Information Technology Ltd. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Page numbering, FOP version
Hey John. Try this in the beginning of your xsl: fo:block fo:page-number//fo:page-number-citation ref-id=endofdoc/ /fo:block And this somewhere close to the end. fo:block id=endofdoc/fo:block Claus Nielsen Denmark Dunning, JohnTo: '[EMAIL PROTECTED]' [EMAIL PROTECTED] JDunning@goSP cc: S.com Subject: Page numbering, FOP version 07-01-2002 17:46 Please respond to fop-dev I'm sorry if this topic has been addressed before, but I couldn't find it in the archives -- can FOP render page numbers as page 1/(n[total number of pages])? Also, the index page at xml.apache.org/fop states The latest version of Fop is 0.20.2 and it supports the xsl:fo XSL-FO Version 1.0 W3C Recommendation (with a link to XSL1.0), but the distribution directory lists the download as Fop-0.20.2RC with a date of 29-Sep-2001 (which, when I downloaded it in September, still used the CR syntax). Has this file been updated to use the Rec syntax, or is that available from CVS, or is this a typo? Thanks in advance, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Page numbering, FOP version
You can do the page 1/(total nb of pages) using some last block reference. I mean you can generate a block with a special id, like my-very-last-paragraph within the last page. then, you can use a page-number-citation that refers to your my-very-last-paragraph block. as for the last FOP dist, I have the very same question you ask ... where is the last REC dist ? Hope that helps Cyril At 11:46 07/01/2002 -0500, you wrote: I'm sorry if this topic has been addressed before, but I couldn't find it in the archives -- can FOP render page numbers as page 1/(n[total number of pages])? Also, the index page at xml.apache.org/fop states The latest version of Fop is 0.20.2 and it supports the xsl:fo XSL-FO Version 1.0 W3C Recommendation (with a link to XSL1.0), but the distribution directory lists the download as Fop-0.20.2RC with a date of 29-Sep-2001 (which, when I downloaded it in September, still used the CR syntax). Has this file been updated to use the Rec syntax, or is that available from CVS, or is this a typo? Thanks in advance, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[PATCH] fix for looping table bug (maintenance branch)
Hi, this patch should fix infinite looping on tables if keep_with or row spans are not fitting on a page. This hack just ignores all keeps for a table after the first page-break (sounds really simple :-) It would be better to check if the table starts already on top of the page but I found no simple way to do this (table-header etc..) Christian P.S. I would like to finish the text-decoration patch before the release but if I don't manage it till tomorrow we should do the release anyway... diff -ur xml-fop/src/org/apache/fop/fo/flow/RowSpanMgr.java xml-fop-tab-final/src/org/apache/fop/fo/flow/RowSpanMgr.java --- xml-fop/src/org/apache/fop/fo/flow/RowSpanMgr.java Mon Jul 30 22:29:23 2001 +++ xml-fop-tab-final/src/org/apache/fop/fo/flow/RowSpanMgr.javaMon Jan 7 +02:36:54 2002 @@ -52,6 +52,8 @@ private SpanInfo spanInfo[]; +private boolean ignoreKeeps = false; + public RowSpanMgr(int numCols) { this.spanInfo = new SpanInfo[numCols]; } @@ -123,6 +125,24 @@ return spanInfo[colNum - 1].isInLastRow(); } else return false; +} + +/** + * helper method to prevent infinite loops if + * keeps or spans are not fitting on a page + * @param codetrue/code if keeps and spans should be ignored + */ +public void setIgnoreKeeps(boolean ignoreKeeps) { +this.ignoreKeeps = ignoreKeeps; +} + +/** + * helper method (i.e. hack ;-) to prevent infinite loops if + * keeps or spans are not fitting on a page + * @return true if keeps or spans should be ignored + */ +public boolean ignoreKeeps() { +return ignoreKeeps; } } diff -ur xml-fop/src/org/apache/fop/fo/flow/TableBody.java xml-fop-tab-final/src/org/apache/fop/fo/flow/TableBody.java --- xml-fop/src/org/apache/fop/fo/flow/TableBody.java Mon Aug 6 11:12:59 2001 +++ xml-fop-tab-final/src/org/apache/fop/fo/flow/TableBody.java Mon Jan 7 04:11:51 +2002 @@ -186,8 +186,9 @@ } return status; } -if (keepWith.size() - 0) {// status.getCode() == Status.AREA_FULL_NONE +if ((keepWith.size() 0) + (!rowSpanMgr.ignoreKeeps())) { +// status.getCode() == Status.AREA_FULL_NONE // FIXME!!! Handle rows spans!!! row.removeLayout(areaContainer); for (Enumeration e = keepWith.elements(); @@ -198,6 +199,10 @@ } if (i == 0) { resetMarker(); + +// Fix for infinite loop bug if keeps are too big for page +rowSpanMgr.setIgnoreKeeps(true); + return new Status(Status.AREA_FULL_NONE); } } @@ -212,6 +217,10 @@ area.increaseHeight(areaContainer.getHeight()); area.setAbsoluteHeight(areaContainer.getAbsoluteHeight()); } + +// Fix for infinite loop bug if spanned rows are too big for page +rowSpanMgr.setIgnoreKeeps(true); + return status; } else if (status.getCode() == Status.KEEP_WITH_NEXT || rowSpanMgr.hasUnfinishedSpans()) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: AW: FOP-XSL:dynamic external graphics
Thanks a lot, that did the trick. I knew there was a way to use global parameters, but hadn't had time to look into it. Nothing speeds development like cutting and pasting from an email straight into your code and having it work the first time! -Matt -Original Message- From: Mark Reeves [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 7:19 AM To: [EMAIL PROTECTED] Subject: RE: AW: FOP-XSL:dynamic external graphics Try using xsl:param e.g. xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xsl:output ... xsl:param name=filepathValue/ ... fo:external-graphic src={concat($filepathValue,'anImage.gif')} / Then in your code to do the transform, use ( for TRAX) transformer.setParameter(filepathValue, the path read from properties file) ; transformer.transform(src,dest); Mark Mark Reeves Senior Software Engineer CSU Ltd 0161 277 5240 -Original Message- From: Matt Savino [mailto:[EMAIL PROTECTED]] Sent: 07 January 2002 15:02 To: [EMAIL PROTECTED] Subject: Re: AW: FOP-XSL:dynamic external graphics My problem is that I need to change the filepath between environments. (NT and Unix). In all of my Java/JSP code I use an environment-level (Weblogic domain-level) properties file for any values that must change from across environments and which I haven't figured out a way to get by with something relative (IE - absolute URL prefix for HTTPS redirects, absolute filepath to the XSLT stylesheets, etc.). The problem is I have no idea how to get Xalan to read properties from this file, or in any way be aware of it's own context. So I manually change the image source path everytime I upload a build to the Unix box. Not a big deal for me right now since I only have one image in all of my reports. But I imagine it could be a pain if you had a lot more. -Matt Beer, Christian wrote: Hello!! Well, try this one: fo:external-graphic src={$filepathValue} / { and } are kind of escape-chars, that tell xalan to process their content. You can also do this, I think, if you only need the filename one time. fo:external-graphic src={concat('file:../default/tra-app/images/',client/id,'logo .gif')} / Greetz Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: How can i optimize memory consumtion?
I had the same problem. I was able to break the document into 1 page long page-sequences and have been able to produce a 1700+ page document that included images with less then 256MB or RAM. -Mike -Original Message- From: Cyril Rognon [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 7:17 AM To: [EMAIL PROTECTED] Subject: Re: How can i optimize memory consumtion? Does it really work ? I have tried with my own documents, but it seems the memory usage still depends on the total page number. Maybe I use something that bugs memory. I would be glad to hear if it works for you, Luigi. Cyril At 06:52 07/01/2002 -0800, you wrote: Try breaking your document into multiple page-sequences. Luigi Savini wrote: I need to produce a very large PDF document (about 1300 pages!), no images, just plain text. I set JVM memory parameters (Xms and Xmx) but i can't process this document anyway. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
How to process wide tables
I've figured out how to repeat certain table data on top of each page for tall tables (more rows than can fit on a page) but now I'm struggling with wide tables (more columns than can fit on a page). For example, let's say the page can fit 4 columns across and 5 rows down. My xml data has 12 columns and 20 rows. This should result in 15 pages - 3 pages across for every 5 rows down. Can anyone help me get jumpstarted? Ultimately I won't know ahead of time how many columns the data contains and would need to drive the process based on the count of columns and how many can fit across a page. TIA, Larry Mason
DO NOT REPLY [Bug 5727] New: - Rendering crashes on 1st run
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5727. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5727 Rendering crashes on 1st run Summary: Rendering crashes on 1st run Product: Fop Version: all Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: pdf renderer AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have written a java class that contains the following snippet to generate PDFs Starter starter = options.getStarter(); driver.setRenderer(Driver.RENDER_PDF); driver.getRenderer().setOptions(options.getRendererOptions()); driver.run(); This snippet is called from another class which generates PDFs in groups of 3. However on most occasions, the 1st PDF creation fails. So only 2 PDFs are created. 1. Shuffling the order of creation does not solve the problem, so the problem is not specific to a particular file. 2. Creating more PDFs doesnt change the problem, only the first one fails. 3. The first PDF creation does not always fail though. It only fails about half the times. I suspect the problem may be related to multiple instances of the driver running at the same time since I dont reuse the same driver but create new ones each time. Any ideas? Thanks, Hrishi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]