RE : (OK) Error with fo:instream-foreign-object and SVG
Ok... Sorry, it has been finally working... Thank you Regards Lawrence -Message d'origine- De : Chris Bowditch [mailto:[EMAIL PROTECTED] Envoyé : mardi, 6. décembre 2005 12:58 À : fop-users@xmlgraphics.apache.org Objet : 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] - 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
RE : Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK)
Fop invocation is done as follow : Batch file : CALL ..\..\Tools\fop-0.20.5\fop -c ..\..\Tools\fop-0.20.5\conf\PostConfig.xml -fo ..\XSL-FO\uml_dp2_Handsortierung_BE.fo -pdf ..\Publikation\Generated\EA_Ist\PDF\TA\uml_dp2_Handsortierung_BE.pdf Lawrence -Message d'origine- De : Manuel Mall [mailto:[EMAIL PROTECTED] Envoyé : mercredi, 31. août 2005 12:08 À : fop-users@xmlgraphics.apache.org Objet : Re: Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK) I am very certain that this is still a classpath issue. Looking into the JAI jars com/sun/media/jai/codec/FileCacheSeekableStream is in jai_codec.jar. If you do a jar tf on jai_codec.jar it is actually within the first 10 files listed. I don't know why your java environment doesn't find it. May be you can describe how you invoke fop? Manuel - 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)
I got it : The typical installation of JSDK5 will create two directories : one for JDK, and the other one for JRE. The Jai installation has only filled the SDK/jre/lib/.../ext/ directory, and did not add anything in the JRE/lib/.../ext/ one. I firgot to install the JAI for JRE! (Except that I now get an: java.lang.RuntimeException: Some content could not fit into a line/page after 50 attempts. Giving up to avoid an endless loop. Where shoud it come from? Image too big? ;-) Lawrence -Message d'origine- De : Manuel Mall [mailto:[EMAIL PROTECTED] Envoyé : mercredi, 31. août 2005 12:08 À : fop-users@xmlgraphics.apache.org Objet : Re: Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK) I am very certain that this is still a classpath issue. Looking into the JAI jars com/sun/media/jai/codec/FileCacheSeekableStream is in jai_codec.jar. If you do a jar tf on jai_codec.jar it is actually within the first 10 files listed. I don't know why your java environment doesn't find it. May be you can describe how you invoke fop? Manuel On Wed, 31 Aug 2005 05:58 pm, [EMAIL PROTECTED] wrote: 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(ImageFac tory.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(Tra nsformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn own Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn own Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent Dispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un known 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(Transf ormerIdentityImpl.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
Endless Loop in PDF
Sorry, I forgot to post the fo:external-graphics : fo:block text-align=center padding-after=15pt fo:external-graphic content-type=image/bmp src=../Publikation/Images/HS_Einfaechern.gif inline-progression-dimension.optimum=auto inline-progression-dimension.maximum=505px block-progression-dimension.optimum=auto block-progression-dimension.maximum=710px scaling=uniform/ /fo:block I always get : Exception java.lang.RuntimeException: Some content could not fit into a line/page after 50 attempts. Giving up to avoid an endless loop. When I set inline-progression-dimension.maximum and block-progression-dimension.maximum lower, it won't change anything. Notice : I use exactly the same externa-graphics attribute value for JPG and SVGs. No Problem. Lawrence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : RE : Endless Loop in PDF
I have four specific cases that should be automatically handled : Let X be maxWidth, let Y be maxHeight (in px): 1. if imgWidth X and imgHeight = Y -- uniform scale until imgWidth fits to X 2. if imgWidth X and imgHeight Y -- uniform scale until imgWidth and imgHeigth fits to X and Y 3. if imgWidth = X and imgHeight Y -- uniform scale until imgHeigth fits to Y 4. if imgWidth = X and imgHeight = Y -- Leave as is. Is there a way to do that? By the way, I converted the GIF into PNG. The problem remain same. I resized it to W/H = 500/476, it worked properly (both as GIF and PNG) -Message d'origine- De : Jeremias Maerki [mailto:[EMAIL PROTECTED] Envoyé : mercredi, 31. août 2005 15:04 À : fop-users@xmlgraphics.apache.org Objet : Re: RE : Endless Loop in PDF On 31.08.2005 14:37:35 michella wrote: Ok... But how could it be possible that it had worked properly with the older version of FOP? Rather, it could be that FOP Trunk finally does what the specification says. :-) content-height was not supported by FOP 0.20.5 and the width/height properties were used to scale the image which is clearly wrong. The problem I have is that I may have some GIF images that may be larger/higher than the area on the PDF, and some which are smaller. For the bigger one, it should scale-to-fit, and the smaller ones leave as is. In that case I think you'd use just b-p-d as before but left i-p-d off so it is automatically determined and used content-width=scale-to-fit and content-height=scale-to-fit. Not sure if this will work. I'm currently writing the demo file for external-graphic. After that I can verify if FOP really does what it should in every case. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error while processing a PDF
Hi all, I compiled the latest FOP trunk (2005.09.29), and tested it. Now, I always get the following error message : Exception java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox I'm unfortunately unable to find where the error sticks in the FO. Thanks for your help Lawrence Michel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : Error while processing a PDF
Here is the complete error message : --- java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.removeEle mentsForTrailingSpaces(LineLayoutManager.java:295) at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.endSequen ce(LineLayoutManager.java:237) at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.endParagr aph(LineLayoutManager.java:229) at org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthE lements(LineLayoutManager.java:803) at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElement s(LineLayoutManager.java:610) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthEleme nts(BlockStackingLayoutManager.java:310) at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowL ayoutManager.java:103) at org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNex tKnuthElements(PageSequenceLayoutManager.java:222) at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBre aker.java:419) at org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNex tBlockList(PageSequenceLayoutManager.java:214) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav a:202) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(Pag eSequenceLayoutManager.java:147) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.j ava:274) at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java - at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:295) at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(Trans formerIdentityImpl.java:1101) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source ) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow n Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent Dispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un known 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(Transf ormerIdentityImpl.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) I hope it helps Mit Freundlichen Grüssen Lawrence Michel -Message d'origine- De : Jeremias Maerki [mailto:[EMAIL PROTECTED] Envoyé : mardi, 30. août 2005 11:19 À : fop-users@xmlgraphics.apache.org Objet : Re: Error while processing a PDF Can you provide a small test case, please? It probably has to do with fo:inline. Please always provide the full stack trace when you get an exception. The -d option on the command-line can help there. On 30.08.2005 11:09:52 michella wrote: Hi all, I compiled the latest FOP trunk (2005.09.29), and tested it. Now, I always get the following error message : Exception java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox I'm unfortunately unable to find where the error sticks in the FO. Jeremias Maerki - 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 while processing a PDF
file. On 30.08.2005 11:44:41 Jeremias Maerki wrote: Thanks, Lawrence, but that only helps me verify that it is a problem with fo:inline elements. Without an FO file that shows the problem I can't do much to reproduce it. Please provide a small test case. On 30.08.2005 11:27:26 michella wrote: Here is the complete error message : --- java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.removeEle mentsForTrailingSpaces(LineLayoutManager.java:295) at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.endSequen ce(LineLayoutManager.java:237) at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.endParagr aph(LineLayoutManager.java:229) at org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthE lements(LineLayoutManager.java:803) at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElement s(LineLayoutManager.java:610) snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] pct_SA_Klassendiagramm_bearbeiten.fo Description: pct_SA_Klassendiagramm_bearbeiten.fo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : RE : RE : Error while processing a PDF - OK
Dear Jeremias, Thank you for your support. Everything works pretty fine from now on. Still another question : Is it normal that GIF images aren't handled anymore? 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(ImageFactory.java:589) at org.apache.fop.image.ImageMimeType.getFirstImplementingClass(ImageFactory.java:639) at org.apache.fop.image.ImageFactory.getImageClass(ImageFactory.java:302) 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:432) 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é : mardi, 30. août 2005 17:39 À : fop-users@xmlgraphics.apache.org Objet : Re: RE : RE : Error while processing a PDF Same error message, different cause. This was all about constellations of text-align, text-align-last and trailing spaces. My first fix was not quite right. Now I think I've got it: http://svn.apache.org/viewcvs?rev=264797view=rev On 30.08.2005 16:38:11 michella wrote: Hi all, I could test trunk 264777. Unfortunately, I get the (same?) following error message. The problem might stick in the FO:Table set. I purified an FO where the problem remains. If you remove the fo:table, it will work properly. pct_SA_Klassendiagramm_bearbeiten.fo Error Message : Handling row group with 1 rows... Exception java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:144) 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) - java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.removeEle mentsForTrailingSpaces(LineLayoutManager.java:295) at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.endSequen ce(LineLayoutManager.java:237) snip/ Jeremias Maerki - 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]
AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images
Thank you for your reply, I actually checked out the last trunk repositery of FOP, as you told me. I may be doing something wrong, but the trunk downloaded doesn't contain any build(.bat) file that is set as required in the FOP building documentation URL. The FOP version I actually use is the latest binary release (fop-0.20.5 windows) Regards Lawrence -Ursprüngliche Nachricht- Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 19. Juli 2005 17:45 An: fop-users@xmlgraphics.apache.org Betreff: Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images On 19.07.2005 17:27:38 michella wrote: I already tried this alternate way, but it didn't change anything. (StrokeSVGText set to false) The SVG contains more or less 40 to 60 graphics (g). Each one having text with ellipses, rect, and so on. I tried the external Batik Rasterizer SVG to pdf conversion. The Pdf output is small (300k per SVG) ... and perfect. The PDF Transcoder delivered with Batik is based on the FOP Trunk code (redesign). It could very well be that there are considerable improvements for your use case. If all you do is basically use XSL-FO to place a set of SVGs on several pages you could try the trunk source code. http://xml.apache.org/fop/download.html#source There's a little catch ATM: A bug may render the SVGs too small. I already fixed that on my machine at home (I'm at ApacheCon ATM) but I'm pretty sure I fixed it the wrong way. I still have to investigate that and probably won't be able to fix it before next week. As a momentary work-around you could make sure that the if-statement in the line below (found in PDFXMLHandler.java) always resolves to false: old: if (!at.isIdentity()) { new: if (false !at.isIdentity()) { Depending on your skills that may sound adventurous, but that's all I can offer right now. The external-graphics tag included has two xsl-fo:blocks as parents (ie parent + grandparent). Could it be the problem? No. Second : As you'll see, the graphics blocks are all in one single page-sequence and flow. Is there a problem with that? No. FO Abstract : fo:page-sequence master-reference=Title font-family=Frutiger45Light fo:flow flow-name=xsl-region-body fo:block id=d1e390153.4pct_Sortierung_NF break-before=page fo:block text-align=center padding-after=15pt fo:external-graphic src=../Output/Bilder/EA_Diagrammen/SVG/d211_PDF.svg content-type=content-type: xml/svg block- progression-dimension=17cm inline-progression-dimension=25.7cm/ /fo:block /fo:block (... + 48 times identical blocs with SVG graphics...) /fo:flow /fo:page-sequence Thank you for your help Lawrence Michel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images
Hi Jeremias, I set an absolute Path, and image is now inserted. OK, But the quality of insertion is really bad. It won't stick it in the middle, and don't have it sized as specified in the SVG header width and height. (the old version of fop did the work properly!). Here the sample FO and SVG header : FO: fo:block text-align=center padding-after=15pt fo:external-graphic src=file:///C:/Documents%20and%20Settings/michella/My %20Documents/EAI/InformationsManagement/XML/Output/Bilder/EA_Diagrammen/SVG/d192_PDF.svg content-type=content-type:xml/svg block-progression-dimension=17cm inline-progression-dimension=25.7cm/ /fo:block The SVG Header : svg xmlns:xlink=http://www.w3.org/1999/xlink; width=355 height=800 viewBox=75 12 1237 2791 preserveAspectRatio=xMinYMin meet kerning=0 xml:space=preserve style=stroke: black; fill: none; g... I may send you the PDF Output in your direct email only (confidentiality purposes :-( ) Thanks ;-) Lawrence -Ursprüngliche Nachricht- Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 20. Juli 2005 12:31 An: fop-users@xmlgraphics.apache.org Betreff: Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images On 20.07.2005 12:02:47 michella wrote: Hi again, thanks for your help. I successfully installed Ant and the latest trunk version of Fop. After a bit while fo:table-column redesign requirement, I finally got an output PDF. Unfortunately, the SVG Images could not be handled correctly. I got the following error : No ImageReader for this type of image ((some relative path)/svgImage.svg) Image not available : (some relative path)/svgImage.svg Can you try with absolute paths, please? The image loading stuff may not be working as it should. If that doesn't help can you please post a small SVG graphic that produces this problem? Maybe there's also something wrong with the SVG detection. FOP doesn't really check the filename extension to detect the file format. Sorry for the trouble, but we're on the bleeding edge here. :-) I'll try to find some time between session to try to reproduce what you're experiencing. No promises, though. It's a busy place here. Do I have to add any Batik stuff manually (if not automatically supplied in the FOP installed version)? No. You should use the batik.jar in the lib directory. Thanks for your (really!) precious help You're welcome. I hope we can get somewhere. :-) Gruss aus Bern ;-) :-) Greetings from Stuttgart (ApacheCon), normally located in Lucerne. Jeremias Maerki - 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]
AW: Almost-Solved - Huge size of Output PDF when inserting 49 SVG Images
Back ... I did the java modifications you proposed, and it worked. ;-) As you already said, there is a scaling problem still to be solved. In my specific case, my FO documents has inline- and block-progression-dimension as image block parameters set to specific centimeters values. Does the actual FOP implementation still handle this case (as it was the case in the previous version)? Again thank you for your precious help Lawrence -Ursprüngliche Nachricht- Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 20. Juli 2005 15:28 An: fop-users@xmlgraphics.apache.org Betreff: Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images Remember the little catch I wrote about yesterday? There's a work-around there. I don't know if it fixes everything but at least the scaling. On 20.07.2005 15:20:19 michella wrote: But the quality of insertion is really bad. It won't stick it in the middle, and don't have it sized as specified in the SVG header width and height. (the old version of fop did the work properly!). Here the sample FO and SVG header : Jeremias Maerki - 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]
Huge size of Output PDF when inserting 49 SVG Images
Hi all, I have an xsl-fo which inserts 49 SVG images into the PDF file. These files are diagrams, containing text and vectorial symbols. After launching the Fop processing, have a bath, coffee, and so on, I finally get a nice 730 MB Pdf file of 160 pages... The Word comparison is... 1.4 Mb... Is there any switch in FOP that might handle the SVG a bit more efficiently? FOP command : CALL ..\..\Tools\fop-0.20.5\fop -q -c ..\..\Tools\fop-0.20.5\conf\PostConfig.xml -fo ..\XSL-FO\pcs_Kommissionierung_automatisch.fo -pdf ..\Output\PDF\PA\pcs_Kommissionierung_automatisch.pdf XSL-FO Image import extract : fo:block text-align=center padding-after=15pt fo:external-graphic src=../Output/Bilder/EA_Diagrammen/SVG/d206_PDF.svg content-type=content-type: xml/svg block-progression-dimension=17cm inline-progression- dimension=25.7cm/ /fo:block The SVG width and Height have been set in a way that they fit a given area on the page. And here the header of the SVG : svg xmlns:xlink=http://www.w3.org/1999/xlink; width=525 height=503 viewBox=-19 -14 1189 1140 preserveAspectRatio=xMinYMin meet kerning=0 xml:space=preserve style=stroke: black; fill: none; g../g /svg Any help would be appreciated ;-) regards Lawrence Michel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images
I already tried this alternate way, but it didn't change anything. (StrokeSVGText set to false) The SVG contains more or less 40 to 60 graphics (g). Each one having text with ellipses, rect, and so on. I tried the external Batik Rasterizer SVG to pdf conversion. The Pdf output is small (300k per SVG) ... and perfect. The external-graphics tag included has two xsl-fo:blocks as parents (ie parent + grandparent). Could it be the problem? Second : As you'll see, the graphics blocks are all in one single page-sequence and flow. Is there a problem with that? FO Abstract : fo:page-sequence master-reference=Title font-family=Frutiger45Light fo:flow flow-name=xsl-region-body fo:block id=d1e390153.4pct_Sortierung_NF break-before=page fo:block text-align=center padding-after=15pt fo:external-graphic src=../Output/Bilder/EA_Diagrammen/SVG/d211_PDF.svg content-type=content-type: xml/svg block- progression-dimension=17cm inline-progression-dimension=25.7cm/ /fo:block /fo:block (... + 48 times identical blocs with SVG graphics...) /fo:flow /fo:page-sequence Thank you for your help Lawrence Michel -Ursprüngliche Nachricht- Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 19. Juli 2005 16:04 An: fop-users@xmlgraphics.apache.org Betreff: Re: Huge size of Output PDF when inserting 49 SVG Images You can have a look at the strokeSVG switch: http://xml.apache.org/fop/configuration.html#strokeSVGText If it's set to true all text is rendered as shapes and takes (1) more time and (2) more space, but is (3) probably more accurate. Switching it to false might help but can have side-effects. Also be sure to give the process enough memory so the garbage collector kicks in later. Maybe that helps. On 19.07.2005 15:55:45 michella wrote: Hi all, I have an xsl-fo which inserts 49 SVG images into the PDF file. These files are diagrams, containing text and vectorial symbols. After launching the Fop processing, have a bath, coffee, and so on, I finally get a nice 730 MB Pdf file of 160 pages... The Word comparison is... 1.4 Mb... Is there any switch in FOP that might handle the SVG a bit more efficiently? FOP command : CALL ..\..\Tools\fop-0.20.5\fop -q -c ..\..\Tools\fop-0.20.5\conf\PostConfig.xml -fo ..\XSL-FO\pcs_Kommissionierung_automatisch.fo -pdf ..\Output\PDF\PA\pcs_Kommissionierung_automatisch.pdf XSL-FO Image import extract : fo:block text-align=center padding-after=15pt fo:external-graphic src=../Output/Bilder/EA_Diagrammen/SVG/d206_PDF.svg content-type=content-type: xml/svg block-progression-dimension=17cm inline-progression- dimension=25.7cm/ /fo:block The SVG width and Height have been set in a way that they fit a given area on the page. And here the header of the SVG : svg xmlns:xlink=http://www.w3.org/1999/xlink; width=525 height=503 viewBox=-19 -14 1189 1140 preserveAspectRatio=xMinYMin meet kerning=0 xml:space=preserve style=stroke: black; fill: none; g../g /svg Jeremias Maerki - 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]