Q: Progress of implementing new features?
Hi, can someone tell me what the progress is in the implementation of features since the release of FOP0.20.3? Tnx in advance.
incorporating static pdf pages?
Is it possible in xsl-fo when generating a dynamic pdf to add static pdf pages that are contained in a separate pdf file into the final pdf? For example, 2 pages from a pdf file at start of document + dynamically generated xsl-fo + 2 pages from pdf file at end of document TIA, Michelle
Re: what are the other third party softwares needed ?
Yes, this list would not be half that usefull without his contributions. Ralf Peter B. West wrote: Seconded. Peter [EMAIL PROTECTED] wrote: P.S: A special thanks to J.Pietschmann for all his time and help with various topics.
Re: Page Numbering when using multiple fo:page-squence tags
Abhijat Upadhyay wrote: if i am using mutiple page sequence (these are generated thru an iterator like using xsl:for-each tag, phisically there's just one fo:page-sequence tag)... then i am not able to show Page X of Y correctly in my page... could someone give a solution for this There is no way to do this with XSLFO alone, because fo:page-number-citation will only get page numbers, not page counts. Look here for a possibility to overcome this: http://marc.theaimsgroup.com/?l=fop-userm=102002702026609w=2 J.Pietschmann
HTM Sevlet
Hi, I tried FopServlet example and its works fine for PDF. Is it possible to do the same for HTML that is http://servername/servlet/FopServlet?xml=data.xmlxsl=format.xsldummy=test.html ,I tried to change the code of FopServlet like .. response.setContentType(text/html); Driver driver = new Driver(foFile, out); driver.setLogger(log); driver.setRenderer(Driver.RENDER_TXT); ... But I'm getting unknown formaating object HTML as error. Have any one tried it? Basically I want to convert XML to PDF or HTML using servlets.Do I have to write my own code,or is there out something. Please comments. Regards Balaji http://messenger.yahoo.com.au - Yahoo! Messenger - A great way to communicate long-distance for FREE!
FOP Scalability
* This email and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. * I have FOP 0.20.3 running successfully on my web server and was wondering what the best way to control the scalability of it. There is a possibility that 30 + users may be requesting a PDF page at the same time and as you all know FOP is not too kind on memory usage. The PDF being produced are only 10 pages max so its just the cost of the processing on the web server that is the problem. I have seen ideas about limiting the number of FOP processes running at one time but I dont want to have users waiting for minutes for their PDF page to be displayed. Does any one have any other ideas ?
RE: FOP Scalability
Title: RE: FOP Scalability * This email and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. * I realise that more servers could be an answer, but unfortunately this is not likely to happen Is there a way to limit the memory allocation that FOP uses. (but then that poses the problem of what to do if we run out) It is imperative that the FOP does not fail, as it generating recipts to our users.. Answers on a postcard ... -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED]] Sent: 10 May 2002 12:42 To: [EMAIL PROTECTED] Subject: Re: FOP Scalability You could have additional servers (can be low-cost) and use JMS to post jobs to a queue. These additional servers will listen on the queue (automatic load-balancing through use of JMS), generate PDFs and send a message back that the file is ready to be taken by the front servlet. I have FOP 0.20.3 running successfully on my web server and was wondering what the best way to control the scalability of it. There is a possibility that 30 + users may be requesting a PDF page at the same time and as you all know FOP is not too kind on memory usage. The PDF being produced are only 10 pages max so its just the cost of the processing on the web server that is the problem. I have seen ideas about limiting the number of FOP processes running at one time but I dont want to have users waiting for minutes for their PDF page to be displayed. Does any one have any other ideas ? 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 The original of this email has been scanned for viruses by the Government Secure Intranet (GSI) virus scanning service supplied exclusively by Cable Wireless in partnership with MessageLabs. GSI users - for further details, please contact the GSI Nerve Centre, or browse GNC 003/2002 at http://www.gsi.gov.uk/main/new2002notices.htm In case of problems, please call your organisations IT helpdesk. *** This email has been received from an external party and has been swept for the presence of computer viruses. ***
Re: FOP Scalability
I've never really done this for real, but I think I'd do it like this: On the first HTTP-Request, the job gets sent on the JMS queue. The user receives a Please wait.. page with an automatic refresh and and ID that will be returned to the server upon refresh. Use the ID in a message selector to see whether the job with the respective ID has already finished. If not, send the Please wait... again. I think this should work, but I may be wrong. I'm sure there are others on the list who have done similar things. I think I remember some posts on one of the FOP lists. Browsing the mail archive might be interesting. This is an interesting suggestion - but how does the notification to the Front Controller allow a user to know when the document is ready without some type of polling? We have a similar setup, but a polling applet is being used - which we would love to get rid of. 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: HTM Sevlet
Thanks for your reply,I never tried Cocoon,will try it. Regards Balaji. --- Alex McLintock [EMAIL PROTECTED] wrote: Hello, I'm not sure what you are asking but I think you ought to investigate Cocoon. Cocoon is a general purpose web application (ie servlet :-) which uses Apache XML and XSL technology including FOP to generate html or PDF on demand from XML source. Alex At 11:31 10/05/2002, Balaji Loganathan wrote: Hi, I tried FopServlet example and its works fine for PDF. Is it possible to do the same for HTML that is http://servername/servlet/FopServlet?xml=data.xmlxsl=format.xsldummy=test.html ,I tried to change the code of FopServlet like .. response.setContentType(text/html); Driver driver = new Driver(foFile, out); driver.setLogger(log); driver.setRenderer(Driver.RENDER_TXT); ... But I'm getting unknown formaating object HTML as error. Have any one tried it? Basically I want to convert XML to PDF or HTML using servlets.Do I have to write my own code,or is there out something. Please comments. Regards Balaji http://messenger.yahoo.com.au - Yahoo! Messenger - A great way to communicate long-distance for FREE! Openweb Analysts Ltd, London: Software For Complex Websites http://www.OWAL.co.uk/ Free Consultancy for London Companies thinking of Open Source Software. http://messenger.yahoo.com.au - Yahoo! Messenger - A great way to communicate long-distance for FREE!
RE: HTM Sevlet
Another option, if you are using jakarta struts framework, is using stxx, which is an extension to struts in which the front end can be rendered using xml/xsl/xsl-fo instead of jsp (or either). http://www.oroad.com/opencode/ -Original Message- From: Alex McLintock [mailto:[EMAIL PROTECTED] Sent: Friday, May 10, 2002 10:00 AM To: [EMAIL PROTECTED] Subject: Re: HTM Sevlet Hello, I'm not sure what you are asking but I think you ought to investigate Cocoon. Cocoon is a general purpose web application (ie servlet :-) which uses Apache XML and XSL technology including FOP to generate html or PDF on demand from XML source. Alex At 11:31 10/05/2002, Balaji Loganathan wrote: Hi, I tried FopServlet example and its works fine for PDF. Is it possible to do the same for HTML that is http://servername/servlet/FopServlet?xml=data.xmlxsl=format.xsldummy=test .html ,I tried to change the code of FopServlet like .. response.setContentType(text/html); Driver driver = new Driver(foFile, out); driver.setLogger(log); driver.setRenderer(Driver.RENDER_TXT); ... But I'm getting unknown formaating object HTML as error. Have any one tried it? Basically I want to convert XML to PDF or HTML using servlets.Do I have to write my own code,or is there out something. Please comments. Regards Balaji http://messenger.yahoo.com.au - Yahoo! Messenger - A great way to communicate long-distance for FREE! Openweb Analysts Ltd, London: Software For Complex Websites http://www.OWAL.co.uk/ Free Consultancy for London Companies thinking of Open Source Software.
Re: incorporating static pdf pages?
Michelle Popovits wrote: Is it possible in xsl-fo when generating a dynamic pdf to add static pdf pages that are contained in a separate pdf file into the final pdf? FOP is primarily a program to format XSLFO into other formats, like PDF. It is not meant to be a more general PDF processor. The iText library http://www.lowagie.com/iText/ can probably help you. You'll probably have to write your own Java wrapper to get your trask done. The iText tutorial has some interesting examples, another one demonstrating how to integrate with FOP is here: http://marc.theaimsgroup.com/?l=fop-devm=102002975028427w=2 J.Pietschmann
Re: step-by-step instructions how to print Chinese in PDF?
Argyn Kuketayev wrote: I don't see anything about Chinese letters in font metrics xml files. Btw, I don't speak Chinese :) I can't change locale or regional settings on the PC due to deployment restrictions. What glyphs are for Chinese? I'm using UTF-8 encoding. You are supposed to try a *bit* harder. The Unicode consortium http://www.unicode.org is responsible for allocating character codes. The have a sort of character names index online http://www.unicode.org/charts/charindex.html You'll have to search this, or by The Unicode Book http://www.amazon.com/exec/obidos/ASIN/0201616335/ and look up character codes which you need. I don't speak chinese, nor do I have any chinese fonts on my computer, I can't help you any further on this particular problem. Once you know which Unicode codepoints you are going to use, locate a font. Look into you Windows Font directory, or, better, use the character table utility. The character table utility will tell you for the selected fonts whether it is a unicode font, and if so, you can pick a character and get the Unicode code point. After you've located a font, check with the font directory to get the windows file name. It should be a TrueType font file ending in .ttf. Follow the instructions in docs/html-docs/fonts.html to generate a font metrics file and register the font with FOP. You'll have to do this yourself. Prepare a FO document with some characters you think should be chinese script, and run it through FOP. It is possible that you are required to explicitely select the font with the proper glyphs. If you see sharp signs ('#') where you expect the chinese script to be this means you've screwed up somewhere. J.Pietschmann
Re: step-by-step instructions how to print Chinese in PDF?
Nice reply :) --- J.Pietschmann [EMAIL PROTECTED] wrote: Argyn Kuketayev wrote: I don't see anything about Chinese letters in font metrics xml files. Btw, I don't speak Chinese :) I can't change locale or regional settings on the PC due to deployment restrictions. What glyphs are for Chinese? I'm using UTF-8 encoding. You are supposed to try a *bit* harder. The Unicode consortium http://www.unicode.org is responsible for allocating character codes. The have a sort of character names index online http://www.unicode.org/charts/charindex.html You'll have to search this, or by The Unicode Book http://www.amazon.com/exec/obidos/ASIN/0201616335/ and look up character codes which you need. I don't speak chinese, nor do I have any chinese fonts on my computer, I can't help you any further on this particular problem. Once you know which Unicode codepoints you are going to use, locate a font. Look into you Windows Font directory, or, better, use the character table utility. The character table utility will tell you for the selected fonts whether it is a unicode font, and if so, you can pick a character and get the Unicode code point. After you've located a font, check with the font directory to get the windows file name. It should be a TrueType font file ending in .ttf. Follow the instructions in docs/html-docs/fonts.html to generate a font metrics file and register the font with FOP. You'll have to do this yourself. Prepare a FO document with some characters you think should be chinese script, and run it through FOP. It is possible that you are required to explicitely select the font with the proper glyphs. If you see sharp signs ('#') where you expect the chinese script to be this means you've screwed up somewhere. J.Pietschmann http://messenger.yahoo.com.au - Yahoo! Messenger - A great way to communicate long-distance for FREE!
RE: Page X of Y Problem
Hi Abhijat, Here's the code and xsl. I am using the example servlet code. Thanks -Neeru (See attached file: test-fod.xsl)(See attached file: ServletCreatePdf.java) Abhijat Upadhyay abhijat.upadhyay@To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] patni.comcc: Subject: RE: Page X of Y Problem 05/10/2002 06:11 AM Please respond to fop-user hi neeru !! it wud be great if u cud fwd ur xsl and servlet code... so that the problem can be analyzed... ___ Abhijat Upadhyay Software Engineer Patni Computer Systems Limited Electronic Sadan - 3, TTC Industrial Area, Mahape, Navi Mumbai - 400 701 Tel: 91 22 761 1090 / 1105 ext. 2221 Fax: 91 22 761 9602 http://www.patni.com World-Wide Partnerships. World-Class Solutions. This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. test-fod.xsl Description: Binary data ServletCreatePdf.java Description: Binary data
Re: what are the other third party softwares needed ?
[EMAIL PROTECTED] wrote: To Run the FOP and see the output in PDF through IE or Netscape browser. Jar files from FOP lib directory, Adobe Acrobat Reader(is read only O.K, and which version?), R/O is OK (this means the Reader provided at no cost). Version 4 is recommended. Plugins for IE and Netscape(Isn't default when you install Adobe's Acrobat Reader?) Ask the IE and netscape guys. IE can use the ActiveX component which is part of the AR 4.x/5.x package. Installation details as well as the actual IE build number and additionally installed Adobe packages could be very important. ,Java 1.3(I am having this version).. Anything else i am missing ? Do you feel you are something missing? How compelled you are to answer everyone's(almost) questions. just curious. do you keep waiting for people to post Being too lazy for doing major coding work, that's my small contribution to the progress of mankind. J.Pietschmann
Re: Page X of Y Problem
[EMAIL PROTECTED] wrote: I am using FOP 0.20.3 for converting xml to pdf. When I am running the java code locally in Visual age I don't get any errors, but when I try to run it as servlet I get the Root element must be root, not none. // driver.render(input.getParser(), input.getInputSource()); driver.render(createParser(), input.getInputSource()); Use the line commmented out. You should not fiddle with working code unless you know what you are doing or someone who knows what happens tells you to do so. BTW it's basic netiquette to start a new thread with a new, meaningful subject for a new question. J.Pietschmann
org.xml.sax.Attributes: method getQName(I)Ljava/lang/String; not found
Hi All, I am new to FOP and trying to run the simple FopServlet in WebSphere Application Server 3.5. I can compile the FopServlet no problem and copy all the lib jar files like fop.jar; xerces-1.2.3.jar; xalan-2.0.0.jar; xalanj1compat.jar; avalon-framework-4.0.jar; logkit-1.0.jar; bsf.jar into the server lib directory. When I try to access the servlet through the browser, I got an empty page and exception logged like: java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError: org.xml.sax.Attributes: method getQName(I)Ljava/lang/String; not found It looks like server can not see the lib jar files but all the jar files are in there. Any suggestions what could be go wrong? Thanks for you help. James Lee [EMAIL PROTECTED] Tel: 416 532 5554 x 285 Fax: 416 583 4940 http://www.navantis.com
Re: HTM Sevlet
Balaji Loganathan wrote: Is it possible to do the same for HTML that is http://servername/servlet/FopServlet?xml=data.xmlxsl=format.xsldummy=test.html ,I tried to change the code of FopServlet like .. response.setContentType(text/html); Driver driver = new Driver(foFile, out); driver.setLogger(log); driver.setRenderer(Driver.RENDER_TXT); ... But I'm getting unknown formaating object HTML as error. Have any one tried it? Basically I want to convert XML to PDF or HTML using servlets. You'll have to gain some more understanding of the underlying technology. The XSL standard consists of two main parts: - XSLT which defines a language for describing transformations from arbitrary XML to other stuff, mainly other XML, and - XSLFO, which defines a language for describing how to layout stuff, mainly on paged media. The first part, XSLT, can be used to describe a transformation of arbitrary XML to (X)HMTL, or, using anther transformation, to XSLFO. The gadgets actually doing such a transformation are called XSLT processors, and Xalan (delivered with FOP) is such a beast (others are Saxon, MSXML, libxslt, there are more). FOP is a processor for transforming XSLFO into a variety of other formats, like PDF, Postscript, Text, or direct rendering into a Java AWT canvas. Therefore, FOP is not the right tool to transform arbitrary XML to HTML. Get the Xalan or Saxon distribution and look at the example servlets delivered there. As others have mentioned, Cocoon is a nice framework which takes most of the dirty Java programming from you. Once you get used to it, your productivity will get a major boost. J.Pietschmann
Re: org.xml.sax.Attributes: method getQName(I)Ljava/lang/String; not found
Lee, James wrote: I am new to FOP and trying to run the simple FopServlet in WebSphere Application Server 3.5. I can compile the FopServlet no problem and copy all the lib jar files like fop.jar; xerces-1.2.3.jar; xalan-2.0.0.jar; xalanj1compat.jar; avalon-framework-4.0.jar; logkit-1.0.jar; bsf.jar into the server lib directory. When I try to access the servlet through the browser, I got an empty page and exception logged like: java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError: org.xml.sax.Attributes: method getQName(I)Ljava/lang/String; not found Websphere 3.x has some really ancient XML libraries in the static classpath for the webapp. You'll have to put your favorite XML toolset (Xalan/Xerxes) in the static classpath explicitely. Look here http://marc.theaimsgroup.com/?l=fop-devm=101552169109119w=2 search for Websphere Complain violently to IBM, event though you'll probably get only some yeah, yeah, upgrade to 4.x comment. J.Pietschmann
Re: fop-0.20.3 Don't know what to do with error
DuCharme, Bob (LNG) wrote: C:\tempjava TestC red green blue 72 65 64 67 72 65 65 6E 62 6C 75 65 Odd. Did you try to call the same java command as in the .bat file directly on the command line? It could be some issue with the .bat file. Is there some interference from some other Java executable possible? Why wouldn't I have a problem using Fop-0.18.1-DEV if I'm using the same JVM and Win98 command processor with that? I'm not sure about 0.18, but 0.17 had a much simpler command line processing, in particular there was no check for unaccounted parameters which haunts us now. J.Pietschmann
RE: step-by-step instructions how to print Chinese in PDF?
I'm using Cocoon 2.0.1. here's what I put inside my userconfig.xml font metrics-file=c:\fop-0.20.3\msminch.xml font-triplet name=Arial style=normal weight=normal / font-triplet name=Arial style=normal weight=bold / font-triplet name=Arial style=italic weight=normal / font-triplet name=Arial style=italic weight=bold / font-triplet name=Arial style=italic weight=bold family=serif / /font I generated msminch.xml file with TTFReader utility from msmincho.ttc file. I tried an option with file-embed too. My PDF file doesn't show me chinese letters, it puts # instead. I know that my XML-FO file is Ok. All fonts are on my PC, so I can see Chinese in Internet Explorer. What shall I look into to find my problem? Argyn -Original Message- From: Argyn Kuketayev [mailto:[EMAIL PROTECTED] Sent: Friday, May 10, 2002 5:37 PM To: '[EMAIL PROTECTED]' Subject: RE: step-by-step instructions how to print Chinese in PDF? After you've located a font, check with the font directory to get the windows file name. It should be a TrueType font file ending in .ttf. it's msmincho.ttc. I ran ttfreader, it generated me the HUGE xml file ~400k. How should I extract the only required fonts? I don't specify any fonts explicitely inside my FO file, only font family serif or sans-serif. Argyn
Re: step-by-step instructions how to print Chinese in PDF?
Argyn Kuketayev wrote: it's msmincho.ttc. I ran ttfreader, it generated me the HUGE xml file ~400k. How should I extract the only required fonts? You don't. Chinese fonts are huge. You should already be aware of that. I don't specify any fonts explicitely inside my FO file, only font family serif or sans-serif. I'm not sure what you want to say. Register your font using some name, like msmincho, in your userconfig.xml. Write a small FO file using some chinese characters, should work best if you assured they have glyphs in the font. Run FOP. If this doesn't work, use font-family=msmincho on the enclosing block. If this still doesn't work, ask your boss for another assignment. J.Pietschmann