Re: SVG External Graphic ...
Jose Hernandez wrote: I'm using the JDK 1.4.0 with FOP 0.20.3 and I created a SVG file that I'm trying to put into a PDF file ... but FOP sent this error message: [ERROR]: svg graphic could not be built: file:e:/test.svg:-1 An I/O error occured while processing the URI 'file:e:/test.svg#clipPath1' specified on the element org.apache.batik.bridge.BridgeException: file:e:/test.svg:-1 An I/O error occured while processing the URI 'file:e:/test.svg#clipPath1' specified on the element at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown Source) It may be possible that JDK1.4 is a bit pickier about URLs. Try to use full absolute URLs in your clip path references: url(file:///e:/test.svg#clipPath1) and see whether the problem goes away, or try to use a proper URL in the fo:external-graphic: Other than that, does the Batik rastreizer display your image? J.Pietschmann
RE: SVG External Graphic ...
Here's what J.Pietschmann had to say yesterday about this: Point 1: file:b.svg is, technically, an invalid URL. FOP tries to cope with it, but Batik has it's of logic. Use b.svg or a full path file:///path/to/b.svg. In the first case, all three files a.svg, b.svg and c.fo should be in the current directory. Point 2: Neither of the code snippets you show has the SVG namespace declared as default namespace. The usual way is that this is done in the SVG DTD. Check whether both files either include a proper DOCTYPE declaration pointing to the DTD, or declare the SVG namespace. Point 3: Your b.svg links retro.svg, not a.svg. In your case try Point 1 first and see if that helps. Matthew L. Avizinis <mailto:[EMAIL PROTECTED]> Gleim Publications, Inc. 4201 NW 95th Blvd. Gainesville, FL 32606 (352)-375-0772 ext. 101 www.gleim.com <http://www.gleim.com> > From: Jose Hernandez [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 12, 2002 6:24 PM > To: '[EMAIL PROTECTED]' > Subject: SVG External Graphic ... > > > > Hello ... > > I'm using the JDK 1.4.0 with FOP 0.20.3 and I created a SVG file that I'm > trying to put into a PDF file ... but FOP sent this error message: > > [ERROR]: svg graphic could not be built: file:e:/test.svg:-1 > An I/O error occured while processing the URI 'file:e:/test.svg#clipPath1' > specified on the element > org.apache.batik.bridge.BridgeException: file:e:/test.svg:-1 > An I/O error occured while processing the URI 'file:e:/test.svg#clipPath1' > specified on the element > at > org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown Source) > > I've attached the svg file ... > > Have any idea about this ? > > Thanks. > > <> > > //jose.alberto.hernandez.maldonado > > System Integrator Engineer. > Algorithmics Mexico. > > Tel. 5520-4293 > Fax. 5520-4292 > e-mail: > [EMAIL PROTECTED] > [EMAIL PROTECTED] > >
SVG External Graphic ...
Hello ... I'm using the JDK 1.4.0 with FOP 0.20.3 and I created a SVG file that I'm trying to put into a PDF file ... but FOP sent this error message: [ERROR]: svg graphic could not be built: file:e:/test.svg:-1 An I/O error occured while processing the URI 'file:e:/test.svg#clipPath1' specified on the element org.apache.batik.bridge.BridgeException: file:e:/test.svg:-1 An I/O error occured while processing the URI 'file:e:/test.svg#clipPath1' specified on the element at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown Source) I've attached the svg file ... Have any idea about this ? Thanks. <> //jose.alberto.hernandez.maldonado System Integrator Engineer. Algorithmics Mexico. Tel. 5520-4293 Fax. 5520-4292 e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] test.svg Description: Binary data
AW: JPEG external graphic works, but SVG external graphic doesn't.
Maybe this won´t solve your problem either, but i forgot the namespace in my example: http://www.w3.org/2000/svg"; width="13cm" height="7cm"> ---^^ http://localhost/new.svg this works for me since fop 0.19 till 0.20.3 with java 1.2-1.4 > -Ursprüngliche Nachricht- > Von: Carter, Will [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 4. April 2002 18:41 > An: '[EMAIL PROTECTED]' > Betreff: RE: JPEG external graphic works, but SVG external graphic > doesn't. > > > Hi and thanks for the help. > > I tried your suggestions but am still having problems. > > I have new.jpg in my c:\inetpub\wwwroot directory and it is > accessible in my > browser with: > http://localhost/new.jpg > > I have new.svg in my c:\inetpub\wwwroot directory and it is > accessible in my > browser with: > http://localhost/new.svg > > this JPG works in my fo file: > > http://localhost/new.jpg"/> > > > this SVG doesn't: > > http://localhost/new.svg"/> > > > if I try all these workarounds...I get a java error (see below) > > > >name="xlink:href">http://localhost/new.svg > > > > > >name="xlink:href">C:\inetpub\wwwroot\new.svg > > > > > >name="xlink:href">file:///c:/inetpub/wwwroot/new.svg > > > > if I substitute new.jpg for new.svg in the above examples it > doesn't work > either. I think I have the syntax wrong. What exactly should > PathToImage.svg be? > > here is the java error I get in my browser based on the above tries... > > 500 Internal Server Error > > /servlet/FopServlet: > > null > java.lang.AbstractMethodError > at org.apache.fop.fo.XMLObj.addGraphic(XMLObj.java:51) > at org.apache.fop.fo.XMLObj.addChild(XMLObj.java:126) > at > org.apache.fop.fo.UnknownXMLObj.addChild(UnknownXMLObj.java:80) > at > org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:276) > at > org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1371) > at > org.apache.xerces.validators.common.XMLValidator.callStartElem > ent(XMLValidat > or.java:840) > at > org.apache.xerces.framework.XMLDocumentScanner.scanElement(XML > DocumentScanne > r.java:1853) > at > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatch > er.dispatch(XM > LDocumentScanner.java:1234) > at > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDo > cumentScanner. > java:381) > at > org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948) > at org.apache.fop.apps.Driver.render(Driver.java:481) > at org.apache.fop.apps.Driver.run(Driver.java:554) > at FopServlet.renderFO(FopServlet.java:102) > at FopServlet.doGet(FopServlet.java:64) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417) > at > allaire.jrun.session.JRunSessionService.service(JRunSessionSer > vice.java:1088 > ) > at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:1271) > at > allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDisp > atcher.java:39 > ) > at allaire.jrun.servlet.Invoker.service(Invoker.java:84) > at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417) > at > allaire.jrun.session.JRunSessionService.service(JRunSessionSer > vice.java:1088 > ) > at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:1271) > at > allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequest > Dispatcher.jav > a:89) > at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1557) > at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1547) > at > allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:364) > at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:115) > at allaire.jrun.ThreadPool.run(ThreadPool.java:272) > at allaire.jrun.WorkerThread.run(WorkerThread.java:75) > > > > -Original Message- > From: Sam Prokop [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 04, 2002 5:54 AM > To: [EMAIL PROTECTED] > Subject: AW: JPEG external graphic works, but SVG external graphic > doesn't. > > > > i use the fol
Re: SVG external graphic doesn't show in FopServlet?
Carter, Will wrote: I am having problems with external svg files in my fo file when generating PDFs using FopServlet. ... This doesn't workgeneratedsvg.svg is in the same directory as generatedjpg.jpg. the resulting pdf has a blank space where the svg should be. First: Can you view the SVG with an SVG viewer, like the one provided by Batik? Second: Try the FOP command line. Does the SVG show up now? Are you getting errors? Third: You may have run into scaling/clipping problems. If you replace the SVG content (all stuff inside the top level svg element) by a single blue rectangle, does this show up? Note that it is advisable to avoid secifying the height/with of the SVG in pixels, or without any units. Use for example millimeters instead. J.Pietschmann
RE: JPEG external graphic works, but SVG external graphic doesn't .
Hi and thanks for the help. I tried your suggestions but am still having problems. I have new.jpg in my c:\inetpub\wwwroot directory and it is accessible in my browser with: http://localhost/new.jpg I have new.svg in my c:\inetpub\wwwroot directory and it is accessible in my browser with: http://localhost/new.svg this JPG works in my fo file: http://localhost/new.jpg"/> this SVG doesn't: http://localhost/new.svg"/> if I try all these workarounds...I get a java error (see below) http://localhost/new.svg C:\inetpub\wwwroot\new.svg file:///c:/inetpub/wwwroot/new.svg if I substitute new.jpg for new.svg in the above examples it doesn't work either. I think I have the syntax wrong. What exactly should PathToImage.svg be? here is the java error I get in my browser based on the above tries... 500 Internal Server Error /servlet/FopServlet: null java.lang.AbstractMethodError at org.apache.fop.fo.XMLObj.addGraphic(XMLObj.java:51) at org.apache.fop.fo.XMLObj.addChild(XMLObj.java:126) at org.apache.fop.fo.UnknownXMLObj.addChild(UnknownXMLObj.java:80) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:276) at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1371) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat or.java:840) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanne r.java:1853) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM LDocumentScanner.java:1234) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner. java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948) at org.apache.fop.apps.Driver.render(Driver.java:481) at org.apache.fop.apps.Driver.run(Driver.java:554) at FopServlet.renderFO(FopServlet.java:102) at FopServlet.doGet(FopServlet.java:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417) at allaire.jrun.session.JRunSessionService.service(JRunSessionService.java:1088 ) at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:1271) at allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:39 ) at allaire.jrun.servlet.Invoker.service(Invoker.java:84) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417) at allaire.jrun.session.JRunSessionService.service(JRunSessionService.java:1088 ) at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:1271) at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav a:89) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1557) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1547) at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:364) at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:115) at allaire.jrun.ThreadPool.run(ThreadPool.java:272) at allaire.jrun.WorkerThread.run(WorkerThread.java:75) -Original Message- From: Sam Prokop [mailto:[EMAIL PROTECTED] Sent: Thursday, April 04, 2002 5:54 AM To: [EMAIL PROTECTED] Subject: AW: JPEG external graphic works, but SVG external graphic doesn't. i use the following workaround: PathToImage.svg > -Ursprüngliche Nachricht- > Von: Carter, Will [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 4. April 2002 01:17 > An: '[EMAIL PROTECTED]' > Betreff: JPEG external graphic works, but SVG external > graphic doesn't. > > > Hi, > > I am having problems with external svg files in my fo file > when generating > PDFs using FopServlet. > > I am using fop-0.20.3 > > specifically, I have these refs to external graphics in my fo file. > > This works: > >src="file:C:\Progra~1\Allaire\JRun\servers\default\default-app > \WEB-INF\class > es\generatedjpg.jpg"/> > > > This doesn't workgeneratedsvg.svg is in the same directory as > generatedjpg.jpg. the resulting pdf has a blank space where > the svg should > be. > >src="file:C:\Progra~1\Allaire\JRun\servers\default\default-app > \WEB-INF\class > es\generatedsvg.svg"/> > > > This doesn't workgeneratedsvg.svg is in the same directory as > generatedjpg.jpg. the resulting pdf has a blank space where > the svg should > be. > >src="file:///c:/Progra~1/Allaire/JRun/servers/default/default- > app/WEB-INF/cl > asses/generatedsvg.svg"/> > > > any help would be greatly appreciated. > Will Carter >
AW: JPEG external graphic works, but SVG external graphic doesn't.
i use the following workaround: PathToImage.svg > -Ursprüngliche Nachricht- > Von: Carter, Will [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 4. April 2002 01:17 > An: '[EMAIL PROTECTED]' > Betreff: JPEG external graphic works, but SVG external > graphic doesn't. > > > Hi, > > I am having problems with external svg files in my fo file > when generating > PDFs using FopServlet. > > I am using fop-0.20.3 > > specifically, I have these refs to external graphics in my fo file. > > This works: > >src="file:C:\Progra~1\Allaire\JRun\servers\default\default-app > \WEB-INF\class > es\generatedjpg.jpg"/> > > > This doesn't workgeneratedsvg.svg is in the same directory as > generatedjpg.jpg. the resulting pdf has a blank space where > the svg should > be. > >src="file:C:\Progra~1\Allaire\JRun\servers\default\default-app > \WEB-INF\class > es\generatedsvg.svg"/> > > > This doesn't workgeneratedsvg.svg is in the same directory as > generatedjpg.jpg. the resulting pdf has a blank space where > the svg should > be. > >src="file:///c:/Progra~1/Allaire/JRun/servers/default/default- > app/WEB-INF/cl > asses/generatedsvg.svg"/> > > > any help would be greatly appreciated. > Will Carter >
RE: JPEG external graphic works, but SVG external graphic doesn't.
Will, Problem could be that that you are trying to access the jpg file in a folder that is not accessable from a "web context". ie the file might be located in the directory specified, but how does this map to the web server (IIS assumed). In IIS you have to have the folder web-shared! Try this: 1. Put the file in a directory that you can access via a browser, using http (i.e http://mymachine/folder/generatedjpg.jpg This will also confirm that IIS is correctly configured. 2. If the browser can retrieve this, then in fop you can specify the location as a URI instead of a file i.e. http://mymachine/folder/generatedjpg.jpg"/> This should then work with the graphic. Hope this helps Bill -Original Message- From: Carter, Will [mailto:[EMAIL PROTECTED] Sent: Thursday, 4 April 2002 9:17 AM To: '[EMAIL PROTECTED]' Subject: JPEG external graphic works, but SVG external graphic doesn't. Hi, I am having problems with external svg files in my fo file when generating PDFs using FopServlet. I am using fop-0.20.3 specifically, I have these refs to external graphics in my fo file. This works: This doesn't workgeneratedsvg.svg is in the same directory as generatedjpg.jpg. the resulting pdf has a blank space where the svg should be. This doesn't workgeneratedsvg.svg is in the same directory as generatedjpg.jpg. the resulting pdf has a blank space where the svg should be. any help would be greatly appreciated. Will Carter
SVG external graphic doesn't show in FopServlet?
Hi, I am having problems with external svg files in my fo file when generating PDFs using FopServlet. I am using fop-0.20.3 specifically, I have these refs to external graphics in my fo file. This works: This doesn't workgeneratedsvg.svg is in the same directory as generatedjpg.jpg. the resulting pdf has a blank space where the svg should be. This doesn't workgeneratedsvg.svg is in the same directory as generatedjpg.jpg. the resulting pdf has a blank space where the svg should be. any help would be greatly appreciated. Will Carter
JPEG external graphic works, but SVG external graphic doesn't.
Hi, I am having problems with external svg files in my fo file when generating PDFs using FopServlet. I am using fop-0.20.3 specifically, I have these refs to external graphics in my fo file. This works: This doesn't workgeneratedsvg.svg is in the same directory as generatedjpg.jpg. the resulting pdf has a blank space where the svg should be. This doesn't workgeneratedsvg.svg is in the same directory as generatedjpg.jpg. the resulting pdf has a blank space where the svg should be. any help would be greatly appreciated. Will Carter