Generating PDF on the fly using on the fly XML
Hi, I used to create a servlet that can produce PDF by setting its contentType. 1. Now, I wonder if I can use Apache FOP to take XML stream that I created using JDOM to produce a PDF? How? 2. Is it possible to produce a PDF that only contains JPEG using XML stream? I am thinking about storing an image stream in an XML document like this : picture the stream is here /picture 3. What about producing mixed content (image and text) in a PDF? I know I can use the external link/external file fo element. But what if the image and text are all created on the fly? Thank you, === Meriahkan Tahun Baru Imlek dengan mengirimkan Kartu Elektronik PlasaCom kepada kerabat dan teman Anda Kepada para pengguna TELKOMSave, lakukan pergantian kartu lama Anda segera ! http://www.telkomsave.com === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java/util/Hashmap
Matthew Lancashire wrote: Its 1.3.1_06. What do I need to do to get the class in to my classes folder. To be sure of the version, put System.out.println( System.getProperty( java.version ) ); in the same code as were you use FOP. Then you can be sure that it is really the version of the java used to run FOP that you see. If you dont have java.util.HashMap, then the version is below 1.2, and there isnt really anything you can do about it, other than changing JDK. There is a possibility to add the collections classes to a pre 1.2 jdk, but these classes exist in a different package, which means that you would have to modify FOP and probably every library that FOP relies on. My humble advice would be to ditch J++. -Original Message- From: Johan Åbrandt [mailto:[EMAIL PROTECTED] Sent: 31 Jan 2003 15:34 To: [EMAIL PROTECTED] Subject: Re: java/util/Hashmap Matthew Lancashire wrote: VJ++ 6.0 Yeah. I have both Sun JDK and MS JDK. Is it in there? If the Sun JDK is above version 1.2 then yes. Try java -version on the command line, or print System.getProperty( java.version ) in a program. i.e public class Prop { public static void main( String[] args ) { System.out.println( System.getProperty( java.version ) ); } } -Original Message- From: Johan Åbrandt [mailto:[EMAIL PROTECTED] Sent: 31 Jan 2003 15:26 To: [EMAIL PROTECTED] Subject: Re: java/util/Hashmap Matthew Lancashire wrote: I keep getting the noclassdeffounderror for hashmap. Where is this MS VM? Are you using VJ++? Isnt that JDK 1.1? HashMap was introduced in JDK 1.2 . Matthew Lancashire IT Project Manager Intitial Electronic Security Ltd Tel: +44 1282 473554 Fax: +44 1254 267552 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Johan Åbrandt Technical Project Manager (Tekninen projektipäällikkö) Tel. +358 9 6817 3342 Mobile. +358 40 848 8068 [EMAIL PROTECTED] Profit Software Oy Meritullinkatu 11 C 00170 Helsinki, Finland __ This message and its attachments have been found clean from known viruses with three different antivirus programs. __ - 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] -- Johan Åbrandt Technical Project Manager (Tekninen projektipäällikkö) Tel. +358 9 6817 3342 Mobile. +358 40 848 8068 [EMAIL PROTECTED] Profit Software Oy Meritullinkatu 11 C 00170 Helsinki, Finland __ This message and its attachments have been found clean from known viruses with three different antivirus programs. __ - 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] -- Johan Åbrandt Technical Project Manager (Tekninen projektipäällikkö) Tel. +358 9 6817 3342 Mobile. +358 40 848 8068 [EMAIL PROTECTED] Profit Software Oy Meritullinkatu 11 C 00170 Helsinki, Finland __ This message and its attachments have been found clean from known viruses with three different antivirus programs. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Table column width
Hi, I have a problem in displaying the data in the pdf table. Each column width in a table should be different from the other column depending on the data. Since I am using the same fop stylesheet for different tables, I cannot hardcode the column width in the stylesheet. Is there any option we can set so that the PDF table columns get adjusted with the data you pass (like HTML table)? If not, how can I go head to solve this problem? Thanks and Regards, Sujata - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
single and double column on same single page
Hi everybody, i need the single and double column on same single page. It is possible in fop-0.20.5. immediate replay is highly appreciated. regards, bala __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
footnote in a list body
Hi all, I have to insert footnotes in my document. It works fine, if the footnote is in a paragraph. But if the footnote is in a list, the footnote has the same indent as the list body and it overwrites the last text rows at the bottom of the page. Is there a solution of this problem? Karen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PDF to FO?
Will Spies wrote: If I have an existing PDF file is there a way to convert it to a FO file? I would like to create dynamic forms but I would rather reverse engineer a PDF file. That's impossible, pdf is lower-level format relatively to fo. -- Oleg Tkachenko Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Table column width
sujata wrote: I have a problem in displaying the data in the pdf table. Each column width in a table should be different from the other column depending on the data. Since I am using the same fop stylesheet for different tables, I cannot hardcode the column width in the stylesheet. Is there any option we can set so that the PDF table columns get adjusted with the data you pass (like HTML table)? table-layout=auto is not implemented yet unfortunately. If not, how can I go head to solve this problem? Move table-column width calculation logic to xslt stage. -- Oleg Tkachenko Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP logo contest
Hi I've noticed that the deadline for submitting a design and voting are the same (28th Feb). Wouldn't it perhaps be better to set a deadline for the logo submission first and then a second deadline for voting? That way the voters can choose from the full range of entries when when placing their vote.. regards Andy Hello! New FOP is looming and it needs a new logo. FOP Team announces open logo contest and invites all members of the FOP community as well as any other interested parties to participate as contestants or by expressing your opinion through voting. The rules and details are at http://xml.apache.org/fop/logocontest.html. -- Oleg Tkachenko Multiconn Technologies, Israel This e-mail and its attachments are confidential. If you are not the intended recipient of this e-mail message, please telephone or e-mail us immediately, delete this message from your system and do not read, copy, distribute, disclose or otherwise use this e-mail message and any attachments. Although ri3k Limited believes this e-mail and any attachments to be free of any virus or other defect which may affect your computer, it is the responsibility of the recipient to ensure that it is virus free and ri3k Limited does not accept any responsibility for any loss or damage in any way from its use. ri3k Limited Registered in England: 10-12 Ely Place, London, EC1N 6RY Company Number: 3909745 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fop + servlet + multisession
Gian Piero Bottini wrote: I am using FOP 0.20.5rc to produce PDF files from XML and XSL-FO I use a servlet in Tomcat 4.04 if I have a large file (100 pages) and 2 session of IE are working concurrently there are no exception but the two processes don't finish and the pdf files are not displayed.. Did FOP finish processing? Run FOP in debug mode and analize debug messages. -- Oleg Tkachenko Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Generating PDF on the fly using on the fly XML
one method of using dynamically create xml content would be to use the StringReader. here some sample code: StringReader input = new StringReader(xmlString); try { FileReader inputxslt = new FileReader(new File(xslfile)); Transformer transformer = TransformerFactory.newInstance().newTransformer( new StreamSource(inputxslt)); driver.setOutputStream(new FileOutputStream(pdffile)); transformer.transform(new SAXSource(new InputSource(input)), new SAXResult(driver.getContentHandler())); } catch(FileNotFoundException fnfe) { ... } catch (TransformerException te) { ... } -Original Message- From: joni santoso [mailto:[EMAIL PROTECTED] Sent: Monday, February 03, 2003 7:01 AM To: [EMAIL PROTECTED] Subject: Generating PDF on the fly using on the fly XML Hi, I used to create a servlet that can produce PDF by setting its contentType. 1. Now, I wonder if I can use Apache FOP to take XML stream that I created using JDOM to produce a PDF? How? 2. Is it possible to produce a PDF that only contains JPEG using XML stream? I am thinking about storing an image stream in an XML document like this : picture the stream is here /picture 3. What about producing mixed content (image and text) in a PDF? I know I can use the external link/external file fo element. But what if the image and text are all created on the fly? Thank you, === Meriahkan Tahun Baru Imlek dengan mengirimkan Kartu Elektronik PlasaCom kepada kerabat dan teman Anda Kepada para pengguna TELKOMSave, lakukan pergantian kartu lama Anda segera ! http://www.telkomsave.com === - 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: FOP logo contest
Andy Joslin wrote: I've noticed that the deadline for submitting a design and voting are the same (28th Feb). Wouldn't it perhaps be better to set a deadline for the logo submission first and then a second deadline for voting? That way the voters can choose from the full range of entries when when placing their vote.. Yes, that's reasonable idea, but that would require more efforts and as public votes are not actually deciding ones (FOP Team decided to reserve jury rights) I made it this way, sorry if it's wrong. -- Oleg Tkachenko Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Table column width
Thanks for the reply. How do you take the column width in a stylesheet. I don't want to take each column width data as a separate parameter because the no of columns vary from table to table. My Logic is get a string with all the column width s of the table seperated by coma. In xsl split it and use it for the defining the column width. But I did not find any methods in xsl to split a string and put it in an array? Can u please tell me, how can i do this? Thanks and Regards, Sujata Oleg Tkachenko wrote: sujata wrote: I have a problem in displaying the data in the pdf table. Each column width in a table should be different from the other column depending on the data. Since I am using the same fop stylesheet for different tables, I cannot hardcode the column width in the stylesheet. Is there any option we can set so that the PDF table columns get adjusted with the data you pass (like HTML table)? table-layout=auto is not implemented yet unfortunately. If not, how can I go head to solve this problem? Move table-column width calculation logic to xslt stage. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fop + servlet + multisession
Now I'll try to encrease the debug level...(by the way how can I do that??) Now my output in the dos-Tomcat window is this ( I'm creating a pdf document 99 pages long): [INFO] [99] [INFO] [86] [INFO] [87] [INFO] [88] [INFO] Parsing of document complete, stopping renderer [INFO] [89] and it seems blocked but I don't know. but sometimes it works fine...very strange... and sometimes the servlet is called twice( why??) This is the code: . try{ XSLTInputHandler input = new XSLTInputHandler(xmlFile, xslFile); renderXML(input, response); } catch (Exception ex) { ex.printStackTrace(); } . public void renderXML(XSLTInputHandler input, HttpServletResponse response) throws ServletException { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); response.reset(); // questa riga è necessaria per IE che forse non capisce il SetContentType() response.setHeader(Content-Disposition,inline; filename= + Report1.pdf); response.setContentType(application/pdf); org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF); System.gc(); driver.setOutputStream(out); driver.render(input.getParser(), input.getInputSource()); System.gc(); System.out.println(stop render); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); } catch (Exception ex) { throw new ServletException(ex); } } Thanks a lot Regards Gian Piero - Original Message - From: Oleg Tkachenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 9:59 AM Subject: Re: fop + servlet + multisession Gian Piero Bottini wrote: I am using FOP 0.20.5rc to produce PDF files from XML and XSL-FO I use a servlet in Tomcat 4.04 if I have a large file (100 pages) and 2 session of IE are working concurrently there are no exception but the two processes don't finish and the pdf files are not displayed.. Did FOP finish processing? Run FOP in debug mode and analize debug messages. -- Oleg Tkachenko Multiconn Technologies, Israel - 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: fop + servlet + multisession
ciao Gian Piero, this is the snippet to set the log level to debug -- //Setup logger Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG); driver.setLogger(logger); MessageHandler.setScreenLogger(logger); -- and sometimes the servlet is called twice( why??) it's a bug of IE 5.0/5.5 hope this help fabrizio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: Re: multithreading issues - FOP, TIFFRenderer, Solaris 4-proc machine, pja x-server
ok, I run the same thing with PDFRenderer, and I found no problems there. This means that the multithreading issue is either within a) AWTRenderer b) TIFFRenderer (subclass of AWTRenderer) c) pja X-Server emulation. Since the issue is, that fontsize-changes from one Renderer influence another Renderer, I suspect the mistake to be in a) or c). AFAIK FOP paints the characters to the InMemory-Image in these classes. Is this correct? Has anyone used AWTRenderer in a mutlithreaded environment? Are there any known limitations? thanks, Reto Oleg Tkachenko [EMAIL PROTECTED] on 31.01.2003 16:05:31 Bitte antworten an [EMAIL PROTECTED] An: [EMAIL PROTECTED] Kopie: Thema: Re: multithreading issues - FOP, TIFFRenderer, Solaris 4-proc machine, pja x-server [EMAIL PROTECTED] wrote: I am using FOP 0.20.5rc to produce TIFF files from XML in an EJB environment. I experience strange multithreading issues when I run the thing in the (production-near) test-environement on a 4-proc box - the font sizes get messed up completly on the 4 proc machine but only if I render more than 1 TIFF in parallel. If I run only one rendering at a time, it is fine. If I run the same thing multithreaded on my dev box, it runs fine (though there is only one proc of course) It is entierly possible that the TIFFRenderer (from Oleg, based on AWTRenderer and JAI), or the pja toolkit (http://www.eteks.com/pja/en/) is the problem. Yes, you have to isolate problem somehow. Can you test it without TIFFRenderer, using just regular PDFRenderer? -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - 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: Generating PDF on the fly using on the fly XML
Try looking into Cocoon...I use it to take data from a database, parse it into an xml file, transform it using XSLT into an FO file and render the resulting FO file as PDF on the fly...it handles pictures/text/forms just fine. You can find it at www.apache.org/Cocoon. Hope this helps! Bob Hitchins Senior IT Business Analyst Cargill Crop Nutrition -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, February 03, 2003 4:09 AM To: [EMAIL PROTECTED] Subject: RE: Generating PDF on the fly using on the fly XML one method of using dynamically create xml content would be to use the StringReader. here some sample code: StringReader input = new StringReader(xmlString); try { FileReader inputxslt = new FileReader(new File(xslfile)); Transformer transformer = TransformerFactory.newInstance().newTransformer( new StreamSource(inputxslt)); driver.setOutputStream(new FileOutputStream(pdffile)); transformer.transform(new SAXSource(new InputSource(input)), new SAXResult(driver.getContentHandler())); } catch(FileNotFoundException fnfe) { ... } catch (TransformerException te) { ... } -Original Message- From: joni santoso [mailto:[EMAIL PROTECTED] Sent: Monday, February 03, 2003 7:01 AM To: [EMAIL PROTECTED] Subject: Generating PDF on the fly using on the fly XML Hi, I used to create a servlet that can produce PDF by setting its contentType. 1. Now, I wonder if I can use Apache FOP to take XML stream that I created using JDOM to produce a PDF? How? 2. Is it possible to produce a PDF that only contains JPEG using XML stream? I am thinking about storing an image stream in an XML document like this : picture the stream is here /picture 3. What about producing mixed content (image and text) in a PDF? I know I can use the external link/external file fo element. But what if the image and text are all created on the fly? Thank you, === Meriahkan Tahun Baru Imlek dengan mengirimkan Kartu Elektronik PlasaCom kepada kerabat dan teman Anda Kepada para pengguna TELKOMSave, lakukan pergantian kartu lama Anda segera ! http://www.telkomsave.com === - 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: fop + servlet + multisession
Thanks a lot but sometimes (with 3 session of IE) tomcat stops without exception or without particolar debug messages... Somebody have any ideas?? Could be a memory problem?? Regards Gian Piero - Original Message - From: Fabrizio Tringali [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 12:39 PM Subject: Re: fop + servlet + multisession ciao Gian Piero, this is the snippet to set the log level to debug -- //Setup logger Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG); driver.setLogger(logger); MessageHandler.setScreenLogger(logger); -- and sometimes the servlet is called twice( why??) it's a bug of IE 5.0/5.5 hope this help fabrizio - 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]
external-destination
Hi, The external-destination on basic-link is not working if I save the pdf locally. I'm getting the following massage The specified file http:/...com/pdf/test.pdf does not exist but I can see the pdf in browser. It worked fine when I open the pdf in browser. Thanks Lucian Opris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using FopServlet with ISO-8859-1
I've got an XML document encoded with ISO-8859-1 for which I have an XSL-FO which also outputs ISO-8859-1. This works nicely using the command line Fop. However, using the same XML and XSL with FopServlet I find that accented characters get clobbered in the retrieved PDF. It happens with Mozilla and IE. Any ideas? PS: I've tried using UTF-8 as the output encoding in the XSL and get the same problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Different JRE versions' affect on extent/margin(s)
In testing my application, I've noticed that different JRE's produce differing FOP output. Specifically, Java 1.3.1_04 tends to require more space for region-before region-after than Java 1.4.1_01. If I use the 1.4.1 extents/margin(s) with 1.3.1, I get a Some static text did not fit error, and it prints on the next page (if there is one--FOPpers know the drill :-). If I use the 1.3.1 extents/margin(s) wwith 1.4.1, I end up with incorrect region-before/after, leaving 1-2cm of white-space around region-body. My problem is that I have clients who use wide-ranging JREs using my templates. I'd like to come up with an intelligent solution to this (e.g., use JRE -version as a parameter to re-calculate the extents/margin(s)) My questions are: - Is this documented anywhere? - Is there a matrix/calculation enabling me to change this - How do others handle this problem? Here're excerpts from the Java 1.3.1 1.4.1 versions of my .fo files: ** Java 1.3.1 ** fo:layout-master-set fo:simple-page-master master-name=repeating page-height=28cm page-width=22cm margin-top=1cm margin-bottom=1.3cm margin-left=1cm margin-right=1cm fo:region-body margin-bottom=7.1cm margin-top=8.3cm/ fo:region-before extent=8.3cm/ fo:region-after extent=7.1cm/ /fo:simple-page-master fo:page-sequence-master master-name=repeating_pm fo:repeatable-page-master-reference master-name=repeating/ /fo:page-sequence-master /fo:layout-master-set ** Java 1.4.1 ** fo:layout-master-set fo:simple-page-master master-name=repeating page-height=28cm page-width=22cm margin-top=1cm margin-bottom=1.3cm margin-left=1cm margin-right=1cm fo:region-body margin-bottom=6.6cm margin-top=7.4cm/ fo:region-before extent=7.4cm/ fo:region-after extent=6.6cm/ /fo:simple-page-master fo:page-sequence-master master-name=repeating_pm fo:repeatable-page-master-reference master-name=repeating/ /fo:page-sequence-master /fo:layout-master-set Many thanks! -- Clay Leeds - [EMAIL PROTECTED] Web Developer - Medata, Inc. - http://www.medata.com PGP Public Key: https://mail.medata.com/pgp/cleeds.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using FopServlet with ISO-8859-1
It was indeed the default charset. I've fixed it by explicitly setting the charset in the InputStreamReader used by the file fetcher. BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(),ISO-8859-1)); Again, apologies for going off topic, but I hope this might be of some help to somebody else doing similar things. -Original Message- From: Fabrizio Tringali [mailto:[EMAIL PROTECTED] Sent: 03 February 2003 18:08 To: [EMAIL PROTECTED] Subject: Re: Using FopServlet with ISO-8859-1 I've got the same problem on solaris 7/8 and it was not the browser but the web server. I solve it setting some locale on OS, something like: LC_COLLATE=it_IT.ISO8859-1 LC_CTYPE=it_IT.ISO8859-1 LC_MESSAGES=it LC_MOLC_COLLATE=it.ISO8859-15 LC_NUMERIC=it_IT.ISO8859-1 LC_TIME=it_IT.ISO8859-1 hi - Original Message - From: Rob Staveley (Tom) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 6:34 PM Subject: Using FopServlet with ISO-8859-1 I've got an XML document encoded with ISO-8859-1 for which I have an XSL-FO which also outputs ISO-8859-1. This works nicely using the command line Fop. However, using the same XML and XSL with FopServlet I find that accented characters get clobbered in the retrieved PDF. It happens with Mozilla and IE. Any ideas? PS: I've tried using UTF-8 as the output encoding in the XSL and get the same problem. - 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: FOP extension functions
When I run FOP I get the following messages when it gets to the WritePageNumber extension function. Any suggestions? I have the idea that the extension function properties are not being mapped correctly -- am I right in this? thanks in advance. [INFO] FOP 0.20.4 [INFO] building formatting object tree [ERROR] property 'id' ignored [ERROR] property 'file' ignored [ERROR] property 'filename' ignored [ERROR] property 'id' ignored [ERROR] property 'file' ignored [ERROR] property 'filename' ignored [INFO] [1] [ERROR] no Maker for filename [ERROR] property filename ignored [ERROR] no Maker for filename [ERROR] property filename ignored [ERROR] null the ExtensionElementMapping file is as follows package com.gleim.fop.extensions.writepagenumber; import org.apache.fop.extensions.*; import org.apache.fop.fo.*; import org.apache.fop.fo.properties.ExtensionPropertyMapping; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; public class ExtensionElementMapping implements ElementMapping { public static final String URI = http://gleim.com/fop/extensions;; private static HashMap foObjs = null; private static synchronized void setupExt() { if(foObjs == null) { foObjs = new HashMap(); foObjs.put(WritePageNumber, WritePageNumber.maker()); } } public void addToBuilder(TreeBuilder builder) { setupExt(); builder.addMapping(URI, foObjs); builder.addPropertyListBuilder(URI, new DirectPropertyListBuilder()); } } -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 14, 2003 11:20 AM To: [EMAIL PROTECTED] Subject: Re: FOP extension functions This passage means that when you package your extension in a separate JAR file you have to add a certain file to the JAR. It's name is org.apache.fop.fo.ElementMapping and must contain the fully qualified classname of your class that extends the ElementMapping interface. That file must be in the directory META-INF/services. So if you have generated your extension jar, it must have approximately the following contents: /META-INF/services/org.apache.fop.fo.ElementMapping com/gleim/myfopext/MyFopExtElementMapping.class com/gleim/myfopext/MyFopExtElement.class [..] In Driver.java (at the end) you will see code that inspects this special file you have to add. It's to make sure that the extension is registered. You can also skip this step with tat special file if you call Driver.addElementMapping() either with the fully qualified classname or an instance of the ElementMapping implementation. This may also help on your way: http://marc.theaimsgroup.com/?l=fop-userm=10384400488w=2 I hope this helps. May I ask what extension you're planning? Just curious. On 14.01.2003 16:40:53 Matthew L. Avizinis wrote: Sorry, forgot to include what I wanted commentary on... :-) Hello all, Could someone elaborate a little on the following from the FOP extensions documentation please? Mabye paste some example code as well? 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. Thanks in advance for help, 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]
How to include an external graphic using a relative path
Using FOP, I succesfully wrote a servlet to generate PDF's from in-memory DOM object's containing XSL-FO markup. I able to embed graphics files by specifying a physical path as in: fo:external-graphic src=url(/project/img/image.gif)/ However, since this is a web application, I need to be able to specify a relative path for the image file. Thanks for you help, /** Gustavo C. Lopez Tetra Tech, Inc. 10306 Eaton Place, Suite 340 Fairfax, VA 22030 @Voice: (703) 385-6000 x335 @Fax: (703) 385-6007 @Email: [EMAIL PROTECTED] @Url: http://www.ttwater.com */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: footnote in a list body
Karen Mergner wrote: I have to insert footnotes in my document. It works fine, if the footnote is in a paragraph. But if the footnote is in a list, the footnote has the same indent as the list body and it overwrites the last text rows at the bottom of the page. Oddly enough, the indentation may even be correct. Apparently the fo:block in the footnote body inherits the start-indent from the fo:list-item-body. Yes, start-indent *is* an inheritable property, I just looked it up (sect. 7.10.7). The descriptions for fo:footnote or fo:footnote-body don't contain anything interesting regarding indentation of the footnote body (sect. 6.10.3f). Overwriting text rows is a bug, but probably not directly caused by the footnote but rather by an incorrect calculation of available space for list items or some subelement. Is there a solution of this problem? Use start-indent=0 (or whatever you like) on the fo:footnote-body or the blocks therein. This will fix the indentation, I'm not sure about the overlapping text. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Antwort: Re: multithreading issues - FOP, TIFFRenderer, Solaris 4-proc machine, pja x-server
[EMAIL PROTECTED] wrote: ok, I run the same thing with PDFRenderer, and I found no problems there. This means that the multithreading issue is either within a) AWTRenderer b) TIFFRenderer (subclass of AWTRenderer) c) pja X-Server emulation. Since the issue is, that fontsize-changes from one Renderer influence another Renderer, I suspect the mistake to be in a) or c). AFAIK FOP paints the characters to the InMemory-Image in these classes. Is this correct? Probably not. Renderers in general are not MT safe, but I found critical stuff only in the PDF renderer (static variables holding a StringBuffer which is filled an reset in an unsync'd routine in pdf/PDFCIDSystemInfo.java:21 and PDFWArray.java:99). There are more unprotected static variables but they seem mostly be changed by configuration, so if you load your configuration file only once, it shouldn't be that bad. Has anyone used AWTRenderer in a mutlithreaded environment? Well, the AWT renderer bears the comment attributed to Mark Lillywhite: ... This class could also do with a general audit, and I suspect it's not swing-thread-safe either. However, the class was designed for use in a stand-alone viewer, not for general purpose and multi-threaded environments. I still didn't find much unprotected static data, however, you might want to inspect the sourtce yourself. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: external-destination
Lucian Opris wrote: The external-destination on basic-link is not working if I save the pdf locally. I'm getting the following massage The specified file http:/...com/pdf/test.pdf does not exist but I can see the pdf in browser. It worked fine when I open the pdf in browser. The tool you use to view the locally saved PDF is responsible for browsing to the URL. Complain to the tool's vendor. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Prb: Using bold fonts with FOP??
Hugo Oliveira wrote: My problem is that I want to use the courier Font, normal and bold. I get the courier font file from my /WINNT/Fonts/ directory and generate the XML file for the two fonts, courier new (cour.ttf) and courier new bold (courbd.ttf). When I generate the pdf file I have two different fonts in my file, the courier new it's OK but the courier new bold is not. The font is different from courier. You have to have separate entries for the Courier New and the Courier New bold in your userconfig.xml. Check with the documentation and the sample (for Arial) in the sample userconfig. What FOP release are you using? J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to include an external graphic using a relative path
Gustavo Lopez wrote: Using FOP, I succesfully wrote a servlet to generate PDF's from in-memory DOM object's containing XSL-FO markup. I able to embed graphics files by specifying a physical path as in: fo:external-graphic src=url(/project/img/image.gif)/ However, since this is a web application, I need to be able to specify a relative path for the image file. You can define baseDir property (see faq howto) as getServletContext().getRealPath(/project/img) and then use relative pathes in fo:external-graphic. -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: external-destination
Hi, I'm using Adobe to see the pdf. The issue is only when I've tried to use a pdf as external-destination; if I'm using another extension for that file (.xml, .xsl etc.) the link is fine when I save the pdf locally. Thanks Lucian Opris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Antwort: Re: multithreading issues - FOP, TIFFRenderer, Solaris 4-proc machine, pja x-server
[EMAIL PROTECTED] wrote: ok, I run the same thing with PDFRenderer, and I found no problems there. This means that the multithreading issue is either within a) AWTRenderer b) TIFFRenderer (subclass of AWTRenderer) c) pja X-Server emulation. Since the issue is, that fontsize-changes from one Renderer influence another Renderer, I suspect the mistake to be in a) or c). AFAIK FOP paints the characters to the InMemory-Image in these classes. Is this correct? Probably yes. TIFFRenderer is just a wrapper around AWTRenderer so I don't think it can cause the problem. So I bet it's AWTRenderer. File it to bugzilla and lets consider if we can do something about it. -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: external-destination
Lucian Opris wrote: I'm using Adobe to see the pdf. The issue is only when I've tried to use a pdf as external-destination; if I'm using another extension for that file (.xml, .xsl etc.) the link is fine when I save the pdf locally. That reminds me bug #9885 - http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9885. Probably that's the case. -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Block Problem
Jim Chundevalel wrote: I'm trying to generate an XSL:FO document on the fly by taking contents from an XML file. My XML file looks like this. DATATEXT SECTIONS SECTION HEADINGTest One/HEADING MATTERThis is some text/MATTER /SECTION SECTION HEADINGTest Two/HEADING MATTERThis is some other text/MATTER /SECTION /SECTIONS /DATATEXT I have an XSL FO Document that says xsl:for-each select=SECTIONS\SECTION fo:block fo:inline text-decoration=underline xsl:value-of select=HEADING/ /fo:inline xsl:value-of select=MATTER/ /fo:block /xsl:for-each Now, I want to underline certain words contained in the MATTER Node. For this, I was thinking of doing like this in the XML document. MATTER This is some fo:inline text-decoration=underlineother/fo:inline text. /MATTER (After referencing the fo namespace at the beginning of the XML document.) However, the resulting PDF document does not underline the word other. How do I go about doing this? Having fo in source xml sounds like a really bad idea, but anyway you should use xsl:copy-of, rather than xsl:value-of to copy source subtree. xsl:copy-of select=MATTER/ -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Block Problem
Jim Chundevalel wrote: Now, I want to underline certain words contained in the MATTER Node. For this, I was thinking of doing like this in the XML document. MATTER This is some fo:inline text-decoration=underlineother/fo:inline text. /MATTER (After referencing the fo namespace at the beginning of the XML document.) However, the resulting PDF document does not underline the word other. How do I go about doing this? That's an XSLT question. The problem is here xsl:for-each select=SECTIONS\SECTION fo:block fo:inline text-decoration=underline xsl:value-of select=HEADING/ /fo:inline xsl:value-of select=MATTER/ ^^ Make yourself familiar with xsl:copy-of and xsl:apply-templates and with the XSLT processing model in general. It helps to work through a good book, the XSL FAQ has some recommendations. For further details, ask on the XSL list: http://www.mulberrytech.com/xsl/xsl-list/ J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Different JRE versions' affect on extent/margin(s)
Clay Leeds wrote: In testing my application, I've noticed that different JRE's produce differing FOP output. Specifically, Java 1.3.1_04 tends to require more space for region-before region-after than Java 1.4.1_01. If I use the 1.4.1 extents/margin(s) with 1.3.1, I get a Some static text did not fit error, and it prints on the next page (if there is one--FOPpers know the drill :-). If I use the 1.3.1 extents/margin(s) wwith 1.4.1, I end up with incorrect region-before/after, leaving 1-2cm of white-space around region-body. Which renderer are you using? Anyway provide full test case to reproduce the problem. -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cannot render a solid border around a table row
I can render a solid border around a table and around a table cell, but I cannot specify a solid border around a table row as in: fo:table-row border-bottom-color=black border-bottom-width=0.5pt border-bottom-style=solid I am using the following configuration: fop 0.20.4 jre 1.3.1_06 /** Gustavo C. Lopez Tetra Tech, Inc. 10306 Eaton Place, Suite 340 Fairfax, VA 22030 @Voice: (703) 385-6000 x335 @Fax: (703) 385-6007 @Email: [EMAIL PROTECTED] @Url: http://www.ttwater.com */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot render a solid border around a table row
Gustavo Lopez wrote: I can render a solid border around a table and around a table cell, but I cannot specify a solid border around a table row as in: fo:table-row border-bottom-color=black border-bottom-width=0.5pt border-bottom-style=solid It seems to be very old bug #2475, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2475. -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Different JRE versions' affect on extent/margin(s)
Oleg Tkachenko wrote: Clay Leeds wrote: In testing my application, I've noticed that different JRE's produce differing FOP output. Specifically, Java 1.3.1_04 tends to require more space for region-before region-after than Java 1.4.1_01. If I use the 1.4.1 extents/margin(s) with 1.3.1, I get a Some static text did not fit error, and it prints on the next page (if there is one--FOPpers know the drill :-). If I use the 1.3.1 extents/margin(s) wwith 1.4.1, I end up with incorrect region-before/after, leaving 1-2cm of white-space around region-body. Which renderer are you using? Anyway provide full test case to reproduce the problem. I am using FOP-0.20.4, although I've noticed the same problem with 0.20.5rc as well. Is that what you mean? Wait. I'm rendering to -print. I've also noticed that when I render to -pdf, I have similar differences from when I render to -print (i.e., region-before/after margin(s) are off. -- Clay Leeds - [EMAIL PROTECTED] Web Developer - Medata, Inc. - http://www.medata.com PGP Public Key: https://mail.medata.com/pgp/cleeds.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Block Problem
Hi, I tried using xsl:copy-of select=MATTER/. But FOP gives me an erro saying NULL. All other code remains the same. Jim -Original Message- From: Oleg Tkachenko [mailto:[EMAIL PROTECTED] Sent: Monday, February 03, 2003 4:12 PM To: [EMAIL PROTECTED] Subject: Re: Block Problem Jim Chundevalel wrote: I'm trying to generate an XSL:FO document on the fly by taking contents from an XML file. My XML file looks like this. DATATEXT SECTIONS SECTION HEADINGTest One/HEADING MATTERThis is some text/MATTER /SECTION SECTION HEADINGTest Two/HEADING MATTERThis is some other text/MATTER /SECTION /SECTIONS /DATATEXT I have an XSL FO Document that says xsl:for-each select=SECTIONS\SECTION fo:block fo:inline text-decoration=underline xsl:value-of select=HEADING/ /fo:inline xsl:value-of select=MATTER/ /fo:block /xsl:for-each Now, I want to underline certain words contained in the MATTER Node. For this, I was thinking of doing like this in the XML document. MATTER This is some fo:inline text-decoration=underlineother/fo:inline text. /MATTER (After referencing the fo namespace at the beginning of the XML document.) However, the resulting PDF document does not underline the word other. How do I go about doing this? Having fo in source xml sounds like a really bad idea, but anyway you should use xsl:copy-of, rather than xsl:value-of to copy source subtree. xsl:copy-of select=MATTER/ -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - 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]
Borders in cell tags
Hi All, I tried to render a border minor than 1pt, but i only obtained results in table tag, but in cell tag i did not obtain any result. There is a way to render borders minor than 1pt in cell tag? Thanks, Paulo Benfatti ___ Busca Yahoo! O serviço de busca mais completo da Internet. O que você pensar o Yahoo! encontra. http://br.busca.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]