Re: Java Result: 2 Why?
David wrote: Dear members, I am getting problmes when getting generating the PDF file from using FOP. I am using DocBook, vía Ant: More detective work seems needed. Have you tried to create the absolutely most minimal Docbook document possible, to see if the error still occurs? This would help determine if the problem is in the text (in which case, you can slowly zoom in on the problematic XML by adding more of your original text in) or your Docbook setup. Also, I think there is a fop.extensions parameter[1] that needs to be set for Docbook when you are using our processor. The Docbook-Apps mailing list may be able to help you more on this topic, unless someone else here also knows. Glen [1] http://www.sagehill.net/docbookxsl/InstallingAnFO.html#InstallFop - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Result: 2 Why?
(Comments inline...) On 04.05.2006 13:48:05 David wrote: > Dear members, > > I am getting problmes when getting generating the PDF file from using FOP. > I am using DocBook, vía Ant: > > >dir="${doc.ref.src.dir}" >> > > > > > > > > > > > > > > > > > > Add this to get more error info: > > > > > The temporal file generation is done, but after that I get the following > error: > > Buildfile: P:\LRA\build.xml > check-build-doc: > doc2pdf: > [echo] INFO(lra): Generating intermediate file... > [docbook] Making portrait pages on A4 paper (210mmx297mm) > [echo] INFO(lra): Generating pdf file... > [docbook] [INFO] Using com.icl.saxon.aelfred.SAXDriver as SAX2 Parser > [docbook] [INFO] FOP 0.20.5 > [docbook] [INFO] Using com.icl.saxon.aelfred.SAXDriver as SAX2 Parser > [docbook] [INFO] building formatting object tree > [docbook] [INFO] setting up fonts > [docbook] [INFO] [1] > [docbook] [INFO] [2] > [docbook] [INFO] [1] > [docbook] [INFO] [2] > [docbook] [INFO] Parsing of document complete, stopping renderer > [docbook] [ERROR] null > [docbook] Java Result: 2 > BUILD SUCCESSFUL > Total time: 5 seconds > > so, the PDF file is not generated. > >I am trying to get more information about the error, but I have no > find the way. I have added, the line on my log4j.properties file, > withut success: > > org.apache.fop.apps.Fop = DEBUG That doesn't work because you're calling FOP's command-line in which case Ant simply captures the console output from FOP and redirects it to it own logger. BTW, there's a Fop Ant Task: http://xmlgraphics.apache.org/fop/0.20.5/anttask.html > so, I don't know what is going on, at the begining I thught it is a > problem with some docbook syntax, but it doesn't because for example if > I change the name of the URL on the element then it fails, so > it should be something extrange, but I don't know. > > I am using the docbook library from: > > http://static.springframework.org/spring/files/docbook-reference-libs.zip > > Thanks, in advance for any inputs, > > David Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Result: 2 Why?
Dear Glen Mazza and others,Glen Mazza <[EMAIL PROTECTED]> wrote:>More detective work seems needed. Have you tried to create the absolutely most minimal Docbook document possible, to see if the error still occurs? This would help determine if the problem is in the text (in which case, you can slowly zoom in on the problematic XML by adding more of your original text in) or your Docbook setup. I did that, it is not my first docbook, more precisly I have problems with only one chapter of my document. The problem doesn't comes with the docbook syntax, because when I have isolated the paragraph, I was surpised that simply changing a particular URL it get the error. I suspect that it is a problem about fitting into page the text and not a particular docbook syntax. If you want I can sent you the original document, if we find the problem then I will write into the mailing list the result of our investigation, :-) I get perfectly the HTML document, my problem comes with the PDF document. I have tried to convert the HTML document into PDF using Adobe Acrobat Professional and it works.>Also, I think there is a fop.extensions parameter[1] that needs to be set for Docbook when you are using our processor. The Docbook-Apps mailing list may be able to help you more on this topic, unless someone else here also knows. on Docbook there is a clear message for preventing posting messages related with style and other companions tools like this. On my case, I guess there is no a docbook question, because I can generates the HTML file. Thanks, David Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
Re: Java Result: 2 Why?
Jeremias Maerki, Concerning to the ant task I am directly invoking java, do you think gain something invoking it via ant? Greate, the -d option gives a little more details, thanks, but no so much from the user point of view. I get the following output: Buildfile: P:\LRA\build.xml check-build-doc: doc2pdf: [echo] INFO(lra): Generating intermediate file... [docbook] Making portrait pages on A4 paper (210mmx297mm) [echo] INFO(lra): Generating pdf file... [docbook] [DEBUG] Input mode: [docbook] [DEBUG] FO [docbook] [DEBUG] fo input file: P:\LRA\build\doc\pdf\docbook_fop.tmp [docbook] [DEBUG] Output mode: [docbook] [DEBUG] pdf [docbook] [DEBUG] output file: P:\LRA\build\doc\pdf\lra.pdf [docbook] [DEBUG] OPTIONS [docbook] [DEBUG] no user configuration file is used [default] [docbook] [DEBUG] debug mode on [docbook] [DEBUG] dump configuration [docbook] [DEBUG] quiet mode on [docbook] [INFO] Using com.icl.saxon.aelfred.SAXDriver as SAX2 Parser [docbook] [INFO] base directory: file:/P:/LRA/build/doc/pdf/ [docbook] [INFO] FOP 0.20.5 [docbook] [INFO] Using com.icl.saxon.aelfred.SAXDriver as SAX2 Parser [docbook] [INFO] building formatting object tree [docbook] [INFO] setting up fonts [docbook] [INFO] [1] [docbook] [DEBUG] Last page-sequence produced 1 pages. [docbook] [INFO] [2] [docbook] [INFO] [3] [docbook] [DEBUG] Last page-sequence produced 2 pages. [docbook] [INFO] [4] (blank) [docbook] [INFO] [1] [docbook] [INFO] [2] [docbook] [INFO] [3] [docbook] [DEBUG] Last page-sequence produced 3 pages. [docbook] [INFO] [4] [docbook] [INFO] [5] [docbook] [INFO] [6] [docbook] [INFO] [7] [docbook] [INFO] [8] [docbook] [INFO] [9] [docbook] [INFO] [10] [docbook] [INFO] [11] [docbook] [INFO] [12] [docbook] [INFO] [13] [docbook] [DEBUG] Last page-sequence produced 10 pages. [docbook] [INFO] [14] [docbook] [INFO] [15] [docbook] [INFO] [16] [docbook] [DEBUG] Last page-sequence produced 3 pages. [docbook] [INFO] [17] [docbook] [INFO] [18] [docbook] [INFO] [19] [docbook] [WARNING] table-layout=auto is not supported, using fixed! [docbook] [INFO] [20] [docbook] [INFO] [21] [docbook] [DEBUG] Last page-sequence produced 5 pages. [docbook] [INFO] [22] [docbook] [INFO] [23] [docbook] [INFO] Parsing of document complete, stopping renderer [docbook] [DEBUG] Initial heap size: 747Kb [docbook] [DEBUG] Current heap size: 9181Kb [docbook] [DEBUG] Total memory used: 8434Kb [docbook] [DEBUG] Memory use is indicative; no GC was performed [docbook] [DEBUG] These figures should not be used comparatively [docbook] [DEBUG] Total time used: 2422ms [docbook] [DEBUG] Pages rendered: 26 [docbook] [DEBUG] Avg render time: 93ms/page [docbook] [ERROR] null [docbook] org.apache.fop.apps.FOPException [docbook] at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:111) [docbook] at org.apache.fop.apps.Fop.main(Fop.java:62) [docbook] - [docbook] java.lang.NullPointerException [docbook] at org.apache.fop.layout.LineArea.addText(LineArea.java:855) [docbook] at org.apache.fop.fo.FOText.addRealText(FOText.java:278) [docbook] at org.apache.fop.fo.FOText.addText(FOText.java:252) [docbook] at org.apache.fop.fo.FOText.layout(FOText.java:161) [docbook] at org.apache.fop.fo.FObjMixed.layout(FObjMixed.java:139) [docbook] at org.apache.fop.fo.flow.ListItemBody.layout(ListItemBody.java:118) [docbook] at org.apache.fop.fo.flow.ListItem.layout(ListItem.java:203) [docbook] at org.apache.fop.fo.flow.ListBlock.layout(ListBlock.java:201) [docbook] at org.apache.fop.fo.flow.Block.layout(Block.java:257) [docbook] at org.apache.fop.fo.flow.Block.layout(Block.java:257) [docbook] at org.apache.fop.fo.flow.Block.layout(Block.java:257) [docbook] at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154) [docbook] at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110) [docbook] at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:400) [docbook] at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338) [docbook] at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262) [docbook] at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223) [docbook] at com.icl.saxon.aelfred.SAXDriver.endElement(SAXDriver.java:792) [docbook] at com.icl.saxon.aelfred.XmlParser.parseETag(XmlParser.java:1133) [docbook] at com.icl.saxon.aelfred.XmlParser.parseContent(XmlParser.java:1217) [docbook] at com.icl.saxon.aelfred.XmlParser.parseElement(XmlParser.java:1037) [docbook] at com.icl.saxon.aelfred.XmlParser.parseContent(XmlParser.java:1222) [docbook] at com.icl.saxon.aelfred.XmlParser.parseElement(XmlParser.java:1037) [docbook] at com.icl.saxon.aelfred.XmlParser.parseDocument(XmlParser.java:510) [docbook] at com.icl.saxon.aelfred.XmlParser.doParse(XmlParser.java:163) [docbook] at com.icl.saxon.aelfred.SAXDriver.parse(SAXDriver.java:320) [docbook] at org.apache.fop.apps.Driver.render(Driver
Re: Java Result: 2 Why?
On 05.05.2006 14:17:26 David wrote: > Jeremias Maerki, > > Concerning to the ant task I am directly invoking java, do you think gain > something invoking it via ant? The ability to set the log level and Ant not having to spawn another JVM to process the file. > Greate, the -d option gives a little more details, thanks, but no so much > from the user point of view. I get the following output: Yes, but I can give you a tip where to go looking. > Buildfile: P:\LRA\build.xml > check-build-doc: > doc2pdf: > [echo] INFO(lra): Generating intermediate file... > [docbook] Making portrait pages on A4 paper (210mmx297mm) > [echo] INFO(lra): Generating pdf file... > [docbook] [DEBUG] Input mode: > [docbook] [INFO] [23] > [docbook] [INFO] Parsing of document complete, stopping renderer > [docbook] [DEBUG] Initial heap size: 747Kb > [docbook] [DEBUG] Current heap size: 9181Kb > [docbook] [DEBUG] Total memory used: 8434Kb > [docbook] [DEBUG] Memory use is indicative; no GC was performed > [docbook] [DEBUG] These figures should not be used comparatively > [docbook] [DEBUG] Total time used: 2422ms > [docbook] [DEBUG] Pages rendered: 26 > [docbook] [DEBUG] Avg render time: 93ms/page > [docbook] [ERROR] null > [docbook] org.apache.fop.apps.FOPException > [docbook] at > org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:111) > [docbook] at org.apache.fop.apps.Fop.main(Fop.java:62) > [docbook] - > [docbook] java.lang.NullPointerException > [docbook] at org.apache.fop.layout.LineArea.addText(LineArea.java:855) > [docbook] at org.apache.fop.fo.FOText.addRealText(FOText.java:278) > [docbook] at org.apache.fop.fo.FOText.addText(FOText.java:252) > [docbook] at org.apache.fop.fo.FOText.layout(FOText.java:161) > [docbook] at org.apache.fop.fo.FObjMixed.layout(FObjMixed.java:139) > [docbook] at > org.apache.fop.fo.flow.ListItemBody.layout(ListItemBody.java:118) Must be something about text inside a list-item-body. The line number in LineArea.java indicates that there may be something wrong with hyphenation. You could try to switch off hyphenation to see if there's any difference. > [docbook] Java Result: 2 > BUILD SUCCESSFUL > Total time: 9 seconds > > so, if you look into generated output, it seems I get a > NullPointerException during the line area computation, like I guess it > is a problem with the area but not with any particular docbook syntax. Right. > Please let me know if you have any suggestion, I'd say this is a bug in FOP 0.20.5. But since we don't do any bugfixing anymore on this version, you might want to consider upgrading to the latest release, 0.92beta. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Result: 2 Why?
Dear Jeremias Maerki, Thanks, for your interesest again, I am following your recomendation with the following results: >Must be something about text inside a list-item-body. The line number inLineArea.java indicates that there may be something wrong withhyphenation. You could try to switch off hyphenation to see if there'sany difference. I guess it too, it is a problem about the the text length, because it ocurres at variables possition on the original text. About to swith hyphenation please clarify again my ignorance, :-), because I have no idea about how to swith off this. I thought to add some attribute in the node definition but I have no found such attribute. I use the following definition: Trying with your second suggestion: >I'd say this is a bug in FOP 0.20.5. But since we don't do any bugfixinganymore on this version, you might want to consider upgrading to thelatest release, 0.92beta. I have downloaded it, but now I get another error: Buildfile: P:\LRA\build.xml check-build-doc: doc2pdf: [echo] INFO(lra): Generating intermediate file... [docbook] Making portrait pages on A4 paper (210mmx297mm) [echo] INFO(lra): Generating pdf file... [fop] P:\LRA\build\doc\pdf\docbook_fop.tmp -> P:\LRA\build\doc\pdf\lra.pdf BUILD FAILED P:\LRA\build.xml:976: javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: file:///P:/LRA/build/doc/pdf/docbook_fop.tmp:1:23534: Error(1/23534): No element mapping definition found for fox:outline Total time: 7 seconds What I did was to just put on the classpath the *.jar on the FOP beta distribution, but still using the *.xsl files from: http://static.springframework.org/spring/files/docbook-reference-libs.zip that use DocBook 4.2 version. so before generating the PDF file I produce a temporary file with the following command: > basedir="${build.doc.ref.pdf.dir}" fofile="${build.doc.ref.pdf.dir}/docbook_fop.tmp" messagelevel="verbose" outfile="${build.doc.ref.pdf.dir}/${name}.pdf" /> Please let me know any suggestion, David Get amazing travel prices for air and hotel in one click on Yahoo! FareChase
Re: Java Result: 2 Why?
On 08.05.2006 12:02:26 David wrote: > Dear Jeremias Maerki, > > Thanks, for your interesest again, I am following your recomendation with > the following results: > > >Must be something about text inside a list-item-body. The line number in > LineArea.java indicates that there may be something wrong with > hyphenation. You could try to switch off hyphenation to see if there's > any difference. > > I guess it too, it is a problem about the the text length, because it > ocurres at variables possition on the original text. > > About to swith hyphenation please clarify again my ignorance, :-), because > I have no idea about how to swith off this. In XSL-FO you say hyphenate="false". You'll have to find out yourself what the equivalent is in DocBook. > I thought to add some attribute in the node definition but I have no > found such attribute. I use the following definition: > > > > Trying with your second suggestion: > > >I'd say this is a bug in FOP 0.20.5. But since we don't do any bugfixing > anymore on this version, you might want to consider upgrading to the > latest release, 0.92beta. > > I have downloaded it, but now I get another error: > > Buildfile: P:\LRA\build.xml > check-build-doc: > doc2pdf: > [echo] INFO(lra): Generating intermediate file... > [docbook] Making portrait pages on A4 paper (210mmx297mm) > [echo] INFO(lra): Generating pdf file... > [fop] P:\LRA\build\doc\pdf\docbook_fop.tmp -> P:\LRA\build\doc\pdf\lra.pdf > BUILD FAILED > P:\LRA\build.xml:976: javax.xml.transform.TransformerException: > org.apache.fop.apps.FOPException: > file:///P:/LRA/build/doc/pdf/docbook_fop.tmp:1:23534: Error(1/23534): No > element mapping definition found for fox:outline fox:outline is not supported by FOP 0.92beta. You have to tell DocBook to use the XSL 1.1 bookmark elements instead and you may need to get the latest DocBook version. The DocBook cracks on this list (or on the DocBook list) may be able to help you here with more current information. > Total time: 7 seconds > > What I did was to just put on the classpath the *.jar on the FOP beta > distribution, but still using the *.xsl files from: > > http://static.springframework.org/spring/files/docbook-reference-libs.zip > > that use DocBook 4.2 version. > > so before generating the PDF file I produce a temporary file with the > following command: > > >dir="${doc.ref.src.dir}" >> > > > > > > > > > > > > > > > > > > > basedir="${build.doc.ref.pdf.dir}" >fofile="${build.doc.ref.pdf.dir}/docbook_fop.tmp" >messagelevel="verbose" > outfile="${build.doc.ref.pdf.dir}/${name}.pdf" /> > > > Please let me know any suggestion, > > David Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Result: 2 Why?
Jeremias Maerki <[EMAIL PROTECTED]> wrote:>In XSL-FO you say hyphenate="false". You'll have to find out yourselfwhat the equivalent is in DocBook. I have found something similar on the web for docbook, I should have to add the following line: on the fop.xsl file. the bad new is that the problem persists, :-)>fox:outline is not supported by FOP 0.92beta. You have to tell DocBookto use the XSL 1.1 bookmark elements instead and you may need to get thelatest DocBook version. The DocBook cracks on this list (or on theDocBook list) may be able to help you here with more current information. Ok, thanks, so that would be more difficult because I am using the Hibernate template (Another Open Source Project), so I have no much idea about the style detail used. Thanks, David New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.