Article in JAVAWORLD.
I had written an article about publishing PDF docs on client side using FOP for JAVAWORLD magazine. The editors have approved it and has been published in the March 28 edition of Javaworld.Check the article at http://www.javaworld.com. Its right on the home page. The direct article link is http://www.javaworld.com/javaworld/jw-03-2005/jw-0328-xmlprinting.htmlI have acknowledged the help received from this forum in the CONCLUSION section just above the ABOUT THE AUTHOR section on page 2.Thanks again to all in this group. Without your inputs this wouldn't have been possible..Manoj Nair - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Build FOP
Gang I have used the http protocol to access the font file.. font metrics-file=http://localhost:7011/web/msgothic.xml; embed-file=http://localhost:7011/web/msgothic.TTF; kerning=yes font-triplet name=MSGothic style=normal weight=normal/ font-triplet name=MSGothic style=normal weight=bold/ /font Instead of localhost you can use the servername where the fonts are located.. Thanks Manoj Gang Li [EMAIL PROTECTED]To: fop-users@xmlgraphics.apache.org onebs.com cc: Subject: RE: Build FOP 03/22/2005 08:59 AM Please respond to fop-users Also, it looks like the userconfig.xml is pointing to a locale copy of font file. Can I make it portable? I am actually gonna build a WAR file of FOP to deploy it on Tomcat server. How can I avoid the hard-coded font file problem? Thanks for your answer, Gang -Original Message- From: Gang Li Sent: Tuesday, March 22, 2005 10:41 AM To: fop-users@xmlgraphics.apache.org Subject: Build FOP Dumb question asked again and again. But I seem to have problems rebuilding 0.20.5 source code. Following is the error message I got. I am trying to add Bookman Old Style font to support my PDF. BUILD FAILED file:C:/AppDown/fop-0.20.5/build.xml:438: java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.optional.TraXLiaison Any help is appreciated. Thanks, Gang - 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: FopServlet
BenI tried without creating a file on disk but was not successful but then I might have missed something. If disk space is an issue ( like in my case) , I created them in the /tmp directory on Unix where my server was running. The /tmp directory gets cleaned up et end of day and so that solved my problem..ThanksManoj-Ben Gill [EMAIL PROTECTED] wrote: -To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED]From: Ben Gill [EMAIL PROTECTED]Date: 03/09/2005 02:02AMSubject: FopServletHi,I am trying to use the FopServlet, but ideally, dont want to have to producethe XML file on disk, and then load it up again, just to pass in File, Fileinto XSLTHandler (or TraxInputHandler)...So, I was trying to just pass in InputSources..(ie):ProjectTeam projectTeam = new ProjectTeam();InputSource projectTeamInputSource = newProjectTeamInputSource(projectTeam);Is this possible? or do I *have* to save the XML to disk?(I was getting a malformed URL exception when trying to do this)BenThis message has been checked for all known viruses by the MessageLabs Virus Control Centre. *Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company.If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.Company reg. no. 3875000.Ocado LimitedTitan Court3 Bishops SquareHatfield Business ParkHatfieldHertsAL10 9NE*-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: How to handle special characters?
I think MS ARIAL UNICODE font has tons of fonts which cover a lot of character sets including special ones. Try using that font set..Manoj-"[EMAIL PROTECTED]" [EMAIL PROTECTED] wrote: -To: [EMAIL PROTECTED]From: "[EMAIL PROTECTED]" [EMAIL PROTECTED]Date: 03/09/2005 01:21AMSubject: How to handle special characters?Hi,I need to display in a pdf file some text that contains different type of characters: some are ascii type but other are special ones like the 'star' or 'square' characters. I understand from what I have read that those special characters are not available in the default Helvetica or Courier base font and that I need to use the ZapfDingbats font.So what I need to achieve is transform the following XML content:"Some text ? More text"Into:fo:inline font-family="Helvetica" Some text fo:inline font-family="ZapfDingbats"?/fo:inline More text /fo:inlineHow can this be done using XSL to create the proper FO document knowing that I don't know in advance what the text to translate looks like and how many 'special' characters it contains (ex 'asdf?as¡df?as£d??fasd?')Thanks for any tips!Patrick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to adjust row width for overflowing text ?
Guys I have an issue where the text in a row is so long that it overflows to the next line and the top of the characters touch the lower part of the upper line. The 2 lines therefore appears squished. I have tried everything to set this right but nothing seems to be working..I have also tried the fo:inline line-height=16pt property but this doesnt work... anyone? Thanks Manoj PS: I have attached a screen shot of these squished lines in word attachment. Note the text Films of Brasil, Inc sliding under the top line. Note that the entire text is in one row (See attached file: x.doc) x.doc Description: MS-Word document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Out of Memory problem
I think someone asked this question ( inadvertently deleted that email) But how do we programmatically increase the memory size for FOP Java VM? Thanks Manoj Chris Bowditch [EMAIL PROTECTED]To: [EMAIL PROTECTED] otmail.com cc: Subject: Re: Out of Memory problem 02/24/2005 01:25 AM Please respond to fop-user Manisha Sathe wrote: I am trying for one Chinese PDF. When i do not make use of Arial Unicode MS font then i do not get this error. All chinese characters are displayed as #. Once i use this font then i get this error (even if it is just 2-3 pages long - sometimes at very beginning i get the 1 page report - after that even not that) I tried the the things mentined such as reduce the size of image, page sequence (do not know how to increase the JVM memory on fly) - also reset the Cache etc what ever given in docs, but still same. To increase JVM memory, just change your FOP.bat or whatever script starts your Java VM and specify command line parameter -Xmx256M. The default is 64Mb, which isnt sufficient due to the large number of glyphs in The Arial Unicode font. snip/ Chris - 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: printing page numbers
Try out display-align ... Jaysheel Bhavsar To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: ite.com Subject: RE: printing page numbers 02/16/2005 12:48 PM Please respond to fop-user Hi, Here is part of my xsl sheet it is working fine, I get it to display page 1 of x. Now the problem I am running into is I cannot align my text for some reason. I have tried end and right but my text page 1 of x always stays on the left. Is there something I am missing. Is this because its in the footer of the page? -- fo:layout-master-set !-- layout for the first page -- fo:simple-page-master master-name=test page-height=11in page-width=8.5in margin-bottom=0.25in margin-top=0.25in fo:region-before extent=1.5cm/ fo:region-body margin-top=0.2in/ fo:region-start extent=1.0in/ fo:region-end extent=0.3in/ fo:region-after extent='1.0cm' region-name=footer/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=test initial-page-number=1 !-- usage of page layout -- !-- header -- fo:static-content flow-name=footer fo:block font-family=Helvetica font-size=7pt fo:inline text-align=end Page fo:page-number/ of fo:page-number-citation ref-id=last-page/ /fo:inline /fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:block xsl:apply-templates/ /fo:block fo:block id=last-page/ /fo:flow /fo:page-sequence - 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: printing page numbers
Try adding spaces before the Page x of y by using fo:inline#160;#160;#160;#160;#160;#160;#160;#160;/fo:inline fo:inline text-align=endPage fo:page-number/ of fo:page-number-citation ref-id=last-page/ /fo:inline Let me know Manoj Jaysheel Bhavsar To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: ite.com Subject: RE: printing page numbers 02/16/2005 01:00 PM Please respond to fop-user No that didn't work either, any other ideas? Jaysheel. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 4:00 PM To: [EMAIL PROTECTED] Subject: RE: printing page numbers Try out display-align ... Jaysheel Bhavsar To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: ite.com Subject: RE: printing page numbers 02/16/2005 12:48 PM Please respond to fop-user Hi, Here is part of my xsl sheet it is working fine, I get it to display page 1 of x. Now the problem I am running into is I cannot align my text for some reason. I have tried end and right but my text page 1 of x always stays on the left. Is there something I am missing. Is this because its in the footer of the page? -- fo:layout-master-set !-- layout for the first page -- fo:simple-page-master master-name=test page-height=11in page-width=8.5in margin-bottom=0.25in margin-top=0.25in fo:region-before extent=1.5cm/ fo:region-body margin-top=0.2in/ fo:region-start extent=1.0in/ fo:region-end extent=0.3in/ fo:region-after extent='1.0cm' region-name=footer/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=test initial-page-number=1 !-- usage of page layout -- !-- header -- fo:static-content flow-name=footer fo:block font-family=Helvetica font-size=7pt fo:inline text-align=end Page fo:page-number/ of fo:page-number-citation ref-id=last-page/ /fo:inline /fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:block xsl:apply-templates/ /fo:block fo:block id=last-page/ /fo:flow /fo:page-sequence - 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
Re: printing page numbers
Yes you can do that. You need to check usage for fo:block id=last-page/ , fo:page-sequence fo:page-number-citation ref-id=last-page/ Thanks Manoj Jaysheel Bhavsar To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: ite.com Subject: printing page numbers 02/15/2005 01:29 PM Please respond to fop-user Hi, I was wondering if I can have Page 1 of 10 printed at the bottom of the page instead of just printing Page 1. One thing is that I don't know how many pages I will have in the pdf, since my content is populated dynamically. Any ideas? If any one have a sample code that will be great. Thank you Jaysheel. - 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: Printing using FOP
You should be using a PrintRenderer ( extended from AWRenderer) ..something like the following org.apache.fop.apps.XSLTInputHandler input = new org.apache.fop.apps.XSLTInputHandler(xml,xsl ); PrinterJob pj = new PrinterJob(); PrintRenderer renderer = new PrintRenderer(pj); Driver driver = new Driver(); driver.setLogger (log); driver.setRenderer (renderer); driver.render(input.getParser(), input.getInputSource()); Let me know Manoj Hassan Mushtaq [EMAIL PROTECTED]To: [EMAIL PROTECTED] hg.com cc: Subject: Printing using FOP 02/14/2005 10:58 AM Please respond to fop-user Hi: I can not simply print using FOP. I first tried FopPrintServlet, it gave IllegalArgument Exception, and I checked API, and found out that setRenderer does not RENDRER_PRINT in as its parameter. Then I went through mailing list archives, and some body suggested to use PrinterJob, and then instantiate AWTRendrer with that. But the problem is that AWTRenderer is expecting Translator, not printer job. Anyway, I am using FOP 0.20.5, so kindly can someone tell me how to do direct print using FOP? Thanks Hassan Mushtaq - 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: Printing using FOP
Thats possible ! This setup has worked for me... Hassan Mushtaq [EMAIL PROTECTED]To: [EMAIL PROTECTED] hg.com cc: Subject: RE: Printing using FOP 02/14/2005 11:43 AM Please respond to fop-user Hi Manoj, Thanks for taking interest. PrintRenderer in FOP 0.20.5 (latest) is an abstract class. And I did see the solution you mentioned was suggested by someone else in mailing archives, and he/she was saying it worked for them. So I can not help but speculating that previous versions of FOP perhaps did not have PrintRenderer as abstract class? Thanks. Hassan Mushtaq -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 1:09 PM To: [EMAIL PROTECTED] Subject: Re: Printing using FOP You should be using a PrintRenderer ( extended from AWRenderer) ..something like the following org.apache.fop.apps.XSLTInputHandler input = new org.apache.fop.apps.XSLTInputHandler(xml,xsl ); PrinterJob pj = new PrinterJob(); PrintRenderer renderer = new PrintRenderer(pj); Driver driver = new Driver(); driver.setLogger (log); driver.setRenderer (renderer); driver.render(input.getParser(), input.getInputSource()); Let me know Manoj Hassan Mushtaq [EMAIL PROTECTED]To: [EMAIL PROTECTED] hg.com cc: Subject: Printing using FOP 02/14/2005 10:58 AM Please respond to fop-user Hi: I can not simply print using FOP. I first tried FopPrintServlet, it gave IllegalArgument Exception, and I checked API, and found out that setRenderer does not RENDRER_PRINT in as its parameter. Then I went through mailing list archives, and some body suggested to use PrinterJob, and then instantiate AWTRendrer with that. But the problem is that AWTRenderer is expecting Translator, not printer job. Anyway, I am using FOP 0.20.5, so kindly can someone tell me how to do direct print using FOP? Thanks Hassan Mushtaq - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Printing using FOP
FOP 0.20.5 Hassan Mushtaq [EMAIL PROTECTED]To: [EMAIL PROTECTED] hg.com cc: Subject: RE: Printing using FOP 02/14/2005 12:00 PM Please respond to fop-user Hi Manoj, what version of FOP you are using? Thanks. Hassan Mushtaq -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 1:58 PM To: [EMAIL PROTECTED] Subject: RE: Printing using FOP Thats possible ! This setup has worked for me... Hassan Mushtaq [EMAIL PROTECTED]To: [EMAIL PROTECTED] hg.com cc: Subject: RE: Printing using FOP 02/14/2005 11:43 AM Please respond to fop-user Hi Manoj, Thanks for taking interest. PrintRenderer in FOP 0.20.5 (latest) is an abstract class. And I did see the solution you mentioned was suggested by someone else in mailing archives, and he/she was saying it worked for them. So I can not help but speculating that previous versions of FOP perhaps did not have PrintRenderer as abstract class? Thanks. Hassan Mushtaq -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 1:09 PM To: [EMAIL PROTECTED] Subject: Re: Printing using FOP You should be using a PrintRenderer ( extended from AWRenderer) ..something like the following org.apache.fop.apps.XSLTInputHandler input = new org.apache.fop.apps.XSLTInputHandler(xml,xsl ); PrinterJob pj = new PrinterJob(); PrintRenderer renderer = new PrintRenderer(pj); Driver driver = new Driver(); driver.setLogger (log); driver.setRenderer (renderer); driver.render(input.getParser(), input.getInputSource()); Let me know Manoj Hassan Mushtaq [EMAIL PROTECTED]To: [EMAIL PROTECTED] hg.com cc: Subject: Printing using FOP 02/14/2005 10:58 AM Please respond to fop-user Hi: I can not simply print using FOP. I first tried FopPrintServlet, it gave IllegalArgument Exception, and I checked API, and found out that setRenderer does not RENDRER_PRINT in as its parameter. Then I went through mailing list archives, and some body suggested to use PrinterJob, and then instantiate AWTRendrer with that. But the problem is that AWTRenderer is expecting Translator, not printer job. Anyway, I am using FOP 0.20.5, so kindly can someone tell me how to do direct print using FOP? Thanks Hassan Mushtaq - 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] - 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: Printing using FOP
I am using this class as a subclass inside an applet class import org.apache.fop.render.awt.*; public class PrintApplet extends JApplet { class PrintRenderer extends AWTRenderer { } } Does this make sense? Thanks Manoj Hassan Mushtaq [EMAIL PROTECTED]To: [EMAIL PROTECTED] hg.com cc: Subject: RE: Printing using FOP 02/14/2005 01:53 PM Please respond to fop-user Hi Manoj, hmm, this is interesting, I am using same version, yet PrintRenderer is abstract. Can you tell me what classes you imported to make this code work. May be I am importing wrong classes. Thanks. Hassan Mushtaq -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 2:02 PM To: [EMAIL PROTECTED] Subject: RE: Printing using FOP FOP 0.20.5 Hassan Mushtaq [EMAIL PROTECTED]To: [EMAIL PROTECTED] hg.com cc: Subject: RE: Printing using FOP 02/14/2005 12:00 PM Please respond to fop-user Hi Manoj, what version of FOP you are using? Thanks. Hassan Mushtaq -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 1:58 PM To: [EMAIL PROTECTED] Subject: RE: Printing using FOP Thats possible ! This setup has worked for me... Hassan Mushtaq [EMAIL PROTECTED]To: [EMAIL PROTECTED] hg.com cc: Subject: RE: Printing using FOP 02/14/2005 11:43 AM Please respond to fop-user Hi Manoj, Thanks for taking interest. PrintRenderer in FOP 0.20.5 (latest) is an abstract class. And I did see the solution you mentioned was suggested by someone else in mailing archives, and he/she was saying it worked for them. So I can not help but speculating that previous versions of FOP perhaps did not have PrintRenderer as abstract class? Thanks. Hassan Mushtaq -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 1:09 PM To: [EMAIL PROTECTED] Subject: Re: Printing using FOP You should be using a PrintRenderer ( extended from AWRenderer) ..something like the following org.apache.fop.apps.XSLTInputHandler input = new org.apache.fop.apps.XSLTInputHandler(xml,xsl ); PrinterJob pj = new PrinterJob(); PrintRenderer renderer = new PrintRenderer(pj); Driver driver = new Driver(); driver.setLogger (log); driver.setRenderer (renderer); driver.render(input.getParser(), input.getInputSource()); Let me know Manoj Hassan Mushtaq [EMAIL PROTECTED]To: [EMAIL PROTECTED] hg.com cc: Subject: Printing using FOP 02/14/2005 10:58 AM Please respond to fop-user Hi: I can not simply print using FOP. I first tried FopPrintServlet, it gave IllegalArgument Exception, and I checked API, and found out that setRenderer does not RENDRER_PRINT in as its parameter. Then I went through mailing list archives, and some body suggested to use PrinterJob, and then instantiate AWTRendrer with that. But the problem
Why is FOP not finding userconfig.xml on server ?
I have code in the Applet as follows. URL userConfig = new URL(http, myserver, 7011, /mypath/+ userconfig.xml); org.apache.fop.apps.Options options = new org.apache.fop.apps.Options( userConfig.openStream()); myserver is running on a completely different machine. When this run in the applet, FOP throws the following exception org.apache.fop.apps.FOPException: can't find default configuration file at org.apache.fop.apps.Options.loadStandardConfiguration(Options.java:184) at org.apache.fop.apps.Options.init(Options.java:73) at org.apache.fop.apps.Options.init(Options.java:78) at PrintApplet.callMeSucker(PrintApplet.java:168) However when I run the server on my local machine and run the same code as follows it works fine. URL userConfig = new URL(http, localhost, 7011, /mypath/+ userconfig.xml); org.apache.fop.apps.Options options = new org.apache.fop.apps.Options( userConfig.openStream()); I checked the link using the http://myserver:7011/mypath/userconfig.xml and I could retrieve the file in IE. Whats happening? Thanks Manoj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is FOP not finding userconfig.xml on server ?
Thanks for the reply.Last evening I did find the cause for this issue. I checked the source code and did found that FOP is initially loading standard configuration ( which is config.xml). I also found that the /cong/ directory is missing from the applet jar. But on my PC (localhost) the same directory /conf/ is present in the base directory where the applet gets loaded. So whats happening is when I access my local machine server the class loader doesnt find the /conf/config.xml file in the jar so it goes and tries to get it from the directory where the applet jar is loaded from.On my machine the /conf/ is present and FOP runs without exception.Now when I try to load the applet from the other server ( myserver which is a diff PC) FOP tries to do the same. It doesn find /conf/ in the applet jar so it tries to get it from the directory from where applet jar is present. This /conf/ directory is not present on the other PC and so it gives out an exceptionThis is what I assume is happening as I am to still test it out..ThanksManoj-"J.Pietschmann" [EMAIL PROTECTED] wrote: -To: [EMAIL PROTECTED]From: "J.Pietschmann" [EMAIL PROTECTED]Date: 02/12/2005 11:40AMSubject: Re: Why is FOP not finding userconfig.xml on server ?[EMAIL PROTECTED] wrote: "myserver" is running on a completely different machine. When this run in the applet, FOP throws the following exception org.apache.fop.apps.FOPException: can't find default configuration file at org.apache.fop.apps.Options.loadStandardConfiguration(Options.java:184)FOP can't find the *default* config file, which is different fromthe user config file. The default config file should be in the FOPjar, as /conf/config.xml. Check the jar, and if the file is there,as a Java security guru why the applet can't get it.Several people reported in the past they successfully run FOP inan applet.J.Pietschmann-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: Whether Chinese Characters / Unicode supported by FOP ?
ManishaYou need to make use of userconfig.xml. Create font metrics file and register it with FOP. I have done this with Japanese characters and it works fine..ThanksManoj-Manisha Sathe [EMAIL PROTECTED] wrote: -To: [EMAIL PROTECTED]From: Manisha Sathe [EMAIL PROTECTED]Date: 02/10/2005 11:13PMSubject: Re: Whether Chinese Characters / Unicode supported by FOP ?hmm..it's giving me 'unknown font' for both. is there any way for it ? Whether it means that on my m/c need to have these fonts ?regardsManishaArun Sinha [EMAIL PROTECTED] wrote:Hi,Try setting font family to "MS Hei" or "MS Song".Cheers.ArunFrom: Manisha Sathe <[EMAIL PROTECTED]>Reply-To: [EMAIL PROTECTED]To: [EMAIL PROTECTED]Subject: Re: Whether Chinese Characters / Unicode supported by FOP ?Date: Thu, 10 Feb 2005 22:43:25 -0800 (PST)Hi all,i want to display some chinese characters. I am trying following unicodes. These get display in HTML properly. But in pdf i do not get these characters.ÇòÈü±àºÅI tried many different fonts but still the same. Which font shall i make use off ?regardsManishaManisha Sathe <[EMAIL PROTECTED]>wrote:Sorry, wrong postanswer was given in my last postregardsManishaManisha Sathe <[EMAIL PROTECTED]>wrote:What i am doing is - taking data from database - put inside XML and then create PDF from that.I also need to print chinese characters. I tried first with some unicode (HTML equivalent)ÇòÈü±àºÅBut i am not getting this in PDF, what's the solution for this ?regardsManisha-Do you Yahoo!?Yahoo! Search presents - Jib Jab's 'Second Term't;-Do you Yahoo!?Yahoo! Mail - You care about security. So do we.-Do you Yahoo!? Meet the all-new My Yahoo! ¨C Try it today!_The real power of teamwork. Experience it in real time. http://www.microsoft.com/india/office/experience/ Experience MS Office System.-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Improving FOP Performance? -
I would second Dominik's idead to invoke FOP programatically.Manoj-"Jesiolowski, Dominik" [EMAIL PROTECTED] wrote: -To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED]From: "Jesiolowski, Dominik" [EMAIL PROTECTED]Date: 02/11/2005 07:13AMSubject: RE: [***SPAM***] - Improving FOP Performance? - Bayesian Filter d etected spam Hello, We are using FOP to convert to generate PDF Invoices for our Customers. We need to generate roughly around 25,000 Invoices Per Month and the Number would increase each Month. We generate PDF Docs from XML Input Files. We had Trial runs to check for Performance and Memory usage. Currently, We are just invoking FOP command directly from a Shell Script which would call the FOP Command repeatedly but making sure that not more than 2 (or sometimes 3) FOP Processes are running at any instant.So you are starting, and stopping JVM, each timeyou run fop. Consider writing java app that invokesfop processing in a loop.RegardsDominik-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: Is it posible to insert a new line in a xml tag to change the view of a PDF file
Maestro You mentioned that the use of fo:block white-space-collapse=false preserves the line breaks in the text. This is presicely the behavior I actually want in my PDF processing. If this is non-conformant as you mentioned what should I do to maintain the linebreaks / newline feed present in the database ? Thanks Manoj The Web Maestro [EMAIL PROTECTED]To: [EMAIL PROTECTED] mail.comcc: Subject: Re: Is it posible to insert a new line in a xml tag to change the view of a 02/11/2005 12:24 PDF file PM Please respond to fop-user I think what Juan wants to use is white-space-collapse=false: http://xml.apache.org/fop/fo.html#fo-preformat Preformatting Content Sometimes it is desirable to retain linebreaks and hard spaces, and to get preformatted text to pass through without being changed. The XSL-FO specification provides some properties for this: white-space-collapse and linefeed-treatment. In FOP, use white-space-collapse=false on an enclosing block. Warning Due to a bug in current versions of FOP, setting white-space-collapse=false will also preserve line breaks in the text. Do not rely on this behavior, as it is non-conformant and will be changed. Cheers! Web Maestro Clay On Feb 11, 2005, at 10:52 AM, Yakov Shafranovich wrote: Use fo:block/ Juan Manuel Bellina wrote: For example if I have the following xml tag: rtcontactoProveedor:063310 O. ARIAS Y CIA S.A. Contacto: PILCOMAYO 848 (1824) -LANUS OESTE BUENOS AIRES - ARGENTINA Fax: 4209-2556/rtcontacto I want to show in my PDF file with a new line between O. ARIAS Y CIA S.A. and Contacto: but when I see the pdf file I see: Proveedor:063310 O. ARIAS Y CIA S.A. Contacto: PILCOMAYO 848 1824) -LANUS OESTE BUENOS AIRES - ARGENTINA Fax: 4209-2556 How can I insert a new line to make the view diferent as in the xml tag. Thank you, Juan M. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.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] Web Maestro Clay -- [EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/ My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet - 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: Userconfig.xml for FOP within an applet.
JeremiasSorry about the cross posting. I was not aware of it...Will not be repeated.I could get Japanese fonts in PDF within the applet without having to jar up any of the userconfig.xml,msgothic.xml and msgothic.ttf files. I used a URL to the userconfig.xml file on server from the applet ( signed ). This URL fed as inputstream to the FOP config class in applet. The font metrics and the ttf file all resides on the server.ThanksManoj ThanksManojJeremias Maerki [EMAIL PROTECTED]02/07/2005 01:33 AMPlease respond to fop-user To: [EMAIL PROTECTED] cc: Subject: Re: Userconfig.xml for FOP within an applet.Please don't cross-post to fop-dev. All FOP developers are supposed tolisten into the fop-user mailing list.Your approach should work because you can initialize the Optionsinstance not only from a java.io.File but also from ajava.io.InputStream. Just try it.On 07.02.2005 02:11:31 Manoj_Nair wrote: As you might know I have successfully got the Japanese fonts to be displayed on PDF by using the userconfig.xml file to load the MSGOTHIC.TTF fonts. In this case I was running a servlet which used FOP to convert the XML file on the webserver ( weblogic) to PDF and then open it using acrobat. I want to do the same thing within an applet. A few months back I could use FOP within an applet to convert XML residing on the server to PDF and then send the resulting PDF to the printqueue on the clients default printer. This works perfectly. Now my question is I want FOP within the applet to recognize Japanese character sets. My approach is to have the userconfig.xml, msgothic.ttf and msgothic.xml ( font metrics ) files in the same jar file as the Applet itself. Would this work? Can I just load the userconfig.xml file from the jar file using the classloader and then call FOP ? I will be trying this next week and just wanted to know your opinion.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]
Userconfig.xml for FOP within an applet.
As you might know I have successfully got the Japanese fonts to be displayed on PDF by using the userconfig.xml file to load the MSGOTHIC.TTF fonts. In this case I was running a servlet which used FOP to convert the XML file on the webserver ( weblogic) to PDF and then open it using acrobat.I want to do the same thing within an applet. A few months back I could use FOP within an applet to convert XML residing on the server to PDF and then send the resulting PDF to the printqueue on the clients default printer. This works perfectly. Now my question is I want FOP within the applet to recognize Japanese character sets. My approach is to have the userconfig.xml, msgothic.ttf and msgothic.xml ( font metrics ) files in the same jar file as the Applet itself. Wouldthis work? Can I just load theuserconfig.xml file from the jar file using the classloader and then call FOP ? I will be trying this next week and just wanted to know your opinion.ThanksManoj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fonts in FOP
Nuno I am also working on a similar issue which involves Japanese fonts but dont have it in a working condition. These are the points I have learned in process. 1) Open the ttfcomic.xml and see whats the name given in the font-name tag? This name should match the ComicSansMS as you have given in font-triplet tag in the userconfig.xml 2) I would advice for time being to hardcode the complete path to ttfcomic.xml as font metrics-file=c:\dir\ttfcomic.xml just like you did for the embed-file 3) No need to change build.xml 4) No need to recompile fop.jar 5) You need to load the fonts by invoking the configuration before your parse XML -- PDF. How are you doing the xml to pdf ? I am using the XSLTInputHandler(xml,xsl) in a servlet or are u running it from command prompt ? 6) I came to know today that I need to manually change the XSL file ( which i had created using XMLSPY) to refer to the font explicitly using the font-family tag. (courtsey of Lou ) fo:block font-family=ComicSansMS font-weight=bold padding-bottom=1mm #x7ecf;#x8425;#x5355;#x4f4d; /fo:block Let me know Manoj [EMAIL PROTECTED] wareag.com To: [EMAIL PROTECTED] cc: 2005/02/04 08:32 Subject: Fonts in FOP Please respond to fop-user Hello, I need to include a new font in FOP. I already generate a new xml file of the font comic.ttf (ttfcomic.xml), and in the userconfig.xml added the new font. font metrics-file=ttfcomic.xml kerning=yes embed-file=c:\windows\fonts\comic.ttf font-triplet name=ComicSansMS style=normal weight=normal/ /font To recompile the fop.jar, what is necessary to configure? Is it necessary anything else in the build.xml of FOP? And where should I put the new ttfcomic.xml file for the new font? Is it in /src/codegen? Next in the XSL-FO, how can I refer the new font? The font name should be ComicSansMS like refer above or the name of the font file? font-style=ComicSansMS Thanks in advance. Best regards. Nuno Canais - 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: Fonts in FOP
Nuno So who is invoking FOP ? Dont you write code to invoice it somewhere in the web application ? I am using XSLTInputhandler explicitly in my servlet to do the xml to pdf conversion and then render the pdf using acrobat. All this happens in the servlet within the weblogic application server paradigm. Right now I have hardcode the userconfig.xml file in the servlet as File userConfigFile = new File(C:\\fop-0.20.5\\conf\\userconfig.xml); I need to find a way to not hardcode it as its deployed as a jar file on production server. Thanks Manoj [EMAIL PROTECTED] wareag.com To: [EMAIL PROTECTED] cc: 2005/02/04 10:49 Subject: RE: Fonts in FOP Please respond to fop-user Hi Manoj, Thanks for your help. I really need to re-build fop.jar, because my web application uses it standalone and I don't have code access. I think I really should configure something in the build.xml of FOP. Something like: property name=ttfcomic.xml value=${build.codegen}/ttfcomic.xml/ I need to know, what and how do I need to configure? Nuno -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: sexta-feira, 4 de Fevereiro de 2005 17:48 To: [EMAIL PROTECTED] Subject: Re: Fonts in FOP Nuno I am also working on a similar issue which involves Japanese fonts but dont have it in a working condition. These are the points I have learned in process. 1) Open the ttfcomic.xml and see whats the name given in the font-name tag? This name should match the ComicSansMS as you have given in font-triplet tag in the userconfig.xml 2) I would advice for time being to hardcode the complete path to ttfcomic.xml as font metrics-file=c:\dir\ttfcomic.xml just like you did for the embed-file 3) No need to change build.xml 4) No need to recompile fop.jar 5) You need to load the fonts by invoking the configuration before your parse XML -- PDF. How are you doing the xml to pdf ? I am using the XSLTInputHandler(xml,xsl) in a servlet or are u running it from command prompt ? 6) I came to know today that I need to manually change the XSL file ( which i had created using XMLSPY) to refer to the font explicitly using the font-family tag. (courtsey of Lou ) fo:block font-family=ComicSansMS font-weight=bold padding-bottom=1mm #x7ecf;#x8425;#x5355;#x4f4d; /fo:block Let me know Manoj [EMAIL PROTECTED] wareag.com To: [EMAIL PROTECTED] cc: 2005/02/04 08:32 Subject: Fonts in FOP Please respond to fop-user Hello, I need to include a new font in FOP. I already generate a new xml file of the font comic.ttf (ttfcomic.xml), and in the userconfig.xml added the new font. font metrics-file=ttfcomic.xml kerning=yes embed-file=c:\windows\fonts\comic.ttf font-triplet name=ComicSansMS style=normal weight=normal/ /font To recompile the fop.jar, what is necessary to configure? Is it necessary anything else in the build.xml of FOP? And where should I put the new ttfcomic.xml file for the new font? Is it in /src/codegen? Next in the XSL-FO, how can I refer the new font? The font name should be ComicSansMS like refer above or the name of the font file? font-style=ComicSansMS Thanks in advance. Best regards. Nuno Canais - 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: XML --- PDF Japanese
I could finally make it work with MS ARIAL UNICODE. What I was missing was coding in XSL file to explicitly mention font-family=arialuni . Thanks to all you guys who replied Manoj [EMAIL PROTECTED] -net.com To: [EMAIL PROTECTED] cc: 2005/02/03 05:02 Subject: Re: XML --- PDF Japanese Please respond to fop-user Manoj: Try to load your fonts without the userconfig.xml file and see if it works (change were necessary): //config fonts Vector allFonts = new Vector(); Vector allTrips = new Vector(); //name weight style allTrips.add(new FontTriplet(MS Song,normal,normal)); allTrips.add(new FontTriplet(MS Song,bold,normal)); allTrips.add(new FontTriplet(MS Song,normal,italic)); allTrips.add(new FontTriplet(MS Song,bold,italic)); FontInfo fontInfo = new FontInfo(MS SONG,/fonts/mssong.xml,true,allTrips,/fonts/mssong.ttf); allFonts.add(fontInfo); Configuration.put(fonts, allFonts); Then at least you will know if your font files are working. -Lou ~~ LOG-NET, Inc. The Logistics Network Management System ~~ 230 Half Mile Road Third Floor Red Bank, NJ 07701 PH: 732-758-6800 FAX: 732-747-7497 http://www.LOG-NET.com ~~ CONFIDENTIAL PRIVILEGED Unless otherwise indicated or if obvious from the nature of the content, the information contained herein is privileged and confidential information/work product. The communication is intended for the use of the individual or entity named above. If the reader of this transmission is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone (732-758-6800) or by electronic mail ([EMAIL PROTECTED]), and destroy any copies, electronic, paper or otherwise, which you may have of this communication. Thank you. ~~ [EMAIL PROTECTED] ony.com To: [EMAIL PROTECTED] cc: 02/02/2005 18:28 Subject: Re: XML --- PDF Japanese Please respond to fop-user Jay Thanks for that tip. My machine has the MSGothic.ttc font file which I understand is used for Japanese characters. 1) From the MSGothic.ttc file, I created the MSGothic.xml file in the /conf/ directory. 2) I changed the userconfig.xml file to have the Japanese fonts defined as font metrics-file=msgothic.xml embed-file=D:\winnt\font\msgothic.ttc kerning=yes font-triplet name=Gothic style=normal weight=normal/ font-triplet name=Gothic style=normal weight=bold/ font-triplet name=Gothic style=italic weight=normal/ font-triplet name=Gothic style=italic weight=bold/ /font font metrics-file=msmincho.xml embed-file=Cyberbit.ttf kerning=yes font-triplet name=Mincho style=normal weight=normal/ font-triplet name=Mincho style=normal weight=bold/ font-triplet name=Mincho style=italic weight=normal/ font-triplet name=Mincho style=italic weight=bold/ /font 3) In my case FOP is called on the server side ( weblogic ) which has FOP.JAR in classpath. XSLTInputHandler input = new XSLTInputHandler(xmlFile, new File(xslParam)); try { ByteArrayOutputStream out = new ByteArrayOutputStream(); response.setContentType(CONTENT_TYPE); Driver driver = new Driver(); String OS = System.getProperty(os.name); driver.setLogger(log); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); driver.render(input.getParser(), input.getInputSource()); byte[] content = out.toByteArray();
XML --- PDF Japanese
I am creating XML files which in turn gets parsed through a FOP processor to create PDF files. It works fine when the data is in English however for Japanese data all I get is a bunch of square boxes in place of Kanji fonts. I have setup the Kanji fonts on my machine and also can view Japanese text in my regular application with no problem. The problem is when the data gets converted to XML and then to PDF...Somewhere the data is getting messed up... I checked the XML file and the japanese fonts are present without any distortions. Check (See attached file: INJCV00444.xml) Is the FOP parser messing things up? Any idea whats happening ? Thanks Manoj INJCV00444.xml Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML --- PDF Japanese
Jay Thanks for that tip. My machine has the MSGothic.ttc font file which I understand is used for Japanese characters. 1) From the MSGothic.ttc file, I created the MSGothic.xml file in the /conf/ directory. 2) I changed the userconfig.xml file to have the Japanese fonts defined as font metrics-file=msgothic.xml embed-file=D:\winnt\font\msgothic.ttc kerning=yes font-triplet name=Gothic style=normal weight=normal/ font-triplet name=Gothic style=normal weight=bold/ font-triplet name=Gothic style=italic weight=normal/ font-triplet name=Gothic style=italic weight=bold/ /font font metrics-file=msmincho.xml embed-file=Cyberbit.ttf kerning=yes font-triplet name=Mincho style=normal weight=normal/ font-triplet name=Mincho style=normal weight=bold/ font-triplet name=Mincho style=italic weight=normal/ font-triplet name=Mincho style=italic weight=bold/ /font 3) In my case FOP is called on the server side ( weblogic ) which has FOP.JAR in classpath. XSLTInputHandler input = new XSLTInputHandler(xmlFile, new File(xslParam)); try { ByteArrayOutputStream out = new ByteArrayOutputStream(); response.setContentType(CONTENT_TYPE); Driver driver = new Driver(); String OS = System.getProperty(os.name); driver.setLogger(log); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); driver.render(input.getParser(), input.getInputSource()); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); System.out.println(renderXML done); } catch (Exception ex) { ex.printStackTrace(); throw new ServletException(ex); } My question is how would FOP on weblogic know how to use the new userconfig.xml file. I tried to add / update the MSGothic.xml / userconfig.xml in FOP.JAR but I get read/write permissions errors on the jar file. Let me know... Thanks Manoj [EMAIL PROTECTED] To: [EMAIL PROTECTED] 2005/02/02 13:25 cc: Please respond toSubject: Re: XML --- PDF Japanese fop-user Just a thought: Did you set up the necessary font-metrics file? You can find an example (called cid-fonts.fo) in the examples\fo\advanced (Windows) or examples/fo/advanced (Linux or Unix) directory. Jay Bryant Bryant Communication Services (on contract at Syngergistic Solution Technologies) - 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: Printing PDF on the client default printer.
I forgot to mention that all our international offices are connected to our LA headoffice via Intranet...-Glen Mazza [EMAIL PROTECTED] wrote: -To: [EMAIL PROTECTED]From: Glen Mazza [EMAIL PROTECTED]Date: 11/30/2004 09:12AMSubject: Re: Printing PDF on the client default printer.Thatseemsodd--HTTPnormallywon't(can't?)workthatway.ItseemstantamounttosayingthatonecanmakeanHTTPrequestfromonebrowserandhavetheresponsesenttoanotherbrowser(onadifferentmachine).Wouldyoumindgettingintosomedetailsofhowyoumanagedthat?Thanks,Glen---[EMAIL PROTECTED]wrote:-JustwantedeveryonetoknowthatIhavesuccessfullyimplementedclientsideprintingusingFOPEg:IftheXMLfilegetscreatedonthewebserverwhichislocatedinLosAngelesandtheuserinLondon,thentheXMLisconvertedtoPDFandthePDFfileisprintedontheclientsdefaultprinterinLondon.ThanksManoj-Tounsubscribe,e-mail:[EMAIL PROTECTED]Foradditionalcommands,e-mail:[EMAIL PROTECTED]
Re: Printing PDF on the client default printer.
This is how I did it.. 1) I used a invisible signed applet within the jsp page which renders the screen. 2) The user selects the documents to be printed and passes this info to the applet. 3) The applet take this info and calls a servlet which creates the corresponding XMLs. 4) The XSLTHandler within the applet then renders the pdf to the default printer on the client side. The XSLT input handler takes in the XSD and the created XML as its parameter during instanciation.. Sorry to be short as i am busy here but can get in detail if reqd.. Thanks Manoj Charles Ohana [EMAIL PROTECTED]To: fop-dev@xml.apache.org rp.com cc: Subject: Re: Printing PDF on the client default printer. 11/30/2004 12:19 PM Please respond to fop-dev wow!!! sounds great... Where can we get that ??? Thanx. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: fop-dev@xml.apache.org Sent: Tuesday, November 30, 2004 9:02 AM Subject: Printing PDF on the client default printer. Just wanted everyone to know that I have successfully implemented client side printing using FOP Eg: If the XML file gets created on the webserver which is located in Los Angeles and the user in London, then the XML is converted to PDF and the PDF file is printed on the clients default printer in London. Thanks Manoj -Forwarded by Manoj Nair/LA/SPE on 11/30/2004 09:00AM - To: fop-dev@xml.apache.org From: [EMAIL PROTECTED] Date: 10/21/2004 10:13AM Subject: Printing PDF on the client default printer. ** I had posted this in the fop-user group and the responses indicated that there is no way this can be implemented currently. Just wanted an opinion from the fop-dev crowd. Thanks ** My requirement is to render an XML as a PDF and then print the PDF on the clients default printer. I dont want the PDF to prompt user to open the acrobat reader. I already have an applet on the client side which uses PrinterJob class to popup the printer selection box on client side. Now how do I redirect the content from server to this printer? Should I use Driver.RENDER_PRINT / Driver.RENDER_PCL set in the fop driver renderer ? and what content type should the response object return? Thanks Manoj PS: I have successfully use the FopPrinter example ( FopPrintServlet ) to print pdfs on the app servers default printer but what I need is to be able to print on the clients default printer and not on servers printer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Printing PDF on the client default printer.
Just wanted everyone to know that I have successfully implemented client side printing using FOPEg: If the XML file gets created on the webserver which is located in Los Angeles and the user in London, then the XML is converted to PDF and the PDF file is printed on the clients default printer in London.ThanksManoj-Forwarded by Manoj Nair/LA/SPE on 11/30/2004 09:00AM -To: fop-dev@xml.apache.orgFrom: [EMAIL PROTECTED]Date: 10/21/2004 10:13AMSubject: Printing PDF on the client default printer.**Ihadpostedthisinthefop-usergroupandtheresponsesindicatedthatthereisnowaythiscanbeimplementedcurrently.Justwantedanopinionfromthefop-devcrowd.Thanks**MyrequirementistorenderanXMLasaPDFandthenprintthePDFontheclientsdefaultprinter.IdontwantthePDFtopromptusertoopentheacrobatreader.IalreadyhaveanappletontheclientsidewhichusesPrinterJobclasstopopuptheprinterselectionboxonclientside.NowhowdoIredirectthecontentfromservertothisprinter?ShouldIuseDriver.RENDER_PRINT/Driver.RENDER_PCLsetinthefopdriverrenderer?andwhatcontenttypeshouldtheresponseobjectreturn?ThanksManojPS:IhavesuccessfullyusetheFopPrinterexample(FopPrintServlet)toprintpdfsontheappserversdefaultprinterbutwhatIneedistobeabletoprintontheclientsdefaultprinterandnotonserversprinter.
Re: How to change the size of a PDF page in XSL
I have to take PDF printouts in A4 and letter size. Being invoice docs I need to make sure the "Address" section is visible thru the addres box on letter/a4 envelopes. I tried to adjust the header and footer section of PDF to accomodate this reqt. Specifically I dont know how to tell XSL that the PDF needs to be on A4 or letter..Let me know if you find out..Manoj-Juan Manuel Bellina [EMAIL PROTECTED] wrote: -To: [EMAIL PROTECTED]From: Juan Manuel Bellina [EMAIL PROTECTED]Date: 11/05/2004 05:21AMSubject: How to change the size of a PDF page in XSLIhaveaXSLtemplatewithIdefiniedsomedayago.ItrendersPDFpagesinA4sizebutnowIwanttomakethepagesinlettersize.DoessomebodyknowshowcanImakethischangeinmyXSLtemplate?Thanks,JuanM. __DoyouYahoo!?CheckoutthenewYahoo!FrontPage.www.yahoo.com-Tounsubscribe,e-mail:[EMAIL PROTECTED]Foradditionalcommands,e-mail:[EMAIL PROTECTED]
RE: How to change the size of a PDF page in XSL
You need to change that line to fo:simple-page-master master-name=cover-page-master page-height=11.00in page-width=8.50in for LETTER size. Manoj Juan Manuel Bellina To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: oo.com Subject: RE: How to change the size of a PDF page in XSL 11/05/2004 10:33 AM Please respond to fop-user I do not have the page size but I have this line: fo:simple-page-master master-name=cover-page-master page-height=11.69in page-width=8.27in I supose it is this line which I should change. I will make some test y let you know. Thanks, Juan M. --- Partridge, Michael [EMAIL PROTECTED] wrote: I believe page size is defined in your page-master setup. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 05, 2004 9:37 AM To: [EMAIL PROTECTED] Subject: Re: How to change the size of a PDF page in XSL I have to take PDF printouts in A4 and letter size. Being invoice docs I need to make sure the Address section is visible thru the addres box on letter/a4 envelopes. I tried to adjust the header and footer section of PDF to accomodate this reqt. Specifically I dont know how to tell XSL that the PDF needs to be on A4 or letter..Let me know if you find out.. Manoj -Juan Manuel Bellina [EMAIL PROTECTED] wrote: - To: [EMAIL PROTECTED] From: Juan Manuel Bellina [EMAIL PROTECTED] Date: 11/05/2004 05:21AM Subject: How to change the size of a PDF page in XSL I have a XSL template with I definied some day ago. It renders PDF pages in A4 size but now I want to make the pages in letter size. Does somebody knows how can I make this change in my XSL template? Thanks, Juan M. __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.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]
XSLTInputHandler questions
Folks I am planning to use the following XSLTInputHandler constructor in an applet downloaded on the client side. Before I use it I have the following questions. public XSLTInputHandler(File xmlfile, File xsltfile) throws FOPException { } public XSLTInputHandler(String xmlURL, String xsltURL) throws FOPException { } public XSLTInputHandler(InputSource xmlSource, InputSource xsltSource) throws FOPException { } 1) Would a URL constructor passed as string like new XSLTInputHandler (new String(http://host:7011/web/myXML.xml;), new String(http://host:7011/web/myXSL.xsl;)) work ? 2) I read on some websites that org.apache.fop.apps.XSLTInputHandler(InputSource ,InputSource ) constructor doesnt work for InputSource and can only be used for String and File arguments? Have anyone made it work with InputSource arguments? 3) As the XSLTInputHandler is called on client side I want to read the XSL and XML files from app server. How should I go about reading the XSL,XML files from server? as inputstreams? Thanks Manoj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to make XSL-FO repeatable for many XML docs having same format?
Right now I have a working application where I create XML file and then pass it through XSLT /FOP parser to create a PDF out of it. So everytime the user clicks a button he gets a PDF. What I want now is to combine multiple XML files into one XML file and then run this big XML file through the FOP parser to create one big PDF. This PDF would have pages equivalent for each individual PDF. Note that all the individual XMLs are validated by the same XSD.. Sorry if I have not made myself clear...I can explain in more detail if reqd... Thanks Manoj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Faxing
www.efax.com Neil Guinto [EMAIL PROTECTED]To: [EMAIL PROTECTED] com cc: Subject: Faxing 09/22/2004 11:06 AM Please respond to fop-user I wan't to get some ideas from this list how you handle faxing of PDF documents? - 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]
Acrobat reader 6.0 question.
I am creating many PDFs using XML/FOP and the resulting files are opened in one instance of acrobat reader. To print each PDF, I have to goto FILE PRINT for each document as acrobat prints only the active window at a time. Is there a way I can print all open docs in acrobat in one go? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Naming the PDF file generated.
I am creating files using XML/FOP and then rendering it as PDF. This is done within a servlet XXXServlet.java. Whats happening is that the PDFs are generated with names like XXXServlet[1].PDF , XXXServlet[2].PDF etc.. I want to give my own name to these PDF files...How do I do that? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP opening only 1 PDF when more than one is rendered?
I have a for loop which calls the XSLTHandler and then renderer in loop till the input criteria is exhausted. What happens is the acrobat reader opens only the last pdf file rendered... My code looks like..whats happening is that only the last (10th ) invoice is opening up in acrobat. I am running it under WEBLOGIC 7.0 for ( i = 0 to 10 invoices ) { XSLTInputHandler input = new XSLTInputHandler(invoicexmlfile,new File(xslParam)); renderXML( input, response); } public void renderXML(XSLTInputHandler input, HttpServletResponse response) throws ServletException { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); response.setContentType(CONTENT_TYPE); Driver driver = new Driver(); String OS = System.getProperty(os.name); driver.setLogger(log); driver.setErrorDump(true); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); driver.render(input.getParser(), input.getInputSource()); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); } catch (Exception ex) { throw new ServletException(ex); } Thanks Manoj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP opening only 1 PDF when more than one is rendered?
I dont want them merged into 1 document. I want them separate but want the one instance of acrobat ( which opened the first invoice ) to take the other 9 documents created after the first one. Now what is happening is that the last document is opened in the acrobat reader where as the other 9 are lost.I have a feeling it has something to do with the response object. I think trying to use the same response/request object is causing the first 9 docs to be flushed out with the last one only remaining...on right track ?Thanks-Jebus [EMAIL PROTECTED] wrote: -To: [EMAIL PROTECTED]From: Jebus [EMAIL PROTECTED]Date: 09/15/2004 06:57PMSubject: Re: FOP opening only 1 PDF when more than one is rendered?whatyouaredoingiswriting10separatedocumentstotheoutputstream.Ifyouneedallthesedocumentstoshowupasone.youiTexttomergethemtogether.OnWed,15Sep200418:02:37-0700,[EMAIL PROTECTED][EMAIL PROTECTED]wrote:IhaveaforloopwhichcallstheXSLTHandlerandthenrendererinlooptilltheinputcriteriaisexhausted.Whathappensistheacrobatreaderopensonlythelastpdffilerendered...Mycodelookslike..whatshappeningisthatonlythelast(10th)invoiceisopeningupinacrobat.IamrunningitunderWEBLOGIC7.0for(i=0to10invoices){XSLTInputHandlerinput=newXSLTInputHandler(invoicexmlfile,newFile(xslParam));renderXML(input,response);}publicvoidrenderXML(XSLTInputHandlerinput,HttpServletResponseresponse)throwsServletException{try{ByteArrayOutputStreamout=newByteArrayOutputStream();response.setContentType(CONTENT_TYPE);Driverdriver=newDriver();StringOS=System.getProperty("os.name");driver.setLogger(log);driver.setErrorDump(true);driver.setRenderer(Driver.RENDER_PDF);driver.setOutputStream(out);driver.render(input.getParser(),input.getInputSource());byte[]content=out.toByteArray();response.setContentLength(content.length);response.getOutputStream().write(content);response.getOutputStream().flush();}catch(Exceptionex){thrownewServletException(ex);}ThanksManoj-Tounsubscribe,e-mail:[EMAIL PROTECTED]Foradditionalcommands,e-mail:[EMAIL PROTECTED]-Tounsubscribe,e-mail:[EMAIL PROTECTED]Foradditionalcommands,e-mail:[EMAIL PROTECTED]
Can i get users default printers IP address?
I have users accessing PDF docs from my webserver ( weblogic). I am using the XML - PDF conversion using FOP. Is there a way I can read the users default printers IP address when he makes a request? That way I can somehow spool the PDF or PCL file directly to his printer. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: image not included in my pdf under web-project
I had the same issue and found that my application was WARed up and the image file would not get included. For a diff reason we abandoned the idea of having a gif file in first place.. vivek gupta [EMAIL PROTECTED]To: [EMAIL PROTECTED] o.com cc: Subject: image not included in my pdf under web-project 08/18/2004 10:29 AM Please respond to fop-user Hi, I am unsing XML and XSLT for creating my fo file in my web project. But I am unable to include my image. Please let me know how I need to write mey path. Right now I have code like this from my xsl file fo:external-graphic src=url(../../../web/image/A.jpg) height=40pt width=60pt/ my xsl file is web-inf/classes/xsl/A.xsl and image directory is /Context/web/image Please help me Thanks in advance Vivek __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.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]
How to tell Driver to open acrobat in a new IE?
I am parsing my XML file through FOP parser and then telling the driver to render it as PDF. The process is initiated by clicking on a button on IE. What happens is the current IE instance opens the acrobat and displays the PDF it. The users have to hit back button to get back to the application. My question is how do i tell the Driver to open the PDF in a separate instance of acrobat (within a new IE instance) or just by acrobat independently. Thanks Manoj My sample code is below public void renderXML(XSLTInputHandler input, HttpServletResponse response) throws ServletException { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); response.setContentType(CONTENT_TYPE); Driver driver = new Driver(); String OS = System.getProperty(os.name); driver.setLogger(log); driver.setErrorDump(true); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); driver.render(input.getParser(), input.getInputSource()); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); } catch (Exception ex) { throw new ServletException(ex); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: For each in xsl
And yes, Altova StyleVision helps you do that...I used it to create the code block i sent earlier... Thanks Juan Manuel Bellina To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: oo.com Subject: For each in xsl 08/03/2004 10:12 AM Please respond to fop-user I need to use the for each to make some rows in the PDF but I do not know how to make it. I am making a PDF design using Altova StyleVision. Do you know if this tool allow me to introduce this feature? Can anybody send me a simple example? Thanks, Juan __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - 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: XMLParser error with unicode characters in XML file.
Thanks for the reply. However this problem has nothing to do with data transfer as I am creating XML file on the fly. So if is installed on Unix file gets created on Unix and same for windows... My guess turned out right. On Unix you need to specify the encoding as 'UTF-8' ( case sensitive ) while on windows 'utf8' ( and for that matter 'UTF-8') works fine.. FYI Manoj J.Pietschmann [EMAIL PROTECTED]To: [EMAIL PROTECTED] e cc: Subject: Re: XMLParser error with unicode characters in XML 07/08/2004 03:59 file. AM Please respond to fop-user [EMAIL PROTECTED] wrote: My boss just called me and informed me that on UNIX ( where we have our jars and where we run our application server) its getting an error saying encoding error utf8. It worked on windows 2000 pro which I am using. Does the utf8 string needs to be different on unix? The most likely problem is that the files got corrupted during transfer. You should definitely get some education about encoding issues rather than stumbling along blindly. Start here for the XML related problems http://skew.org/xml/tutorial/ There are some websites dealing with encoding issues in Java and with transferring files across machines as well. J.Pietschmann - 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: XMLParser error with unicode characters in XML file.
My boss just called me and informed me that on UNIX ( where we have our jars and where we run our application server) its getting an error saying "encoding error utf8". It worked on windows 2000 pro which I am using. Does the utf8 string needs to be different on unix?Paging Vinuta ThanksManoj-Forwarded by Manoj Nair/LA/SPE on 07/07/2004 06:08PM -To: [EMAIL PROTECTED]From: [EMAIL PROTECTED]Date: 07/07/2004 11:01AMSubject: RE: XMLParser error with unicode characters in XML file.ThanksVinuta!Thatworkedfine.IhavetestedwithSpanish,German,Italian,FrenchandPortuguese.IamstilltotestJapanese(whichmightbeapaininneck)...Willkeepyouposted...Thanksagaintoallwhoreplied..ManojVinutaNagaraddi[EMAIL PROTECTED]To:[EMAIL PROTECTED]muscle.comcc:Subject:RE:XMLParsererrorwithunicodecharactersinXML07/06/200402:31file.PMPleaserespondtofop-userIhadasimilarproblem.Iamwritingtoafileusingthefollowingcode:FileoutputDir=newFile(outputPath);outputDir.mkdir();StringfoFile=outputPath+"/image.fo";log.debug("Writingtofile"+foFile);FileOutputStreamfileoutstream=newFileOutputStream(foFile);Writerwriter=newOutputStreamWriter(fileoutstream,"utf8");writer.write(foDoc.toString().trim());writer.close();Theimportantpartofthecodeiswritingtothefileusingutf8encoding.VinutaNagaraddi-OriginalMessage-From:[EMAIL PROTECTED][mailto:[EMAIL PROTECTED]Sent:Tuesday,July06,20045:28PMTo:[EMAIL PROTECTED]Cc:fop-dev@xml.apache.orgSubject:XMLParsererrorwithunicodecharactersinXMLfile.IamgettingaXMLparsingerrorfromweblogic.apache.xerceswhenIparseaXMLdocumentwhichcontainsaccentedcharacters.ThisiswhatIamdoing1)Somedatabasecolumnshaveaccenteddataforspanish,japaneseetclanguageslikeNúmerodeidentificação:andnúmerodeidentificación.2)IamreadingthisdataandcreatingaXMLfileusingsomeprocessingandthenwritingthefileonthediscusingweblogic.xml.stream.XMLOutputStreamflush()method.3)ThenIamusingFOPtorenderthisXMLinPDF.Intherenderingprocesstheweblogic.apache.xerces.XMLparsergetscalledtoparsetheXML.Heretheparserthrowsaorg.xml.sax.SAXParserException(AninvalidXMLcharacter(Unicode:0xfa)wasfoundintheelementcontentofthedocument).IwasundertheimpressionthatXMLParsershouldtakecareoftheaccentedcharacters.WhenIopentheXMLfilewhichIcreatedinXMLSPYIsee"box"characterslike"clientendeidentificaci".Pleaseletmeknowhowshouldihandlemycodehere.ThanksManojThanks-Tounsubscribe,e-mail:[EMAIL PROTECTED]Foradditionalcommands,e-mail:[EMAIL PROTECTED]
RE: XMLParser error with unicode characters in XML file.
Thanks Vinuta ! That worked fine. I have tested with Spanish,German,Italian, French and Portuguese. I am still to test Japanese ( which might be a pain in neck )... Will keep you posted... Thanks again to all who replied.. Manoj Vinuta Nagaraddi [EMAIL PROTECTED]To: [EMAIL PROTECTED] muscle.com cc: Subject: RE: XMLParser error with unicode characters in XML 07/06/2004 02:31 file. PM Please respond to fop-user I had a similar problem. I am writing to a file using the following code: File outputDir = new File(outputPath); outputDir.mkdir(); String foFile = outputPath + /image.fo; log.debug(Writing to file + foFile); FileOutputStream fileoutstream = new FileOutputStream(foFile); Writer writer = new OutputStreamWriter(fileoutstream, utf8); writer.write(foDoc.toString().trim()); writer.close(); The important part of the code is writing to the file using utf8 encoding. Vinuta Nagaraddi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 5:28 PM To: [EMAIL PROTECTED] Cc: fop-dev@xml.apache.org Subject: XMLParser error with unicode characters in XML file. I am getting a XML parsing error from weblogic.apache.xerces when I parse a XML document which contains accented characters. This is what I am doing 1) Some database columns have accented data for spanish,japanese etc languages like Nmero de identificao: and nmero de identificacin. 2) I am reading this data and creating a XML file using some processing and then writing the file on the disc using weblogic.xml.stream.XMLOutputStream flush() method. 3) Then I am using FOP to render this XML in PDF. In the rendering process the weblogic.apache.xerces.XMLparser gets called to parse the XML. Here the parser throws a org.xml.sax.SAXParserException ( An invalid XML character (Unicode: 0xfa) was found in the element content of the document). I was under the impression that XMLParser should take care of the accented characters. When I open the XML file which I created in XML SPY I see box characters like cliente n de identificaci. Please let me know how should i handle my code here. Thanks Manoj Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]