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: PDF-PS-PDF with EPS
Hi, This is how I process my output from FOP using Ghostscript 7.06 (on Windows XP): gswin32c -dNOPAUSE -dBATCH -dPDFSETTINGS=/prepress -dConvertCMYKImagesToRGB=false -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sDEVICE=pdfwrite -sOutputFile=output.pdf input.pdf Sent a test PDF to the printer a couple of days ago and received the result yesterday and it looks great. Regards, Johan Andersson Wouter de Vaal wrote: Hi, I've read here a couple of time that a workaround to viewing PDFs with a non-viewable EPS is to let GhostScript create a PS from it and then again the PDF. However when I try this, it doesn't work, GhostScript even seems to just remove the EPS from it, (PDF == 10MB, PS == 3KB), do I need some extra options? Idea's? I'm using GhostScript 8.11 on windows 2000. Regards, Wouter de Vaal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PDF-PS-PDF with EPS
Thanx! We switched from 8.11 to 7.06 and it also works with us now! Maybe something to add on the site? Regards, Wouter de Vaal I've just tried using GhostScript 8.14 and it doesn't work here either. But it works with GNU GhostScript 7.06. On 06.07.2004 17:24:41 Wouter de Vaal wrote: I've read here a couple of time that a workaround to viewing PDFs with a non-viewable EPS is to let GhostScript create a PS from it and then again the PDF. However when I try this, it doesn't work, GhostScript even seems to just remove the EPS from it, (PDF == 10MB, PS == 3KB), do I need some extra options? Idea's? I'm using GhostScript 8.11 on windows 2000. 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]
Re: XMLParser error with unicode characters in XML file.
[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]
Re: PDFTextCompression 0.20.5
Jeremias Maerki wrote: That should work. Doesn't it? No it shouldn't. There is a flate filter hardcoded in case the filter list is empty. The only way to get around this is to comment out the code and recompile. I don't know how often I got angry about this. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: line-height interpretation
Adam Augusta wrote: I think I've figured out the formula FOP uses. I'm quite sure it's wrong; the height of the block should simply be line-height, if specified in length, or as a multiplier of the font-size, if specified dimensionless. It seems to be: Diff(Ascender,Descender)*font-size/1000 + (line-height - font-size) FOP adds a half-leading display space above and below the line, the half-leading is computed as (lineHeight - fontState.getFontSize()) / 2 There are numerous inconsistencies in the application though. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
EPS image printing problem
Hello.. I have a problem with printing EPS images that i have included in my fop generated pdf file. I know that it isn't supposed to show up in acrobat but I can't even print them. I have tried to view the PDF;s with GSView4.1 but the image wasn't shown there either. Thought there was som sort of error in the image so I created a sample image with Illustrator which wasn't shown either. The image is however embedded in the pdf file since the file size is rather big and a space for the image is reserved in the pdf. I also tried viewing the pdf on another computer with the same result. I have tried both fop 0.20.4 and 0.20.5 (binary distrubition) and 0.20.5 (source) my testcode is: /Peter Gustafsson ?xml version=1.0 encoding=ISO-8859-1? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master margin-right=0pt margin-left=0pt page-height=11in page-width=8.5in margin-bottom=0pt margin-top=0pt master-name=main fo:region-body margin-top=0pt margin-bottom=0pt/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=main fo:flow flow-name=xsl-region-body fo:blockbefore/fo:block fo:block fo:external-graphic width=4in src=url('test.eps') / /fo:block fo:blockafter/fo:block /fo:flow /fo:page-sequence /fo:root - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PDFTextCompression 0.20.5
- J, I am trying to work with a thrid party vendor and they need a decompressed (un-compressed) PDF file. Can you tell me where/how to make FOP generate a un-compressed PDF. What method/java file must be modified? Thanks -Ryan J.Pietschmann wrote: Jeremias Maerki wrote: That should work. Doesn't it? No it shouldn't. There is a flate filter hardcoded in case the filter list is empty. The only way to get around this is to comment out the code and recompile. I don't know how often I got angry about this. 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]
Integrating FOP in a Project
Hi evrybody ! excuse me for my english but i'm french so i will try to be clear but ... so i have a problem with using fop. I work on an application in Java 1.4 and when i use fop to create a file on the file system in a java program it works BUT i can't do the same thing with my server. I would generate an PDF in a servlet with this code : public static void doPDF(Document xml, Document xsl, Document xslfo, OutputStream outputstream) throws Exception { DOMSource transformXSLT = new DOMSource(xsl); DOMResult resultatXSLFO = new DOMResult(xslfo); DOMSource sourceXML = new DOMSource(xml); logger.warn(XML TO FO TRANSFORMATION BEGIN); gcpmrds.xsl.xslTransform.transformUri( sourceXML, transformXSLT, null, resultatXSLFO ); logger.warn(XML TO FO TRANSFORMATION END); logger.warn(FO TO PDF TRANSFORMATION BEGIN); File pdffile = new File(C:/Resultat.pdf); OutputStream out = new java.io.FileOutputStream(pdffile); out = new java.io.BufferedOutputStream(out); logger.warn(A); //Driver driver = new Driver((InputSource)xslfo,out); Driver driver = new Driver(); logger.warn(A); driver.setRenderer(Driver.RENDER_PDF); driver.setInputSource((InputSource)xslfo); driver.setOutputStream(out); driver.run(); out.close(); logger.warn(FO TO PDF TRANSFORMATION END); } And my problem is that i haven't any exception or error but the program never go out of the Driver driver = new Driver() and if i use Driver driver = new Driver((InputSource)xslfo,out) it's the same problem so i don't know what's the matter. Perhaps i've got forget a jar ? thanks for help ! ** The sender's email address has changed to firstname.lastname@ sgcib.com. You may want to update your personal address book. Please see http://www.sgcib.com for more information. ** This message and any attachments (the message) are confidential and intended solely for the addressee(s). Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. *** L'adresse mail de votre correspondant a change en prenom.nom@ sgcib.com. Il est recommande de mettre a jour votre carnet d'addresse personnel.Pour plus d'informations, aller sur http://www.sgcib.com ** Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, modifie ou falsifie. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PDF-PS-PDF with EPS
On Jul 8, 2004, at 12:08 AM, Wouter de Vaal wrote: Thanx! We switched from 8.11 to 7.06 and it also works with us now! Maybe something to add on the site? Regards, Wouter de Vaal Would you please file a BUG in bugzilla[1] so this issue can be tracked? It would help if you could test using other versions of Ghostscript, and include that information in your report. Thanks! Web Maestro Clay [1] http://xml.apache.org/fop/bugs.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Integrating FOP in a Project
i use fop 0.20.5 and i can't use driver.initialize() because it doesn't exist. but i don't think that's the problem because in my program the logger never print the second A so I suppose the application stop in the Driver driver = new Driver() line !!! thanks for your help ! [EMAIL PROTECTED] To: [EMAIL PROTECTED] 07/08/04 05:23 PMcc: Please respond toSubject: Re: Integrating FOP in a Project fop-user I think you're missing one line of code: --- [EMAIL PROTECTED] wrote: logger.warn(A); //Driver driver = new Driver((InputSource)xslfo,out); Driver driver = new Driver(); driver.initialize(); logger.warn(A); driver.setRenderer(Driver.RENDER_PDF); driver.setInputSource((InputSource)xslfo); driver.setOutputStream(out); driver.run(); Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** The sender's email address has changed to firstname.lastname@ sgcib.com. You may want to update your personal address book. Please see http://www.sgcib.com for more information. ** This message and any attachments (the message) are confidential and intended solely for the addressee(s). Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration.Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. *** L'adresse mail de votre correspondant a change en prenom.nom@ sgcib.com.Il est recommande de mettre a jour votre carnet d'adresses personnel.Pour plus d'informations, aller sur http://www.sgcib.com ** Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration.La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, modifie ou falsifie. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Integrating FOP in a Project
[EMAIL PROTECTED] wrote: File pdffile = new File(C:/Resultat.pdf); Does your server have a C: drive? :-) Furthermore, it's almost always a waste to use DOM trees for intermediate XML documents. Check out the code samples on the FOP website for more information. But neither of these appears to be your problem: And my problem is that i haven't any exception or error but the program never go out of the Driver driver = new Driver() This method doesn't do much except setting up the element mapping tables. In particular it doesn't do anything to the output stream. It tries to get a class loader for accessing the mapping property files though, which might be a problem. Whats your environment on the server? Are there any user written class loaders or such? Security policies? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Integrating FOP in a Project
[EMAIL PROTECTED] wrote: but i don't think that's the problem because in my program the logger never print the second A so I suppose the application stop in the Driver driver = new Driver() line !!! I'd rather think it throws an exception. Try to get a debugger which can be attached to a running JVM and check what the application is doing. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Integrating FOP in a Project
I work on a local Dev server that is an Apache Tomcat 4.0 so i use the default configuration (except few minor things) In the future i won't use the file system, i will send pdf direct in the outputstream of my servlet ! [EMAIL PROTECTED] To: [EMAIL PROTECTED] 07/08/04 05:56 PMcc: Please respond toSubject: Re: Integrating FOP in a Project fop-user [EMAIL PROTECTED] wrote: File pdffile = new File(C:/Resultat.pdf); Does your server have a C: drive? :-) Furthermore, it's almost always a waste to use DOM trees for intermediate XML documents. Check out the code samples on the FOP website for more information. But neither of these appears to be your problem: And my problem is that i haven't any exception or error but the program never go out of the Driver driver = new Driver() This method doesn't do much except setting up the element mapping tables. In particular it doesn't do anything to the output stream. It tries to get a class loader for accessing the mapping property files though, which might be a problem. Whats your environment on the server? Are there any user written class loaders or such? Security policies? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** The sender's email address has changed to firstname.lastname@ sgcib.com. You may want to update your personal address book. Please see http://www.sgcib.com for more information. ** This message and any attachments (the message) are confidential and intended solely for the addressee(s). Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. *** L'adresse mail de votre correspondant a change en prenom.nom@ sgcib.com. Il est recommande de mettre a jour votre carnet d'addresse personnel.Pour plus d'informations, aller sur http://www.sgcib.com ** Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, modifie ou falsifie. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Trying to Troubleshoot an Issue
Hello all, I'm trying to determine the source of a problem I'm having. I have several documents that include images. Ideally, I would like to control the size of these images by percentage--for example, I would like all images for a document to be 60% of their original size. I had thought I could set these parameters in my XML document, but they don't seem to take. When I use actual point sizes, the images are displayed as expected, but any values that I enter as percentages are ignored. I think the problem lies in one of three places: 1. My XML editor is not assigning the values correctly (I use XMLMind). 2. FOP does not support percentage values yet. 3. My inexperience with XML and such is once again rearing its ugly head. Has anyone else experienced this? If it is a FOP-related issue, could anyone recommend a reliable workaround? Thanks! Dave Shevitz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Integrating FOP in a Project
[EMAIL PROTECTED] wrote: java.lang.NoClassDefFoundError: org/apache/fop/apps/Driver ... but i don't understand because i compile my source code including fop.jar (that is in a lib directory in the Apache directory) so would i have declare something in the configuration of Apache/Tomcat ? I'm not really sure what you attempt to say in this paragraph. The FOP jars have to be put into the WEB-INF/lib directory of your web application and zipped up into the war file which is deployed to the servlet engine. Check the Tomcat docs for more details or ask on the tomcat user list. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]