AW: Preserving Linefeed character
Hello I had the same problem. I' ve solved it, with doing the newline in the xml. In the xml I wrote a new tag instead of the newline, like this: Data Line1n/Line2/Data In the xsl I ad a template for the new tag: xsl:template match=n fo:block xsl:text #160;#xa;/xsl:text /fo:block /xsl:template With this it works by us fine. Regards Priska -Ursprüngliche Nachricht- Von: Al-Dhahir, Haitham [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 23. Juli 2002 21:29 An: '[EMAIL PROTECTED]' Betreff: Preserving Linefeed character Hi, I have an XML document which contains a linefeed character in one of the lines. However, when I process this into PDF using FOP, the outputted line has a space where the linefeed should be. My XML: Data val=Line1#x0A;Line2/ My XSL: fo:block text-align=left font-weight=normal linefeed-treatment=preservexsl:value-of select=Data/@val//fo:block What I want to appear in the PDF: Line1 Line2 What is actually appearing: Line1Line2 The FO documentation indicates that linefeed-treatment=preserve should keep the linefeed, but it is not. I suspect that the problem may be that FOP does not support the linefeed-treatment property. Is this the case? If so, can anyone suggest how I can get around this problem? Thanks, Haitham. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Preserving Linefeed character
Hi, thanks for the suggestion. I actually followed J Pietschmann's advice to use the property white-space-collapse=false in the fo:block level and this worked! So I would recommend anyone facing the same problem with linefeed removal to try this first. I am still facing the same problem with FOP's log output (described below). Basically I want the log output to go to my own Logger, which in itself is an implementation of java.util.Logging. I would be very grateful if anyone can help with this. From my previous mail: -- I am running Java 1.3 and so I am using my own implementation of the Java 1.4 Logger class. My implementation works in exactly the same way as the Java 1.4 version. How can I configure FOP to send all of its output to my logger rather than System.out? Thanks, Haitham. -Original Message- From: Steiner, Priska [mailto:[EMAIL PROTECTED]] Sent: 24 July 2002 07:42 To: '[EMAIL PROTECTED]' Subject: AW: Preserving Linefeed character Hello I had the same problem. I' ve solved it, with doing the newline in the xml. In the xml I wrote a new tag instead of the newline, like this: Data Line1n/Line2/Data In the xsl I ad a template for the new tag: xsl:template match=n fo:block xsl:text #160;#xa;/xsl:text /fo:block /xsl:template With this it works by us fine. Regards Priska -Ursprüngliche Nachricht- Von: Al-Dhahir, Haitham [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 23. Juli 2002 21:29 An: '[EMAIL PROTECTED]' Betreff: Preserving Linefeed character Hi, I have an XML document which contains a linefeed character in one of the lines. However, when I process this into PDF using FOP, the outputted line has a space where the linefeed should be. My XML: Data val=Line1#x0A;Line2/ My XSL: fo:block text-align=left font-weight=normal linefeed-treatment=preservexsl:value-of select=Data/@val//fo:block What I want to appear in the PDF: Line1 Line2 What is actually appearing: Line1Line2 The FO documentation indicates that linefeed-treatment=preserve should keep the linefeed, but it is not. I suspect that the problem may be that FOP does not support the linefeed-treatment property. Is this the case? If so, can anyone suggest how I can get around this problem? Thanks, Haitham. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: Embedding FOP in Servlet
Hi Oleg, first thanx for your response. It's indeed an ClassCastException. You're right, but fop.far is from July 2002, so it's new. I make an attempt from command line and wrote following short programm which works fine. Hmm! What is wrong with the servlet, what goes wrong during Driver driver = new Driver();? Any idea? Martin ### Command Line Programmm import java.io.*; import org.xml.sax.*; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; import org.apache.fop.apps.Driver; import org.apache.fop.apps.Version; import org.apache.fop.apps.InputHandler; import org.apache.fop.apps.XSLTInputHandler; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.svg.*; import org.apache.fop.fo.*; import org.apache.batik.util.XMLResourceDescriptor; import org.apache.avalon.framework.logger.ConsoleLogger; import org.apache.avalon.framework.logger.Logger; public class fopdriver { public static void main(String[] args) { try { Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); File xmlFile = new File(C:\\jakarta-tomcat-4.0.1\\webapps\\fop\\WEB-INF\\lib\\glossary.xml); File xslFile = new File(C:\\jakarta-tomcat-4.0.1\\webapps\\fop\\WEB-INF\\lib\\glossary.xsl); File outFile = new File(C:\\jakarta-tomcat-4.0.1\\webapps\\fop\\WEB-INF\\lib\\glossary.pdf); InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); XMLReader parser = inputHandler.getParser(); driver.setOutputStream(new FileOutputStream(outFile)); driver.render(parser, inputHandler.getInputSource()); } catch (Exception ex) { System.out.println(Lade neuen driver Kon2); } } } ### - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: AW: Embedding FOP in Servlet
Martin Ewald wrote: first thanx for your response. It's indeed an ClassCastException. You're right, but fop.far is from July 2002, so it's new. I make an attempt from command line and wrote following short programm which works fine. Hmm! You could also run fop.bat (or fop.sh) script instead. What is wrong with the servlet, what goes wrong during Driver driver = new Driver();? Any idea? I meant not your fop is old, but may be somewhere in the tomcat classpath does exist older fop or something. -- Oleg Tkachenko Multiconn International, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: AW: Embedding FOP in Servlet
Hi Oleg, I have searched all possibilities where a fop could be referenced by tomcat to be sure it's the only one. To test I've deleted the fop.jar from the subdirectory 'C:\jakarta-tomcat-4.0.1\webapps\fop\WEB-INF\lib' and the servlet fails completely because of missing classes. Then I have built up fop.jar again with ant, but I always get the same error message: java.lang.IllegalArgumentException: org.apache.fop.svg.SVGElementMapping is not an ElementMapping at org.apache.fop.apps.Driver.addElementMapping(Unknown Source) at org.apache.fop.apps.Driver.setupDefaultMappings(Unknown Source) at org.apache.fop.apps.Driver.(Unknown Source) Could this be a question of access rights to the driver.class, because the command line variant succeeded? Kind regards Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: FO to RTF
Rendering RTF from the FOP area tree will produce a document edited without template (.dot). RTF is a revisable format - not a formatted document format. XSL:FO is an extensive formatting language without any kind document elements (like Adobe's e-Book), macros or stylesheets in the original meaning. Have a look at Microsoft's Office XML and you will see incompatible concepts. RTF generation has to happen at the XSLT layer. Hansuli Anderegg, Zurich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: PDF output driver
Let's talk component software (or blame monolithic MicrosSoft)! - Formatting has to be separated strictly from rendering o A clean and stable interface has to be defined (why not by data representations of powerful PDF?) o The renderer has to control the processing sequence. - FOP does what the XSL:FO specs say - no more and no less: o external-graphics are not really specified in XSL:FO, so let additional attributes pass and let the renderer do the job. o foreign-object is by chance SVG: let foreign be foreign and pass foreign-object's without checks thru to the renderer. The area of contributors and hackers is renderers and foreign-objects, so that the FOP core can be kept clean and preserved from release dependencies (Batik, JAI etc.) Hansuli Anderegg, Zurich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FOP extension elements
-Original Message- From: Keiron Liddle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 2:27 AM To: FOP Subject: Re: FOP extension elements On Tue, 2002-07-23 at 22:20, Matthew L. Avizinis wrote: Hello all, The following is stated on the FOP website: These extension are available by default. They are automatically loaded and you only need to provide the correct namespace for your embedded xml markup. OK, so fop:outline and fop:label are loaded by default without needing to do the other stuff described in Adding Your Own. What is the mechanism that allows this? In other words, if I have an extension element(s) of my own, what do I have to do in order for them work the same as outline and label and not have to load my own jars. The mechanism is that there is code that sets it all up. What exactly do you want to do, there are different types of extensions. I have an extension element that emits output to an alternate file than the one FOP is mainly processing for, i.e. FOP is humming along spitting out to a certain file, then when a certain element is encountered it emits a page number to another file that the element specifies so I can use it later. What do you mean load my own jars. What I mean is that when I run FOP and use my own extension element I do not want to have to have extra jar files hanging around. I would like the class for my own element contained in the fop.jar just like outline and label. So what I want to know is how to package up my own element with the rest of fop when I build it and have it accessible like outline and label. If this would be more hassle than it's worth, than perhaps you could explain the following in a little more detail (with maybe example code or something). Create a jar file with your classes, it must also include the following file /META-INF/services/org.apache.fop.fo.ElementMapping. In this file you need to put the fully qualified classname of your element mappings class. This class must implement the org.apache.fop.fo.ElementMapping interface. Hopefully, when I am done I can donate some code or at the least spruce up the extension element instructions so that they are easier to follow when implementing a new element. For instance, nowhere does it indicate that if the element has attributes that you have to include them in the codegen/extproperties.xml file in order for fop to even compile correctly. thanks for your time and help, matthew l. avizinis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FOP extension elements
On Wed, 2002-07-24 at 15:55, Matthew L. Avizinis wrote: What I mean is that when I run FOP and use my own extension element I do not want to have to have extra jar files hanging around. I would like the class for my own element contained in the fop.jar just like outline and label. So what I want to know is how to package up my own element with the rest of fop when I build it and have it accessible like outline and label. If this would be more hassle than it's worth, than perhaps you could explain the following in a little more detail (with maybe example code or something). If you really don't want an extra jar then I would suggest using ant to add the resulting files from your project to the fop.jar. The ant jar task can update an existing archive. Create a jar file with your classes, it must also include the following file /META-INF/services/org.apache.fop.fo.ElementMapping. In this file you need to put the fully qualified classname of your element mappings class. This class must implement the org.apache.fop.fo.ElementMapping interface. There are examples in cvs but these work slightly different than what you need. As for that file then look at the examples in cvs. You will have a class that implements the interface. Put the name of that class info a file. Put the file in the location in the jar. Hopefully, when I am done I can donate some code or at the least spruce up the extension element instructions so that they are easier to follow when implementing a new element. For instance, nowhere does it indicate that if the element has attributes that you have to include them in the codegen/extproperties.xml file in order for fop to even compile correctly. Thanks for the offer but this is already done in cvs. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Image Source with FOPServlet
Hello I would like to make a report with an image in it. When I render the xml and the xsl with the image source, with FOP 0.20.4 out a commandline, it works fine. But I have to render it, with exactly the same files in a FOPServlet. There it gives me a NullPointerException. In the xml it is as follows: bild src=c:\xsl\bild_1200011229.jpg width=50 height=50/bild In the xsl I do it with an external graphics element: xsl:template match=bild fo:block text-align=center fo:external-graphic src=file:{@src}/ /fo:block /xsl:template Is there any idea, what the problem is ? Regards P. Steiner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: AW: AW: Embedding FOP in Servlet
Martin Ewald schrieb: Hi Oleg, I have searched all possibilities where a fop could be referenced by tomcat to be sure it's the only one. To test I've deleted the fop.jar from the subdirectory 'C:\jakarta-tomcat-4.0.1\webapps\fop\WEB-INF\lib' and the servlet fails completely because of missing classes. Then I have built up fop.jar again with ant, but I always get the same error message: java.lang.IllegalArgumentException: org.apache.fop.svg.SVGElementMapping is not an ElementMapping at org.apache.fop.apps.Driver.addElementMapping(Unknown Source) at org.apache.fop.apps.Driver.setupDefaultMappings(Unknown Source) at org.apache.fop.apps.Driver.(Unknown Source) Could this be a question of access rights to the driver.class, because the command line variant succeeded? As Oleg already mentioned this really sounds like a classpath issue. Is the correct batik.jar there? Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Table Sectioning
Hi Developers, I'm struck in formatting the table. pls help me out. whts the equivalent xsl fo syntax for th colspan and th rowspan. i want my table in the following format. || | | Status | Effect of | |Total|--| Deduction | | | Paid | UnPaid| | || || || || || || || Thnx in Advance, Saran. __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: the license of Chinese hyphenation pattern file
RamanaJV, the problem is : the FOP will not wrap the text when I have a very long sentence in a block or a table-cell, with the follow I will present a sample code. so I had to use hyphenation pattem file to solve it, so, that comes another question that there is NO Chinese hyphenation pattern file for FOP. I wonder whether there is another better way , if not, how can I use Chinese hyphenation file in FOP?? ___This content is Chinese, maybe you can not see that_ fo:block font-family=SimSun -- set the Chinese font family,and modify the config.xml to embed the font SimSun hyphenate=true -- to use hyphenate hyphenation-push-character-count=2 hyphenation-remain-character-count=2 language=zh -- the problem is here, I miss the zh hyhpenate file in directory hyph ÖйúÈÕ±¨ÍøÕ¾ÏûÏ¢£ºÖйúÍâ½»²¿·¢ÑÔÈË¿×ȪÔÚ5ÔÂ28ÈÕµÄÀýÐÐÐÂÎÅ·¢²¼»áÉϳƣ¬½üÈÕ£¬º«¹úפÖйú´óʹ¹Ý¸æËßÖз½Óйز¿ÃÅ£¬ÈýÃûÈËÔ±½øÈ뺫¹úפ±±¾©Ê¹¹Ý£¬×Ô³ÆÊdz¯ÏÊÈË£¬ÒªÇóÇ°Íùº«¹ú¡£¸ù¾Ý¹ú¼Ê·¨¼°Öйú¹úÄÚµÄÓйط¨ÂÉ£¬Íâ¹úפ»ªÊ¹¹Ý¶ÔµÚÈý¹ú¹«ÃñûÓбӻ¤È¨£¬Öз½ÒªÇ󺫹úʹ¹Ý½«ÉÏÊöÈËÔ±½»ÓÉÖз½´¦Àí¡£(¶ÅÀò) /fo:block -- With above , FOP will break the sentece to fix the layout, but will warn me that miss zh hyphenate file. if I not use hyphenate in it, the pdf will just appear ÖйúÈÕ±¨ÍøÕ¾ÏûÏ¢£ºÖйúÍâ½»²¿·¢ÑÔÈË¿×ȪÔÚ5ÔÂ28ÈÕµÄÀýÐÐÐÂÎÅ·¢²¼»áÉϳƣ¬½ü and the after disappear. === 2002-07-24 Wrote £º=== Stoneson, This is happening even with the normal english also. Suppose, u have a text in the block of a table-cell and the text is not having any words ( It is a single world). FOP is not wrapping the word and the text is moving on the next cell. How to solve this problem? Ramana. -Original Message- From: stoneson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 5:05 PM To: [EMAIL PROTECTED] Subject: Re: Re: Re: the license of Chinese hyphenation pattern file Peter S. Housel, Thanks Peter, I have studyed the described in http://www.unicode.org/unicode/reports/tr14/ . but I still do not get the point to. would you please to tell me in detail?? === 2002-07-23 Wrote £º=== stoneson [EMAIL PROTECTED] wrote: the problem is : when I use to write a part of Chinese in the block or table-cell, the Chinese text could not broken in the end of line. so I use the hyhens to fixed it, the problem solved, but there is not hyhens file of Chinese for FOP, I wonder is there any good way to make the text broken if I would not use hyhens.?? What some people do is to put a space character ( ) after every Chinese character. It spaces out the text a little, but at least FOP knows where it can break the lines, and it looks better than hyphens (which can be mistaken for the number 1). At some point the FOP developers need to implement the Unicode Line Breaking Algorithm (described in http://www.unicode.org/unicode/reports/tr14/) so that FOP can break lines of Chinese/Japanese/etc. without needing extra spaces. -Peter- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] = = = = = = = = = = = = = = = = = = = = stoneson [EMAIL PROTECTED] 2002-07-24 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] = = = = = = = = = = = = = = = = = = = = stoneson [EMAIL PROTECTED] 2002-07-25 face-6.gif Description: GIF image - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Image Source with FOPServlet
Steiner, Priska wrote: I would like to make a report with an image in it. When I render the xml and the xsl with the image source, with FOP 0.20.4 out a commandline, it works fine. But I have to render it, with exactly the same files in a FOPServlet. There it gives me a NullPointerException. Taking a wild stab in the dark (you'd probably want to provide a stack trace for a more accurate guess.. :), the generated file URL isn't valid. Your file URL will end up looking like: file:c:\xsl\bild_1200011229.jpg There are a few problems with this. First, the URL doesn't have a leading '/', or an authority part. Eg: file:///c:\xsl\bild_1200011229.jpg or at least: file:/c:\xsl\bild_1200011229.jpg Next, the ':' character the 'c' is (IIRC) invalid for a URL at that point, and either needs to be escaped or replaced with something valid (a '|' is usally used) file:/c|\xsl\bild_1200011229.jpg or file:///c%3A\xsl\bild_1200011229.jpg Lastly, you've used '\' as the path separator, not '/', which is also invalid in a URL. So, in the end, the URL shoulddl look like: file:///c|/xsl/bild_1200011229.jpg Either you'll want to modify your XML to use a valid URL path component and your XSLT to use prepend file:/// instead of just file:, or modify your XSLT to fixup the Windows file path, turning it into a valid URL path component as part of the transformation. I don't know how lax the JRE on Windows is WRT strict parsing of file URLs, but if you fix up all of the above, at least you'll know you're referencing your image correctly. :) HTH, /mike -- Michael Gratton [EMAIL PROTECTED] Recall Design http://www.recalldesign.com/ s: 53 Gilbert Street Adelaide SA 5000 Australia t: +61 8 8217 0500 f: +61 8 8217 0555 smime.p7s Description: S/MIME Cryptographic Signature
EOFException while creating metrics for the font file
Hello, I am using fop-0.20.4rc version. I am trying to create font mertics file from TrueTypeFont (hgrgb98.ttf) in environment of HP-UX (11) While Creating metrics for the fontfile,following error occures. - Reading /usr/lib/X11/fonts/TrueType/japanese.st/typefaces/hgrgb98.ttf... java.io.EOFException: Reached EOF, file size=65536 offset=7092058 at org.apache.fop.fonts.FontFileReader.seek_set(FontFileReader.java:78) at org.apache.fop.fonts.TTFFile.seek_tab(TTFFile.java:82) at org.apache.fop.fonts.TTFFile.readFontHeader(TTFFile.java:614) at org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:391) at org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:181) at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:143) Can anybody please guide me how to solve this problem or how to Use Japanese font in HP-UX. --- Sachio YAGI - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Table-cell problem
HI group, I have a text in the block of a table-cell and the text is not having any words ( It is a single world). FOP is not wrapping the word and the text is moving on the next cell. The next cell text is super imposed with the previous one. How to solve this problem? Please help me. Ramana. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Table Sectioning
In the table-cell u have attribues number-columns-spanned=A Number and number-rows-spanned=A Number. Use them to get the effect. Ramana. -Original Message- From: saravana kumar [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 7:01 AM To: [EMAIL PROTECTED] Subject: Table Sectioning Hi Developers, I'm struck in formatting the table. pls help me out. whts the equivalent xsl fo syntax for th colspan and th rowspan. i want my table in the following format. || | | Status | Effect of | |Total|--| Deduction | | | Paid | UnPaid| | || || || || || || || Thnx in Advance, Saran. __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Page break
HI Group, I want to know the block where the FOP has broke the FO for the next page. Is it possible? Ramana. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]