Problem with FOP.bat
Hi Guys, I have a problem to use fop.bat in windows Vista. I Downloaded FOP bin (on my desktop), JDK 1.4_2.19 and XAMPP. I tried to launch FOP.bat but it appear and immediately disappear but I don't Know why. Anyone can to help me? Thank you very much Maurizio -- View this message in context: http://www.nabble.com/Problem-with-FOP.bat-tp23738753p23738753.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Problem with FOP.bat
m I tried to launch FOP.bat but it appear and immediately disappear but I don't Know why. Try using command shell (e.g. cmd.exe). Then change directory to the place You have the .bat and start it. It probably does produce some error message :) - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Problem with FOP.bat
maolimix wrote: Hi Guys, Hi, I have a problem to use fop.bat in windows Vista. I Downloaded FOP bin (on my desktop), JDK 1.4_2.19 and XAMPP. I tried to launch FOP.bat but it appear and immediately disappear but I don't Know why. Anyone can to help me? You need to run FOP.bat from command line. Double clicking it from Windows Explorer will result in the window being closed immediately after FOP has finished. Regards, Chris Thank you very much Maurizio - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Problem with FOP.bat
Thank you very much...now it work correctly! :) maolimix wrote: Hi Guys, I have a problem to use fop.bat in windows Vista. I Downloaded FOP bin (on my desktop), JDK 1.4_2.19 and XAMPP. I tried to launch FOP.bat but it appear and immediately disappear but I don't Know why. Anyone can to help me? Thank you very much Maurizio -- View this message in context: http://www.nabble.com/Problem-with-FOP.bat-tp23738753p23739516.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Custom FOP Extension
Can anybody help me with step-by-step guide for writing own FOP extension. I want to write some extension where fop will output an image parsing fo document like this fo:block ns:img xmlns=some URI width=100 height=100 ns:bar height=10bar1/bar ns:bar height=10bar2/bar /ns:img Internally I want to generate BufferedImage from Graphics2D then forward the same to FOP. -- View this message in context: http://www.nabble.com/Custom-FOP-Extension-tp23741578p23741578.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
AW: FOP is fun, even images brighten up?
Hi everybody, Some more information on this problem: I have a png image, which I place in a pdf. Without doing anything else, the image in the pdf is much brighter than the original image. Further information: An example image was generated with profile Dot Gain 15%. After placing it in a pdf with iText, Acrobat tells me, the image has a profile Dot Gain 15% and color management module Adobe CMM. Placing it in the pdf with fop, Acrobat tells me, the image has a profile KODAK Grayscale Conversion - Gamma 1.0 and color management module Kodak KCMS. Trying the same thing with a different image with a different profile, again, iText retains the profile, fop replaces it with KODAK Grayscale Conversion - Gamma 1.0. Now that I found out, what the problem is, can anybody give me a hint, where I can find more information regarding why fop replaces the profile and maybe even, how I can prevent that? Regards, Georg Datterl -- Kontakt -- Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH:www.irs-nbg.de Willmy PrintMedia GmbH:www.willmy.de Willmy Consult Content GmbH: www.willmycc.de - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: Custom FOP Extension
Just wondering if a custom URI resolver would be a possible and most likely simple solution? So you would use a normal external graphics tag but a custom scheme in the URI. fo:external-graphic src=myscheme:. / You then set a custom JAXP URIREesolver on the FOP Factory (I think) which does the work your extension would do and provides image data as a stream. The image still would have to be in one of the formats fop recognizes natively though (JPEG, PNG, ...). Manuel -Original Message- From: Subrata Hazra [mailto:subra...@gmail.com] Sent: Wednesday, 27 May 2009 8:32 PM To: fop-users@xmlgraphics.apache.org Subject: Custom FOP Extension Can anybody help me with step-by-step guide for writing own FOP extension. I want to write some extension where fop will output an image parsing fo document like this fo:block ns:img xmlns=some URI width=100 height=100 ns:bar height=10bar1/bar ns:bar height=10bar2/bar /ns:img Internally I want to generate BufferedImage from Graphics2D then forward the same to FOP. -- View this message in context: http://www.nabble.com/Custom-FOP-Extension-tp23741578p23741578.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RTF doc. compilation failure
Hi folks, I have a document (in A5 format) that can be flawlessly compiled in PDF format, but fails in RTF. It seems that FOP cannot handle background images in fo:block elements when creating an RTF file. The following API in my print.xsl has caused this problem: xsl:param name=chap.label.path select=normalize-space(//bookinfo//imageda...@role='chap_label']/@fileref)/ xsl:attribute-set name=chap.label.properties ... xsl:attribute name=background-image xsl:call-template name=fo-external-image xsl:with-param name=filename select=$chap.label.path/ /xsl:call-template /xsl:attribute xsl:attribute name=background-attachmentfixed/xsl:attribute xsl:attribute name=background-repeatno-repeat/xsl:attribute /xsl:attribute-set FOP fails to place the chapter number on top of a background icon. As I said, in PDF it works fine. When compiling RTF, I get the following error message: WARNING: Ignored deferred event for org.apache.fop.fo.flow.retrievemar...@be49e0[@id=null] May 27, 2009 4:11:44 PM org.apache.fop.render.rtf.RTFHandler startBlock SEVERE: startBlock: null May 27, 2009 4:11:44 PM org.apache.fop.cli.Main startFOP SEVERE: Exception java.lang.RuntimeException: Exception: java.lang.NullPointerException at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) ... Please advise! Thank you a lot in advance Nancy -- View this message in context: http://www.nabble.com/RTF-doc.-compilation-failure-tp23742368p23742368.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
xsl-fo java extension function
I've used the example code in the class ExampleXML2PDF from the FOP 0.95 distribution to see what fop can do. I'm trying to write a java extension function for the stylesheet and in the function return a org.w3c.dom.Node element. My problem is, i cannot find a easy way to construct such an object. My java function has the following signature: public static Node method(ExpressionContext e, Node n, more params) And i correctly recieve an ExpressionContext and Node of type org.apache.xpath.XPathContext$XPathExpressionContext and org.apache.xml.dtm.ref.DTMNodeProxy. The method n.getOwnerDocument().createElement(block); throws an exception since the owner document does not support any of the createX methods. I've written my own class the implements org.w3c.dom.Element and it works, but its a lot of code for something that ought to be supported by something in the extension. The reason for this madness is that i've made a java function which is able to calculate tab stops using the FOP event handlers FontInfo class (((org.apache.fop.fo.FOTreeBuilder) fop.getDefaultHandler()).getEventHandler()). Using the fontInfo class one can get access to the fontmetrics of the font used to render a given PDF document, thereby calculating the length of a word before a tabstop. My goal is to create som fo:block and fo:leader elements with the text where tabs stop has been replaced by fo:leader elements. If i just return the String fo:blocksome text/fo:block the output is escape. -- View this message in context: http://www.nabble.com/xsl-fo-java-extension-function-tp23745283p23745283.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Custom FOP Extension
Subrata Hazra subra...@gmail.com wrote: Can anybody help me with step-by-step guide for writing own FOP extension. I want to write some extension where fop will output an image parsing fo document like this fo:block ns:img xmlns=some URI width=100 height=100 ns:bar height=10bar1/bar ns:bar height=10bar2/bar /ns:img Internally I want to generate BufferedImage from Graphics2D then forward the same to FOP. Depending on your workflow, have you looked into generating the image with XSLT as SVG to be included with fo:instream-foreign-object? Tim - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Media or paper tray selection in FOP for AFP rendering
Hi Vijay, Sorry to hear you are new to the AFP format, you have a lot of reading to do! :-). Also apologies for the delay in getting back to you but I really have no free time at the moment. First of all I'd recommend you take a look at http://wiki.apache.org/xmlgraphics-fop/AFPResources. Follow the link http://www.elink.ibmlink.ibm.com/public/applications/publications/cgibin/pbi.cgi on this page and enter publication reference SC31-6802-06 to download the MO:DCA reference guide. I suggest you take a look at Begin Medium Map (see page 122), and Map Media Type structured field (see page 260) and also Media Type Identifiers in the MO:DCA Registry (see page 544) - I say, what a lovely, easy to read reference guide... ;-). Hope this points you in the right direction and good luck! Adrian. vvijay wrote: Any pointers would be greatly appreciated. We are very new to AFP format and if possible pointers to detailed instructions/documntation/ideas will be greatly helpful. Thanks. Vijay Adrian Cumiskey-2 wrote: Hi, There is currently no support for this. I have no time at the moment to implement this feature, but let me know if you would like some pointers and I'll try to help. Adrian. 2009/5/23 vvijay vij...@me.com I have seen some discussion in 2006 in this forum about Media or paper tray selection in FOP. There were some proposals but I haven't seen any documentation in the latest version regarding this issue (other than postscript extensions) Is there a way to specify media/tray selection in FOP for AFP rendering? Thanks. -- View this message in context: http://www.nabble.com/Media-or-paper-tray-selection-in-FOP-for-AFP-rendering-tp23681345p23681345.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Auto Table Column Width
Hi, please see my original question below. Furthermore I'd like to know if there are already approaches or ongoing development on this issue. Do you know how other FO processors capable of this feature have solved the problem. Would be nice if you can provide me additional information what happend so far or not - so maybe we can help and work on/contribute a solution in one of the next releases. Cheers, Tobias On Wed, May 20, 2009 at 9:18 PM, Tobias Anstett [k15t.com] tob...@k15t.com wrote: Hi, I know that auto table column width is currently not supported by FOP 0.9.5. But is there a way to get the actual width of a table in the document (page - some indents) and calculate the column width like the CSS2 algorithm does? Or has anybody tried to render tables with iText and replace them automatically in the generated FOP-PDF ? -- Cheers, Tobias K15t Software UG (haftungsbeschränkt), http://www.k15t.com Rosenbergstr. 58, 70176 Stuttgart, GERMANY Registration: Stuttgart HRB 729752, VAT ID: t.b.a. Geschäftsführer (CEO): Klaus-Dieter Krüger -- Cheers, Tobias K15t Software UG (haftungsbeschränkt), http://www.k15t.com Rosenbergstr. 58, 70176 Stuttgart, GERMANY Registration: Stuttgart HRB 729752, VAT ID: t.b.a. Geschäftsführer (CEO): Klaus-Dieter Krüger - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: Auto Table Column Width
Tobias, We have a similar need for auto table sizing, but we also have an additional need for table wrapping, so we simply had to come up with an alternative solution. Since the FO is generated from XSLT, we can pass the page width and margin values as parameters to the XSLT stylesheets that can be used to get the body width of the table. Then, we have a complicated algorithm that analyzes the text that will go into each cell and calculates its approximate width based on the number of chars in the largest string in that column. We use that value in combo with the body width to know how many columns will fit on the page and how wide each column needs to be. At this point in time the character metrics are stored in a lookup table for a controlled set of fonts and font sizes. Certain combinations of characters cause the metric approximation to get all haywire, though, so we're beginning to look at a way we can possibly use XSLT extension functions to have Java and its FontMetrics class better approximate the width and height of the strings. Overall, however, the algorithm doesn't change. From what I've read on the mailing lists before, yes, there is a patch somewhere in the Bugzilla queue that attempts to offer some auto table sizing algorithm but that it doesn't yet work for all cases and is an *extremely complicated* algorithm to complete. Sean -Original Message- From: Tobias Anstett [k15t.com] [mailto:tob...@k15t.com] Sent: Wednesday, May 27, 2009 12:40 PM To: fop-users@xmlgraphics.apache.org Subject: Re: Auto Table Column Width Hi, please see my original question below. Furthermore I'd like to know if there are already approaches or ongoing development on this issue. Do you know how other FO processors capable of this feature have solved the problem. Would be nice if you can provide me additional information what happend so far or not - so maybe we can help and work on/contribute a solution in one of the next releases. Cheers, Tobias On Wed, May 20, 2009 at 9:18 PM, Tobias Anstett [k15t.com] tob...@k15t.com wrote: Hi, I know that auto table column width is currently not supported by FOP 0.9.5. But is there a way to get the actual width of a table in the document (page - some indents) and calculate the column width like the CSS2 algorithm does? Or has anybody tried to render tables with iText and replace them automatically in the generated FOP-PDF ? -- Cheers, Tobias K15t Software UG (haftungsbeschränkt), http://www.k15t.com Rosenbergstr. 58, 70176 Stuttgart, GERMANY Registration: Stuttgart HRB 729752, VAT ID: t.b.a. Geschäftsführer (CEO): Klaus-Dieter Krüger -- CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Media or paper tray selection in FOP for AFP rendering
Hi Adrian, I appreciate you taking the time to respond to my request. We will go through the reference material suggested by you. Is this the right forum to post any FOP/AFP related questions. I do have a few more issues we are trying to resolve and wondering if there is another forum for these specific issues. Thank you, Vijay Adrian Cumiskey-2 wrote: Hi Vijay, Sorry to hear you are new to the AFP format, you have a lot of reading to do! :-). Also apologies for the delay in getting back to you but I really have no free time at the moment. First of all I'd recommend you take a look at http://wiki.apache.org/xmlgraphics-fop/AFPResources. Follow the link http://www.elink.ibmlink.ibm.com/public/applications/publications/cgibin/pbi.cgi on this page and enter publication reference SC31-6802-06 to download the MO:DCA reference guide. I suggest you take a look at Begin Medium Map (see page 122), and Map Media Type structured field (see page 260) and also Media Type Identifiers in the MO:DCA Registry (see page 544) - I say, what a lovely, easy to read reference guide... ;-). Hope this points you in the right direction and good luck! Adrian. vvijay wrote: Any pointers would be greatly appreciated. We are very new to AFP format and if possible pointers to detailed instructions/documntation/ideas will be greatly helpful. Thanks. Vijay Adrian Cumiskey-2 wrote: Hi, There is currently no support for this. I have no time at the moment to implement this feature, but let me know if you would like some pointers and I'll try to help. Adrian. 2009/5/23 vvijay vij...@me.com I have seen some discussion in 2006 in this forum about Media or paper tray selection in FOP. There were some proposals but I haven't seen any documentation in the latest version regarding this issue (other than postscript extensions) Is there a way to specify media/tray selection in FOP for AFP rendering? Thanks. -- View this message in context: http://www.nabble.com/Media-or-paper-tray-selection-in-FOP-for-AFP-rendering-tp23681345p23681345.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://www.nabble.com/Media-or-paper-tray-selection-in-FOP-for-AFP-rendering-tp23681345p23750539.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Media or paper tray selection in FOP for AFP rendering
Hi Vijay, There is a specialist AFP list at http://lists.topica.com/lists/afp-l that you can subscribe to. Its not a very active list but there are a lot of knowledgeable subscribers who work at IBM and Infoprint Solutions Company who may be able to help you. Good luck. Adrian. 2009/5/27 vvijay vij...@me.com Hi Adrian, I appreciate you taking the time to respond to my request. We will go through the reference material suggested by you. Is this the right forum to post any FOP/AFP related questions. I do have a few more issues we are trying to resolve and wondering if there is another forum for these specific issues. Thank you, Vijay Adrian Cumiskey-2 wrote: Hi Vijay, Sorry to hear you are new to the AFP format, you have a lot of reading to do! :-). Also apologies for the delay in getting back to you but I really have no free time at the moment. First of all I'd recommend you take a look at http://wiki.apache.org/xmlgraphics-fop/AFPResources. Follow the link http://www.elink.ibmlink.ibm.com/public/applications/publications/cgibin/pbi.cgi on this page and enter publication reference SC31-6802-06 to download the MO:DCA reference guide. I suggest you take a look at Begin Medium Map (see page 122), and Map Media Type structured field (see page 260) and also Media Type Identifiers in the MO:DCA Registry (see page 544) - I say, what a lovely, easy to read reference guide... ;-). Hope this points you in the right direction and good luck! Adrian. vvijay wrote: Any pointers would be greatly appreciated. We are very new to AFP format and if possible pointers to detailed instructions/documntation/ideas will be greatly helpful. Thanks. Vijay Adrian Cumiskey-2 wrote: Hi, There is currently no support for this. I have no time at the moment to implement this feature, but let me know if you would like some pointers and I'll try to help. Adrian. 2009/5/23 vvijay vij...@me.com I have seen some discussion in 2006 in this forum about Media or paper tray selection in FOP. There were some proposals but I haven't seen any documentation in the latest version regarding this issue (other than postscript extensions) Is there a way to specify media/tray selection in FOP for AFP rendering? Thanks. -- View this message in context: http://www.nabble.com/Media-or-paper-tray-selection-in-FOP-for-AFP-rendering-tp23681345p23681345.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://www.nabble.com/Media-or-paper-tray-selection-in-FOP-for-AFP-rendering-tp23681345p23750539.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- Adrian.
Re: Custom FOP Extension
On 27 May 2009, at 14:32, Subrata Hazra wrote: Can anybody help me with step-by-step guide for writing own FOP extension. I want to write some extension where fop will output an image parsing fo document like this fo:block ns:img xmlns=some URI width=100 height=100 ns:bar height=10bar1/bar ns:bar height=10bar2/bar /ns:img Internally I want to generate BufferedImage from Graphics2D then forward the same to FOP. Apart from what Manuel and Tim already suggested, what you could do, is implement it as a custom FO extension. SVG can be taken as an example, although SVG is only implemented to work if it is child to a fo:instream-foreign-object. It does, however, offer a fairly good picture of all the work that needs to be done to process foreign XML (not in the default FO namespace). The Barcode4J extension may also be of interest here.[*] On the FOP side, be sure to take a look at org.apache.fop.fo.flow.InstreamForeignObject and its superclass org.apache.fop.fo.flow.AbstractGraphics.[**] Chances are you can reuse a lot of the existing code. I'm guessing that, with a bit of imagination, it should be possible to implement your extension as a subclass of AbstractGraphics (so you can reuse the same LayoutManager; otherwise, you would need to provide an extension LM together with the extension node, and add a mapping for that...) [*] http://barcode4j.sourceforge.net/ [**] http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java?revision=679326 http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractGraphics.java?revision=679326 HTH! Andreas - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org