Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
My build of FOP from 2004/05/29 works fine on Sun Java 1.4.1_02 with Tomcat 5.0.19, but when I move toSun Java 1.5.1 and Tomcat 5.5.7 I get the URI I/O error listed below. This build included a Batik.jar with files dates 10/11/2003. The exception message below seems to indicate it is choking on the SmileyFace.gif file - but I am not sure why. I google the archives and could not really find a problem with Java 1.5 and FOP/Batik. I went and downloaded the latest CVS of FOP, but it looks like the Driver class my code depended on is now gone. I could not find any doc on how to use the new APIs. I found one Wiki page (http://wiki.apache.org/xmlgraphics-fop/SvgNotes/PdfTranscoderTrueTypeEm bedding), but it expects a pure SVG file. I have been wrapping my svg graphic with FO markup (see below the exception for how it normally appears) Any ideas on how to either fix the current problem, or do an SVG to PDF transform with the new API? Thank you in advance - Richard 19:34:42,179 ERROR [TP-Processor1] PDFXMLHandler:253 - svg graphic could not be built: file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1 An I/O error occured while processing the URI 'file://c/jakarta-tomcat-5.5.7/webapps/stars/images/allTimeBest/SmileyFa ce.gif' specified on the element image org.apache.batik.bridge.BridgeException: file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1 An I/O error occured while processing the URI 'file://c/jakarta-tomcat-5.5.7/webapps/stars/images/allTimeBest/SmileyFa ce.gif' specified on the element image at org.apache.batik.bridge.SVGImageElementBridge.openStream(Unknown Source) at org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(Un known Source) at org.apache.batik.bridge.SVGImageElementBridge.buildImageGraphicsNode(Unk nown Source) at org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown Source) at org.apache.fop.render.pdf.PDFXMLHandler$SVGHandler.renderSVGDocument(PDF XMLHandler.java:251) at org.apache.fop.render.pdf.PDFXMLHandler.handleXML(PDFXMLHandler.java:156 ) at org.apache.fop.render.AbstractRenderer.renderXML(AbstractRenderer.java:7 66) at org.apache.fop.render.pdf.PDFRenderer.renderDocument(PDFRenderer.java:12 40) at org.apache.fop.render.pdf.PDFRenderer.renderForeignObject(PDFRenderer.ja va:1206) at org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.j ava:675) at org.apache.fop.render.pdf.PDFRenderer.renderViewport(PDFRenderer.java:12 65) at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer .java:623) at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.j ava:609) at org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:85 5) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.jav a:546) at org.apache.fop.render.pdf.PDFRenderer.renderBlocks(PDFRenderer.java:503) at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java :587) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.jav a:537) at org.apache.fop.render.pdf.PDFRenderer.renderBlocks(PDFRenderer.java:503) at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java: 462) at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRende rer.java:445) at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer .java:381) at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRend erer.java:327) at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer. java:299) at org.apache.fop.render.pdf.PDFRenderer.renderPage(PDFRenderer.java:436) at org.apache.fop.area.RenderPagesModel.checkPreparedPages(RenderPagesModel .java:118) at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:97) at org.apache.fop.area.AreaTree.addPage(AreaTree.java:111) at org.apache.fop.layoutmgr.PageLayoutManager.finishPage(PageLayoutManager. java:507) at org.apache.fop.layoutmgr.PageLayoutManager.doLayout(PageLayoutManager.ja va:203) at org.apache.fop.layoutmgr.PageLayoutManager.run(PageLayoutManager.java:17 8) at org.apache.fop.apps.Document.format(Document.java:219) at org.apache.fop.apps.Document.foPageSequenceComplete(Document.java:123) at org.apache.fop.fo.FOTreeHandler.notifyPageSequenceComplete(FOTreeHandler .java:501) at
Re: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
You're asking for something to work that was written before JDK 1.5 was out. 1.5 has some serious consequences. Not everything is guaranteed to continue working. BTW, are you sure you mean 1.5.1 or rather 1.5.0_01 which is the latest version? Just keep in mind that due to these bigger changes it will again take a long time until more people will migrate to the newer JDK. Just remember how long it took until 1.4 was wide-spread. I wonder why you persist in using an XSL-FO wrapper when all you want to do is convert SVG to PDF. In this case Batik's Transcoder API would be more appropriate. The additional content could easily be added in an all-SVG wrapper around the SVG image. Anyway, the new API isn't documented, yet, but examples can be found under the following URL: http://xml.apache.org/fop/embedding.html#examples (Click on the future 1.0dev links). If you continue to run into problems with 1.5 (or 5.0 or whatever Sun tries to name it) please let us know. Some problems have already been fixed (in CVS HEAD). On 03.02.2005 03:51:02 Richard Mixon (qwest) wrote: My build of FOP from 2004/05/29 works fine on Sun Java 1.4.1_02 with Tomcat 5.0.19, but when I move toSun Java 1.5.1 and Tomcat 5.5.7 I get the URI I/O error listed below. This build included a Batik.jar with files dates 10/11/2003. The exception message below seems to indicate it is choking on the SmileyFace.gif file - but I am not sure why. I google the archives and could not really find a problem with Java 1.5 and FOP/Batik. I went and downloaded the latest CVS of FOP, but it looks like the Driver class my code depended on is now gone. I could not find any doc on how to use the new APIs. I found one Wiki page (http://wiki.apache.org/xmlgraphics-fop/SvgNotes/PdfTranscoderTrueTypeEm bedding), but it expects a pure SVG file. I have been wrapping my svg graphic with FO markup (see below the exception for how it normally appears) Any ideas on how to either fix the current problem, or do an SVG to PDF transform with the new API? snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML --- PDF Japanese
Manoj: Try to load your fonts without the userconfig.xml file and see if it works (change were necessary): //config fonts Vector allFonts = new Vector(); Vector allTrips = new Vector(); //name weight style allTrips.add(new FontTriplet(MS Song,normal,normal)); allTrips.add(new FontTriplet(MS Song,bold,normal)); allTrips.add(new FontTriplet(MS Song,normal,italic)); allTrips.add(new FontTriplet(MS Song,bold,italic)); FontInfo fontInfo = new FontInfo(MS SONG,/fonts/mssong.xml,true,allTrips,/fonts/mssong.ttf); allFonts.add(fontInfo); Configuration.put(fonts, allFonts); Then at least you will know if your font files are working. -Lou ~~ LOG-NET, Inc. The Logistics Network Management System ~~ 230 Half Mile Road Third Floor Red Bank, NJ 07701 PH: 732-758-6800 FAX: 732-747-7497 http://www.LOG-NET.com ~~ CONFIDENTIAL PRIVILEGED Unless otherwise indicated or if obvious from the nature of the content, the information contained herein is privileged and confidential information/work product. The communication is intended for the use of the individual or entity named above. If the reader of this transmission is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone (732-758-6800) or by electronic mail ([EMAIL PROTECTED]), and destroy any copies, electronic, paper or otherwise, which you may have of this communication. Thank you. ~~ [EMAIL PROTECTED] ony.com To: [EMAIL PROTECTED] cc: 02/02/2005 18:28 Subject: Re: XML --- PDF Japanese Please respond to fop-user Jay Thanks for that tip. My machine has the MSGothic.ttc font file which I understand is used for Japanese characters. 1) From the MSGothic.ttc file, I created the MSGothic.xml file in the /conf/ directory. 2) I changed the userconfig.xml file to have the Japanese fonts defined as font metrics-file=msgothic.xml embed-file=D:\winnt\font\msgothic.ttc kerning=yes font-triplet name=Gothic style=normal weight=normal/ font-triplet name=Gothic style=normal weight=bold/ font-triplet name=Gothic style=italic weight=normal/ font-triplet name=Gothic style=italic weight=bold/ /font font metrics-file=msmincho.xml embed-file=Cyberbit.ttf kerning=yes font-triplet name=Mincho style=normal weight=normal/ font-triplet name=Mincho style=normal weight=bold/ font-triplet name=Mincho style=italic weight=normal/ font-triplet name=Mincho style=italic weight=bold/ /font 3) In my case FOP is called on the server side ( weblogic ) which has FOP.JAR in classpath. XSLTInputHandler input = new XSLTInputHandler(xmlFile, new File(xslParam)); try { ByteArrayOutputStream out = new ByteArrayOutputStream(); response.setContentType(CONTENT_TYPE); Driver driver = new Driver(); String OS = System.getProperty(os.name); driver.setLogger(log); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); driver.render(input.getParser(), input.getInputSource()); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); System.out.println(renderXML done); } catch (Exception ex) { ex.printStackTrace(); throw new ServletException(ex); } My question is how would FOP on weblogic know how to use the new userconfig.xml file. I tried to add / update the MSGothic.xml /
RE: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
Jeremias, You are correct - java version 1.5.0_01. And yes I know it is still very new. I needed session replication with Tomcat 5.5.7 and Java 1.5 was recommended (there is a mode that works with Java 1.4 also). Thank you for the API reference I will take a look. - Richard -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Thursday, February 03, 2005 12:34 AM To: [EMAIL PROTECTED] Subject: Re: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built You're asking for something to work that was written before JDK 1.5 was out. 1.5 has some serious consequences. Not everything is guaranteed to continue working. BTW, are you sure you mean 1.5.1 or rather 1.5.0_01 which is the latest version? Just keep in mind that due to these bigger changes it will again take a long time until more people will migrate to the newer JDK. Just remember how long it took until 1.4 was wide-spread. I wonder why you persist in using an XSL-FO wrapper when all you want to do is convert SVG to PDF. In this case Batik's Transcoder API would be more appropriate. The additional content could easily be added in an all-SVG wrapper around the SVG image. Anyway, the new API isn't documented, yet, but examples can be found under the following URL: http://xml.apache.org/fop/embedding.html#examples (Click on the future 1.0dev links). If you continue to run into problems with 1.5 (or 5.0 or whatever Sun tries to name it) please let us know. Some problems have already been fixed (in CVS HEAD). On 03.02.2005 03:51:02 Richard Mixon (qwest) wrote: My build of FOP from 2004/05/29 works fine on Sun Java 1.4.1_02 with Tomcat 5.0.19, but when I move toSun Java 1.5.1 and Tomcat 5.5.7 I get the URI I/O error listed below. This build included a Batik.jar with files dates 10/11/2003. The exception message below seems to indicate it is choking on the SmileyFace.gif file - but I am not sure why. I google the archives and could not really find a problem with Java 1.5 and FOP/Batik. I went and downloaded the latest CVS of FOP, but it looks like the Driver class my code depended on is now gone. I could not find any doc on how to use the new APIs. I found one Wiki page (http://wiki.apache.org/xmlgraphics-fop/SvgNotes/PdfTranscoderTrueTypeEm bedding), but it expects a pure SVG file. I have been wrapping my svg graphic with FO markup (see below the exception for how it normally appears) Any ideas on how to either fix the current problem, or do an SVG to PDF transform with the new API? 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]
RE: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
James, Thanks for the input and suggestion. I installed the Java 1.4 compatibility files for Tomcat 5.5.7 and reverted to Sun Java 1.4.2_03. I still get the error below :( The good news is I know more - it does not appear to be a Java 1.5 issue, but possibly a Tomcat 5.5.x issue. Any additional ideas are appreciated. I will probably post on the Tomcat user list also. Thank you - Richard 08:18:05,396 ERROR [TP-Processor2] PDFXMLHandler:253 - svg graphic could not be built: file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1 An I/O error occured while processing the URI 'file://c/jakarta-tomcat-5.5.7/webapps/stars/images/allTimeBest/SmileyFa ce.gif' specified on the element image org.apache.batik.bridge.BridgeException: file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1 An I/O error occured while processing the URI 'file://c/jakarta-tomcat-5.5.7/webapps/stars/images/allTimeBest/SmileyFa ce.gif' specified on the element image at org.apache.batik.bridge.SVGImageElementBridge.openStream(Unknown Source) at org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(Un known Source) at org.apache.batik.bridge.SVGImageElementBridge.buildImageGraphicsNode(Unk nown Source) at org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown Source) at org.apache.fop.render.pdf.PDFXMLHandler$SVGHandler.renderSVGDocument(PDF XMLHandler.java:251) at org.apache.fop.render.pdf.PDFXMLHandler.handleXML(PDFXMLHandler.java:156 ) at org.apache.fop.render.AbstractRenderer.renderXML(AbstractRenderer.java:7 66) at org.apache.fop.render.pdf.PDFRenderer.renderDocument(PDFRenderer.java:12 40) at org.apache.fop.render.pdf.PDFRenderer.renderForeignObject(PDFRenderer.ja va:1206) at org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.j ava:675) at org.apache.fop.render.pdf.PDFRenderer.renderViewport(PDFRenderer.java:12 65) at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer .java:623) at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.j ava:609) at org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:85 5) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.jav a:546) at org.apache.fop.render.pdf.PDFRenderer.renderBlocks(PDFRenderer.java:503) at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java :587) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.jav a:537) at org.apache.fop.render.pdf.PDFRenderer.renderBlocks(PDFRenderer.java:503) at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java: 462) at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRende rer.java:445) at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer .java:381) at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRend erer.java:327) at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer. java:299) at org.apache.fop.render.pdf.PDFRenderer.renderPage(PDFRenderer.java:436) at org.apache.fop.area.RenderPagesModel.checkPreparedPages(RenderPagesModel .java:118) at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:97) at org.apache.fop.area.AreaTree.addPage(AreaTree.java:111) at org.apache.fop.layoutmgr.PageLayoutManager.finishPage(PageLayoutManager. java:507) at org.apache.fop.layoutmgr.PageLayoutManager.doLayout(PageLayoutManager.ja va:203) at org.apache.fop.layoutmgr.PageLayoutManager.run(PageLayoutManager.java:17 8) at org.apache.fop.apps.Document.format(Document.java:219) at org.apache.fop.apps.Document.foPageSequenceComplete(Document.java:123) at org.apache.fop.fo.FOTreeHandler.notifyPageSequenceComplete(FOTreeHandler .java:501) at org.apache.fop.fo.FOTreeHandler.endPageSequence(FOTreeHandler.java:187) at org.apache.fop.fo.pagination.PageSequence.end(PageSequence.java:312) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:260) at org.apache.fop.tools.ProxyContentHandler.endElement(ProxyContentHandler. java:94) at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(Transfor merIdentityImpl.java:1050) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at
Re: Page Sequence Master
Kumar: Victor answered my similar question last month (snipped below). Louis.Masters wrote: In order to get around some memory issues, I am creating multiple page sequences on my reports. The problem is, every time a new page sequence is created, a new page is created. Is there any way I can tell FOP not to insert the page break after the page sequence? I know it sounds _funny_ to not have page breaks when there is a new page sequence, but I am just using the page sequences to break up the memory use in FOP. No, there is no way to do what you are trying to do. Even putting the practical aspects aside (which are overwhelming), it would be a violation of the XSL-FO standard. Victor Mote -Lou ~~ LOG-NET, Inc. The Logistics Network Management System ~~ 230 Half Mile Road Third Floor Red Bank, NJ 07701 PH: 732-758-6800 FAX: 732-747-7497 http://www.LOG-NET.com ~~ CONFIDENTIAL PRIVILEGED Unless otherwise indicated or if obvious from the nature of the content, the information contained herein is privileged and confidential information/work product. The communication is intended for the use of the individual or entity named above. If the reader of this transmission is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone (732-758-6800) or by electronic mail ([EMAIL PROTECTED]), and destroy any copies, electronic, paper or otherwise, which you may have of this communication. Thank you. ~~ Puppala, Kumar (LNG-DAY) To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] [EMAIL PROTECTED] cc: snexis.com Subject: Page Sequence Master 02/03/2005 10:19 Please respond to fop-user I have a page sequence master defined as shown below: fo:page-sequence-master master-name=my-sequence fo:single-page-master-reference master-reference=first-body-page/ fo:repeatable-page-master-reference master-reference=middle-body-pages/ /fo:page-sequence-master This sequence holds good for each individual document in my application. But there are times when I need to generate multiple documents within a job and so I use this sequence repeatedly and it works fine. The only problem is that each time a new document is generated, it starts on a new page (since we are starting a new sequence for this document). I am looking at some option to control this. In some cases I want each individual document to start on a new page but in other cases I would like my next document to start off on the remaining empty page left out by my previous document. Going with one big sequence containing all the documents might work but it will be a performance issue as our documents can get real big. Any help to solve this problem is greatly appreciated. Thanks, Kumar Puppala - 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: Page Sequence Master
Thanks Victor for your response. So did you have any alternate approaches to resolve this issue in your application? Thanks, Kumar Puppala -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, February 03, 2005 11:03 AM To: [EMAIL PROTECTED] Subject: Re: Page Sequence Master Kumar: Victor answered my similar question last month (snipped below). Louis.Masters wrote: In order to get around some memory issues, I am creating multiple page sequences on my reports. The problem is, every time a new page sequence is created, a new page is created. Is there any way I can tell FOP not to insert the page break after the page sequence? I know it sounds _funny_ to not have page breaks when there is a new page sequence, but I am just using the page sequences to break up the memory use in FOP. No, there is no way to do what you are trying to do. Even putting the practical aspects aside (which are overwhelming), it would be a violation of the XSL-FO standard. Victor Mote -Lou ~~ LOG-NET, Inc. The Logistics Network Management System ~~ 230 Half Mile Road Third Floor Red Bank, NJ 07701 PH: 732-758-6800 FAX: 732-747-7497 http://www.LOG-NET.com ~~ CONFIDENTIAL PRIVILEGED Unless otherwise indicated or if obvious from the nature of the content, the information contained herein is privileged and confidential information/work product. The communication is intended for the use of the individual or entity named above. If the reader of this transmission is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone (732-758-6800) or by electronic mail ([EMAIL PROTECTED]), and destroy any copies, electronic, paper or otherwise, which you may have of this communication. Thank you. ~~ Puppala, Kumar (LNG-DAY) To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] [EMAIL PROTECTED] cc: snexis.com Subject: Page Sequence Master 02/03/2005 10:19 Please respond to fop-user I have a page sequence master defined as shown below: fo:page-sequence-master master-name=my-sequence fo:single-page-master-reference master-reference=first-body-page/ fo:repeatable-page-master-reference master-reference=middle-body-pages/ /fo:page-sequence-master This sequence holds good for each individual document in my application. But there are times when I need to generate multiple documents within a job and so I use this sequence repeatedly and it works fine. The only problem is that each time a new document is generated, it starts on a new page (since we are starting a new sequence for this document). I am looking at some option to control this. In some cases I want each individual document to start on a new page but in other cases I would like my next document to start off on the remaining empty page left out by my previous document. Going with one big sequence containing all the documents might work but it will be a performance issue as our documents can get real big. Any help to solve this problem is greatly appreciated. Thanks, Kumar Puppala - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
Richard Mixon (qwest) wrote: I checked my SVG markup and am not sure how I would change this as I'm using an xlink:href. Here is an example: xlink:href=images/allTimeBest/c:out value=${cmSummary.allTimeBestIcon}/ This means that it is using the base URL for the document to resolve the image reference. The base URL for the document would be provided when you parse the document. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
Thomas DeWeese wrote: Richard Mixon (qwest) wrote: I checked my SVG markup and am not sure how I would change this as I'm using an xlink:href. Here is an example: xlink:href=images/allTimeBest/c:out value=${cmSummary.allTimeBestIcon}/ This means that it is using the base URL for the document to resolve the image reference. The base URL for the document would be provided when you parse the document. I have set the base directory as follows: String httpBaseDir = .; imageURLProtocol = getInitParameter(imageURLProtocol); String baseDir = this.getServletContext().getRealPath(httpBaseDir); userAgent = new FOUserAgent(); userAgent.setBaseURL(imageURLProtocol+baseDir); log.info(init - setting httpBaseDir='+httpBaseDir+', baseDir='+baseDir+'); Here is the output from the last log statement: 09:20:23,646 INFO [main] SVG2PDFServlet:112 - init - setting httpBaseDir='.', baseDir='c:\jakarta-tomcat-5.5.7\webapps\stars\.' I think I am setting this base directory correctly. Maybe not? I did some more tests before also posting this on the Tomcat list. The results were interesting: Works fine with: Tomcat 5.0.x and Java 1.4.1_02 Tomcat 5.5.7 and Java 1.4.1_02 Throws the exception (below) with: Tomcat 5.5.7 and Java 1.4.2_03 Tomcat 5.5.7 and Java 1.5.0_01 So I can get it to work with Tomcat 5.5.x with an earlier version of Java 1.4. Thank you - Richard Repeating part of the exception for those that might not have seen the earlier part of the thread: 09:20:56,146 ERROR [TP-Processor2] PDFXMLHandler:253 - svg graphic could not be built: file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1 An I/O error occured while processing the URI 'file://c/jakarta-tomcat-5.5.7/webapps/stars/images/allTimeBest/SmileyFa ce.gif' specified on the element image org.apache.batik.bridge.BridgeException: file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1 An I/O error occured while processing the URI 'file://c/jakarta-tomcat-5.5.7/webapps/stars/images/allTimeBest/SmileyFa ce.gif' specified on the element image at org.apache.batik.bridge.SVGImageElementBridge.openStream(Unknown Source) at org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(Un known Source) SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
Bingo! That was it. I changed it from file:// to file:/// and all works now. You earlier mentioned that might be it - but I was so focused on the fact that it worked on Java 1.4.1 that I figured I had it correctly. That is weird though that moving past Java 1.4.1 breaks this. Thank you once again, very much - Richard Thomas DeWeese wrote: Hi Richard, What is 'imageURLProtocol' I'm guessing it's file:// I think it should be either file:/// or file:/. Richard Mixon (qwest) wrote: Thomas DeWeese wrote: Richard Mixon (qwest) wrote: I checked my SVG markup and am not sure how I would change this as I'm using an xlink:href. Here is an example: xlink:href=images/allTimeBest/c:out value=${cmSummary.allTimeBestIcon}/ This means that it is using the base URL for the document to resolve the image reference. The base URL for the document would be provided when you parse the document. I have set the base directory as follows: String httpBaseDir = .; imageURLProtocol = getInitParameter(imageURLProtocol); String baseDir = this.getServletContext().getRealPath(httpBaseDir); userAgent = new FOUserAgent(); userAgent.setBaseURL(imageURLProtocol+baseDir); log.info(init - setting httpBaseDir='+httpBaseDir+', baseDir='+baseDir+'); Here is the output from the last log statement: 09:20:23,646 INFO [main] SVG2PDFServlet:112 - init - setting httpBaseDir='.', baseDir='c:\jakarta-tomcat-5.5.7\webapps\stars\.' I think I am setting this base directory correctly. Maybe not? 09:20:56,146 ERROR [TP-Processor2] PDFXMLHandler:253 - svg graphic could not be built: file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1 - 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: Page Sequence Master
Kumar Puppala wrote: Thanks Victor for your response. So did you have any alternate approaches to resolve this issue in your application? That depends on what you mean by performance issue. If you have plenty of memory, I don't think your performance speed will be adversely affected by using one page-sequence. If you are running out of memory, probably your least-expensive, quickest-to-implement solution is to run on a machine with more memory. AFAIK, the commercial implementations use more memory than FOP, but that may have changed. Several releases ago, FOP needed to have the entire document in memory, not just one page sequence. So the current state is a vast improvement over that. One of the stated goals for FOP is to be able to process page-sequences of arbitrary size, i.e. limited only by disk space instead of memory. There have been pretty heated discussions among the developers about how best to do this. The trick of course is to come up with a /general/ solution that works or can be made to work for all cases posed. The constraints are significant. Consider the example of a table with auto layout that is 1000 (or 50,000) pages long. You need to know what is going on at both ends of that table to do the auto layout. IIUC, the three rewrite efforts underway each use a different approach, and I don't think any of them are yet complete, so it will be interesting to see what possibilities develop. I wish I had a better answer for you. Your second-best option (see recommended option above) is probably to pick one of the rewrite efforts support it. Victor Mote - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]