Re: Tiff Image conversion in a multithreaded environment
Hasan, I've recently fixed a multi-threading problem in the Java2D renderer which is also responsible for creating TIFF images: http://svn.apache.org/viewvc?rev=895012&view=rev Please check if FOP Trunk works for you. Good luck! On 12.02.2010 19:13:31 HasanK wrote: > > Hi, > We are using Apache FOP 0.95 to produce TIFF images in CCITT T.6 format in a > j2ee application(thus this is a multithreaded environment). We also use FOP > 0.95 to produce pdf images in the same application with the same inputs. A > while back we had an issue where producing the tiff images resulted in > extreme overlapping in the images(In some cases the application produced > blank images). Upon initial observation it was observed that the > transformation that results in the tiff images is not thread safe, while the > one producing the pdf images is. To test this hypothesis, we have produced > the test case named Test_FopTiffTransformMultithreaded.java(attached). This > test case provides proof of concept that the tiff image conversion is not > thread safe. A few notes on the test case: > 1) The following jars would be needed in the class path: > -commons-io-1.3.1.jar > -fop-0.95.jar > -xml-apis-ext-1.3.04.jar > -xmlgraphics-commons-1.3.1.jar > -spring-2.0.5.jar > -junit-3.8.1.jar > -jdom.jar > -saxpath.jar > -commons-logging-1.04.jar > -avalon-framework-4.2.0.jar > 2) The properties(static strings) in the test case translate as follows: > EXPECTED_THREAD_COUNT -> the expected number of threads we want to test > with(value 1 to N) > OUTPUT_FILE_DIRECTORY_PATH -> The file path to the directory where the > images are stored > OUTPUT_FILE_NAME -> The name of the file that will be output(for example if > this value is "image", and the thread count is 2, then the output files will > be named as "image0", "image1") > OUTPUT_FILE_FORMAT -> this value is expected to be either ".pdf" or ".tiff" > OUTPUT_FILE_FORMAT_TYPE -> this value is expected to be either "pdf" or > "tiff" and must match the file format in the OUTPUT_FILE_FORMAT above > PRINTABLE_FO_PATH -> the file path to the xsl transformation file > 3) The xml file which will be rendered(named "InputFile.xml") in this test > case should be placed in the same directory as the test case. > 4) Line 181 of this test case shows the following: > // synchronized (fopFactory) > // { > transformer.transform(src, result); > // } > This indicates a synchronization of the fopFactory object. If this > synchronization block is not present and the output is in tiff images, the > text in the images is overlapped. If this synchronization block is present, > there are SEVERE performance implications on our application as this > synchronization introduces performance issues(I can provide the performance > differential if needed). An example of the correct image(imageCorrect.tiff) > is attached and the overlapped image as a result of the multithreaded > process(EXPECTED_THREAD_COUNT >1) without > synchronization(imageIncorrect.tiff) is also attached. > > I am attaching all the files(except the jars) that are needed for this test > case. > > The following is my question. How can this tiff image problem be corrected? > As we are working with highly demanding customers(as everyone is :-):-) > http://old.nabble.com/file/p27567366/Test_FopTiffTransformMultithreaded.java > Test_FopTiffTransformMultithreaded.java > http://old.nabble.com/file/p27567366/InputFile.xml InputFile.xml > http://old.nabble.com/file/p27567366/Transformer.xsl Transformer.xsl > http://old.nabble.com/file/p27567366/imageCorrect.tiff imageCorrect.tiff > http://old.nabble.com/file/p27567366/imageIncorrect.tiff imageIncorrect.tiff > ), we need to solve the performance problems as well as the tiff image > issue. We would be really grateful if this issue can be solved. > Thanks > Hasan > -- > View this message in context: > http://old.nabble.com/Tiff-Image-conversion-in-a-multithreaded-environment-tp27567366p27567366.html > Sent from the FOP - Users mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org Jeremias Maerki - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Does FOP open its configuration file read-write?
FOP [1] uses Avalon Framework's DefaultConfigurationBuilder [2] to load config files. This in turn uses the system's default SAXParserFactory. I don't think any of that code would overwrite the config file. Either this is overwritten by a build process somewhere or by your code. After all, there are various ways how the configuration can be loaded. At least I've never had the problem that my FOP config files were killed. [1] http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java?view=markup [2] http://svn.apache.org/viewvc/excalibur/trunk/framework/impl/src/main/java/org/apache/avalon/framework/configuration/DefaultConfigurationBuilder.java?view=markup On 15.02.2010 23:09:12 Jonathan Levinson wrote: > Something keeps on truncating my FOP configuration file - fop.xconf in the > conf directory. The file still exists but has 0 bytes. This has happened > several times. > > Does FOP open its configuration file read-write? Could a premature abort of > FOP cause the fop.xconf file to be truncated? > > Best Regards, > Jonathan Levinson > Jeremias Maerki - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Watermarks On PDF that contains shading in table rows
Hi Dawn, A solution to your problem suddenly came to my mind. In case this is still of interest to you: D Landskroon wrote: > Hi, > > We're creating a PDF that contains a table that uses background shading on > the alternate rows. As part of the same PDF we also have to generate a > watermark as the background. > > We now have a problem in that the alternate row shading clashes with the > watermark and basically the watermark disappears on the rows that are > shaded. > > Is there any way around this? Does FOP support this or not? Just wondering > if the XSLT is coded correctly or its just something that FOP does not > support. One way to deal with that is to specify a level of transparency on the background colour of the rows, but to my knowledge XSL-FO doesn’t offer this possibility. However, you can create an SVG image made of basically one rectangle that has a transparent fill, as SVG gives you full flexibility on that matter. Then you just have to set this image as the background-image of the table-row. You don’t have to worry about the dimensions of the image and can set its size to the dimensions of the page, as fo:table-row will clip it accordingly. > Appreciate any help that can be offerred. > > Kind Regards, > Dawn HTH, Vincent - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Loading font error with fop
Hello, I want loading a font with fop. Font is Parisine Office. I generated xml files with following command: java -cp build/fop.jar:lib/avalon-framework-4.2.0.jar:lib/xml-apis-1.3.04.jar:lib/xercesImpl-2.7.1.jar:lib/xalan-2.7.0.jar:lib/commons-logging-1.0.4.jar:lib/commons-io-1.3.1.jar:lib/xmlgraphics-commons-1.3.1.jar:lib/serializer-2.7.0.jar org.apache.fop.fonts.apps.TTFReader /test/ParisineOffice-Regular.ttf /test/ParisineOffice-Regular.xml Xml files are generating. ~500Ko per files. I'm using following file to configure my fop: flate When I generate the Pdf in xslfo with fop, I'm this exception: [INFO] javax.xml.transform.TransformerException: java.lang.RuntimeException: Cannot load font: After URI resolution, the returned Source object does not contain an InputStream or a valid URL (system identifier) for metrics file: /home/philippe/accessio-conf/ParisineOffice-Regular.xml [INFO] Caused by: java.lang.RuntimeException: Cannot load font: After URI resolution, the returned Source object does not contain an InputStream or a valid URL (system identifier) for metrics file: /home/philippe/accessio-conf/ParisineOffice-Regular.xml [INFO] java.lang.RuntimeException: Cannot load font: After URI resolution, the returned Source object does not contain an InputStream or a valid URL (system identifier) for metrics file: /home/philippe/accessio-conf/ParisineOffice-Regular.xml Any ideas ? regards, philippe
Re: SEVERE: Exception java.lang.NullPointerException
Georg, This is incorrect I use xsltproc as a first step for doing the --xinclude step. So the output is exactly what I get running fop directly on the fo file. I do not see any line number referenced. I also used the -d option as indicated by the documentation. $ /usr/bin/xsltproc --stringparam fop1.extensions 1 --stringparam ulink.show 0 --xinclude -o /home/mathieu/Projects/csm/Doc/bin/CoSMo/ReferenceGuide/article.fo /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl /home/mathieu/Projects/csm/Doc/CoSMo/ReferenceGuide/article.xml <...> $ /usr/bin/fop -d -fo /home/mathieu/Projects/csm/Doc/bin/CoSMo/ReferenceGuide/article.fo -pdf /home/mathieu/Projects/csm/Doc/bin/CoSMo/ReferenceGuide/article.pdf [warning] /usr/bin/fop: Unable to locate xml-apis in /usr/share/java Feb 16, 2010 1:27:17 PM org.apache.fop.fo.flow.table.TableColumn bind WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) Feb 16, 2010 1:27:17 PM org.apache.fop.fo.flow.table.TableColumn bind WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) Feb 16, 2010 1:27:17 PM org.apache.fop.fo.flow.table.TableColumn bind WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) Feb 16, 2010 1:27:17 PM org.apache.fop.fo.flow.table.TableColumn bind WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) Feb 16, 2010 1:27:18 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'Symbol,normal,700' not found. Substituting with 'Symbol,normal,400'. Feb 16, 2010 1:27:18 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'ZapfDingbats,normal,700' not found. Substituting with 'ZapfDingbats,normal,400'. Feb 16, 2010 1:27:19 PM org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2 WARNING: Line 1 of a paragraph overflows the available area by more than 50 points. (fo:block, location: 41/59) Feb 16, 2010 1:27:19 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'ZapfDingbats,italic,400' not found. Substituting with 'ZapfDingbats,normal,400'. Feb 16, 2010 1:27:19 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'ZapfDingbats,italic,700' not found. Substituting with 'any,italic,700'. Feb 16, 2010 1:27:19 PM org.apache.fop.cli.Main startFOP SEVERE: Exception java.lang.NullPointerException at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) - java.lang.NullPointerException at org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350) at org.apache.fop.layoutmgr.inline.LineLayoutManager.findHyphenationPoints(LineLayoutManager.java:1480) at org.apache.fop.layoutmgr.inline.LineLayoutManager.findOptimalBreakingPoints(LineLayoutManager.java:950) at org.apache.fop.layoutmgr.inline.LineLayoutManager.createLineBreaks(LineLayoutManager.java:917) at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:607) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116) at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:107) at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:145) at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:552) at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:137) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:302) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:264) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:106) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234) at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:123) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:340) a
AW: SEVERE: Exception java.lang.NullPointerException
Hi Mathieu, Can you shorten the fo file as much as possible and post it? Regards, Georg Datterl -- Kontakt -- Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH:www.irs-nbg.de Willmy PrintMedia GmbH:www.willmy.de Willmy Consult & Content GmbH: www.willmycc.de -Ursprüngliche Nachricht- Von: Mathieu Malaterre [mailto:mathieu.malate...@gmail.com] Gesendet: Dienstag, 16. Februar 2010 13:26 An: fop-users@xmlgraphics.apache.org Betreff: Re: SEVERE: Exception java.lang.NullPointerException Georg, This is incorrect I use xsltproc as a first step for doing the --xinclude step. So the output is exactly what I get running fop directly on the fo file. I do not see any line number referenced. I also used the -d option as indicated by the documentation. $ /usr/bin/xsltproc --stringparam fop1.extensions 1 --stringparam ulink.show 0 --xinclude -o /home/mathieu/Projects/csm/Doc/bin/CoSMo/ReferenceGuide/article.fo /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl /home/mathieu/Projects/csm/Doc/CoSMo/ReferenceGuide/article.xml <...> $ /usr/bin/fop -d -fo /home/mathieu/Projects/csm/Doc/bin/CoSMo/ReferenceGuide/article.fo -pdf /home/mathieu/Projects/csm/Doc/bin/CoSMo/ReferenceGuide/article.pdf [warning] /usr/bin/fop: Unable to locate xml-apis in /usr/share/java Feb 16, 2010 1:27:17 PM org.apache.fop.fo.flow.table.TableColumn bind WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) Feb 16, 2010 1:27:17 PM org.apache.fop.fo.flow.table.TableColumn bind WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) Feb 16, 2010 1:27:17 PM org.apache.fop.fo.flow.table.TableColumn bind WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) Feb 16, 2010 1:27:17 PM org.apache.fop.fo.flow.table.TableColumn bind WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) Feb 16, 2010 1:27:18 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'Symbol,normal,700' not found. Substituting with 'Symbol,normal,400'. Feb 16, 2010 1:27:18 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'ZapfDingbats,normal,700' not found. Substituting with 'ZapfDingbats,normal,400'. Feb 16, 2010 1:27:19 PM org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2 WARNING: Line 1 of a paragraph overflows the available area by more than 50 points. (fo:block, location: 41/59) Feb 16, 2010 1:27:19 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'ZapfDingbats,italic,400' not found. Substituting with 'ZapfDingbats,normal,400'. Feb 16, 2010 1:27:19 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'ZapfDingbats,italic,700' not found. Substituting with 'any,italic,700'. Feb 16, 2010 1:27:19 PM org.apache.fop.cli.Main startFOP SEVERE: Exception java.lang.NullPointerException at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) - java.lang.NullPointerException at org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350) at org.apache.fop.layoutmgr.inline.LineLayoutManager.findHyphenationPoints(LineLayoutManager.java:1480) at org.apache.fop.layoutmgr.inline.LineLayoutManager.findOptimalBreakingPoints(LineLayoutManager.java:950) at org.apache.fop.layoutmgr.inline.LineLayoutManager.createLineBreaks(LineLayoutManager.java:917) at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:607) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116) at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:107) at org.apache.fop.layoutmgr.PageBreaker
java.lang.NullPointerException: org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)
Could someone please try this example on their setup: $ xsltproc --stringparam fop1.extensions 1 --stringparam ulink.show 0 --xinclude -o out.fo /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl ./test.xml $ fop -fo out.fo -pdf out.pdf with test.xml: http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; []> title I am getting: $ fop -fo out.fo -pdf out.pdf [warning] /usr/bin/fop: Unable to locate xml-apis in /usr/share/java Feb 16, 2010 2:17:27 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'Symbol,normal,700' not found. Substituting with 'Symbol,normal,400'. Feb 16, 2010 2:17:27 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'ZapfDingbats,normal,700' not found. Substituting with 'ZapfDingbats,normal,400'. Feb 16, 2010 2:17:27 PM org.apache.fop.cli.Main startFOP SEVERE: Exception java.lang.NullPointerException at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) - java.lang.NullPointerException at org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350) at org.apache.fop.layoutmgr.inline.LineLayoutManager.findHyphenationPoints(LineLayoutManager.java:1480) at org.apache.fop.layoutmgr.inline.LineLayoutManager.findOptimalBreakingPoints(LineLayoutManager.java:950) at org.apache.fop.layoutmgr.inline.LineLayoutManager.createLineBreaks(LineLayoutManager.java:917) at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:607) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116) at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:107) at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:145) at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:552) at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:137) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:302) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:264) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:106) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234) at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:123) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:340) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169) at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) Thanks -- Mathieu - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: java.lang.NullPointerException: org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)
If this helps, I converted it to docbook 5 with the same result: $ cat test5.xml http://docbook.org/ns/docbook"; version="5.0"> title The anchor element is empty and contributes nothing to the flow of the content in which it occurs. It is only useful as a target. $ fop -xsl /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/fo/docbook.xsl -xml test5.xml -pdf test5.pdf [warning] /usr/bin/fop: Unable to locate servlet-api in /usr/share/java Feb 16, 2010 1:40:47 PM org.apache.fop.cli.InputHandler warning WARNING: Making portrait pages on USletter paper (8.5inx11in) Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:47 PM org.apache.fop.fo.properties.CommonBorderPaddingBackground SEVERE: Background image not available: images/draft.png Feb 16, 2010 1:40:48 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'Symbol,normal,700' not found. Substituting with 'Symbol,normal,400'. Feb 16, 2010 1:40:48 PM org.apache.fop.fonts.FontInfo notifyFontReplacement WARNING: Font 'ZapfDingbats,normal,700' not found. Substituting with 'ZapfDingbats,normal,400'. Feb 16, 2010 1:40:48 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree SEVERE: Couldn't find hyphenation pattern en Feb 16, 2010 1:40:48 PM org.apache.fop.fo.FOTreeBuilder fatalError SEVERE: javax.xml.transform.TransformerException: java.lang.NullPointerException Feb 16, 2010 1:40:48 PM org.apache.fop.cli.Main startFOP SEVERE: Exception javax.xml.transform.TransformerException: java.lang.NullPointerException at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) - ; SystemID: file:/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/fo/docbook.xsl; Line#: 309; Column#: 54 javax.xml.transform.TransformerException: java.lang.NullPointerException at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2405) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at
Re: Loading font error with fop
metrics-url and embed-url requires a URL, not a filename. Please note that starting with FOP 0.95 you can omit the metrics-url attribute. The XML font metrics step is no longer required. So, changing "/test/ParisineOffice-Regular.ttf" to "file:/test/ParisineOffice-Regular.ttf" should do it. On 16.02.2010 12:35:14 philippe voncken wrote: > Hello, > > I want loading a font with fop. Font is Parisine Office. I generated xml > files with following command: > > java -cp > build/fop.jar:lib/avalon-framework-4.2.0.jar:lib/xml-apis-1.3.04.jar:lib/xercesImpl-2.7.1.jar:lib/xalan-2.7.0.jar:lib/commons-logging-1.0.4.jar:lib/commons-io-1.3.1.jar:lib/xmlgraphics-commons-1.3.1.jar:lib/serializer-2.7.0.jar > org.apache.fop.fonts.apps.TTFReader /test/ParisineOffice-Regular.ttf > /test/ParisineOffice-Regular.xml > > Xml files are generating. ~500Ko per files. > > I'm using following file to configure my fop: > > > > > > flate > > > embed-url="/test/ParisineOffice-Regular.ttf"> >weight="normal"/> > > embed-url="/test/ParisineOffice-Bold.ttf"> >weight="bold"/> > > embed-url="/test/ParisineOffice-Italic.ttf"> >weight="normal"/> > > kerning="yes" embed-url="/test/ParisineOffice-BoldItalic.ttf"> >weight="bold"/> > > > > > > > When I generate the Pdf in xslfo with fop, I'm this exception: > [INFO] javax.xml.transform.TransformerException: java.lang.RuntimeException: > Cannot load font: After URI resolution, the returned Source object does not > contain an InputStream or a valid URL (system identifier) for metrics file: > /home/philippe/accessio-conf/ParisineOffice-Regular.xml > [INFO] Caused by: java.lang.RuntimeException: Cannot load font: After URI > resolution, the returned Source object does not contain an InputStream or a > valid URL (system identifier) for metrics file: > /home/philippe/accessio-conf/ParisineOffice-Regular.xml > > [INFO] java.lang.RuntimeException: Cannot load font: After URI resolution, > the returned Source object does not contain an InputStream or a valid URL > (system identifier) for metrics file: > /home/philippe/accessio-conf/ParisineOffice-Regular.xml > > > Any ideas ? > > regards, > philippe Jeremias Maerki - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
fo:block and wrap-option="wrap"
Hi, I already searched the web about this, but I am still not sure if it should work the way I won't it too. If I have a fo:block containing a long (read: no spaces; neither zws or normal ones) text and wrap-option="wrap" it should wrap the text before it overflows right? Is this currently not working cause of https://issues.apache.org/bugzilla/show_bug.cgi?id=43474 or did I miss something? I am using fop 0.95 and I am somewhat sure it did work a while ago (maybe 0.2 or 9.4, not sure) Thx in advance, Florian signature.asc Description: OpenPGP digital signature