Re: Error trying to create PDF with accessibility
I don't think so: the same .fo works fine when accessibility is disabled. Anyways I have renamed it and I could open it in Chrome without any errors. Esteban De: Szeak (Register Man) <szea...@gmail.com> Enviado: miércoles, 08 de noviembre de 2017 01:11 p.m. Para: fop-users@xmlgraphics.apache.org Asunto: Re: Error trying to create PDF with accessibility Hi Esteban, It seems like an XML parsing error. Have you checked your FO file is well-formed? (Rename extension to XML and Open it in a browser ie: firefox or chrome) By, Szeak 2017-11-08 00:13 keltezéssel, Esteban R írta: Hello I'm working in a quite complex java (1.8.0_112) project, using apache-fop 2.2. Windows 10 OS. It seems that the tag is ignored in the xconf file so I had to enable it programatically. After that, I get the following exception when rendering pdf with accessibility enabled: java.lang.NullPointerException at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:422) at org.apache.fop.render.intermediate.IFRenderer$TextUtil.flush(IFRenderer.java:1236) at org.apache.fop.render.intermediate.IFRenderer.renderText(IFRenderer.java:1063) at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:701) at org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:926) at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:690) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:572) at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613) at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:998) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557) at org.apache.fop.render.AbstractRenderer.renderRegion(AbstractRenderer.java:344) at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:308) at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:737) at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:263) at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:244) at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:587) at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:123) at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:316) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:226) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:145) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267) at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190) at org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:263) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1401) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253) ... (my classes) nov 07, 2017 7:54:38 PM org.apache.fop.fo.FOTreeBuilder fatalError GRAVE: org.xml.sax.SAXParseException; systemId: file:///C:/Users/complete_file_name.fo; lineNumber: 160; columnNumber: 82; java.lang.NullPointerException The above-mentioned line 160 is: Maybe I'm missing something? I may try to create a full example if needed. Esteban - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error trying to create PDF with accessibility
Hi Esteban, It seems like an XML parsing error. Have you checked your FO file is well-formed? (Rename extension to XML and Open it in a browser ie: firefox or chrome) By, Szeak 2017-11-08 00:13 keltezéssel, Esteban R írta: Hello I'm working in a quite complex java (1.8.0_112) project, using apache-fop 2.2. Windows 10 OS. It seems that the tag is ignored in the xconf file so I had to enable it programatically. After that, I get the following exception when rendering pdf with accessibility enabled: java.lang.NullPointerException at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:422) at org.apache.fop.render.intermediate.IFRenderer$TextUtil.flush(IFRenderer.java:1236) at org.apache.fop.render.intermediate.IFRenderer.renderText(IFRenderer.java:1063) at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:701) at org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:926) at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:690) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:572) at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613) at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:998) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557) at org.apache.fop.render.AbstractRenderer.renderRegion(AbstractRenderer.java:344) at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:308) at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:737) at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:263) at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:244) at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:587) at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:123) at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:316) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:226) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:145) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267) at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190) at org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:263) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1401) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253) ... (my classes) nov 07, 2017 7:54:38 PM org.apache.fop.fo.FOTreeBuilder fatalError GRAVE: org.xml.sax.SAXParseException; systemId: file:///C:/Users/complete_file_name.fo; lineNumber: 160; columnNumber: 82; java.lang.NullPointerException The above-mentioned line 160 is: Maybe I'm missing something? I may try to create a full example if needed. Esteban - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail:
Re: Error when building FOP svn 1800269 - cannot find symbol symbol getNameForGID(int)
On Thursday, June 29, 2017 8:49 AM, Simon Stener wrote: > > Hi, > > Maybe you have an old fontbox jar on your classpath? Yes, that was it. I had fontbox-1.3.1.jar in fop-svn\fop\lib as well as fontbox-2.0.4. Regards, John Brown. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: Error when building FOP svn 1800269 - cannot find symbol symbol getNameForGID(int)
Hi, Maybe you have an old fontbox jar on your classpath? Thanks -Original Message- From: John Brown [mailto:johnbrown...@hotmail.com] Sent: 29 June 2017 13:38 To: fop-users@xmlgraphics.apache.org Subject: Error when building FOP svn 1800269 - cannot find symbol symbol getNameForGID(int) john@john-pc /c/downloads/fop-svn/fop $ ant Buildfile: c:\downloads\fop-svn\fop\build.xml Trying to override old definition of task javac Trying to override old definition of task junit init-avail: [echo] --- Apache FOP 2.3.0-SNAPSHOT [1999-2017] [echo] See build.properties and build-local.properties for additional build settings [echo] Apache Ant(TM) version 1.9.6 compiled on June 29 2015 [echo] VM: 25.112-b15, Oracle Corporation [echo] JAVA_HOME: c:/progra~1/java/jdk1.8.0_112 [echo] JAI Support NOT Present [echo] JCE Support PRESENT [echo] JUnit Support NOT Present - Committers are required to have JUnit working [echo] XMLUnit Support NOT Present - you can get it from http://xmlunit.sourceforge.net init: codegen: [echo] Generating the java files from xml resources [xslt] Transforming into c:\downloads\fop-svn\fop\build\gensrc\org\apache\fop\fonts\base14 compile-java: [javac] Compiling 211 source files to c:\downloads\fop-svn\fop\build\classes [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6 [javac] c:\downloads\fop-svn\fop-core\src\main\java\org\apache\fop\render\ps\Type1Fo ntFormatter.java:115: error: cannot find symbol [javac] String name = font.getCharset().getNameForGID(gid.getKey()); [javac]^ [javac] symbol: method getNameForGID(Integer) [javac] location: class CFFCharset [javac] c:\downloads\fop-svn\fop-core\src\main\java\org\apache\fop\render\ps\Type1Fo ntFormatter.java:160: error: cannot find symbol [javac] String mapping = font.getCharset().getNameForGID(gid); [javac] ^ [javac] symbol: method getNameForGID(int) [javac] location: class CFFCharset [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 2 errors [javac] 1 warning BUILD FAILED c:\downloads\fop-svn\fop\build.xml:351: Compile failed; see the compiler error output for details. Total time: 11 seconds john@john-pc /c/downloads/fop-svn/fop - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error after updating trunk
You need to clean and build again on the command line. If using Eclipse, do a refresh (after the build on the command line) and build again. On Tue, Apr 16, 2013 at 11:19 AM, Bonekrusher djs...@yahoo.com wrote: Hi, After update my local copy of trunk this morning and rebuilding FOP I get the following error while running a FO to PDF transformation. java.lang.IllegalStateException: Event model isn't consistent with the EventProducer interface. Please rebuild FOP! Affected method: org.apache.fop.layoutmgr.BlockLevelEventProducer.staticRegionOverflow Any ideas? I'll try to put a repo together, but this usually takes be about a day.. Stack: java.lang.IllegalStateException: Event model isn't consistent with the EventProducer interface. Please rebuild FOP! Affected method: org.apache.fop.layoutmgr.BlockLevelEventProducer.staticRegionOverflow at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:156) at com.sun.proxy.$Proxy0.staticRegionOverflow(Unknown Source) at org.apache.fop.layoutmgr.StaticContentLayoutManager.doLayout(StaticContentLayoutManager.java:150) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.layoutSideRegion(PageSequenceLayoutManager.java:179) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:186) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:114) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267) at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:129) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181) at net.sf.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.java:391) at net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:213) at net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:443) at org.apache.xerces.parsers.AbstractSAXParser.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 net.sf.saxon.event.Sender.sendSAXSource(Sender.java:404) at net.sf.saxon.event.Sender.send(Sender.java:214) at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:30) at com.sdi.apache.Testing.generateDoc(Testing.java:163) at com.gui.MainForm.GeneratePdf(MainForm.java:159) -- View this message in context: http://apache-fop.1065347.n5.nabble.com/Error-after-updating-trunk-tp38326.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
Re: Error after updating trunk
Thanks Luis. Rebuild and Clean did not solve the issue. I was able to track down the issue to a missing graphic. It seems after this last update, if the graphic is missing, the error occurs. Once again, I'll try to come up with a repo. Thanks for the help. -- View this message in context: http://apache-fop.1065347.n5.nabble.com/Error-after-updating-trunk-tp38326p38330.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
Re: Error after updating trunk
the error occurs if the graphic is missing or if it s present? is the graphic in static content? does it fit in the side region? it looks like you have overflow in the side region, which uses a new event producer method added to trunk yesterday. I still think the issue can be fixed by a clean + build (the exception also says so). does it happen from the command line? On Tue, Apr 16, 2013 at 1:38 PM, Bonekrusher djs...@yahoo.com wrote: Thanks Luis. Rebuild and Clean did not solve the issue. I was able to track down the issue to a missing graphic. It seems after this last update, if the graphic is missing, the error occurs. Once again, I'll try to come up with a repo. Thanks for the help. -- View this message in context: http://apache-fop.1065347.n5.nabble.com/Error-after-updating-trunk-tp38326p38330.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
Re: Error after updating trunk
Forgot to mention, this is in the flow region. -- View this message in context: http://apache-fop.1065347.n5.nabble.com/Error-after-updating-trunk-tp38326p38334.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
Re: error with FOP1.1 (java.lang.AbstractMethodError: org.apache.batik.dom.AbstractDocument.getDocumentURI())
Looks like no one replied to your question. Sorry for the delay... There is an example in the code that shows how to do what you ask: embedding.ExampleXML2PDF under examples/embedding/java. On 4/8/13 5:15 PM, pepgrifell wrote: Hi, I have update fop.jar from version 0.95 to 1.1. I have changed as well related libraries (avalon-framework-4.2.0.jar, batik-all-1.7.jar were already in 0.95 and I have only changed xmlgraphics-commons*.jar (from 1.3.1 to 1.5). In 0.95 I could generate a PDF from and XSL and XML but now I get this error: / ... 2013-04-08 15:22:04,148 DEBUG [org.apache.xmlgraphics.image.loader.pipeline.ImageProviderPipeline] Image loading using org.apache.fop.image.loader.batik.ImageLoaderSVG@ca1198 took 0 ms. 2013-04-08 15:22:04,148 DEBUG [org.apache.xmlgraphics.image.loader.pipeline.ImageProviderPipeline] Caching image: org.apache.xmlgraphics.image.loader.impl.ImageXMLDOM: null (image/svg+xml) ... java.lang.AbstractMethodError: org.apache.batik.dom.AbstractDocument.getDocumentURI()Ljava/lang/String; at org.apache.fop.image.loader.batik.BatikUtil.cloneSVGDocument(BatikUtil.java:58) at org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:95) at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:228) at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:184) at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:149) at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingDocument(AbstractIFPainter.java:298) at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:203) at org.apache.fop.render.intermediate.IFRenderer.renderForeignObject(IFRenderer.java:1290) at org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:820) at org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:785) at org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:866) at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:678) at org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:913) at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:643) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:561) at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:598) at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:980) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:546) at org.apache.fop.render.AbstractPathOrientedRenderer.renderReferenceArea(AbstractPathOrientedRenderer.java:710) at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:585) at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:980) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:546) at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:598) at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:980) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:546) at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:451) at org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:738) at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:428) at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:352) at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:299) at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:748) at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:273) at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:238) at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:597) at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:123) at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:312) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:191) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:115) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267) at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:128) at
RE: Error with missing glyphs in font.
Glenn, That was the ticket. I ended up opening the font with the program FontForge, and resaving it to rebuild the Unicode list. Now it works fine inside of FOP. Thanks, Nathan Davis| Interface Analyst| vRad This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. The company accepts no liability for any damage caused by any virus transmitted by this email. From: Glenn Adams [mailto:gl...@skynav.com] Sent: Thursday, April 04, 2013 5:36 PM To: fop-users@xmlgraphics.apache.org Subject: Re: Error with missing glyphs in font. Keep in mind that character codes in FOP files always represent Unicode code points, not glyph codes. You should check the font's CMAP to see what Unicode codepoints it assigns to its glyphs. They will probably be in the PUA [1], i.e., from 0xE000 to 0xF8FF. Then you will need to use these codes in your FOP source file, e.g., by using numeric character references, like #xE00; etc. You should not be specifying or using an external font metrics file. [1] http://en.wikipedia.org/wiki/Private_Use_(Unicode) On Thu, Apr 4, 2013 at 3:23 PM, Nathan Davis nathan.da...@vrad.com wrote: Hello all, I've been chasing an issue with FOP for a little while and hit a bit of a wall. I've added a new font to the list of fonts we can use when rendering a PDF. However no matter what character I enter, FOP gives me an error for every single letter. For example, with the letter E it says 'WARNING: Glyph e (0x65, e) not available in font Code128.' There are lots of posts where people are trying to pass in non-english language, but in this case I'm passing in standard roman letters and numbers. Nothing fancy. In searching this error message I've found the recommendation to add the font to fop.xconf as described here: http://xmlgraphics.apache.org/fop/trunk/fonts.html#truetype-collections-metrics but I still get the error. The font I'm trying to get working here is a bar code font I downloaded from this site: http://www.jtbarton.com/Barcodes/Code128.aspx and I've opened up the font with a true type editor. There's nothing unusual there. Just a pretty standard font and looking at the character map, I can see an entry for 0x65 that matches correctly and looks just like any other font. So I'm really at a loss. Any suggestions where to look next? Also, just an fyi, I know there's the option to add Barcode4j as an extension to FOP. However since I'm using a system that has FOP embedded into it, it's impossible for us to add any extensions to FOP. I've been down that road with the vendor and we're stuck with using a barcode font and manually calculating the checksum. Thank you, -Nathan Davis This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
Re: Error with missing glyphs in font.
Keep in mind that character codes in FOP files always represent Unicode code points, not glyph codes. You should check the font's CMAP to see what Unicode codepoints it assigns to its glyphs. They will probably be in the PUA [1], i.e., from 0xE000 to 0xF8FF. Then you will need to use these codes in your FOP source file, e.g., by using numeric character references, like #xE00; etc. You should not be specifying or using an external font metrics file. [1] http://en.wikipedia.org/wiki/Private_Use_(Unicode) On Thu, Apr 4, 2013 at 3:23 PM, Nathan Davis nathan.da...@vrad.com wrote: Hello all, I've been chasing an issue with FOP for a little while and hit a bit of a wall. I've added a new font to the list of fonts we can use when rendering a PDF. However no matter what character I enter, FOP gives me an error for every single letter. For example, with the letter E it says 'WARNING: Glyph e (0x65, e) not available in font Code128.' There are lots of posts where people are trying to pass in non-english language, but in this case I'm passing in standard roman letters and numbers. Nothing fancy. In searching this error message I've found the recommendation to add the font to fop.xconf as described here: http://xmlgraphics.apache.org/fop/trunk/fonts.html#truetype-collections-metrics but I still get the error. The font I'm trying to get working here is a bar code font I downloaded from this site: http://www.jtbarton.com/Barcodes/Code128.aspxand I've opened up the font with a true type editor. There's nothing unusual there. Just a pretty standard font and looking at the character map, I can see an entry for 0x65 that matches correctly and looks just like any other font. So I'm really at a loss. Any suggestions where to look next? Also, just an fyi, I know there's the option to add Barcode4j as an extension to FOP. However since I'm using a system that has FOP embedded into it, it's impossible for us to add any extensions to FOP. I've been down that road with the vendor and we're stuck with using a barcode font and manually calculating the checksum. Thank you, -Nathan Davis This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: ERROR: endElement() for fo:root where there is no current element
On 23/01/2012 17:27, Nathan Schoenroth wrote: I am getting the following error when trying to run fop on an xsl-fo template Full Trace: [xmlserver] [INFO] [XMLConnectionHandler] Processed XML document. [xmlserver] [INFO] [XMLConnectionHandler] Sending preview. [xmlserver] [INFO] [XMLConnectionHandler] Sent preview. [xmlserver] [INFO] [XMLConnectionHandler] Job completed. [xmlserver] [WARN] [FOTreeBuilder] Mismatch: table-body (http://www.w3.org/1999/ XSL/Format) vs. table (http://www.w3.org/1999/XSL/Format) [xmlserver] [WARN] [FOTreeBuilder] Mismatch: table (http://www.w3.org/1999/XSL/F ormat) vs. table-body (http://www.w3.org/1999/XSL/Format) [xmlserver] [WARN] [FOTreeBuilder] Mismatch: block (http://www.w3.org/1999/XSL/F ormat) vs. table (http://www.w3.org/1999/XSL/Format) [xmlserver] [WARN] [FOTreeBuilder] Mismatch: flow (http://www.w3.org/1999/XSL/Fo rmat) vs. block (http://www.w3.org/1999/XSL/Format) [xmlserver] [WARN] [FOTreeBuilder] Mismatch: page-sequence (http://www.w3.org/19 99/XSL/Format) vs. flow (http://www.w3.org/1999/XSL/Format) [xmlserver] [WARN] [BreakingAlgorithm] Line 1 of a paragraph overflows the avail able area. (fo:block, ?) [xmlserver] [WARN] [FOTreeBuilder] Mismatch: root (http://www.w3.org/1999/XSL/Fo rmat) vs. page-sequence (http://www.w3.org/1999/XSL/Format) Have you seen this FAQ on the website? http://xmlgraphics.apache.org/fop/faq.html#saxexception-mismatch The error means that something went wrong during the XSLT stage. Run your XML+XSLT using xalan directly instead of FOP to diagnose what goes wrong in your XSLT. Thanks, Chris [xmlserver] [ERROR] [FOTreeBuilder] javax.xml.transform. TransformerException: ja va.lang.IllegalStateException: endElement() called for fo:root where there is no current element. [xmlserver] [INFO] [XMLConnectionHandler] Processed XML document. [xmlserver] [INFO] [XMLConnectionHandler] Job completed. [xmlserver] SystemId Unknown; Line #0; Column #0; java.lang.IllegalStateExceptio n: endElement() called for fo:root where there is no current element. -- *Nathan* - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error when embedding PNG with iTXt metadata (text/international)
What fop version are you using? I ran your example with both the trunk and the 1.0 version and in both cases the PDF was generated with the image embedded (fop-1.0 throws a warning but still generates the PDF with the image). Luis On Fri, Nov 25, 2011 at 7:47 AM, mheigl michael.he...@yahoo.de wrote: Hi, I've a problem embedding PNGs within a PDF file. When trying to embed PNGs which are created (for example) in Adobe Photosop (using Metadata: All) FOP throws an error: Reason: org.apache.xmlgraphics.image.loader.ImageException: I/O error while extracting image metadata: Error reading PNG metadata (see position 41:110) It seems the problem is due to iTXt metadata entries - as soon as there is any iTXt metadata entry in the PNG the error is thrown. When I change iTXt to tEXt FOP creates the PDF and embeds the image I've attached a demo .fo and .png file http://old.nabble.com/file/p32875848/itxt.zip itxt.zip Thanks, Michael -- View this message in context: http://old.nabble.com/Error-when-embedding-PNG-with-iTXt-metadata-%28text-international%29-tp32875848p32875848.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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error when embedding PNG with iTXt metadata (text/international)
I am using FOP Version 1.0 binary. Yes, it creates the PDF but it does not embed the image lmpmbernardo wrote: What fop version are you using? I ran your example with both the trunk and the 1.0 version and in both cases the PDF was generated with the image embedded (fop-1.0 throws a warning but still generates the PDF with the image). Luis On Fri, Nov 25, 2011 at 7:47 AM, mheigl michael.he...@yahoo.de wrote: Hi, I've a problem embedding PNGs within a PDF file. When trying to embed PNGs which are created (for example) in Adobe Photosop (using Metadata: All) FOP throws an error: Reason: org.apache.xmlgraphics.image.loader.ImageException: I/O error while extracting image metadata: Error reading PNG metadata (see position 41:110) It seems the problem is due to iTXt metadata entries - as soon as there is any iTXt metadata entry in the PNG the error is thrown. When I change iTXt to tEXt FOP creates the PDF and embeds the image I've attached a demo .fo and .png file http://old.nabble.com/file/p32875848/itxt.zip itxt.zip Thanks, Michael -- View this message in context: http://old.nabble.com/Error-when-embedding-PNG-with-iTXt-metadata-%28text-international%29-tp32875848p32875848.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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Error-when-embedding-PNG-with-iTXt-metadata-%28text-international%29-tp32875848p32875936.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
Re: Error when embedding PNG with iTXt metadata (text/international)
Ok, then what is the java version and OS you are using? If you look at the error it is not really a fop error but an error in one of the libraries used by fop. I do not see the error using java 1.6.0_23. On Fri, Nov 25, 2011 at 9:45 AM, mheigl michael.he...@yahoo.de wrote: I am using FOP Version 1.0 binary. Yes, it creates the PDF but it does not embed the image lmpmbernardo wrote: What fop version are you using? I ran your example with both the trunk and the 1.0 version and in both cases the PDF was generated with the image embedded (fop-1.0 throws a warning but still generates the PDF with the image). Luis On Fri, Nov 25, 2011 at 7:47 AM, mheigl michael.he...@yahoo.de wrote: Hi, I've a problem embedding PNGs within a PDF file. When trying to embed PNGs which are created (for example) in Adobe Photosop (using Metadata: All) FOP throws an error: Reason: org.apache.xmlgraphics.image.loader.ImageException: I/O error while extracting image metadata: Error reading PNG metadata (see position 41:110) It seems the problem is due to iTXt metadata entries - as soon as there is any iTXt metadata entry in the PNG the error is thrown. When I change iTXt to tEXt FOP creates the PDF and embeds the image I've attached a demo .fo and .png file http://old.nabble.com/file/p32875848/itxt.zip itxt.zip Thanks, Michael -- View this message in context: http://old.nabble.com/Error-when-embedding-PNG-with-iTXt-metadata-%28text-international%29-tp32875848p32875848.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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Error-when-embedding-PNG-with-iTXt-metadata-%28text-international%29-tp32875848p32875936.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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error when embedding PNG with iTXt metadata (text/international)
I confirm that the error exists with java 1.5.0_22. So I think if you upgrade it should go away. On Fri, Nov 25, 2011 at 10:33 AM, Luis Bernardo lmpmberna...@gmail.com wrote: Ok, then what is the java version and OS you are using? If you look at the error it is not really a fop error but an error in one of the libraries used by fop. I do not see the error using java 1.6.0_23. On Fri, Nov 25, 2011 at 9:45 AM, mheigl michael.he...@yahoo.de wrote: I am using FOP Version 1.0 binary. Yes, it creates the PDF but it does not embed the image lmpmbernardo wrote: What fop version are you using? I ran your example with both the trunk and the 1.0 version and in both cases the PDF was generated with the image embedded (fop-1.0 throws a warning but still generates the PDF with the image). Luis On Fri, Nov 25, 2011 at 7:47 AM, mheigl michael.he...@yahoo.de wrote: Hi, I've a problem embedding PNGs within a PDF file. When trying to embed PNGs which are created (for example) in Adobe Photosop (using Metadata: All) FOP throws an error: Reason: org.apache.xmlgraphics.image.loader.ImageException: I/O error while extracting image metadata: Error reading PNG metadata (see position 41:110) It seems the problem is due to iTXt metadata entries - as soon as there is any iTXt metadata entry in the PNG the error is thrown. When I change iTXt to tEXt FOP creates the PDF and embeds the image I've attached a demo .fo and .png file http://old.nabble.com/file/p32875848/itxt.zip itxt.zip Thanks, Michael -- View this message in context: http://old.nabble.com/Error-when-embedding-PNG-with-iTXt-metadata-%28text-international%29-tp32875848p32875848.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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Error-when-embedding-PNG-with-iTXt-metadata-%28text-international%29-tp32875848p32875936.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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error when embedding PNG with iTXt metadata (text/international)
thanks very much :-) using java 1.6.0_27 solved the problem lmpmbernardo wrote: I confirm that the error exists with java 1.5.0_22. So I think if you upgrade it should go away. On Fri, Nov 25, 2011 at 10:33 AM, Luis Bernardo lmpmberna...@gmail.com wrote: Ok, then what is the java version and OS you are using? If you look at the error it is not really a fop error but an error in one of the libraries used by fop. I do not see the error using java 1.6.0_23. On Fri, Nov 25, 2011 at 9:45 AM, mheigl michael.he...@yahoo.de wrote: I am using FOP Version 1.0 binary. Yes, it creates the PDF but it does not embed the image lmpmbernardo wrote: What fop version are you using? I ran your example with both the trunk and the 1.0 version and in both cases the PDF was generated with the image embedded (fop-1.0 throws a warning but still generates the PDF with the image). Luis On Fri, Nov 25, 2011 at 7:47 AM, mheigl michael.he...@yahoo.de wrote: Hi, I've a problem embedding PNGs within a PDF file. When trying to embed PNGs which are created (for example) in Adobe Photosop (using Metadata: All) FOP throws an error: Reason: org.apache.xmlgraphics.image.loader.ImageException: I/O error while extracting image metadata: Error reading PNG metadata (see position 41:110) It seems the problem is due to iTXt metadata entries - as soon as there is any iTXt metadata entry in the PNG the error is thrown. When I change iTXt to tEXt FOP creates the PDF and embeds the image I've attached a demo .fo and .png file http://old.nabble.com/file/p32875848/itxt.zip itxt.zip Thanks, Michael -- View this message in context: http://old.nabble.com/Error-when-embedding-PNG-with-iTXt-metadata-%28text-international%29-tp32875848p32875848.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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Error-when-embedding-PNG-with-iTXt-metadata-%28text-international%29-tp32875848p32875936.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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Error-when-embedding-PNG-with-iTXt-metadata-%28text-international%29-tp32875848p32876032.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
Re: Error messages from fop
On sø., sep. 18, 2011 at 08:00:56 +0200, Simon Pepping wrote: Probably. You should also upgrade xmlgraphics-commons. Simon Thank you! Helped a lot. Lars On Sat, Sep 17, 2011 at 09:03:26PM +0200, Lars Bjørndal wrote: I upgraded fop from the update-testing repository, and now, I have fop-1.0-13.fc14 installed. Unfortunately and surprisingly, I get the following errors when giving the command 'fop -h' or other fop commands: Exception in thread main java.lang.NoClassDefFoundError: org/apache/xmlgraphics/util/uri/CommonURIResolver at org.apache.fop.apps.FOURIResolver.init(FOURIResolver.java:56) at org.apache.fop.apps.FopFactory.init(FopFactory.java:155) at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:177) at org.apache.fop.cli.CommandLineOptions.init(CommandLineOptions.java:121) at org.apache.fop.cli.Main.startFOP(Main.java:157) at org.apache.fop.cli.Main.main(Main.java:204) Caused by: java.lang.ClassNotFoundException: org.apache.xmlgraphics.util.uri.CommonURIResolver at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) ... 6 more Is there some missing dependency packages on my system? - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error messages from fop
Probably. You should also upgrade xmlgraphics-commons. Simon On Sat, Sep 17, 2011 at 09:03:26PM +0200, Lars Bjørndal wrote: I upgraded fop from the update-testing repository, and now, I have fop-1.0-13.fc14 installed. Unfortunately and surprisingly, I get the following errors when giving the command 'fop -h' or other fop commands: Exception in thread main java.lang.NoClassDefFoundError: org/apache/xmlgraphics/util/uri/CommonURIResolver at org.apache.fop.apps.FOURIResolver.init(FOURIResolver.java:56) at org.apache.fop.apps.FopFactory.init(FopFactory.java:155) at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:177) at org.apache.fop.cli.CommandLineOptions.init(CommandLineOptions.java:121) at org.apache.fop.cli.Main.startFOP(Main.java:157) at org.apache.fop.cli.Main.main(Main.java:204) Caused by: java.lang.ClassNotFoundException: org.apache.xmlgraphics.util.uri.CommonURIResolver at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) ... 6 more Is there some missing dependency packages on my system? - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error messages from fop
Hi, Simon! You wrote: The problem does not occur in fop-1.0, nor in the current development version of fop. It may be bug 46386 (see https://issues.apache.org/bugzilla/show_bug.cgi?id=46386). That bug report suggests that the problem is due to an empty inline with an id. You may either remove such elements, or upgrade to fop-1.0. We recently discussed with fedora how to solve the problem that they had with building fop-1.0, so I hope it is now available in fedora. I upgraded fop from the update-testing repository, and now, I have fop-1.0-13.fc14 installed. Unfortunately and surprisingly, I get the following errors when giving the command 'fop -h' or other fop commands: Exception in thread main java.lang.NoClassDefFoundError: org/apache/xmlgraphics/util/uri/CommonURIResolver at org.apache.fop.apps.FOURIResolver.init(FOURIResolver.java:56) at org.apache.fop.apps.FopFactory.init(FopFactory.java:155) at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:177) at org.apache.fop.cli.CommandLineOptions.init(CommandLineOptions.java:121) at org.apache.fop.cli.Main.startFOP(Main.java:157) at org.apache.fop.cli.Main.main(Main.java:204) Caused by: java.lang.ClassNotFoundException: org.apache.xmlgraphics.util.uri.CommonURIResolver at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) ... 6 more Is there some missing dependency packages on my system? Thanks Lars On Wed, Sep 14, 2011 at 11:13:42AM +0200, Lars Bjørndal wrote: Hello I'd like to convert the following file into PDF, using fop version 0.95. http://lamasti.net/filer/test.fo The fo file is generated from an Docbook XML file with xsltproc. The rest of this mail shows the output from fop, and I hope someon could help me find a way out... The CLASSPATH variable is set to: /usr/share/java/commons-io.jar:/usr/share/java/batik-all.jar:/usr/share/java/avalon-framework.jar:/usr/share/java/xmlgraphics-commons.jar:/usr/share/java/commons-logging.jar:/usr/share/java/fop.jar::/usr/share/java/xml-commons-apis-ext.jar:/home/lrs/fop/fop-hyph.jar Here's the output: - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error messages from fop
The problem does not occur in fop-1.0, nor in the current development version of fop. It may be bug 46386 (see https://issues.apache.org/bugzilla/show_bug.cgi?id=46386). That bug report suggests that the problem is due to an empty inline with an id. You may either remove such elements, or upgrade to fop-1.0. We recently discussed with fedora how to solve the problem that they had with building fop-1.0, so I hope it is now available in fedora. Best, Simon On Wed, Sep 14, 2011 at 11:13:42AM +0200, Lars Bjørndal wrote: Hello I'd like to convert the following file into PDF, using fop version 0.95. http://lamasti.net/filer/test.fo The fo file is generated from an Docbook XML file with xsltproc. The rest of this mail shows the output from fop, and I hope someon could help me find a way out... The CLASSPATH variable is set to: /usr/share/java/commons-io.jar:/usr/share/java/batik-all.jar:/usr/share/java/avalon-framework.jar:/usr/share/java/xmlgraphics-commons.jar:/usr/share/java/commons-logging.jar:/usr/share/java/fop.jar::/usr/share/java/xml-commons-apis-ext.jar:/home/lrs/fop/fop-hyph.jar Here's the output: - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error including a PDF inside another PDF
Hi Jose, The ERROR message is the key here, it's indicative of an absence of an image loader for PDFs. You need to have the FOP-pdf-images JAR to your class path, you can get the JAR from this link http://www.jeremias-maerki.ch/download/fop/pdf-images/ and to put it in your class path, the easiest way would be to drop the jar in your lib/ folder. Hope that helps Mehdi On 17 June 2011 04:16, JOSE L MARTINEZ-AVIAL jlm...@gmail.com wrote: Hi, I'm using FOP 0.95 to add an address cover to a PDF I receive. I'm doign this: fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:call-template name=letter-layout-portrait/ xsl:call-template name=address/ fox:external-document content-type=pdf src=prueba.pdf/ /fo:root The document is composed, but the external file is not added, and I see the following lines in the log 2011-06-16 23:11:16,099 DEBUG org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext - Creating new Source for prueba.pdf 2011-06-16 23:11:16,115 DEBUG org.apache.fop.image.loader.batik.PreloaderSVG - Error while trying to load stream as an SVG file: Content is not allowed in prolog. 2011-06-16 23:11:16,115 DEBUG org.apache.fop.image.loader.batik.PreloaderSVG - Error while trying to load stream as an SVG file: Content is not allowed in prolog. 2011-06-16 23:11:16,193 ERROR org.apache.fop.apps.FOUserAgent - Image not available. URI: prueba.pdf. Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for prueba.pdf (No context info available) The contentype is set to pdf, so I don't why FOP is trying to read it as a SVG. Any ideas? Thanks Jose - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: Error including a PDF inside another PDF
On a slightly different note can you use the FOP-pdf-images.jar to extract thumbnails of PDFs? Kindest regards Theresa Forster Senior Software Developer -Original Message- From: mehdi houshmand [mailto:med1...@gmail.com] Sent: 17 June 2011 08:00 To: fop-users@xmlgraphics.apache.org Subject: Re: Error including a PDF inside another PDF Hi Jose, The ERROR message is the key here, it's indicative of an absence of an image loader for PDFs. You need to have the FOP-pdf-images JAR to your class path, you can get the JAR from this link http://www.jeremias-maerki.ch/download/fop/pdf-images/ and to put it in your class path, the easiest way would be to drop the jar in your lib/ folder. Hope that helps Mehdi - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error including a PDF inside another PDF
Hi Theresa, To put it simply, no. As far as I'm aware and I've done some testing of this, FOP-pdf-images doesn't resize/rescale PDFs it only crops. Hope that helps Mehdi On 17 June 2011 11:06, Theresa Jayne Forster ther...@inbrand.co.uk wrote: On a slightly different note can you use the FOP-pdf-images.jar to extract thumbnails of PDFs? Kindest regards Theresa Forster Senior Software Developer -Original Message- From: mehdi houshmand [mailto:med1...@gmail.com] Sent: 17 June 2011 08:00 To: fop-users@xmlgraphics.apache.org Subject: Re: Error including a PDF inside another PDF Hi Jose, The ERROR message is the key here, it's indicative of an absence of an image loader for PDFs. You need to have the FOP-pdf-images JAR to your class path, you can get the JAR from this link http://www.jeremias-maerki.ch/download/fop/pdf-images/ and to put it in your class path, the easiest way would be to drop the jar in your lib/ folder. Hope that helps Mehdi - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: Error including a PDF inside another PDF
But can it be used to extract the front page as an image? We can rescale later... Kindest regards Theresa Forster Senior Software Developer -Original Message- From: mehdi houshmand [mailto:med1...@gmail.com] Sent: 17 June 2011 11:17 To: fop-users@xmlgraphics.apache.org Subject: Re: Error including a PDF inside another PDF Hi Theresa, To put it simply, no. As far as I'm aware and I've done some testing of this, FOP-pdf-images doesn't resize/rescale PDFs it only crops. Hope that helps Mehdi - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error including a PDF inside another PDF
Hi Theresa, Yes, it can place the font page of one document and place it in another, this may help you http://old.nabble.com/-ANN--PDF-image-plug-in-for-Apache-FOP-version-2.0-released-td30077148.html/. Hope that helps Mehdi On 17 June 2011 11:49, Theresa Jayne Forster ther...@inbrand.co.uk wrote: But can it be used to extract the front page as an image? We can rescale later... Kindest regards Theresa Forster Senior Software Developer -Original Message- From: mehdi houshmand [mailto:med1...@gmail.com] Sent: 17 June 2011 11:17 To: fop-users@xmlgraphics.apache.org Subject: Re: Error including a PDF inside another PDF Hi Theresa, To put it simply, no. As far as I'm aware and I've done some testing of this, FOP-pdf-images doesn't resize/rescale PDFs it only crops. Hope that helps Mehdi - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error including a PDF inside another PDF
Hi, I'm using FOP 0.95 to add an address cover to a PDF I receive. I'm doign this: fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:call-template name=letter-layout-portrait/ xsl:call-template name=address/ fox:external-document content-type=pdf src=prueba.pdf/ /fo:root The document is composed, but the external file is not added, and I see the following lines in the log 2011-06-16 23:11:16,099 DEBUG org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext - Creating new Source for prueba.pdf 2011-06-16 23:11:16,115 DEBUG org.apache.fop.image.loader.batik.PreloaderSVG - Error while trying to load stream as an SVG file: Content is not allowed in prolog. 2011-06-16 23:11:16,115 DEBUG org.apache.fop.image.loader.batik.PreloaderSVG - Error while trying to load stream as an SVG file: Content is not allowed in prolog. 2011-06-16 23:11:16,193 ERROR org.apache.fop.apps.FOUserAgent - Image not available. URI: prueba.pdf. Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for prueba.pdf (No context info available) The contentype is set to pdf, so I don't why FOP is trying to read it as a SVG. Any ideas? Thanks Jose
Re: Error with X11GraphicsEnvironment
Hello, Hi Venkateswara, To: gene...@xmlgraphics.apache.org, fop-users@xmlgraphics.apache.org, fop-users-h...@xmlgraphics.apache.org Please don't cross-post at so many mailing list at a time: instead, pick a mailing list [1] wisely (in this case, possibly a users list (fop-users@, the one I'm replying to) and wait patiently for a response before recalling the subject and/or attempting other mailing list. Thanks! :-) BTW: does fop-users-help@ even exists? I guess that might be reserved for administrative purposes... :-| I am using Apache FOP to generate a PDF as per my requirement. I have written a program to convert an XML data into PDF. This was working fine on my local machine, Windows XP sp2. When I roll out my code to my DEV server, Linux devsrv1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux. I am facing the following exception : java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment [...] As you provide almost no interesting information (for example, FOP and Java run-time versions are much more important that operating system, IMO), I'd still say that there's a simple explanation for this: your server is headless (that is, no graphics adapted is available). You can reproduce this in your Windows environment (which has a graphics adapter) using the information in Batik bug 42408 [2] (and maybe even help testing the patch available there?). Can you please support me with suggestion or can you forward me with some references where I can overcome these errors. Please provide more detailed information about your environment at a next opportunity! ;-) Thanks In Advance. Regards, Venkateswara Gupta Grandhi. Hope this helps, Helder [1] http://xmlgraphics.apache.org/mail.html [2] https://issues.apache.org/bugzilla/show_bug.cgi?id=42408 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error (Exception in thread Root Thread java.lang.StackOverflowError) while transforming XML data using .xsl file using Oracle 11g R1
Jayant Ghagre wrote: Hello, I am getting following error while transforming XML data file to PDF using .XSL file. I have loaded FOP 0.95 in Oracle 11g R1 database. I am calling FOP using Java Stored Procedure. The same code executes without any errors in stand-alone mode (Windows XP with JDK 1.5) Exception in thread Root Thread java.lang.StackOverflowError at java.lang.String.valueOf(String.java) When running within Oracle Instance you may just need more than 64Kb stack space. You could try specifying -Xss2M to JVM startup parameters to see if it resolves the issue Thanks, Chris - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: [ERROR] Image not found
Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe 2010/2/18 pjmorce pjcarva...@gmail.com Hello I used a simple example on the Internet about how to use FOP in java (http://javaboutique.internet.com/tutorials/FOP/): - I Created a simple Java application with a class that takes an XML and converts it into a PDF (using a XSL) containing an image. The name of my class is Process.java and it has a method process. It works fine when called directly as a java application. - I Created a simple web service that just call this process method of that class. However, when i call the web service, i get an error: [ERROR] Image not found: img/logo.gif = The PDF is created but without the image. Here is the code of my Process.java class: public static String process(String xml, String xsl) { String sResult = null; try { ByteArrayOutputStream foOut = new ByteArrayOutputStream(); ByteArrayOutputStream bOut = new ByteArrayOutputStream(); InputStream iss = Process.class.getClassLoader().getResourceAsStream(brique); copyFile(new BufferedInputStream(iss), bOut); SAXBuilder builder = new SAXBuilder(); Document document = builder.build(new ByteArrayInputStream(xml.getBytes())); TransformerFactory factory = TransformerFactory.newInstance(); InputStream iXsl = Process.class.getClassLoader().getResourceAsStream(xsl); StreamSource iSource = new StreamSource(iXsl); Transformer foTrans = factory.newTransformer(iSource); StreamSource strSourceXML = new StreamSource(new ByteArrayInputStream(xml.getBytes())); foTrans.transform(strSourceXML, new StreamResult(foOut)); foOut.flush(); ByteArrayOutputStream pdfOut = new ByteArrayOutputStream(); TransformerFactory tFactoryFO2PDF = TransformerFactory.newInstance(); Transformer pdfTrans = tFactoryFO2PDF.newTransformer(); FopFactory fopFactory = FopFactory.newInstance(); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, pdfOut); Result res = new SAXResult(fop.getDefaultHandler()); StreamSource streamSourceXml = new StreamSource(new ByteArrayInputStream(foOut.toByteArray())); pdfTrans.transform(streamSourceXml, res); java.io.File file = new java.io.File(d:/res.pdf); FileOutputStream foStream = new FileOutputStream(file); pdfOut.writeTo(foStream); } catch(Exception e) { e.printStackTrace(); } return sResult; } private static boolean copyFile(InputStream in, OutputStream out) { try { int c; while ((c = in.read()) != -1) out.write(c); in.close(); out.close(); } catch (IOException io) { return false; } return true; } The code of my web service is just: public static String process(String xml, String xsl) { String sResult = null; try { sResult = Process.process(xml, xsl); System.out.println(sss); } catch(Exception e) { e.printStackTrace(); } return sResult; } The web service has the JAR of the Java application in his classpath. The content of the Jar file is the following one: NamePath briques.xsd logo.gif img\ Manifest.mf meta-inf\ Process.class tst saxon-licence.lic xsl2.xslt I call the web service with the following parameters: xml = ?xml version='1.0' encoding='UTF-8'?+ Catalog+ Book+ TitleMastering EJB/Title+ AuthorEd Roman/Author+ Price$45.00/Price+ /Book+ Book+ TitleDesign Patterns/Title+ AuthorErich Gamma/Author+ Price$50.00/Price+ /Book+ Book+ TitleEffective Java/Title+ AuthorJosch Bloch/Author+ Price$30.00/Price+ /Book + /Catalog; xsl = xsl2.xslt; In the xsl2.xslt I have a part of code like this to insert the image on the pdf: ... fo:block fo:external-graphic src=img/logo.gif/ /fo:block ... The XSL is found in the JAR because
Re: [ERROR] Image not found
Hi, It is more of a URL problem, try pass URL 'file:/img/logo.gif' instead of relative path. Thanks, Venkat. philippe voncken wrote: Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe 2010/2/18 pjmorce pjcarva...@gmail.com mailto:pjcarva...@gmail.com Hello I used a simple example on the Internet about how to use FOP in java (http://javaboutique.internet.com/tutorials/FOP/): - I Created a simple Java application with a class that takes an XML and converts it into a PDF (using a XSL) containing an image. The name of my class is Process.java and it has a method process. It works fine when called directly as a java application. - I Created a simple web service that just call this process method of that class. However, when i call the web service, i get an error: [ERROR] Image not found: img/logo.gif = The PDF is created but without the image. Here is the code of my Process.java class: public static String process(String xml, String xsl) { String sResult = null; try { ByteArrayOutputStream foOut = new ByteArrayOutputStream(); ByteArrayOutputStream bOut = new ByteArrayOutputStream(); InputStream iss = Process.class.getClassLoader().getResourceAsStream(brique); copyFile(new BufferedInputStream(iss), bOut); SAXBuilder builder = new SAXBuilder(); Document document = builder.build(new ByteArrayInputStream(xml.getBytes())); TransformerFactory factory = TransformerFactory.newInstance(); InputStream iXsl = Process.class.getClassLoader().getResourceAsStream(xsl); StreamSource iSource = new StreamSource(iXsl); Transformer foTrans = factory.newTransformer(iSource); StreamSource strSourceXML = new StreamSource(new ByteArrayInputStream(xml.getBytes())); foTrans.transform(strSourceXML, new StreamResult(foOut)); foOut.flush(); ByteArrayOutputStream pdfOut = new ByteArrayOutputStream(); TransformerFactory tFactoryFO2PDF = TransformerFactory.newInstance(); Transformer pdfTrans = tFactoryFO2PDF.newTransformer(); FopFactory fopFactory = FopFactory.newInstance(); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, pdfOut); Result res = new SAXResult(fop.getDefaultHandler()); StreamSource streamSourceXml = new StreamSource(new ByteArrayInputStream(foOut.toByteArray())); pdfTrans.transform(streamSourceXml, res); java.io.File file = new java.io.File(d:/res.pdf); FileOutputStream foStream = new FileOutputStream(file); pdfOut.writeTo(foStream); } catch(Exception e) { e.printStackTrace(); } return sResult; } private static boolean copyFile(InputStream in, OutputStream out) { try { int c; while ((c = in.read()) != -1) out.write(c); in.close(); out.close(); } catch (IOException io) { return false; } return true; } The code of my web service is just: public static String process(String xml, String xsl) { String sResult = null; try { sResult = Process.process(xml, xsl); System.out.println(sss); } catch(Exception e) { e.printStackTrace(); } return sResult; } The web service has the JAR of the Java application in his classpath. The content of the Jar file is the following one: NamePath briques.xsd logo.gif img\ Manifest.mf meta-inf\ Process.class tst saxon-licence.lic xsl2.xslt I call the web service with the following parameters: xml = ?xml version='1.0' encoding='UTF-8'?+ Catalog+ Book+ TitleMastering EJB/Title+ AuthorEd Roman/Author+ Price$45.00/Price+ /Book+
Re: [ERROR] Image not found
Thanks for your answer. I am not familiarized with URIResolver but I check it and, if I understood, I must implement it creating a new class that implements the URIResolver class and the method resolve(String href, String base) In the javadoc the definition of both arguments are: href - An href attribute, which may be relative or absolute. base - The base URI in effect when the href attribute was encountered. If I am correct HRef is the filename. So my URIResolver will have img/logo.gif as href parameter. Correct? And in the case that I dont know the name of my image indicated on the XSL? how can I solve the problem? thank you regards Philippe Voncken wrote: Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe 2010/2/18 pjmorce pjcarva...@gmail.com Hello I used a simple example on the Internet about how to use FOP in java (http://javaboutique.internet.com/tutorials/FOP/): - I Created a simple Java application with a class that takes an XML and converts it into a PDF (using a XSL) containing an image. The name of my class is Process.java and it has a method process. It works fine when called directly as a java application. - I Created a simple web service that just call this process method of that class. However, when i call the web service, i get an error: [ERROR] Image not found: img/logo.gif = The PDF is created but without the image. Here is the code of my Process.java class: public static String process(String xml, String xsl) { String sResult = null; try { ByteArrayOutputStream foOut = new ByteArrayOutputStream(); ByteArrayOutputStream bOut = new ByteArrayOutputStream(); InputStream iss = Process.class.getClassLoader().getResourceAsStream(brique); copyFile(new BufferedInputStream(iss), bOut); SAXBuilder builder = new SAXBuilder(); Document document = builder.build(new ByteArrayInputStream(xml.getBytes())); TransformerFactory factory = TransformerFactory.newInstance(); InputStream iXsl = Process.class.getClassLoader().getResourceAsStream(xsl); StreamSource iSource = new StreamSource(iXsl); Transformer foTrans = factory.newTransformer(iSource); StreamSource strSourceXML = new StreamSource(new ByteArrayInputStream(xml.getBytes())); foTrans.transform(strSourceXML, new StreamResult(foOut)); foOut.flush(); ByteArrayOutputStream pdfOut = new ByteArrayOutputStream(); TransformerFactory tFactoryFO2PDF = TransformerFactory.newInstance(); Transformer pdfTrans = tFactoryFO2PDF.newTransformer(); FopFactory fopFactory = FopFactory.newInstance(); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, pdfOut); Result res = new SAXResult(fop.getDefaultHandler()); StreamSource streamSourceXml = new StreamSource(new ByteArrayInputStream(foOut.toByteArray())); pdfTrans.transform(streamSourceXml, res); java.io.File file = new java.io.File(d:/res.pdf); FileOutputStream foStream = new FileOutputStream(file); pdfOut.writeTo(foStream); } catch(Exception e) { e.printStackTrace(); } return sResult; } private static boolean copyFile(InputStream in, OutputStream out) { try { int c; while ((c = in.read()) != -1) out.write(c); in.close(); out.close(); } catch (IOException io) { return false; } return true; } The code of my web service is just: public static String process(String xml, String xsl) { String sResult = null; try { sResult = Process.process(xml, xsl); System.out.println(sss); } catch(Exception e) { e.printStackTrace(); } return sResult; } The web service has the JAR of the Java application in his classpath. The content of the Jar file is the following one: NamePath briques.xsd logo.gif img\ Manifest.mf meta-inf\ Process.class tst saxon-licence.lic xsl2.xslt I call the web service with the following parameters: xml = ?xml version='1.0' encoding='UTF-8'?+ Catalog+ Book+ TitleMastering EJB/Title+ AuthorEd Roman/Author+ Price$45.00/Price+ /Book+
Re: [ERROR] Image not found
I tried your suggestion: in the XSL I have now the following code and the problem remains: fo:block fo:external-graphic src=url('file:/img/logo.gif')/ /fo:block However, i also tried to put this and it worked: fo:block fo:external-graphic src=jar:file:///D:/eclipse_galileo/eclipse/TstFOP/TstFOP.jar!/img/logo.gif/ /fo:block It worked, but obvious reasons I cannot put this on the XSL that will be on production... :( Hi, It is more of a URL problem, try pass URL 'file:/img/logo.gif' instead of relative path. Thanks, Venkat. philippe voncken wrote: Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe -- View this message in context: http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637052.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
Re: [ERROR] Image not found
Yes, it's right. implement your UriResolver, set the fopFactory and debug your programme. You will see that you pass in your resolve(String href, String base) method when fop search your image. in href you'll see your image file name and so you can plugged your real image with the inputStream resolve method return. So you can put your image in the classpath and use as : resolve(String href, String base) { return YourUriResolver.class.getResourceAsStream(href); } or : public class SimpleUriResolver implements URIResolver { /** * Instantiates a new fop uri resolver. */ public SimpleUriResolver() { super(); } /* * (non-Javadoc) * @see javax.xml.transform.URIResolver#resolve(java.lang.String, java.lang.String) */ public Source resolve(String href, String base) throws TransformerException { Source src; final String file = file:; if (href.startsWith(file)) { src = new StreamSource(new File(href.substring(file.length(; } else { src = new StreamSource(SimpleUriResolver.class.getResourceAsStream(href)); } return src; } } As you want :) Philippe 2010/2/18 pjmorce pjcarva...@gmail.com Thanks for your answer. I am not familiarized with URIResolver but I check it and, if I understood, I must implement it creating a new class that implements the URIResolver class and the method resolve(String href, String base) In the javadoc the definition of both arguments are: href - An href attribute, which may be relative or absolute. base - The base URI in effect when the href attribute was encountered. If I am correct HRef is the filename. So my URIResolver will have img/logo.gif as href parameter. Correct? And in the case that I dont know the name of my image indicated on the XSL? how can I solve the problem? thank you regards Philippe Voncken wrote: Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe 2010/2/18 pjmorce pjcarva...@gmail.com Hello I used a simple example on the Internet about how to use FOP in java (http://javaboutique.internet.com/tutorials/FOP/): - I Created a simple Java application with a class that takes an XML and converts it into a PDF (using a XSL) containing an image. The name of my class is Process.java and it has a method process. It works fine when called directly as a java application. - I Created a simple web service that just call this process method of that class. However, when i call the web service, i get an error: [ERROR] Image not found: img/logo.gif = The PDF is created but without the image. Here is the code of my Process.java class: public static String process(String xml, String xsl) { String sResult = null; try { ByteArrayOutputStream foOut = new ByteArrayOutputStream(); ByteArrayOutputStream bOut = new ByteArrayOutputStream(); InputStream iss = Process.class.getClassLoader().getResourceAsStream(brique); copyFile(new BufferedInputStream(iss), bOut); SAXBuilder builder = new SAXBuilder(); Document document = builder.build(new ByteArrayInputStream(xml.getBytes())); TransformerFactory factory = TransformerFactory.newInstance(); InputStream iXsl = Process.class.getClassLoader().getResourceAsStream(xsl); StreamSource iSource = new StreamSource(iXsl); Transformer foTrans = factory.newTransformer(iSource); StreamSource strSourceXML = new StreamSource(new ByteArrayInputStream(xml.getBytes())); foTrans.transform(strSourceXML, new StreamResult(foOut)); foOut.flush(); ByteArrayOutputStream pdfOut = new ByteArrayOutputStream(); TransformerFactory tFactoryFO2PDF = TransformerFactory.newInstance(); Transformer pdfTrans = tFactoryFO2PDF.newTransformer(); FopFactory fopFactory = FopFactory.newInstance(); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, pdfOut); Result res = new SAXResult(fop.getDefaultHandler()); StreamSource streamSourceXml = new StreamSource(new ByteArrayInputStream(foOut.toByteArray())); pdfTrans.transform(streamSourceXml, res); java.io.File file = new java.io.File(d:/res.pdf); FileOutputStream foStream = new FileOutputStream(file); pdfOut.writeTo(foStream); } catch(Exception e) { e.printStackTrace(); } return sResult; } private static boolean copyFile(InputStream in,
Re: [ERROR] Image not found
Sorry, with this xsl it'll work in root element classpath : fo:block fo:external-graphic src=url('/logo.gif')/ /fo:block Philippe 2010/2/18 philippe voncken m...@philippevoncken.com With my SimpleUriResolver() you must use xsl as follow: fo:block fo:external-graphic src=url('logo.gif')/ /fo:block if logo.gif is in your classpath root element, it will work. Philippe 2010/2/18 Georg Datterl gdatt...@geneon.de Hi pjmorce, Assuming TstFOP.jar is on the server and found by your application server, what happens if you use fo:block fo:external-graphic src=url('file:TstFOP.jar!/img/logo.gif')/ /fo:block Mit freundlichen Grüßen 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: pjmorce [mailto:pjcarva...@gmail.com] Gesendet: Donnerstag, 18. Februar 2010 11:47 An: fop-users@xmlgraphics.apache.org Betreff: Re: [ERROR] Image not found I tried your suggestion: in the XSL I have now the following code and the problem remains: fo:block fo:external-graphic src=url('file:/img/logo.gif')/ /fo:block However, i also tried to put this and it worked: fo:block fo:external-graphic src=jar:file:///D:/eclipse_galileo/eclipse/TstFOP/TstFOP.jar!/img/logo.gif/ /fo:block It worked, but obvious reasons I cannot put this on the XSL that will be on production... :( Hi, It is more of a URL problem, try pass URL 'file:/img/logo.gif' instead of relative path. Thanks, Venkat. philippe voncken wrote: Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe -- View this message in context: http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637052.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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: [ERROR] Image not found
With my SimpleUriResolver() you must use xsl as follow: fo:block fo:external-graphic src=url('logo.gif')/ /fo:block if logo.gif is in your classpath root element, it will work. Philippe 2010/2/18 Georg Datterl gdatt...@geneon.de Hi pjmorce, Assuming TstFOP.jar is on the server and found by your application server, what happens if you use fo:block fo:external-graphic src=url('file:TstFOP.jar!/img/logo.gif')/ /fo:block Mit freundlichen Grüßen 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: pjmorce [mailto:pjcarva...@gmail.com] Gesendet: Donnerstag, 18. Februar 2010 11:47 An: fop-users@xmlgraphics.apache.org Betreff: Re: [ERROR] Image not found I tried your suggestion: in the XSL I have now the following code and the problem remains: fo:block fo:external-graphic src=url('file:/img/logo.gif')/ /fo:block However, i also tried to put this and it worked: fo:block fo:external-graphic src=jar:file:///D:/eclipse_galileo/eclipse/TstFOP/TstFOP.jar!/img/logo.gif/ /fo:block It worked, but obvious reasons I cannot put this on the XSL that will be on production... :( Hi, It is more of a URL problem, try pass URL 'file:/img/logo.gif' instead of relative path. Thanks, Venkat. philippe voncken wrote: Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe -- View this message in context: http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637052.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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: [ERROR] Image not found
Thank you all. I found the answer for my prays. The answer were in dead on URIResolver. I just had to add this into my code to configure my FOUserAgent. (So easy, but so much difficult to find the solution) // configure foUserAgent as desired foUserAgent.setURIResolver(new URIResolver() { public Source resolve(String href, String base) throws TransformerException { return new StreamSource(getClass().getClassLoader ().getResourceAsStream(href)); } }); Thanks again. Best regards. Philippe Voncken wrote: With my SimpleUriResolver() you must use xsl as follow: fo:block fo:external-graphic src=url('logo.gif')/ /fo:block if logo.gif is in your classpath root element, it will work. Philippe 2010/2/18 Georg Datterl gdatt...@geneon.de Hi pjmorce, Assuming TstFOP.jar is on the server and found by your application server, what happens if you use fo:block fo:external-graphic src=url('file:TstFOP.jar!/img/logo.gif')/ /fo:block Mit freundlichen Grüßen 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: pjmorce [mailto:pjcarva...@gmail.com] Gesendet: Donnerstag, 18. Februar 2010 11:47 An: fop-users@xmlgraphics.apache.org Betreff: Re: [ERROR] Image not found I tried your suggestion: in the XSL I have now the following code and the problem remains: fo:block fo:external-graphic src=url('file:/img/logo.gif')/ /fo:block However, i also tried to put this and it worked: fo:block fo:external-graphic src=jar:file:///D:/eclipse_galileo/eclipse/TstFOP/TstFOP.jar!/img/logo.gif/ /fo:block It worked, but obvious reasons I cannot put this on the XSL that will be on production... :( Hi, It is more of a URL problem, try pass URL 'file:/img/logo.gif' instead of relative path. Thanks, Venkat. philippe voncken wrote: Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe -- View this message in context: http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637052.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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637247.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
Re: error in pdf with tiff image inside which was created by fop
ye thank you a lot! all work good now. you are my hero :) -- View this message in context: http://old.nabble.com/error-in-pdf-with-tiff-image-inside-which-was-created-by-fop-tp26509340p26528536.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
Re: error in pdf with tiff image inside which was created by fop
The TIFF contains multiple strips but our code didn't detect that due to a bug. I've just fixed that: http://svn.apache.org/viewvc?rev=884276view=rev Please download XML Graphics Commons Trunk [1] via Subversion, build it and replace the generated JAR in your application's classpath. That should fix your problem. [1] http://svn.apache.org/repos/asf/xmlgraphics/commons/trunk/ On 25.11.2009 10:01:37 lexa2009 wrote: hi. i use fop 0.95 and create pdf document. i have a tiff image with compression CCITT4 http://old.nabble.com/file/p26509340/0375.tif 0375.tif and want to see it in pdf, so i use this xsl file with any xml document. ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:m=http://www.w3.org/1998/Math/MathML; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:output method=xml/ xsl:template match=/ fo:root fo:layout-master-set fo:simple-page-master master-name=my-page1 page-height=29.7cm page-width=21cm margin-top=0cm margin-bottom=0cm margin-left=0cm margin-right=0cm fo:region-body margin-top=1.5cm margin-bottom=1.5cm margin-left=1.5cm margin-right=1.5cm / fo:region-before extent=1.5cm / fo:region-after extent=0.5cm / fo:region-start extent=1.5cm / fo:region-end extent=1.5cm / /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=my-page1 fo:flow flow-name=xsl-region-body fo:blockfo:external-graphic src=url(0375.tif) content-height=100% scaling=uniform //fo:block /fo:flow /fo:page-sequence /fo:root /xsl:template /xsl:stylesheet when fop create pdf there is an error - insufficient data for an image. when i use other tiff images CCITT4 or decode this one to jpeg or tiff without compression all work good. but i need to transform a large amount of images and documents, so i want to know why this error happens and how to fix it with out converting to other format. how to fix it? thank you. -- View this message in context: http://old.nabble.com/error-in-pdf-with-tiff-image-inside-which-was-created-by-fop-tp26509340p26509340.html Sent from the FOP - Users mailing list archive at Nabble.com. Jeremias Maerki - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error in TLE
On 10 Jul 2009, at 21:04, Tecra wrote: Hi Bharat Done. I have posted the patch. :-) I did not realize it would be that small... I'll make sure it gets incorporated into the trunk asap. Thanks again! Andreas Andreas Delmelle mailto:andreas.delmelle.AT.telenet.be jabber: mandr...@jabber.org skype: adlm0608 --- - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error in TLE
On 05 Jul 2009, at 23:39, Tecra wrote: Hi Bharat There is an error while writing the TLE's while writing the attribute qualifier in the afp output. i have modified it. Please let me know if you want me to post the fix. If no problem for you, then please attach a patch with the changes to a Bugzilla entry, and we'll have a look at applying it to the trunk. Thanks for the contribution! Regards Andreas Andreas Delmelle e-mail: andreas.delmelle.AT.telenet.be Skype: adlm0608 Jabber: mandr...@jabber.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error in pdf generation, Invalid or Empty Template
On 06 Jul 2009, at 18:02, mlotfi wrote: Hi when I want to generate a pdf file from fop I got this error : Error in pdf generation, Invalid or Empty Template This is not an error that is thrown by FOP. Seems like this is caused somewhere in the embedding application. At any rate, the XSL by itself tells us very little. I don't see an invalid template, and an empty template is not wrong from the point of view of the XSLT processor. Based on the provided info, we cannot provide more specific hints/pointers. Please try completing the XSL transform separately, using Xalan, and feed the resulting FO to FOP (or send it to us). Maybe that will lead to more helpful info. Regards Andreas Andreas Delmelle e-mail: andreas.delmelle.AT.telenet.be Skype: adlm0608 Jabber: mandr...@jabber.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: [ERROR] org.apache.fop.apps.FOPException: A fo:repeatable-page-master-reference must be child of fo:page-sequence-master, not fo:repeatable-page-master-alternatives
On 10 Apr 2009, at 16:24, Redro JP wrote: Hi Apologies for the late reply. Please post questions like these on the users-list in the future. fop-dev@ is only meant for questions relating to development on FOP. Thanks! While doing fop in dos prompt, i am getting the following error message: [ERROR] org.apache.fop.apps.FOPException: A fo:repeatable-page- master-reference must be child of fo:page-sequence-master, not fo:repeatable-page-master-alternatives When i remove fo:repeatable page master alternative , it is throwing following error message: [ERROR] org.apache.fop.apps.FOPException: fo:conditional-page-master- reference must be child of fo:repeatable-page-master-alternatives, not fo:page-sequence-master Could you please suggest me for further proceedings. The error message tells you literally what is wrong. Somewhere in the layout-master-set, you have: fo:page-sequence-master ... fo:repeatable-page-master-alternatives ... fo:repeatable-page-master-reference ... ... /fo:repeatable-page-master-alternatives ... fo:conditional-page-master-reference ... This is in violation of the XSL-FO Rec. Only the following would be allowed: fo:page-sequence-master ... fo:repeatable-page-master-reference ... ... fo:repeatable-page-master-alternatives ... fo:conditional-page-master-reference ... ... /fo:repeatable-page-master-alternatives HTH! Andreas - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error occurred during initialization of VM
Is there any reason why you're using .025? The latest release is 0.95. Also, can you give a bit more detail of how you're using it? Is it stand-alone? Are you using your own scripts? Is it a servlet? What's your platform? On Thu, Apr 2, 2009 at 10:19 AM, bonekrusher djs...@yahoo.com wrote: Hi All, This question is probably Java issue, but I want to run by this list first. I am running FOP 0.025 on 2 machines. Because the XML files are very large I set the heap size to Xmx1056mb. On one machine it works and another I get this error: Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. Machine 1 (works) stats: Intel Duel Core CPU @2.10GHz/2.07 GHz 2.99 GB Ram Java 1.6.0_11 jdk 1.6.0_11 Machine 2 (doesnt work) Stats: Pentium Dual CPU E2180 @ 2.00 GHz 2.00 GHz, 3.24 GB of RAM Java 1.6.0_11 As you can see I have enough memory in both machines. The only difference is Machine 1 has the JDK. Could this be the issue or its a configuration issue. Any suggestions? Thanks, -- View this message in context: http://www.nabble.com/Error-occurred-during-initialization-of-VM-tp22849015p22849015.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 -- Sam Fuqua ΣΝ ΘΗ 454
Re: Error occurred during initialization of VM
On 02 Apr 2009, at 16:19, bonekrusher wrote: Hi Phil snip / Machine 2 (doesnt work) Stats: Pentium Dual CPU E2180 @ 2.00 GHz 2.00 GHz, 3.24 GB of RAM Java 1.6.0_11 As you can see I have enough memory in both machines. The only difference is Machine 1 has the JDK. Could this be the issue or its a configuration issue. Not really sure, but the stats above (most likely) only reflect the amount of physical RAM available. Any other processes running on that machine that could be eating part of that 3.84GB? IOW: Can you check whether there is enough *free* memory at JVM startup time? Regards Andreas - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error occurred during initialization of VM
Thanks... I am running from the command line. We are in the process of upgrading to 95 - in the mean time I have 18 tech writers using 0.025 - Andreas, How can I check whether there is enough *free* memory at JVM startup time? Thanks, -- View this message in context: http://www.nabble.com/Error-occurred-during-initialization-of-VM-tp22849015p22854270.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
Re: Error occurred during initialization of VM
Thanks - I am running windows - The problem is that Java doenst even start - so i cant see what is happening in task manager Andreas Delmelle-2 wrote: On 02 Apr 2009, at 20:29, bonekrusher wrote: Hi Phil Andreas, How can I check whether there is enough *free* memory at JVM startup time? That depends on the OS. If it is Windows, then checking the Task Manager could already give a clue. On Mac OS X, the tool would be the Activity Monitor. Not sure what the equivalent is for Linux, Solaris, etc. Cheers Andreas - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://www.nabble.com/Error-occurred-during-initialization-of-VM-tp22849015p22854740.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
Re: Error occurred during initialization of VM
On 02 Apr 2009, at 21:03, Andreas Delmelle wrote: On 02 Apr 2009, at 20:54, bonekrusher wrote: Thanks - I am running windows - The problem is that Java doenst even start - so i cant see what is happening in task manager Oh, what I meant was: see if you have enough memory to begin with. Is there 1056MB free RAM available, or are you perhaps already using 80% before Java is even started? If yes, then that would explain why java.exe cannot allocate enough memory for the heap. Just thought of another possibility: in server environments, the RAM on one single machine is typically shared by different users. Maybe a policy is enabled on that particular machine that would place restrictions on the amount of memory that can be used by one account at any given time? I'm suddenly realizing that my earlier remark is not correct. It would only cause a lot of swapping, but should not lead to JVM initialization errors, IIC... Regards Andreas - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Error occurred during initialization of VM
Try running with decreased -Xmx settings. If lower values do work, then that would seem to point to memory restrictions imposed by the OS... - thats it - Because If I lower the memory settings on Xmx I get a Heap Error with large files. Thanks - you're the best Phil Andreas Delmelle-2 wrote: On 02 Apr 2009, at 21:27, bonekrusher wrote: Ok, see attached. http://www.nabble.com/file/p22855298/Windows%2BTask%2BManager.png OK, that should be no problem whatsoever, unless (see my follow-up mail). Try running with decreased -Xmx settings. If lower values do work, then that would seem to point to memory restrictions imposed by the OS... Regards Andreas - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://www.nabble.com/Error-occurred-during-initialization-of-VM-tp22849015p22855636.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
Re: Error while processing xml and xslt files to pdf
Check what JVM is in use. If it's not a Sun JVM, then switch to that. Otherwise, you might want to try one of the other options listed here: http://xmlgraphics.apache.org/fop/stable/graphics.html#batik On 05.11.2008 17:04:26 Ronald McDonald wrote: Hello, I'd like to produce a pdf file with fop from an xml with a xslt file using the following command: fop -c fopconf.xconf -xml my.xml -xsl my.xsl -pdf my.pdf Mac OS X with fop installed via ports does everything right, I get the expected result as a pdf. But using the same command on a remote debian system, i get the following error: (.:X): Gtk-WARNING **: cannot open display: Where X semms to be a random number that changes on every call. I looked at the fop-script and enabled the debug mode. This display the following command under Mac OS X: /System/Library/Frameworks/JavaVM.framework/Home/bin/java -classpath /opt/local/share/java/fop/0.94/lib/xmlgraphics-commons-1.2.jar :/opt/local/share/java/fop/0.94/lib/xml-apis-1.3.02.jar :/opt/local/share/java/fop/0.94/lib/xercesImpl-2.7.1.jar :/opt/local/share/java/fop/0.94/lib/xalan-2.7.0.jar :/opt/local/share/java/fop/0.94/lib/serializer-2.7.0.jar :/opt/local/share/java/fop/0.94/lib/commons-logging-1.0.4.jar :/opt/local/share/java/fop/0.94/lib/commons-io-1.3.1.jar :/opt/local/share/java/fop/0.94/lib/batik-all-1.6.jar :/opt/local/share/java/fop/0.94/lib/avalon-framework-4.2.0.jar :/opt/local/share/java/fop/0.94/build/fop.jar -Djava.awt.headless=true org.apache.fop.cli.Main -c fopconf.xconf -xml my.xml -xsl my.xsl -pdf my.pdf For working on command line, I have to add the -Djava.awt.headless=true in the fop script as seen above. Enabling the debug mode on debian I get the following command: /usr/bin/java -classpath /usr/share/java/xmlgraphics-commons.jar :/usr/share/java/xercesImpl.jar :/usr/share/java/servlet-api.jar :/usr/share/java/commons-logging.jar :/usr/share/java/batik-all.jar :/usr/share/java/xml-apis.jar :/usr/share/java/xalan2.jar :/usr/share/java/serializer.jar :/usr/share/java/avalon-framework.jar :/usr/share/java/commons-io.jar :/usr/share/java/fop.jar: -Djava.awt.headless=true org.apache.fop.cli.Main -c my.xconf -xml my.xml -xsl my.xsl -pdf my.pdf The -Djava.awt.headless=true was already in the fop script on debian lenny. When i comment the following line in my xslt file everything works fine, without the Gtk-Warning: fo:external-graphic src=myLogo.gif content-width=32mm/ I have tried different image types (gif, bmp, jpg and png) and vector grapics (svg). I also tried embedding the vector graphic with fo:instream-foreign-object/ which works fine on the mac, but not on the debian system. I always get the Gtk-Warning on the debian system and the pdf file cannot be opened with a pdf reader. -- View this message in context: http://www.nabble.com/Error-while-processing-xml-and-xslt-files-to-pdf-tp20343295p20343295.html Sent from the FOP - Users mailing list archive at Nabble.com. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when using XSL with French Characters
Hi, Andreas Delmelle wrote: On Sep 3, 2008, at 18:35, Steffanina, Jeff wrote: Hi Jeff There is always one MORE option to consider!! What would you suggest as the best way to handle this? I think I'd opt for using (N)umeric (C)haracter (R)eferences. Reasoning would be that if one changes the BASIC code to emit the sequence '#xE8;', this will never, ever have to be changed (unless Unicode would somehow decide on altering the codepoints). You can change the encoding in the XML header all you want, NCRs will always work. On the other hand, if you have a LOT of those characters, using NCRs could make your XML a bit bulky (instead of 1 byte/character, you Not mentioning the fact that this would make the document really tedious to type, and not very readable... actually generate 6-8 bytes to represent one character in the final result; the XML parser, instead of needing only one byte, has to parse all bytes from '' up to and including ';'). The character code you mentioned earlier (130) is the decimal value for 'é' in ASCII, so if you're concerned with the size of the XML and do not want to generate 6 bytes for one character, try specifying US-ASCII as encoding for the source XML. No, US-ASCII is a 7-bit character set, which means it can contain only 128 characters, none of them being an accented letter [1]. From your other message it looks like the default character set on your system is ISO-8859-15, which is ok for all of the western languages plus a few more [2]. Your BASIC program probably uses that character set, in which case you just have to change the header of your xml file: ?xml version=1.0 encoding=ISO-8859-15? As long as you put the right header in the XML file you can live with that setup. However, it is safer to switch to UTF-8 now, in order to avoid troubles in the future. Indeed, it’s probable that when you change your computer or upgrade your system the default character set will become UTF-8. Then if you re-edit that file on the new system, accented letters will be entered as UTF-8 sequences that are incompatible with ISO-8859-15, and you’ll basically see garbage in the result. Unless your editor is elaborate enough to recognize that the file is xml, and parses the header to get its encoding. But I doubt many editors do that... You can choose to convert your files to UTF-8 later on, but that might represent a lot of work, plus you will have to edit every file to change the xml header to UTF-8. Since the use of UTF-8 as the default charset will happen sooner or later, you better do that now, when you don’t have too many files. Changing the default character set is very system-dependent. Basically you have to play with the LOCALE variable. You can (may) get a list of available locales by typing the following command in a terminal: $ locale -a C en_US.iso885915 en_US.utf8 ... If no UTF-8 locale is available it must be generated. Try to find documentation for your system or ask the system administrator if applicable... You find that complicated? It is, it has always been, and I’m afraid it may forever be. This is historical... [1] http://en.wikipedia.org/wiki/Ascii [2] http://en.wikipedia.org/wiki/ISO/IEC_8859-15 HTH, Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when using XSL with French Characters
On Sep 4, 2008, at 12:06, Vincent Hennebert wrote: snip / No, US-ASCII is a 7-bit character set, which means it can contain only 128 characters, none of them being an accented letter [1]. Ouch! Indeed. I'm so used to the basic 7-bit set being extended... To think that I even tried it over here in an editor. If I had only also tried to actually save the file, I would have noticed... Sorry for the confusion, Jeff. The conclusion is definitely the right one: if you can somehow manage to have the BASIC code write the file as UTF-8, all the encoding hassles disappear. Cheers Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error when using XSL with French Characters
Manuel, We create the XML using a version of BASIC. To create this particular character, we send CHR(130) to the XML. When I open the XML in vi, I see the proper FRENCH symbol. Jeff From: Manuel Mall [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2008 10:51 PM To: 'fop-users@xmlgraphics.apache.org' Subject: RE: Error when using XSL with French Characters I am suspicious that although you declare the XML file as being in UTF-8 it actually isn't. How do you produce the XML file? Manuel From: Steffanina, Jeff [mailto:[EMAIL PROTECTED] Sent: Wednesday, 3 September 2008 10:23 AM To: fop-users@xmlgraphics.apache.org Subject: Error when using XSL with French Characters My Friends, Fop-0.95 My style sheet has been working perfectly. However, the user submitted some text in French. In the text was a letter e with an accent above it. That character caused the following error: Invalid byte 1 of 1-byte UTF-8 sequence. My .xml looks fine. The e with the accent above it is perfect. First line in my XML: ?xml version=1.0 encoding=UTF-8? Here is the first line of my XSL: ?xml version=1.0 encoding=UTF-8? I am confused over why the UTF-8 for the XML understands the character but the UTF-8 in the XSL does not? I found an article that suggests that the problem would be solved with: ?xml version=1.0 encoding=8859-1? Would this be a viable/recommended solution? Do you have a better idea?
Re: Error when using XSL with French Characters
There are four kinds of accent current in French (é è ê ë) so you should be more precise. None of them can possibly correspond to CHR(130) neither in UTF-8 nor in ISO-8859-1 On what kind of system/platform/OS are you working ? Mentioning vi makes me guess it should be some kind of Unix but at the same time the encoding used makes this improbable... I guess more information is needed here. Steffanina, Jeff a écrit : Manuel, We create the XML using a version of BASIC. To create this particular character, we send CHR(130) to the XML. When I open the XML in vi, I see the proper FRENCH symbol. */Jeff /* *From:* Manuel Mall [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, September 02, 2008 10:51 PM *To:* 'fop-users@xmlgraphics.apache.org' *Subject:* RE: Error when using XSL with French Characters I am suspicious that although you declare the XML file as being in UTF-8 it actually isn't. How do you produce the XML file? Manuel *From:* Steffanina, Jeff [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, 3 September 2008 10:23 AM *To:* fop-users@xmlgraphics.apache.org *Subject:* Error when using XSL with French Characters My Friends, Fop-0.95 My style sheet has been working perfectly. However, the user submitted some text in French. In the text was a letter e with an accent above it. That character caused the following error: Invalid byte 1 of 1-byte UTF-8 sequence. My .xml looks fine. The e with the accent above it is perfect. First line in my XML: ?xml version=1.0 encoding=UTF-8? Here is the first line of my XSL: ?xml version=1.0 encoding=UTF-8? I am confused over why the UTF-8 for the XML understands the character but the UTF-8 in the XSL does not? I found an article that suggests that the problem would be solved with: ?xml version=1.0 encoding=8859-1? Would this be a viable/recommended solution? Do you have a better idea? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error when using XSL with French Characters
Jean-Francois, fop-0.95 I am running Redhat Linux 2.4.21-47.0.1. The letter I am referring to is: é è I assume I am having problems with any French character that includes a glyph. What are you using for ?xml version=1.0 encoding=? I appreciate any suggestions. I have not had to deal with international characters sets before. Thanks. Jeff -Original Message- From: Jean-François El Fouly [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 03, 2008 8:58 AM To: fop-users@xmlgraphics.apache.org Subject: Re: Error when using XSL with French Characters There are four kinds of accent current in French (é è ê ë) so you should be more precise. None of them can possibly correspond to CHR(130) neither in UTF-8 nor in ISO-8859-1 On what kind of system/platform/OS are you working ? Mentioning vi makes me guess it should be some kind of Unix but at the same time the encoding used makes this improbable... I guess more information is needed here. Steffanina, Jeff a écrit : Manuel, We create the XML using a version of BASIC. To create this particular character, we send CHR(130) to the XML. When I open the XML in vi, I see the proper FRENCH symbol. */Jeff /* *From:* Manuel Mall [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, September 02, 2008 10:51 PM *To:* 'fop-users@xmlgraphics.apache.org' *Subject:* RE: Error when using XSL with French Characters I am suspicious that although you declare the XML file as being in UTF-8 it actually isn't. How do you produce the XML file? Manuel *From:* Steffanina, Jeff [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, 3 September 2008 10:23 AM *To:* fop-users@xmlgraphics.apache.org *Subject:* Error when using XSL with French Characters My Friends, Fop-0.95 My style sheet has been working perfectly. However, the user submitted some text in French. In the text was a letter e with an accent above it. That character caused the following error: Invalid byte 1 of 1-byte UTF-8 sequence. My .xml looks fine. The e with the accent above it is perfect. First line in my XML: ?xml version=1.0 encoding=UTF-8? Here is the first line of my XSL: ?xml version=1.0 encoding=UTF-8? I am confused over why the UTF-8 for the XML understands the character but the UTF-8 in the XSL does not? I found an article that suggests that the problem would be solved with: ?xml version=1.0 encoding=8859-1? Would this be a viable/recommended solution? Do you have a better idea? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error when using XSL with French Characters
Jean-Francois, On my Linux box I have this entry in: /etc/sysconfig/i18n LANG=en_US.iso885915 Jeff Steffanina FOSSE Development, Bethesda, MD (301)380-2047 [EMAIL PROTECTED] This communication contains information from Marriott International, Inc. that may be confidential. Except for personal use by the intended recipient, or as expressly authorized by the sender, any person who receives this information is prohibited from disclosing, copying, distributing, and/or using it. If you have received this communication in error, please immediately delete it and all copies, and promptly notify the sender. Nothing in this communication is intended as an electronic signature under applicable law. -Original Message- From: Jean-François El Fouly [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 03, 2008 8:58 AM To: fop-users@xmlgraphics.apache.org Subject: Re: Error when using XSL with French Characters There are four kinds of accent current in French (é è ê ë) so you should be more precise. None of them can possibly correspond to CHR(130) neither in UTF-8 nor in ISO-8859-1 On what kind of system/platform/OS are you working ? Mentioning vi makes me guess it should be some kind of Unix but at the same time the encoding used makes this improbable... I guess more information is needed here. Steffanina, Jeff a écrit : Manuel, We create the XML using a version of BASIC. To create this particular character, we send CHR(130) to the XML. When I open the XML in vi, I see the proper FRENCH symbol. */Jeff /* *From:* Manuel Mall [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, September 02, 2008 10:51 PM *To:* 'fop-users@xmlgraphics.apache.org' *Subject:* RE: Error when using XSL with French Characters I am suspicious that although you declare the XML file as being in UTF-8 it actually isn't. How do you produce the XML file? Manuel *From:* Steffanina, Jeff [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, 3 September 2008 10:23 AM *To:* fop-users@xmlgraphics.apache.org *Subject:* Error when using XSL with French Characters My Friends, Fop-0.95 My style sheet has been working perfectly. However, the user submitted some text in French. In the text was a letter e with an accent above it. That character caused the following error: Invalid byte 1 of 1-byte UTF-8 sequence. My .xml looks fine. The e with the accent above it is perfect. First line in my XML: ?xml version=1.0 encoding=UTF-8? Here is the first line of my XSL: ?xml version=1.0 encoding=UTF-8? I am confused over why the UTF-8 for the XML understands the character but the UTF-8 in the XSL does not? I found an article that suggests that the problem would be solved with: ?xml version=1.0 encoding=8859-1? Would this be a viable/recommended solution? Do you have a better idea? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when using XSL with French Characters
On Sep 3, 2008, at 15:05, Steffanina, Jeff wrote: Hi Jeff fop-0.95 I am running Redhat Linux 2.4.21-47.0.1. The letter I am referring to is: é è I assume I am having problems with any French character that includes a glyph. What are you using for ?xml version=1.0 encoding=? I appreciate any suggestions. I have not had to deal with international characters sets before. If all else fails, remember that XML *always* allows Numeric Character References, like #x0A; or #10; for a linefeed (values are always UTF-8 codepoints). In UTF-8, the respective character codes are: #xE8; - è #xE9; - é If you output those sequences in the BASIC module, then it should work, regardless of which encoding is specified in the XML header. HTH! Cheers Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error when using XSL with French Characters
There is always one MORE option to consider!! What would you suggest as the best way to handle this? Jeff -Original Message- From: Andreas Delmelle [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 03, 2008 12:32 PM To: fop-users@xmlgraphics.apache.org Subject: Re: Error when using XSL with French Characters On Sep 3, 2008, at 15:05, Steffanina, Jeff wrote: Hi Jeff fop-0.95 I am running Redhat Linux 2.4.21-47.0.1. The letter I am referring to is: é è I assume I am having problems with any French character that includes a glyph. What are you using for ?xml version=1.0 encoding=? I appreciate any suggestions. I have not had to deal with international characters sets before. If all else fails, remember that XML *always* allows Numeric Character References, like #x0A; or #10; for a linefeed (values are always UTF-8 codepoints). In UTF-8, the respective character codes are: #xE8; - è #xE9; - é If you output those sequences in the BASIC module, then it should work, regardless of which encoding is specified in the XML header. HTH! Cheers Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when using XSL with French Characters
On Sep 3, 2008, at 18:35, Steffanina, Jeff wrote: Hi Jeff There is always one MORE option to consider!! What would you suggest as the best way to handle this? I think I'd opt for using (N)umeric (C)haracter (R)eferences. Reasoning would be that if one changes the BASIC code to emit the sequence '#xE8;', this will never, ever have to be changed (unless Unicode would somehow decide on altering the codepoints). You can change the encoding in the XML header all you want, NCRs will always work. On the other hand, if you have a LOT of those characters, using NCRs could make your XML a bit bulky (instead of 1 byte/character, you actually generate 6-8 bytes to represent one character in the final result; the XML parser, instead of needing only one byte, has to parse all bytes from '' up to and including ';'). The character code you mentioned earlier (130) is the decimal value for 'é' in ASCII, so if you're concerned with the size of the XML and do not want to generate 6 bytes for one character, try specifying US- ASCII as encoding for the source XML. HTH! Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error when using XSL with French Characters
I am suspicious that although you declare the XML file as being in UTF-8 it actually isn't. How do you produce the XML file? Manuel _ From: Steffanina, Jeff [mailto:[EMAIL PROTECTED] Sent: Wednesday, 3 September 2008 10:23 AM To: fop-users@xmlgraphics.apache.org Subject: Error when using XSL with French Characters My Friends, Fop-0.95 My style sheet has been working perfectly. However, the user submitted some text in French. In the text was a letter e with an accent above it. That character caused the following error: Invalid byte 1 of 1-byte UTF-8 sequence. My .xml looks fine. The e with the accent above it is perfect. First line in my XML: ?xml version=1.0 encoding=UTF-8? Here is the first line of my XSL: ?xml version=1.0 encoding=UTF-8? I am confused over why the UTF-8 for the XML understands the character but the UTF-8 in the XSL does not? I found an article that suggests that the problem would be solved with: ?xml version=1.0 encoding=8859-1? Would this be a viable/recommended solution? Do you have a better idea? Jeff Steffanina FOSSE Development, Bethesda, MD (301)380-2047 [EMAIL PROTECTED] This communication contains information from Marriott International, Inc. that may be confidential. Except for personal use by the intended recipient, or as expressly authorized by the sender, any person who receives this information is prohibited from disclosing, copying, distributing, and/or using it. If you have received this communication in error, please immediately delete it and all copies, and promptly notify the sender. Nothing in this communication is intended as an electronic signature under applicable law.
Re: Error during make Open Type Font metric
Jeremias Maerki-2 wrote: As the exception suggests, the font probably contains CFF glyphs which are not supported by FOP, yet. You'll have to get a different font. On 14.12.2007 13:11:11 Miroslav Pukhalsky wrote: Hi, I try to make font metric for Open Type font Helvetica LT Standard Black When I type the next command: The other thing is - you should be able to get a copy of the .TTF version of the font, in fact we happen to be using almost the same one (HelveticaNeueLTStd) - and thus same issue as Miroslav, but this solve our issue. -- View this message in context: http://www.nabble.com/Error-during-make-Open-Type-Font-metric-tp14334751p14694897.html 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: Error during make Open Type Font metric
Hello mokeeffe, mokeeffe wrote: The other thing is - you should be able to get a copy of the .TTF version of the font, in fact we happen to be using almost the same one (HelveticaNeueLTStd) - and thus same issue as Miroslav, but this solve our issue. I was found someone who convert OTF fonts to TTF fonts for me (on Windows XP was used TransType utility from FontLab) and it was resolved my problem. After it I made font metrics (as described here http://xmlgraphics.apache.org/fop/0.93/fonts.html#truetype-metrics) and embed fonts into PDF. Regards, Miroslav. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error during make Open Type Font metric
Miroslav Pukhalsky wrote: Hi, I try to make font metric for Open Type font Helvetica LT Standard Black When I type the next command: java org.apache.fop.fonts.apps.TTFReader -enc ansi HelveticaLTStd-Blk.otf HelveticaLTStd-Blk.xml I have got the next error: [snip] java.io.IOException: 'loca' table not found, happens when the font file doesn't contain TrueType outlines (trying to read an OpenType CFF font maybe?) Here's a possible workaround, as the CFF it's failing on seems to be specify how it's stored - it's still a Type-1 font: http://www.stuermer.ch/blog/convert-otf-to-ttf-font-on-ubuntu.html I'd be interested on any ideas on the effort involved in adding support - easier than changing a corporate standard perhaps ;) Or is it already underway? It seems like something FOP should be able to process without considerable changes (we aren't talking about major new graphics capabilities, etc)? http://partners.adobe.com/public/developer/en/font/5176.CFF.pdf -- View this message in context: http://www.nabble.com/Error-during-make-Open-Type-Font-metric-tp14334751p14669384.html 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: Error
irene23 wrote: I have this error: ... Caused by: java.lang.IndexOutOfBoundsException: Index: 90, Size: 90 at java.util.ArrayList.RangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at org.apache.fop.layoutmgr.KnuthSequence.getElement(KnuthSequence.java: 159) That's a problem with the global page layout. I suggest upgrading to the latest FOP release (0.94), which is a bit further advanced in this area. If the problem persists, we'll need a complete FO file in order to track down the defect. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error during make Open Type Font metric
As the exception suggests, the font probably contains CFF glyphs which are not supported by FOP, yet. You'll have to get a different font. On 14.12.2007 13:11:11 Miroslav Pukhalsky wrote: Hi, I try to make font metric for Open Type font Helvetica LT Standard Black When I type the next command: java org.apache.fop.fonts.apps.TTFReader -enc ansi HelveticaLTStd-Blk.otf HelveticaLTStd-Blk.xml I have got the next error: Parsing font... Reading HelveticaLTStd-Blk.otf... Number of glyphs in font: 253 Dirtab loca not found. Error while building XML font metrics file. java.io.IOException: 'loca' table not found, happens when the font file doesn't contain TrueType outlines (trying to read an OpenType CFF font maybe?) Do I something wrong? I use FOP 0.93. Regards, Miroslav. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error - java.lang.UnsatisfiedLinkError: no cmm in java.library.path
DISCLAIMER: This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.
Re: Error - java.lang.UnsatisfiedLinkError: no cmm in java.library.path
The fix that was found was to inclulde the value java.awt.headless true on the clp java command in the properties section. You can also use the properties file and set it in there. The link is http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaha/nawtsystemprops.htm
Re: Error - java.lang.UnsatisfiedLinkError: no cmm in java.library.path
Seems to have to do with the IBM JVM you're using. Friend Google revealed this: http://groups.google.com/group/comp.sys.ibm.as400.misc/browse_thread/thread/8c486bb36e896c6c/9e0fb85a14724312 cmm has to do with color profiles. I have no idea why that is not available with the IBM JVM. I'd ask IBM for help. Just for reference, it would be interesting to see the full stacktrace. On 16.05.2007 21:14:38 Edward.Smith wrote: Hello, I am running a java application on a iSeries V5R4, JDK 1.4 using release 0.93 of FOP. I get the error - java.lang.UnsatisfiedLinkError: no cmm in java.library.path. I am not sure what the error actually means.. I can run the application and/or the FOP script on my windows pc and it runs fine. I am not sure what I am missing on the iSeries. Any help would be appreciated... Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error on Webpage
On Apr 14, 2007, at 17:25, Thomas Zastrow wrote: Hi Tom, on the webpage http://xmlgraphics.apache.org/fop/0.93/fonts.html there is an error in the section TrueType Font Metrics: the jar-libs have to be separated with a : and not wit a ; I'm not sure if this is Windows-specific, but on Linux the : separates the libs :-) That's indeed Windows-specific. Thanks for pointing this out, we'll see if we can clarify it. Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error: Content is not allowed in prolog
Oh, man, chagrin. Thank you very much, Jeremias! Jeff -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Friday, January 26, 2007 9:49 AM To: fop-users@xmlgraphics.apache.org Subject: Re: Error: Content is not allowed in prolog On 26.01.2007 15:42:49 Jeff Vannest wrote: I've embedded FOP 0.93 successfully am able to process XML+XSLFO=PDF. However, when I try embed fonts I get this error message: Caught exception: javax.xml.transform.TransformerException: java.lang.RuntimeException: Content is not allowed in prolog. This only occurs when I place the following into my userconfig.xml file: font metrics-url=arial.ttf embed-url=arial.xml Should be: font metrics-url=arial.xml embed-url=arial.ttf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error: Content is not allowed in prolog
On 26.01.2007 15:42:49 Jeff Vannest wrote: I've embedded FOP 0.93 successfully am able to process XML+XSLFO=PDF. However, when I try embed fonts I get this error message: Caught exception: javax.xml.transform.TransformerException: java.lang.RuntimeException: Content is not allowed in prolog. This only occurs when I place the following into my userconfig.xml file: font metrics-url=arial.ttf embed-url=arial.xml Should be: font metrics-url=arial.xml embed-url=arial.ttf font-triplet name=Arial style=normal weight=normal/ /font The arial.xml file was created using the following command line: java -cp build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;l ib\commons-io-1.1.jar org.apache.fop.fonts.apps.TTFReader ARIAL.TTF arial.xml The resulting arial.xml file starts with ?xml version=1.0 encoding=UTF-8? with no preceding characters, and is followed with a line break and the font-metrics tag as the root. If I comment out the font metrics for the font everything works correctly again. Does anyone know why I'm getting the Content is not allowed in prolog error? TIA, Jeff Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error using TTFReader
That's strange. My Java version (java -version) reads 1.4.2, and I installed Java on this machine from the latest SDK last year. But in any case, it worked. Thanks. That means you're probably still on old JDK 1.3 which doesn't contain JAXP. Please add Xerces and Xalan to the classpath. -- View this message in context: http://www.nabble.com/Error-using-TTFReader-tf2944457.html#a8255423 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: Error using TTFReader
Nicol Bolas wrote: I'm attempting to import some fonts into FOP 0.93, but I'm running into trouble. I keep getting this error whenever I try to run TTFReader: Exception in thread main java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:116) Its a classpath problem. I don't really know what that means or why it's happenning. The command line I'm using is: C:\fop-0.93java -cp c:\fop-0.93\build\fop.jar;c:\fop-0.93\lib\avalon-framework.jar;c:\fop-0.93\lib\commons-logging.jar;c:\fop-0.93\lib\commons-io.jar org.apache.fop.fonts.apps.TTFReader The commons-logging.jar file that you've referenced in the classpath is actually called commons-logging-1.0.4.jar. Take a look in the lib sub folder to check the names of JAR files that you are referencing in your classpath. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error using TTFReader
OK, I've gotten past that error using this command line: java -cp build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;lib\commons-io-1.1.jar org.apache.fop.fonts.apps.TTFReader However, I get the following: Exception in thread main java.lang.NoClassDefFoundError: org/w3c/dom/Node Is there something else I'm missing? cbowditch wrote: Nicol Bolas wrote: I'm attempting to import some fonts into FOP 0.93, but I'm running into trouble. I keep getting this error whenever I try to run TTFReader: Exception in thread main java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:116) Its a classpath problem. I don't really know what that means or why it's happenning. The command line I'm using is: C:\fop-0.93java -cp c:\fop-0.93\build\fop.jar;c:\fop-0.93\lib\avalon-framework.jar;c:\fop-0.93\lib\commons-logging.jar;c:\fop-0.93\lib\commons-io.jar org.apache.fop.fonts.apps.TTFReader The commons-logging.jar file that you've referenced in the classpath is actually called commons-logging-1.0.4.jar. Take a look in the lib sub folder to check the names of JAR files that you are referencing in your classpath. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Error-using-TTFReader-tf2944457.html#a8250928 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: Error using TTFReader
That means you're probably still on old JDK 1.3 which doesn't contain JAXP. Please add Xerces and Xalan to the classpath. On 10.01.2007 03:00:41 Nicol Bolas wrote: OK, I've gotten past that error using this command line: java -cp build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;lib\commons-io-1.1.jar org.apache.fop.fonts.apps.TTFReader However, I get the following: Exception in thread main java.lang.NoClassDefFoundError: org/w3c/dom/Node Is there something else I'm missing? cbowditch wrote: Nicol Bolas wrote: I'm attempting to import some fonts into FOP 0.93, but I'm running into trouble. I keep getting this error whenever I try to run TTFReader: Exception in thread main java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:116) Its a classpath problem. I don't really know what that means or why it's happenning. The command line I'm using is: C:\fop-0.93java -cp c:\fop-0.93\build\fop.jar;c:\fop-0.93\lib\avalon-framework.jar;c:\fop-0.93\lib\commons-logging.jar;c:\fop-0.93\lib\commons-io.jar org.apache.fop.fonts.apps.TTFReader The commons-logging.jar file that you've referenced in the classpath is actually called commons-logging-1.0.4.jar. Take a look in the lib sub folder to check the names of JAR files that you are referencing in your classpath. Chris Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ERROR] null while running FOP
[EMAIL PROTECTED] wrote: Hi, I have done transformation of xml to html. I am getting desired output using xalan parer. No I have replace html with xsl-fo tags so that I should get pdf output. 1) Is there any site which gives the html equivalent of xsl-fo tags? A quick search on google revealed the html2fo project: http://html2fo.sourceforge.net/ BTW, I believe what you are doing is not the best approach. A better solution is to generate 2 separate XSLT stylesheets; 1 to transform your own XML to HTML and another to tranform the XML to XSL-FO. Creating a chain like XML-HTML-XSL-FO means some features may be lost in translation. 2) I am getting null error while parsing. I have attached xsl and xml files please suggests me where is the actual problem. You dont say what version of FOP you are using? I had a quick look at your XSLT and there is a typo in the client template: xsl:template match=client fo:block xsl:value select=name/ xsl:value select=number/ /fo:block /xsl:template The xsl:value element doesnt exist. I believe you meant xsl:value-of BTW, this is a pure XSLT problem, which you would have spotted yourself if you ran the XSLT in a separate step before presenting FOP with the XSL-FO. If you call FOP with an XML and XSL file then it calls xalan to generate the XSL-FO first. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [ERROR] null while running FOP
Hi Chris, After sending the mail I realized that there is typo error. I appreciate for your view of converting xml to pdf using xsl-f instead html in between. Thanks a lot. Is there any better sites that teaches xsl:fo with examples? Thanks and Regards Bhaskar K S Associate Consultant - Investment Banking i-flex solutions limited - Bangalore i-flex center, Kundalahalli Tel. Office: 91-80-66596589 e-mail: [EMAIL PROTECTED] -Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 7:51 PM To: fop-users@xmlgraphics.apache.org Subject: Re: [ERROR] null while running FOP [EMAIL PROTECTED] wrote: Hi, I have done transformation of xml to html. I am getting desired output using xalan parer. No I have replace html with xsl-fo tags so that I should get pdf output. 1) Is there any site which gives the html equivalent of xsl-fo tags? A quick search on google revealed the html2fo project: http://html2fo.sourceforge.net/ BTW, I believe what you are doing is not the best approach. A better solution is to generate 2 separate XSLT stylesheets; 1 to transform your own XML to HTML and another to tranform the XML to XSL-FO. Creating a chain like XML-HTML-XSL-FO means some features may be lost in translation. 2) I am getting null error while parsing. I have attached xsl and xml files please suggests me where is the actual problem. You dont say what version of FOP you are using? I had a quick look at your XSLT and there is a typo in the client template: xsl:template match=client fo:block xsl:value select=name/ xsl:value select=number/ /fo:block /xsl:template The xsl:value element doesnt exist. I believe you meant xsl:value-of BTW, this is a pure XSLT problem, which you would have spotted yourself if you ran the XSLT in a separate step before presenting FOP with the XSL-FO. If you call FOP with an XML and XSL file then it calls xalan to generate the XSL-FO first. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when using FOP embedded using Saxon for transformation
Jeremias Maerki wrote: Hi Seems to be a problem in Saxon. When I last tested with Saxon 8.7.1, everything was fine. But I downloaded 8.8 and I can now reproduce your problem. So it's a regression in Saxon. The SAX startDocument() method is somehow called twice although it must not be. BTW, Mike released a snapshot of the SVN repository on the 29th of September. Maybe this fix the problem? See: http://sourceforge.net/mailarchive/message.php?msg_id=36968233 Regards, --drkm ___ Découvrez un nouveau moyen de poser toutes vos questions quel que soit le sujet ! Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. http://fr.answers.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ERROR] Connection refused: connect
Andrew Forstie wrote: Any ideas why I may be getting the following error: Output of external XSL converter: [ERROR] Connection refused: connect Well, probably someone or something refused to accept a connection. There isn't all that much data to get more out of this for sure. If I had to resort to guesswork: There is either a DTD or perhaps an XSchema in a source XML or an image wich can't be retrieved from a remote location because of a firewall, a malformed URL or high load. You have to supply more information about your environment: - What tool is actually showing the message above? - How does it interface to FOP (are you even sure you are using FOP? Why?) - What JRE version is used for running FOP? - Do you have images referenced in your document? If so, do they use HTTP URLs? - Is there a DTD or XSD involved anywhere? - If you search your document or style sheet for the string connect, does it turn up outside normal content? J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when customizing title fonts etc.
[EMAIL PROTECTED] wrote: I am using xsltproc and fop 0.92b to generate pdf output from docbook sources. I am trying to customize my section titles by changing the section.title.properties attribute-set in my customization layer. The error message I receive from FOP is: java.lang.IllegalStateException: Flow 'xsl-region-body' does not map to the region-body in page-master 'blank'. FOP presently does not support this. Question: Do you get this same error message when you *aren't* trying to customize the section titles? I don't know if this customization is a red herring for your problem, because this error message is really unrelated to what you are doing. Also, do you actually have an fo:simple-page-master called 'blank'? Look at the output FO document, before it is fed to FOP. Main problem: If any of the fo:flows have a flow-name that map to something other than xsl-region-body, or if any of the fo:static-contents have a flow-name that map to xsl-region-body, then this error message will occur. If this is occurring for you, fix your XSLT customization layer so this doesn't happen. Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when customizing title fonts etc.
Glen Mazza gmazza at apache.org writes: Main problem: If any of the fo:flows have a flow-name that map to something other than xsl-region-body, or if any of the fo:static-contents have a flow-name that map to xsl-region-body, then this error message will occur. If this is occurring for you, fix your XSLT customization layer so this doesn't happen. It might not be precisely on-topic for this list, but I didn't get a response to it on docbook.apps, so maybe you can help. When I set double.sided to 1 with docbook-xsl-1.69.1, I get this region-body error. Otherwise, I don't get it, and I didn't get it with version 1.68 either. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when customizing title fonts etc.
Matthew East wrote: Glen Mazza gmazza at apache.org writes: Main problem: If any of the fo:flows have a flow-name that map to something other than xsl-region-body, or if any of the fo:static-contents have a flow-name that map to xsl-region-body, then this error message will occur. If this is occurring for you, fix your XSLT customization layer so this doesn't happen. It might not be precisely on-topic for this list, but I didn't get a response to it on docbook.apps, so maybe you can help. Open-source requires more detective work on the part of the person having the problem. When I set double.sided to 1 with docbook-xsl-1.69.1, I get this region-body error. Otherwise, I don't get it, and I didn't get it with version 1.68 either. OK. Again, look at the flow-name property[1] (attributes) on each of the fo:flows and fo:static-contents within the 1.68-generated FO file (not the output PDF, this is before you process the file with FOP), and do the same with the 1.69.1. If you have the problem mentioned at the top with the latter stylesheets but not the former, then you probably have a Docbook bug, to be recorded here[2]. [1] http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#fo_flow [2] http://sourceforge.net/tracker/?group_id=21935atid=373747 Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error while creating font metric file
You shoud you use some like: java -cp build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;lib\commons-io-1.1.jar org.apache.fop.fonts.apps.TTFReader ?? the jars have version numbers in... Dirk kralik wrote: Hi, I am trying to create font metrics file for FOP Trunk. I use the following command: java org.apache.fop.fonts.apps.TTFReader C:\myfont\times.ttf C:\FopTrunk\conf\my_new_font.xml In my CLASSPATH I have: C:\FopTrunk\build\fop.jar;C:\FopTrunk\lib\avalon-framework.jar;C:\FopTrunk\lib\xml-apis.jar;C:\FopTrunk\lib\xercesImpl.jar;C:\FopTrunk\lib\xalan.jar and C:\myfont\times.ttf exists. I get the following error: Exception in thread main java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:109) Where can be problem? And is there any possibility then to copy text from PDF? Thanks, Pavel Tyl -- View this message in context: http://www.nabble.com/Error-while-creating-font-metric-file-t1563275.html#a4245353 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error while creating metric file
Thank you Jeremi. I was using that logo as an image with a very high resolution. Let me try it out with svg. Is there any way to add a cmap table in these kind of fonts? Because i still have a whole set of fonts which has the same problem. My FOP version is '0.20.5'. Error message: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:507) at java.util.ArrayList.get(ArrayList.java:324) at org.apache.fop.fonts.TTFFile.createCMaps(TTFFile.java:449) at org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:439) at org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:222) at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:184) -- View this message in context: http://www.nabble.com/Error-while-creating-metric-file-t1398534.html#a4172244 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error while creating metric file
I guess it should be possible to add cmap tables with a font editor, but I've never done this. The other option is to improve FOP to handle TrueType fonts without a cmap table. I can't imagine that it's difficult, it's just that somebody has to sit down and take it on. On 01.05.2006 19:00:37 Susant wrote: Thank you Jeremi. I was using that logo as an image with a very high resolution. Let me try it out with svg. Is there any way to add a cmap table in these kind of fonts? Because i still have a whole set of fonts which has the same problem. My FOP version is '0.20.5'. Error message: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:507) at java.util.ArrayList.get(ArrayList.java:324) at org.apache.fop.fonts.TTFFile.createCMaps(TTFFile.java:449) at org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:439) at org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:222) at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:184) Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error while creating metric file
On 28.04.2006 23:12:34 Susant wrote: Archna, I would like to know how you generated the metrics file for that OCR font. He probably generated it like any other font. I've a font that generates a logo which says it's a TrueType font, but complains while generating metrics file using TTFReader. TTFReader cannot process every TrueType font. I assume you get an error message about a missing cmap table. BTW, it's always a good idea to say which FOP version you use and what exactly the error messages are. I assume you're using a custom-built font (since it's producing a logo) and that's why the cmap table is not available. You're out of luck with FOP to process this font for now. I suggest you use a painting program (like CorelDraw or Illustrator) to paint the logos contained in the font and export each as an SVG graphic (with text converted to shapes). Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error while creating metric file
Archna, I would like to know how you generated the metrics file for that OCR font. I've a font that generates a logo which says it's a TrueType font, but complains while generating metrics file using TTFReader. Suggestion would be appreciated. Sus -- View this message in context: http://www.nabble.com/Error-while-creating-metric-file-t1398534.html#a4147728 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error while generating the PDF Document - Please help
Hi Pietschmann, The problem is resolved now. The problem was with the classloader settings of the IDE. Thanks a ton. Regards, Sunil From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Sun 4/23/2006 5:12 AM To: fop-users@xmlgraphics.apache.org Subject: Re: Error while generating the PDF Document - Please help Sunil_Bhandary wrote: I am getting the following error in my application when tried to generate the PDF document using FOP. java.lang.AbstractMethodError: org/apache/fop/svg/SVGElementMapping.addToBuilder at org.apache.fop.apps.Driver.addElementMapping(Driver.java:373) [snip] SVGElementMapping.addToBuilder is definitely not an abstract method, and the line numbers in Driver.java are way off compared to the actual file in 0.20.5. Try running the FOP command line application from a shell, with your actual Java environment. FOP should run fine Java 1.4 in general. You should double check the classpath settings in the IDE, check whether there aren't modified Driver.Java and/or SVGElementMapping file sin the project or imported from another project, and check whether the IDE has known classloader bugs. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. winmail.dat- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error while generating the PDF Document - Please help
Hi Pietschmann, Thanks for the information. I will try to run the FOP with my actual Java environment and will also check the classpath settings in the IDE. I will let you know the results. Regards, Sunil From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Sun 4/23/2006 5:12 AM To: fop-users@xmlgraphics.apache.org Subject: Re: Error while generating the PDF Document - Please help Sunil_Bhandary wrote: I am getting the following error in my application when tried to generate the PDF document using FOP. java.lang.AbstractMethodError: org/apache/fop/svg/SVGElementMapping.addToBuilder at org.apache.fop.apps.Driver.addElementMapping(Driver.java:373) [snip] SVGElementMapping.addToBuilder is definitely not an abstract method, and the line numbers in Driver.java are way off compared to the actual file in 0.20.5. Try running the FOP command line application from a shell, with your actual Java environment. FOP should run fine Java 1.4 in general. You should double check the classpath settings in the IDE, check whether there aren't modified Driver.Java and/or SVGElementMapping file sin the project or imported from another project, and check whether the IDE has known classloader bugs. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. winmail.dat- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error while generating the PDF Document - Please help
Sunil_Bhandary wrote: I am getting the following error in my application when tried to generate the PDF document using FOP. java.lang.AbstractMethodError: org/apache/fop/svg/SVGElementMapping.addToBuilder at org.apache.fop.apps.Driver.addElementMapping(Driver.java:373) [snip] SVGElementMapping.addToBuilder is definitely not an abstract method, and the line numbers in Driver.java are way off compared to the actual file in 0.20.5. Try running the FOP command line application from a shell, with your actual Java environment. FOP should run fine Java 1.4 in general. You should double check the classpath settings in the IDE, check whether there aren't modified Driver.Java and/or SVGElementMapping file sin the project or imported from another project, and check whether the IDE has known classloader bugs. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error while creating metric file
Indeed, Windows' Webdings and Symbol TrueType fonts cannot be processed by TTFReader and can therefore not be used with FOP at the moment. For the Symbol font this is not tragic because the Symbol font is one of the base14 fonts which are simply available in FOP. For the other fonts, this is a problem. In the last few months a number of people have reported problems with certain fonts. One would hope that the itch to make these fonts work would at some point be enough to get someone to look into the problem. Patches are always welcome. Otherwise, you'll have to live with these restrictions. Alternatives are to find other fonts, possibly in Type 1 format, or to use SVG graphics instead of the Webdings fonts, for example. On 05.04.2006 12:04:16 Archana Visveswaran, ASDC Chennai wrote: Hi, I am using fop-0.20.5. I need to create a metric file for Webdings, OCR font and Symbol. But I get the following error: Reading C:\WINNT\Fonts\Symbol.ttf... Number of glyphs in font: 192 Unicode cmap table not present java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:507) at java.util.ArrayList.get(ArrayList.java:324) at org.apache.fop.fonts.TTFFile.createCMaps(TTFFile.java:449) at org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:439) at org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:222) at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:184) I saw a similar post but the solution was not provided. How can I write the metric file? I am using 1.4.2_03 version of Java. My aim is to convert an fo file to pdf. This uses Symbol and OCR font. Is there any way these fonts can be included or do we have any restrictions while using FOP? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error while creating metric file
Are you sure that FOP picks up your userconfig.xml (-c on the command-line)? If I use your triplet for the OCR font with one of my fonts, it works fine. On 05.04.2006 15:55:24 Archana Visveswaran, ASDC Chennai wrote: Oops! I have now changed the userconfig file. I still get the same error. What is this font-triplet name? What should be the actual value? I have attached the userconfig.xml and orb1.xml files for reference. snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error while creating metric file
See here: http://xmlgraphics.apache.org/fop/0.20.5/embedding.html#config-external On 05.04.2006 16:57:51 Archana Visveswaran, ASDC Chennai wrote: Right! When I used fop -c option from my command line, the file gets converted well. But I have a Java application that does this conversion. Executing this code is similar to execution fop from command line. How can I make this code work with the -c option. i.e how do I ensure that the correct config file is referred to? I have attached the Java File. snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error checking out Trunk from subversion
If you're behind a proxy, this could help: http://subversion.tigris.org/faq.html#proxy It could also just be a temporary glitch. On 28.03.2006 00:06:27 Karl Roberts wrote: Hi, I'm using Tortoise subversion client TortoiseSVN 1.2.6, Build 4786 - 32 Bit I tried to check out the trunk as per instructions at http://xmlgraphics.apache.org/fop/dev/tools.html#svn However I ge the following 500 error any ideas? ActionPath ErrorPROPFIND request failed on '/repos/asf/xmlgraphics/fop/trunk' ErrorPROPFIND of '/repos/asf/xmlgraphics/fop/trunk': 500 Server Error (http://svn.apache.org) Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ERROR] TrueType warning: Can't find cvt table
On 28.03.2006 23:19:48 Pardha Paruchuri wrote: I am getting following error in FOP 0.20.5 when I am trying to convert into PDF. but It creates the PDF fine. [ERROR] TrueType warning: Can't find cvt table [ERROR] TrueType warning: Can't find prep table what does this mean ? Can it be ignored ? Please help. TrueType fonts consist of many different tables with different information in each. Not every table can be found in every font. The warnings above mean that the cvt and prep tables don't exist in your font. If you still get the XML font metric file from the TrueType font and the usage of the font in FOP works then yes, you can ignore it. I'm not sure if the two tables are required for the font to work but I think they are of only minor importance. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ERROR] Index: 5, Size: 4
[EMAIL PROTECTED] wrote: fo:table-column column-number=4 column-width=.65in/ fo:table-column column-number=6 column-width=.65in/ I guess FOP can't cope with missing column Nr. 5. If it's defined later, maybe FOP 0.20.5 can't deal properly with out-of-order declarations (just a guess without looking into the code). J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error with fo:instream-foreign-object and SVG
[EMAIL PROTECTED] wrote: Hi all, I have the following error, but no ide on how to fix it! You don't say which version of FOP you use, 0.20.5, or 0.90alpha1?? (...) Intrinsic dimensions of instream-foreign-object could not be determined (...) The message seems to say that you must specify a width and height on the instream-foreign-object. However, I must say that I'm surprised by this message. The size can usually be worked out automatically snip/ Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error: / by zero
Ail Sahin wrote: snip/ When I fire up the transformation I get an error: [INFO] building formatting object tree [INFO] Parsing of document complete, stopping renderer javax.xml.transform.TransformerException: java.lang.ArithmeticException: / by zero at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1276) 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 de.xifs.worker.PrintDocumentWorker.render2PDF(PrintDocumentWorker.java:212) Looks like the problem is in Xalan, not FOP. To trace the cause of the problem use Xalan to generate an FO file. This is explained on the website: http://xmlgraphics.apache.org/fop/0.20.5/running.html#check-input If you get the same error when running Xalan, then the problem isn't in FOP. You might be better off posting the Xalan error to the xalan-j user mailing list. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK)
Ok, I did the following : 1. Remove JAI and test. - Result is the same error. 2. Reinstall JAI and set CLASSPATH=...directory where jai_core and codec.jar are located and test - Result is the same error. Please, keep me in touch if any corrected trunk is available Regards Lawrence -Message d'origine- De : Manuel Mall [mailto:[EMAIL PROTECTED] Envoyé : mercredi, 31. août 2005 02:45 À : fop-users@xmlgraphics.apache.org Objet : Re: Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK) On Wed, 31 Aug 2005 02:50 am, Jeremias Maerki wrote: On 30.08.2005 19:00:25 michella wrote: Thank you for your support. Everything works pretty fine from now on. Thanks for being brave enough to try out our new code and for telling us of any problems you find. Still another question : Is it normal that GIF images aren't handled anymore? The image handling has been improved considerably in the new code, at least in my opinion. GIF images are now supported through four different image sources (handled in this order): - JAI - ImageIO (only = JDK 1.4) - JIMI - the ugly, not really working URL hack to load a GIF image. :-) When I include external-graphics... As gif image,I get the following error : I installed SDK1.5.0_04, and jai-1_1_2_01-lib-windows-i586-jdk --- Exception in thread main java.lang.NoClassDefFoundError: com/sun/media/jai/codec/FileCacheSeekableStream at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.fop.image.ImageProvider.getImplementingClass(ImageFactor y.java:589) at org.apache.fop.image.ImageMimeType.getFirstImplementingClass(ImageF actory.java:639) Sounds a lot like a class path problem. Are you sure you've added both jai_core.jar and jai_codec.jar to the classpath? Since you're working with a JDK = 1.4 you could also remove JAI now with FOP Trunk and instead just use ImageIO which is provided by the JDK. GIF support is already in there. No additional libraries required. It is also a bug in our image provider detection mechanism. It shouldn't throw an exception but simply try the next available provider. I'll post a patch. Jeremias Maerki Manuel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : RE : Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK)
Clean ant followed by Ant result to a successful build. Thanks. Unfortunately, I still get the same error message at FO processing with a GIF Image: Exception in thread main java.lang.NoClassDefFoundError: com/sun/media/jai/codec/FileCacheSeekableStream at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.fop.image.ImageProvider.getImplementingClass(ImageFactory.java:594) at org.apache.fop.image.ImageMimeType.getFirstImplementingClass(ImageFactory.java:644) at org.apache.fop.image.ImageFactory.getImageClass(ImageFactory.java:307) at org.apache.fop.image.ImageFactory.loadImage(ImageFactory.java:249) at org.apache.fop.image.ImageLoader.loadImage(ImageLoader.java:54) at org.apache.fop.image.ContextImageCache.getImage(ImageFactory.java:437) at org.apache.fop.image.ImageFactory.getImage(ImageFactory.java:167) at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:127) at org.apache.fop.fo.FObj.processNode(FObj.java:109) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:270) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:141) at org.apache.fop.cli.InputHandler.render(InputHandler.java:101) at org.apache.fop.cli.Main.startFOP(Main.java:165) at org.apache.fop.cli.Main.main(Main.java:195) -- -Message d'origine- De : Jeremias Maerki [mailto:[EMAIL PROTECTED] Envoyé : mercredi, 31. août 2005 11:43 À : fop-users@xmlgraphics.apache.org Objet : Re: RE : Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK) This usually works fine. Try ant clean followed by ant. Maybe the change of JDK has a bad influence on the build. On 31.08.2005 11:40:41 michella wrote: Ooops... Well... The problem seems to remain in my Java installation. My name is Dumbo, and I've set the JAVA_HOME uncorrectly! Now, Ant tells me that it has found the JAI (which was not the case before) But... build fails : C:\Documents and Settings\michella\My Documents\EA_Publikation\Tools\FOP_Trunka nt Buildfile: build.xml init-avail: [echo] --- Fop 1.0dev [1999-2005] [echo] See build.properties and build-local.properties for additional build settings [echo] Apache Ant version 1.6.5 compiled on June 2 2005 [echo] VM: 1.5.0_04-b05, Sun Microsystems Inc. [echo] JAVA_HOME: C:\Program Files\Java\jdk1.5.0_04 [echo] Jimi Support NOT Present [echo] JAI Support PRESENT [echo] JCE Support PRESENT [echo] JUnit Support NOT Present - Committers are required to have JUnit wo rking init-filters-jdk14: [echo] Use GraphicsConfiguration adapter for JDK 1.4. init-filters-jdk13: init: codegen: [echo] Generating the java files from xml resources compile-java: [javac] Compiling 638 source files to C:\Documents and Settings\michella\My Documents\EA_Publikation\Tools\FOP_Trunk\build\classes [javac] C:\Documents and Settings\michella\My Documents\EA_Publikation\Tools \FOP_Trunk\src\java\org\apache\fop\fonts\FontSetup.java:30: cannot access org.ap ache.fop.fonts.base14.Courier [javac] bad class file: C:\Documents and Settings\michella\My Documents\EA_P ublikation\Tools\FOP_Trunk\build\gensrc\org\apache\fop\fonts\base14\Courier.java [javac] file does not contain class org.apache.fop.fonts.base14.Courier [javac] Please remove or make sure it appears in the correct subdirectory of the classpath. [javac] import org.apache.fop.fonts.base14.Courier; [javac]^ [javac] 1 error BUILD FAILED C:\Documents and Settings\michella\My Documents\EA_Publikation\Tools\FOP_Trunk\b uild.xml:357: Compile failed; see the compiler error output for details. Total time: 4 seconds