RE: dynamic image in PDF
Thanks for clearing that up. Humm, time to upgrade I guess... Cheers, Michiel $ -Original Message- $ From: Jeremias Maerki [mailto:[EMAIL PROTECTED] $ Sent: woensdag 6 maart 2002 10:50 $ To: [EMAIL PROTECTED] $ Subject: Re: dynamic image in PDF $ $ $ > Also, refer to the page master using the master-name attribute. $ $ No, not anymore. That was the old syntax. $ $ Cheers, $ Jeremias Märki $ $ mailto:[EMAIL PROTECTED] $ $ OUTLINE AG $ Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern $ Tel. +41 41 317 2020 - Fax +41 41 317 2029 $ Internet http://www.outline.ch $
Re: dynamic image in PDF
> Also, refer to the page master using the master-name attribute. No, not anymore. That was the old syntax. Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Tel. +41 41 317 2020 - Fax +41 41 317 2029 Internet http://www.outline.ch
RE: dynamic image in PDF
Also, refer to the page master using the master-name attribute. Cheers, Michiel $ -Original Message- $ From: Jeremias Maerki [mailto:[EMAIL PROTECTED] $ Sent: woensdag 6 maart 2002 8:32 $ To: [EMAIL PROTECTED] $ Subject: Re: dynamic image in PDF $ $ $ This happens because you used "master-reference" instead of $ "master-name" $ on fo:simple-page-master. $ $ > I have been trying to create a pdf using FOP. This is the $ exception I get.. $ > Any thoughts. $ > $ > Attached is the FO file being used... $ $ Cheers, $ Jeremias Märki $ $ mailto:[EMAIL PROTECTED] $ $ OUTLINE AG $ Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern $ Tel. +41 41 317 2020 - Fax +41 41 317 2029 $ Internet http://www.outline.ch $
Re: SV: dynamic image in PDF
> Am I the only one having problems with including images when running FOP > as part of a J2EE application? > When running FOP stand alone, I can specify the path to my image as per > normal, but when Im running FOP as part of my application I get output > that boils down to that I havent specified a base directory. > Now, going through the API I find no way of setting FOP:s base directory > at runtime, neither how to turn off logging. > > Could someone help me out? > > It would be awesome if I could give FOP an Image or a byte[] directly, > but just getting file: or url: to work when its part of an application > would do for now. You can try to specify a base directory with the following call where baseDir is an URL String like "file:D:/Temp". Configuration.put("baseDir", baseDir); Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Tel. +41 41 317 2020 - Fax +41 41 317 2029 Internet http://www.outline.ch
Re: dynamic image in PDF
This happens because you used "master-reference" instead of "master-name" on fo:simple-page-master. > I have been trying to create a pdf using FOP. This is the exception I get.. > Any thoughts. > > Attached is the FO file being used... Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Tel. +41 41 317 2020 - Fax +41 41 317 2029 Internet http://www.outline.ch
RE: dynamic image in PDF
Ankur, With rtf2fo I had to use a "-o fop0.20.3". I had the same problem. What are you using to generate the fo? We can talk tomorrow. - steveb -Original Message- From: Jain, Ankur A (CAP, VFS) Sent: Tuesday, March 05, 2002 6:24 PM To: [EMAIL PROTECTED] Subject: RE: dynamic image in PDF Hi All, I have been trying to create a pdf using FOP. This is the exception I get.. Any thoughts. Attached is the FO file being used... Thanks, Ankur [DEBUG]: Input mode: [DEBUG]: FO [DEBUG]: fo input file: DateTrial.fo [DEBUG]: Output mode: [DEBUG]: pdf [DEBUG]: output file: DateTrial.pdf [DEBUG]: OPTIONS [DEBUG]: no user configuration file is used [default] [DEBUG]: debug mode on [DEBUG]: dump configuration [DEBUG]: quiet mode on [DEBUG]: base directory: file:/c:/program files/ibm/visualage for java/ide/project_resources/APACHE FOP/ [INFO]: FOP 0.20.3 [DEBUG]: using SAX parser org.apache.xerces.parsers.SAXParser [INFO]: building formatting object tree [DEBUG]: setting up fonts [ERROR]: 'master-reference' for 'fo:page-sequence'matches no 'simple-page-master' or 'page-sequence-master' org.apache.fop.apps.FOPException: 'master-reference' for 'fo:page-sequence'matches no 'simple-page-master' or 'page-sequence-master' java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) org.apache.fop.apps.FOPException(java.lang.String) org.apache.fop.layout.PageMaster org.apache.fop.fo.pagination.PageSequence.getNextPageMaster(java.lang.String, int, boolean, boolean) org.apache.fop.layout.Page org.apache.fop.fo.pagination.PageSequence.makePage(org.apache.fop.layout.AreaTree, int, boolean, boolean) void org.apache.fop.fo.pagination.PageSequence.format(org.apache.fop.layout.AreaTree) void org.apache.fop.apps.StreamRenderer.render(org.apache.fop.fo.pagination.PageSequence) void org.apache.fop.fo.FOTreeBuilder.endElement(java.lang.String, java.lang.String, java.lang.String) void org.apache.xerces.parsers.SAXParser.endElement(org.apache.xerces.utils.QName) void org.apache.xerces.validators.common.XMLValidator.callEndElement(int) boolean org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(boolean) boolean org.apache.xerces.framework.XMLDocumentScanner.parseSome(boolean) void org.apache.xerces.framework.XMLParser.parse(org.xml.sax.InputSource) void org.apache.fop.apps.Driver.render(org.xml.sax.XMLReader, org.xml.sax.InputSource) void org.apache.fop.apps.CommandLineStarter.run() void org.apache.fop.apps.Fop.main(java.lang.String [])
RE: dynamic image in PDF
Hi All, I have been trying to create a pdf using FOP. This is the exception I get.. Any thoughts. Attached is the FO file being used... Thanks, Ankur [DEBUG]: Input mode: [DEBUG]: FO [DEBUG]: fo input file: DateTrial.fo [DEBUG]: Output mode: [DEBUG]: pdf [DEBUG]: output file: DateTrial.pdf [DEBUG]: OPTIONS [DEBUG]: no user configuration file is used [default] [DEBUG]: debug mode on [DEBUG]: dump configuration [DEBUG]: quiet mode on [DEBUG]: base directory: file:/c:/program files/ibm/visualage for java/ide/project_resources/APACHE FOP/ [INFO]: FOP 0.20.3 [DEBUG]: using SAX parser org.apache.xerces.parsers.SAXParser [INFO]: building formatting object tree [DEBUG]: setting up fonts [ERROR]: 'master-reference' for 'fo:page-sequence'matches no 'simple-page-master' or 'page-sequence-master' org.apache.fop.apps.FOPException: 'master-reference' for 'fo:page-sequence'matches no 'simple-page-master' or 'page-sequence-master' java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) org.apache.fop.apps.FOPException(java.lang.String) org.apache.fop.layout.PageMaster org.apache.fop.fo.pagination.PageSequence.getNextPageMaster(java.lang.String, int, boolean, boolean) org.apache.fop.layout.Page org.apache.fop.fo.pagination.PageSequence.makePage(org.apache.fop.layout.AreaTree, int, boolean, boolean) void org.apache.fop.fo.pagination.PageSequence.format(org.apache.fop.layout.AreaTree) void org.apache.fop.apps.StreamRenderer.render(org.apache.fop.fo.pagination.PageSequence) void org.apache.fop.fo.FOTreeBuilder.endElement(java.lang.String, java.lang.String, java.lang.String) void org.apache.xerces.parsers.SAXParser.endElement(org.apache.xerces.utils.QName) void org.apache.xerces.validators.common.XMLValidator.callEndElement(int) boolean org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(boolean) boolean org.apache.xerces.framework.XMLDocumentScanner.parseSome(boolean) void org.apache.xerces.framework.XMLParser.parse(org.xml.sax.InputSource) void org.apache.fop.apps.Driver.render(org.xml.sax.XMLReader, org.xml.sax.InputSource) void org.apache.fop.apps.CommandLineStarter.run() void org.apache.fop.apps.Fop.main(java.lang.String []) DateTrial.fo Description: DateTrial.fo
SV: dynamic image in PDF
Am I the only one having problems with including images when running FOP as part of a J2EE application? When running FOP stand alone, I can specify the path to my image as per normal, but when Im running FOP as part of my application I get output that boils down to that I havent specified a base directory. Now, going through the API I find no way of setting FOP:s base directory at runtime, neither how to turn off logging. Could someone help me out? It would be awesome if I could give FOP an Image or a byte[] directly, but just getting file: or url: to work when its part of an application would do for now. WR -Ursprungligt meddelande- Från: Jeremias Maerki [mailto:[EMAIL PROTECTED] Skickat: den 28 februari 2002 08:20 Till: [EMAIL PROTECTED] Ämne: Re: dynamic image in PDF > I have a servlet which creates imagery. I want to embed this in a PDF > document and I've been playing around with FOP in JSP. I can get PDF > generated but only on static image references, using external- > graphic. What I need to know is - is there anyway of generating the > image dynamically, with the reference to the servlet embedded in the > .fo ? > > I can see there is a fo:instream- foreign-object but the examples just > show examples of SVG. Is there anyway to extend this and if so, > doesanyone have examples ? I haven't tested what you do, but I think you should be able to specify a full URL with parameters and all in the "src" attribute of "external-graphic" that will call your servlet to get the image. Or do you get any error messages? Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch
Re: dynamic image in PDF
> I have the same problem. The "src" attribute of "external-graphic" accepts > only "file:." value not a full URL. I've just tried it and it works (0.20.3CVS). Well, at least without parameters because I have nothing like that ready at the moment. Could provide the error message that you get? Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch
RE: dynamic image in PDF
I have the same problem. The "src" attribute of "external-graphic" accepts only "file:." value not a full URL. Ashkan -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: 28 February 2002 07:20 To: [EMAIL PROTECTED] Subject: Re: dynamic image in PDF > I have a servlet which creates imagery. I want to embed this in a PDF document and I've been playing around with FOP in JSP. I can get PDF generated but only on static image references, using external- > graphic. What I need to know is - is there anyway of generating the image dynamically, with the reference to the servlet embedded in the .fo ? > > I can see there is a fo:instream- foreign-object but the examples just show examples of SVG. Is there anyway to extend this and if so, doesanyone have examples ? I haven't tested what you do, but I think you should be able to specify a full URL with parameters and all in the "src" attribute of "external-graphic" that will call your servlet to get the image. Or do you get any error messages? Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch
SV: dynamic image in PDF
I think he wanted to use a javax.activation.DataSource or equalent to be able to write an image held in memory directly without storing it, but I could be wrong :) WR -Ursprungligt meddelande- Från: Jeremias Maerki [mailto:[EMAIL PROTECTED] Skickat: den 28 februari 2002 08:20 Till: [EMAIL PROTECTED] Ämne: Re: dynamic image in PDF > I have a servlet which creates imagery. I want to embed this in a PDF > document and I've been playing around with FOP in JSP. I can get PDF > generated but only on static image references, using external- > graphic. What I need to know is - is there anyway of generating the > image dynamically, with the reference to the servlet embedded in the > .fo ? > > I can see there is a fo:instream- foreign-object but the examples just > show examples of SVG. Is there anyway to extend this and if so, > doesanyone have examples ? I haven't tested what you do, but I think you should be able to specify a full URL with parameters and all in the "src" attribute of "external-graphic" that will call your servlet to get the image. Or do you get any error messages? Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch
Re: dynamic image in PDF
> I have a servlet which creates imagery. I want to embed this in a PDF > document and I've been playing around with FOP in JSP. I can get PDF > generated but only on static image references, using external- > graphic. What I need to know is - is there anyway of generating the image > dynamically, with the reference to the servlet embedded in the .fo ? > > I can see there is a fo:instream- foreign-object but the examples just show > examples of SVG. Is there anyway to extend this and if so, doesanyone have > examples ? I haven't tested what you do, but I think you should be able to specify a full URL with parameters and all in the "src" attribute of "external-graphic" that will call your servlet to get the image. Or do you get any error messages? Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch
dynamic image in PDF
Hi I have a servlet which creates imagery. I want to embed this in a PDF document and I've been playing around with FOP in JSP. I can get PDF generated but only on static image references, using external- graphic. What I need to know is - is there anyway of generating the image dynamically, with the reference to the servlet embedded in the .fo ? I can see there is a fo:instream- foreign-object but the examples just show examples of SVG. Is there anyway to extend this and if so, doesanyone have examples ? Thanks Chris