Re: Displaying image on pdf
Iam running this through an application and I am using FOP 0.93, Jdk 1.4.2, UNIX OS. I ran the same application on Windows XP, I can see image on PDF but not on UNIX. -- View this message in context: http://www.nabble.com/Displaying-image-on-pdf-tf4518543.html#a12900530 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying image on pdf
Hi Alex, I do remember UNIX is case sensitive and even I set the image to binary mode and I compared the file size its showing same. Here iam attaching XML and XSL file which iam using to generate PDF. Could you please look into that and give me any suggestions please. Alexander Simon-2 wrote: Hi manojkmi, did you remember that UNIX filesystems are case sensitive? Maybe this is your problem. Also, maybe you uploaded the file with eg ftp and forgot to set binary mode? Compare the file sizes in byte with the original file, or better md5sum it. As Chris said, please post the output when running FOP from command line. It should tell you what the problem is. Alex Am Mittwoch, 26. September 2007 15:06:40 schrieb manojkmi: Iam running this through an application and I am using FOP 0.93, Jdk 1.4.2, UNIX OS. I ran the same application on Windows XP, I can see image on PDF but not on UNIX. cbowditch wrote: manojkmi wrote: snip/ Problem is that on UNIX, PDF is getting generated but image in not coming up. I have given the absolute path (src=/u01/bro_cds/images/phone.jpg) for the image even iam not getting that. Could some one shed some light onto this and let me know how to resolve this issue? How are you running FOP? From the command line or from an application? If running from the command line you should see some messages telling you that FOP couldn't find the image. Also, you failed to mention which version of FOP you are using. The JDK version and operating system details would also be useful. Thanks, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://www.nabble.com/file/p12900995/New%2BFolder.zip New+Folder.zip -- View this message in context: http://www.nabble.com/Displaying-image-on-pdf-tf4518543.html#a12900995 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying image on pdf
Hi All, I need to display the image on pdf document. I am using FOP for generating the pdf documents. fo:table-cell number-rows-spanned=2 background-repeat=repeat fo:block text-align=right fo:external-graphic content-height=0.3in vertical-align=center src=/images/phone.jpg/ /fo:block /fo:table-cell The above code works fine on Windows. This generates the images and the same are being shown on the PDF. Problem is that on UNIX, PDF is getting generated but image in not coming up. I have given the absolute path (src=/u01/bro_cds/images/phone.jpg) for the image even iam not getting that. Could some one shed some light onto this and let me know how to resolve this issue? -- View this message in context: http://www.nabble.com/Displaying-image-on-pdf-tf4518543.html#a12889205 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Perfomance Issue need Help on generating PDF from XSL FO
I changed the code as mentioned FopFactory fopFactory = FopFactory.newInstance(); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); OutputStream out = new BufferedOutputStream(new FileOutputStream(new File((\bro.pdf; try { Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out); TransformerFactory factory = new org.apache.xalan.processor.TransformerFactoryImpl(); Transformer transformer = factory.newTransformer(new StreamSource(new File(\Brodart.xsl))); transformer.setParameter(versionParam, 2.0); Source src = new DOMSource(doc); Result res = new SAXResult(fop.getDefaultHandler()); transformer.transform(src, res); Even then it is taking long time. Please HELP Manoj Jeremias Maerki-2 wrote: Manuel already gave you some tips in http://issues.apache.org/bugzilla/show_bug.cgi?id=42590 The example files you attached don't even take 2 seconds from the command-line and that's including VM startup and class-loading. So the problem is probably somewhere else (maybe the machine is swapping like mad or the app server has not enough memory available and is constantly in garbage collection). I also don't see anything wrong with your code except that you set a system property within an application server which is bad practice. Instead of: System.setProperty(javax.xml.transform.TransformerFactory,org.apache.xalan.processor.TransformerFactoryImpl); TransformerFactory factory = TransformerFactory.newInstance(); I'd write: TransformerFactory factory = new org.apache.xalan.processor.TransformerFactoryImpl(); ...if you want to control which XSLT implementation you want to use. Setting the system property affects the whole application server! On 06.06.2007 16:36:46 manojkmi wrote: Hi, I created a code snippet to convert XML+XSL FO to PDF using FOP. I am using OC4j as Application Server. Here is the code: FopFactory fopFactory = FopFactory.newInstance(); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); OutputStream out = new BufferedOutputStream(new FileOutputStream(new file(/brodart.pdf))); Try { System.setProperty(javax.xml.transform.TransformerFactory,org.apache.xalan.processor.TransformerFactoryImpl); Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(new File(/Brodart.xsl))); transformer.setParameter(versionParam, 2.0); Source src = new StreamSource(new File(/brodart.xml)); Result res = new SAXResult(fop.getDefaultHandler()); transformer.transform(src, res); } At the highlighted step seems to be taking a lot of time to execute (around 15 min). Can any one please help on this issue? Here I attached the XML and XSL file we are using. Thanks Manoj http://www.nabble.com/file/p10989960/XML_XSL.zip XML_XSL.zip -- View this message in context: http://www.nabble.com/Perfomance-Issue-need-Help-on-generating-PDF-from-XSL-FO-tf3878334.html#a10989960 Sent from the FOP - Users mailing list archive at Nabble.com. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Perfomance-Issue-need-Help-on-generating-PDF-from-XSL-FO-tf3878334.html#a11586692 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Perfomance Issue need Help on generating PDF from XSL FO
Hi, I created a code snippet to convert XML+XSL FO to PDF using FOP. I am using OC4j as Application Server. Here is the code: FopFactory fopFactory = FopFactory.newInstance(); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); OutputStream out = new BufferedOutputStream(new FileOutputStream(new file(/brodart.pdf))); Try { System.setProperty(javax.xml.transform.TransformerFactory,org.apache.xalan.processor.TransformerFactoryImpl); Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(new File(/Brodart.xsl))); transformer.setParameter(versionParam, 2.0); Source src = new StreamSource(new File(/brodart.xml)); Result res = new SAXResult(fop.getDefaultHandler()); transformer.transform(src, res); } At the highlighted step seems to be taking a lot of time to execute (around 15 min). Can any one please help on this issue? Here I attached the XML and XSL file we are using. Thanks Manoj http://www.nabble.com/file/p10989960/XML_XSL.zip XML_XSL.zip -- View this message in context: http://www.nabble.com/Perfomance-Issue-need-Help-on-generating-PDF-from-XSL-FO-tf3878334.html#a10989960 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]