Re: FOP from TRUNK: Hyphenation LineBreak-Problem???
On Thursday 11 January 2007 14:00, malm wrote: leeloo5e79-docbook wrote: snip/ It could be that the new UAX#14 line breaking introduced after 0.93 in late December is causing this. Can you please provide a full working testcase fo exhibiting the problem (if possible attached please not inlined with the message). Thanks Don't worry to send something else. The problem is caused by some interaction between the new UAX#14 linebreaking and hyphenation when explicit hyphens like in 'IT-System' are involved. I am looking at a fix. BTW, looks like the German hyphenation pattern have some issues. To hyphenate 'Betriebsablauf' as 'Betrie-bsablauf' appears to be a bit unconventional. Manuel Manuel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Line-Height Problem with footnotes in FOP 0.93
I've got some Problems generating PDFs from FOs with footnotes. The line-height between the line containing the footnote and the line before is a bit to high in contrast to the other line-heights. The error doesn't appear if I process the same FO with FOP 0.20.5. The problematic code: Ressource genutzt werden können.fo:footnotefo:inlinefo:inline font-size=75% font-weight=normal fo nt-style=normal baseline-shift=super1/fo:inline/fo:inlinefo:footnote-body font-family=serif,Symbol,ZapfDingbats font-size=8pt font-weight=normal font-style=normal text-align=justify start-indent=0pt text-indent=0ptfo:block fo:inline font-size=75% font-weight=normal font-style=normal baseline-shift=super1/fo:inlineVgl. Pfister (1998), S. 72/fo:block/fo:footnote-body/fo:footnote Über ein -- View this message in context: http://www.nabble.com/Line-Height-Problem-with-footnotes-in-FOP-0.93-tf2957669.html#a8273999 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Line-Height Problem with footnotes in FOP 0.93
malm wrote: Try setting line-stacking-strategy=font-height on the fo:block containing the footnote. Thanks, I customized my docbook stylesheet to add this to all blocks and everything is fine (because I don't know how to set it only to the affected block, but that doesn't matter in my case). Andrea -- View this message in context: http://www.nabble.com/Line-Height-Problem-with-footnotes-in-FOP-0.93-tf2957669.html#a8275517 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP from TRUNK: Hyphenation LineBreak-Problem???
Hi Manuel, thanks for the fast fix. I update my fop-trunk-folder and tried to build fop with ant again. While building fop ant displays following message: apache-ant-1.6.5/bin/ant: line 80: uname: command not found Now trying to generate a pdf with FOP FOP just display this lines: ./FOP_TRUNK/fop: line 79: uname: command not found ./FOP_TRUNK/fop: line 91: basename: command not found ./FOP_TRUNK/fop: line 104: dirname: command not found Exception in thread main java.lang.NoClassDefFoundError: org/apache/fop/cli/Main Did I something wrong because I tried to build FOP again with ANT??? Or is it just another mistake?? Best Regards, Leeloo PS: Yes, it's right Betrie-bsablauf is not separated correctly. Manuel Mall [EMAIL PROTECTED] schrieb: On Thursday 11 January 2007 17:55, Manuel Mall wrote: On Thursday 11 January 2007 14:00, malm wrote: leeloo5e79-docbook wrote: It could be that the new UAX#14 line breaking introduced after 0.93 in late December is causing this. Can you please provide a full working testcase fo exhibiting the problem (if possible attached please not inlined with the message). Thanks Don't worry to send something else. The problem is caused by some interaction between the new UAX#14 linebreaking and hyphenation when explicit hyphens like in 'IT-System' are involved. I am looking at a fix. Fix committed: http://svn.apache.org/viewvc?view=revrev=495175 BTW, looks like the German hyphenation pattern have some issues. To hyphenate 'Betriebsablauf' as 'Betrie-bsablauf' appears to be a bit unconventional. Manuel Manuel Manuel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo! Clever hilft Ihnen.
Re: FOP from TRUNK: Hyphenation LineBreak-Problem???
Hi Manuel, maybe this was the problem. I tried again and now all was build fine. Maybe something wrong in my SSH-Client. The head of the table looks fine now :-))) Thanks a lot. Best Regards, Leeloo Manuel Mall [EMAIL PROTECTED] schrieb: On Thursday 11 January 2007 21:15, [EMAIL PROTECTED] wrote: Hi Manuel, thanks for the fast fix. I update my fop-trunk-folder and tried to build fop with ant again. While building fop ant displays following message: apache-ant-1.6.5/bin/ant: line 80: uname: command not found Now trying to generate a pdf with FOP FOP just display this lines: ./FOP_TRUNK/fop: line 79: uname: command not found ./FOP_TRUNK/fop: line 91: basename: command not found ./FOP_TRUNK/fop: line 104: dirname: command not found Exception in thread main java.lang.NoClassDefFoundError: org/apache/fop/cli/Main This looks like a problem with your Unix path (or are you using cygwin?) because uname, dirname, basename are all Unix commands used in the shell script to start fop. Also check the line endings in the shell script files. I think the Unix shells don't like script files with Windows cr/lf end of lines. Manuel Did I something wrong because I tried to build FOP again with ANT??? Or is it just another mistake?? Best Regards, Leeloo PS: Yes, it's right Betrie-bsablauf is not separated correctly. Manuel Mall schrieb: On Thursday 11 January 2007 17:55, Manuel Mall wrote: On Thursday 11 January 2007 14:00, malm wrote: leeloo5e79-docbook wrote: It could be that the new UAX#14 line breaking introduced after 0.93 in late December is causing this. Can you please provide a full working testcase fo exhibiting the problem (if possible attached please not inlined with the message). Thanks Don't worry to send something else. The problem is caused by some interaction between the new UAX#14 linebreaking and hyphenation when explicit hyphens like in 'IT-System' are involved. I am looking at a fix. Fix committed: http://svn.apache.org/viewvc?view=revrev=495175 BTW, looks like the German hyphenation pattern have some issues. To hyphenate 'Betriebsablauf' as 'Betrie-bsablauf' appears to be a bit unconventional. Manuel Manuel Manuel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo! Clever ans wers.yahoo.com hilft Ihnen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf Yahoo! Clever.
XSL transformation throws a NullPointerException
Hi, I want to build a PDF file with a XSL transformation. I use FOP 0.93 on Tomcat 4.3 (Windows) 1) I load the XSLT 2) I create a DOM Document 3) I create de DOMSource Element 4) I process the XSL transformation public ByteArrayOutputStream convertDocumentToPDF(DOMSource source, String xsltPath) throws IOException, FOPException, TransformerException, Exception { FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); // configure foUserAgent as desired // Setup output ByteArrayOutputStream out = new ByteArrayOutputStream(); try { // Construct fop with desired output format Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out); // Setup XSLT TransformerFactory factory = TransformerFactory.newInstance(); //Setup Transformer System.out.println(xsltPath:+ xsltPath); File xslFile = new File(xsltPath); Source xsltSrc = new StreamSource(xslFile); Transformer transformer = factory.newTransformer(xsltSrc); // Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); if(source == null) throw new Exception(Document DOMSource est null); // Start XSLT transformation and FOP processing Line 180 --- transformer.transform(source, res); fop = null; } finally { out.close(); } return out; } The problem is that ther is an error on the line transformer.transform(source, res); Here is the detail of the error message java.lang.NullPointerException at org.apache.fop.area.AreaTreeHandler.endDocument(AreaTreeHandler.java: 416) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:171) at org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler.java:192) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1224) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107) at com.adelis.roederer.fop.DecompteSante.convertDocumentToPDF(DecompteSante.java:180) I looked at the source of the endDocument method of the AreaTreeHandler class. I did not understant why is the Exception thrown : /** * End the document. * * @throws SAXException if there is some error */ public void endDocument() throws SAXException { finishPrevPageSequence(null); // process fo:bookmark-tree Line 416 : -- BookmarkTree bookmarkTree = rootFObj.getBookmarkTree(); Has anybody any idea ? What is this rootFObj ? Regards, Xavier -- Pour préservez l’environnement n’imprimez cet e-mail qu’en cas de nécessité. Xavier Ottolini Développeur multimédia Adelis 37 rue d'Engwiller 67350 La Walck France Téléphone : +33 (0) 3 69 20 29 02 Télécopie : +33 (0) 3 88 72 29 19 http://www.adelis.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSL transformation throws a NullPointerException
Hi Xavier, The exception is thrown on this line because of the method call on a null rootFObj object reference. 416: BookmarkTree bookmarkTree = rootFObj.getBookmarkTree(); Although not sure why the rootFObj reference is null... I am new to the fop project and still finding my way but will do my best to find some answers to your problem. Do you have the XSLT source document? Do you have the code creates the DOMSource object and which calls convertDocumentToPDF? To try and answer your question about the rootFObj. I believe it represents and object reference representation of the parent node (the fo::root node) of the page sequence node (fo::page-sequence) in your document. Adrian. Xavier Ottolini wrote: Hi, I want to build a PDF file with a XSL transformation. I use FOP 0.93 on Tomcat 4.3 (Windows) 1) I load the XSLT 2) I create a DOM Document 3) I create de DOMSource Element 4) I process the XSL transformation public ByteArrayOutputStream convertDocumentToPDF(DOMSource source, String xsltPath) throws IOException, FOPException, TransformerException, Exception { FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); // configure foUserAgent as desired // Setup output ByteArrayOutputStream out = new ByteArrayOutputStream(); try { // Construct fop with desired output format Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out); // Setup XSLT TransformerFactory factory = TransformerFactory.newInstance(); //Setup Transformer System.out.println(xsltPath:+ xsltPath); File xslFile = new File(xsltPath); Source xsltSrc = new StreamSource(xslFile); Transformer transformer = factory.newTransformer(xsltSrc); // Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); if(source == null) throw new Exception(Document DOMSource est null); // Start XSLT transformation and FOP processing Line 180 --- transformer.transform(source, res); fop = null; } finally { out.close(); } return out; } The problem is that ther is an error on the line transformer.transform(source, res); Here is the detail of the error message java.lang.NullPointerException at org.apache.fop.area.AreaTreeHandler.endDocument(AreaTreeHandler.java: 416) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:171) at org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler.java:192) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1224) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107) at com.adelis.roederer.fop.DecompteSante.convertDocumentToPDF(DecompteSante.java:180) I looked at the source of the endDocument method of the AreaTreeHandler class. I did not understant why is the Exception thrown : /** * End the document. * * @throws SAXException if there is some error */ public void endDocument() throws SAXException { finishPrevPageSequence(null); // process fo:bookmark-tree Line 416 : -- BookmarkTree bookmarkTree = rootFObj.getBookmarkTree(); Has anybody any idea ? What is this rootFObj ? Regards, Xavier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSL transformation throws a NullPointerException
Hi Adrian , Thank you for your answer. Here is the XSLT file ?xml version=1.0 encoding=ISO-8859-1 ? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:template match=/decompte fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=decomptes page-height=29.7cm page-width=21cm margin-top=2cm margin-bottom=1cm margin-left=2.5cm margin-right=2.5cm fo:region-body margin-top=1cm margin-bottom=2cm/ fo:region-before region-name=header extent=3cm/ fo:region-after region-name=footer extent=1.5cm/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=decomptes fo:static-content flow-name=footer fo:block text-align=right Page fo:page-number //fo:page-number-citation ref-id=theEnd / /fo:block /fo:static-content fo:static-content flow-name=header fo:block-container height=7cm width=100% top=7cm left=0cm position=absolute fo:block background-color=transparent fo:external-graphic src=copie-conforme.svg content-height=6.7cm vertical-align=middle / /fo:block /fo:block-container /fo:static-content fo:flow flow-name=xsl-region-body fo:block-container height=6cm width=6cm top=0cm left=0cm position=absolute fo:block font-size=9pt space-after.optimum=15pt background-color=transparent fo:inlinexsl:value-of select=./assure/ititr //fo:inlinefo:inline font-size=4pt #160; /fo:inlinefo:inlinexsl:value-of select=./assure/ipnom //fo:inlinefo:inline font-size=4pt #160; /fo:inlinefo:inlinexsl:value-of select=./assure/inom //fo:inline /fo:block fo:block font-size=9pt text-align=startVotre adresse :/fo:block xsl:if test=./assure/iadr1!='' fo:block font-size=9pt text-align=startxsl:value-of select=./assure/iadr1//fo:block /xsl:if xsl:if test=./assure/iadr2!='' fo:block font-size=9pt text-align=startxsl:value-of select=./assure/iadr2//fo:block /xsl:if xsl:if test=./assure/iadr3!='' fo:block font-size=9pt text-align=startxsl:value-of select=./assure/iadr3//fo:block /xsl:if xsl:if test=./assure/iadr4!='' fo:block font-size=9pt text-align=startxsl:value-of select=./assure/iadr4//fo:block /xsl:if xsl:if test=./assure/iadr5!='' fo:block font-size=9pt text-align=startxsl:value-of select=./assure/iadr5//fo:block /xsl:if /fo:block-container fo:block-container height=5cm width=6cm top=0cm left=6.5cm position=absolute background-color=transparent fo:block font-size=9pt text-align=startN#176; d'adh#233;sion : xsl:value-of select=./assure/iadh//fo:block fo:block font-size=9pt text-align=start space-after.optimum=15ptN#233;xsl:if test=./assure/ititr='MME'e/xsl:ifxsl:if test=./assure/ititr='MLE'e/xsl:if le xsl:value-of select=./assure/idtn//fo:block fo:block font-size=9pt text-align=start2, rue Bartisch/fo:block fo:block font-size=9pt text-align=start67100 STRASBOURG/fo:block fo:block font-size=9pt text-align=startT#233;l : 03 88 76 73 00/fo:block /fo:block-container fo:block-container height=5cm width=3.5cm top=0cm left=12.5cm position=absolute background-color=rgb(255,255,255) fo:block text-align=end fo:external-graphic src=logo-roederer.svg content-height=2.9cm vertical-align=middle / /fo:block /fo:block-container fo:block-container height=7cm width=100% top=5cm left=0cm position=absolute fo:block background-color=transparent fo:external-graphic src=copie-conforme.svg content-height=6.7cm vertical-align=middle / /fo:block /fo:block-container fo:block-container height=2cm width=16cm top=4cm left=0cm position=absolute fo:block font-size=9pt text-align=start D#233;compte santé n#176; xsl:value-of select=./iref/. /fo:block fo:block font-size=9pt text-align=start D#233;tail du d#233;compte pay#233; le xsl:value-of select=./idapi/ d'un montant total de xsl:value-of select=./imont/ Euros. /fo:block /fo:block-container fo:block space-after.optimum=5.5cm / fo:table width=100% table-layout=fixed background-color=transparent
Re: XSL transformation throws a NullPointerException
I finally found the problem : The there was an error in the DOM document. The root node was not append to the document; It was replaced by the first child. Xavier Ottolini a écrit : Hi Adrian , Thank you for your answer. Here is the XSLT file ?xml version=1.0 encoding=ISO-8859-1 ? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:template match=/decompte fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=decomptes page-height=29.7cm page-width=21cm margin-top=2cm margin-bottom=1cm margin-left=2.5cm margin-right=2.5cm fo:region-body margin-top=1cm margin-bottom=2cm/ fo:region-before region-name=header extent=3cm/ fo:region-after region-name=footer extent=1.5cm/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=decomptes fo:static-content flow-name=footer fo:block text-align=right Page fo:page-number //fo:page-number-citation ref-id=theEnd / /fo:block /fo:static-content fo:static-content flow-name=header fo:block-container height=7cm width=100% top=7cm left=0cm position=absolute fo:block background-color=transparent fo:external-graphic src=copie-conforme.svg content-height=6.7cm vertical-align=middle / /fo:block /fo:block-container /fo:static-content fo:flow flow-name=xsl-region-body fo:block-container height=6cm width=6cm top=0cm left=0cm position=absolute fo:block font-size=9pt space-after.optimum=15pt background-color=transparent fo:inlinexsl:value-of select=./assure/ititr //fo:inlinefo:inline font-size=4pt #160; /fo:inlinefo:inlinexsl:value-of select=./assure/ipnom //fo:inlinefo:inline font-size=4pt #160; /fo:inlinefo:inlinexsl:value-of select=./assure/inom //fo:inline /fo:block fo:block font-size=9pt text-align=startVotre adresse :/fo:block xsl:if test=./assure/iadr1!='' fo:block font-size=9pt text-align=startxsl:value-of select=./assure/iadr1//fo:block /xsl:if xsl:if test=./assure/iadr2!='' fo:block font-size=9pt text-align=startxsl:value-of select=./assure/iadr2//fo:block /xsl:if xsl:if test=./assure/iadr3!='' fo:block font-size=9pt text-align=startxsl:value-of select=./assure/iadr3//fo:block /xsl:if xsl:if test=./assure/iadr4!='' fo:block font-size=9pt text-align=startxsl:value-of select=./assure/iadr4//fo:block /xsl:if xsl:if test=./assure/iadr5!='' fo:block font-size=9pt text-align=startxsl:value-of select=./assure/iadr5//fo:block /xsl:if /fo:block-container fo:block-container height=5cm width=6cm top=0cm left=6.5cm position=absolute background-color=transparent fo:block font-size=9pt text-align=startN#176; d'adh#233;sion : xsl:value-of select=./assure/iadh//fo:block fo:block font-size=9pt text-align=start space-after.optimum=15ptN#233;xsl:if test=./assure/ititr='MME'e/xsl:ifxsl:if test=./assure/ititr='MLE'e/xsl:if le xsl:value-of select=./assure/idtn//fo:block fo:block font-size=9pt text-align=start2, rue Bartisch/fo:block fo:block font-size=9pt text-align=start67100 STRASBOURG/fo:block fo:block font-size=9pt text-align=startT#233;l : 03 88 76 73 00/fo:block /fo:block-container fo:block-container height=5cm width=3.5cm top=0cm left=12.5cm position=absolute background-color=rgb(255,255,255) fo:block text-align=end fo:external-graphic src=logo-roederer.svg content-height=2.9cm vertical-align=middle / /fo:block /fo:block-container fo:block-container height=7cm width=100% top=5cm left=0cm position=absolute fo:block background-color=transparent fo:external-graphic src=copie-conforme.svg content-height=6.7cm vertical-align=middle / /fo:block /fo:block-container fo:block-container height=2cm width=16cm top=4cm left=0cm position=absolute fo:block font-size=9pt text-align=start D#233;compte santé n#176; xsl:value-of select=./iref/. /fo:block fo:block font-size=9pt text-align=start D#233;tail du d#233;compte pay#233; le xsl:value-of select=./idapi/ d'un montant total de xsl:value-of select=./imont/ Euros.
ExternalGraphic Image not available
Hi, I want to build a PDF file with a XSL transformation. I use FOP 0.93 on Tomcat 4.3 (Windows) When I process the XSL transformation, I get the following error : 11 janv. 2007 17:49:42 org.apache.fop.fo.flow.ExternalGraphic bind GRAVE: Image not available: copie-conforme.svg 11 janv. 2007 17:49:42 org.apache.fop.fo.flow.ExternalGraphic bind GRAVE: Image not available: logo-roederer.svg 11 janv. 2007 17:49:42 org.apache.fop.fo.flow.ExternalGraphic bind GRAVE: Image not available: copie-conforme.svg I a am surprised because the picture is in the same document as my XSL. I found a solution on the mailing list archive. http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200607.mbox/[EMAIL PROTECTED] But I do not understand what is this cert.conf file. I use FO embeded in a JSP file. How to set this configuration file ? Regards Xavier -- Pour préservez l’environnement n’imprimez cet e-mail qu’en cas de nécessité. Xavier Ottolini Développeur multimédia Adelis 37 rue d'Engwiller 67350 La Walck France Téléphone : +33 (0) 3 69 20 29 02 Télécopie : +33 (0) 3 88 72 29 19 http://www.adelis.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]