Application Server FOP Problem: Mismatch: page-sequence vs. root
Hi! I am running FOP and convert an XML+XSL-FOP-PDF. Locally everything is working fine but on the app server i get the following error message: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format) Environment: App-Server: Bea Weblogic 8.1 SP5 Java: 1.4.2_08 (using the same JDK for AppServer and for the local tests) FOP: 0.95 (most recent version) OS: Windows XP SP3 Searching in the web didn't return anything helpful, although this problem has already occured once or twice. My guess is that there may be a library or classpath conflict but replacing some JDK libs (XML/Parser related) didn't make it better... I don't think that this is a problem with the XML or the stylsheet since locally it is working. Maybe anyone experienced the same problems or has some idea what could be the cause - any help appreciated! Thanks, ToM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Application Server FOP Problem: Mismatch: page-sequence vs. root
I debugged through the code but the error occurs inside the transformer (which is part of the JDK 1.4.2 standard). Here's an more complete stacktrace: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w 3.org/1999/XSL/Format) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107) These errors are usually follow-up errors after the real problem (at least in my experience). Please take a look if you can see any error message before that exception. It could also be some bad exception handling somewhere in FOP. I've had this thing a number of times in the past but I haven't had the chance to really look into avoiding unhelpful exceptions like that. Maybe that helps. On 15.08.2008 13:03:46 Tobias van Treeck wrote: Hi! I am running FOP and convert an XML+XSL-FOP-PDF. Locally everything is working fine but on the app server i get the following error message: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format) Environment: App-Server: Bea Weblogic 8.1 SP5 Java: 1.4.2_08 (using the same JDK for AppServer and for the local tests) FOP: 0.95 (most recent version) OS: Windows XP SP3 Searching in the web didn't return anything helpful, although this problem has already occured once or twice. My guess is that there may be a library or classpath conflict but replacing some JDK libs (XML/Parser related) didn't make it better... I don't think that this is a problem with the XML or the stylsheet since locally it is working. Maybe anyone experienced the same problems or has some idea what could be the cause - any help appreciated! Thanks, ToM 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: Application Server FOP Problem: Mismatch: page-sequence vs. root
Hi, i've found the problem after trying (uncomenting, deploying, testing) for nearly 2 days :-( fo:table table-layout=fixed width=100% border-collapse=separate fo:table-column column-width=50%/ fo:table-column column-width=50%/ is working locally but not on the application server. However with 'cm' instead of '%' it works: fo:table table-layout=fixed width=100% border-collapse=separate fo:table-column column-width=8cm/ fo:table-column column-width=8cm/ A better exception would have been helpful... Regards, ToM I'm afraid you've only caught the TransformerException thrown inside Xalan due to the SAXException. You've missed the nested SAXException. But it wouldn't help anyway. As I said, this exception is only a follow-up thing. There must be something else going wrong before that mismatch is encountered. On 15.08.2008 15:11:24 Tobias van Treeck wrote: I debugged through the code but the error occurs inside the transformer (which is part of the JDK 1.4.2 standard). Here's an more complete stacktrace: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w 3.org/1999/XSL/Format) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107) These errors are usually follow-up errors after the real problem (at least in my experience). Please take a look if you can see any error message before that exception. It could also be some bad exception handling somewhere in FOP. I've had this thing a number of times in the past but I haven't had the chance to really look into avoiding unhelpful exceptions like that. Maybe that helps. On 15.08.2008 13:03:46 Tobias van Treeck wrote: Hi! I am running FOP and convert an XML+XSL-FOP-PDF. Locally everything is working fine but on the app server i get the following error message: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format) Environment: App-Server: Bea Weblogic 8.1 SP5 Java: 1.4.2_08 (using the same JDK for AppServer and for the local tests) FOP: 0.95 (most recent version) OS: Windows XP SP3 Searching in the web didn't return anything helpful, although this problem has already occured once or twice. My guess is that there may be a library or classpath conflict but replacing some JDK libs (XML/Parser related) didn't make it better... I don't think that this is a problem with the XML or the stylsheet since locally it is working. Maybe anyone experienced the same problems or has some idea what could be the cause - any help appreciated! Thanks, ToM Jeremias Maerki 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: Problems with Apache FOP and Barcode4j
Hi Miguel, i had a similar problem recently. I also generated a PDF with a barcode and an image. I got the exact same error you got (root vs. page-sequence) and the reason was a wrong parameter in a table i used (for the column-with i used % instead of cm) Now i have serval suggestions for you: 1. Try to isolate your barcode 'code' - meaning create a document with just the barcode and run it. Does that work? 2. I used the same barcode 'code' like you but the following proved to be better for me: Namespace: xmlns:barcode=http://barcode4j.krysalis.org/ns; block ... fo:instream-foreign-object barcode:barcode xsl:attribute name=message xsl:text1234567890/xsl:text /xsl:attribute barcode:codabar barcode:height15mm/barcode:height barcode:module-width0.3mm/barcode:module-width barcode:wide-factor3.0/barcode:wide-factor barcode:quiet-zone enabled=true10mw/barcode:quiet-zone /barcode:codabar /barcode:barcode /fo:instream-foreign-object Try that barcodeversion in a separate stylsheet and run it. 3. Which version of xalan are you using? Put the newest one with the endorsed mechanism (http://java.sun.com/j2se/1.4.2/docs/guide/standards/ ) into your jdk. Regards, ToM Hi folks, I'm upgrading my FOP version from 0.20 up to 0.95 and I'm getting two problems. The first one, and most important, is that I can't generate barcodes with Apache FOP and Barcode4j projects. I don't know why but I'm getting this error: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format) I know that this error uses to be a follow-up error but I have no more detail and I'm lost since I have reached a strange situation. I have the following code on my xslt. - Definition: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:barcode=org.krysalis.barcode4j.xalan.BarcodeExt xmlns:svg=http://www.w3.org/2000/svg; extension-element-prefixes=barcode - Template: xsl:template match=[EMAIL PROTECTED]'CODIGO_BARRAS'] fo:block fo:instream-foreign-object xsl:variable name=barcode-cfg barcode code128 human-readablenone/human-readable height5mm/height quiet-zone enabled=false/ /code128 /barcode /xsl:variable xsl:copy-of select=barcode:generate($barcode-cfg, .)/ /fo:instream-foreign-object /fo:block /xsl:template - Call example: texto class=CODIGO_BARRAS text-align=left font-size=12pt module=0.45 height=10 D106696/texto - Java code: The following code throws the exception. public void convertXmlToPdf(final StreamSource xmlSource, final String xsl, final OutputStream pdf) throws Exception { FOUserAgent foUserAgent = instance.fopFactory.newFOUserAgent(); // todo, configure urls. foUserAgent.setBaseURL(file:///C:/TRIBUTOS/apps/gt_ear/build/gt_ear/gt_web/); foUserAgent.setFontBaseURL(file:///C:/TRIBUTOS/apps/gt_ear/build/gt_ear/gt_web/); foUserAgent.setAuthor(Miguel Tablado); //Setup XSLT Fop fop = instancia.fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, pdf); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xsl)); // Parámetro PATH de las imagenes transformer.setParameter(AG_XSLFO_PATH_IMAGES, AGFunciones.agregarProtocoloFile(AGConfig.get(VirtualDirTemplates)) + /images); //Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); //Start XSLT transformation and FOP processing transformer.transform(xmlSource, res); } The following one creates the .fo file with no problems. private void convertXML2FO(final StreamSource src, final String xslt) throws IOException, TransformerException , FOPException { //Setup output final File fo = new File(AGConfig.get(writeXmlFoPdfIntoFile)); final OutputStream out = new FileOutputStream(fo); try { //Setup XSLT TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xslt)); // Parámetro PATH de las imagenes transformer.setParameter(AG_XSLFO_PATH_IMAGES, AGFunciones.agregarProtocoloFile(AGConfig.get(VirtualDirTemplates)) + /images); //Resulting SAX events (the generated FO) must be piped through to FOP Result res = new StreamResult(out); //Start XSLT transformation and FOP processing transformer.transform(src, res); } finally { out.close(); } } The .fo generated snippet is something like this: fo:block fo:instream-foreign-object svg:svg height=1.3316mm viewBox=0 0 120.54 1.3316 width=120.54mm svg:g style=fill:black; stroke:none svg:rect height=1.3316 width=0.42 x=0 y=0/ svg:rect height=1.3316 width=0.21 x=0.63 y=0/ ... svg:rect height=1.3316 width=0.42 x=120.12 y=0/ /svg:g /svg:svg /fo:instream-foreign-object
Re: Problems with Apache FOP and Barcode4j
Hui Miquel, i also had this problem but then i realized that i forgot the following jar: barcode4j-fop-ext.jar You also need those: barcode4j.jar batik-all-1.7.jar avalon-framework-4.2.0.jar commons-io-1.3.1.jar commons-logging-1.0.4.jar fop.jar serializer-2.7.0.jar xalan-2.7.0.jar xercesImpl-2.7.1.jar xml-apis-1.3.04.jar xml-apis-ext-1.3.04.jar xmlgraphics-commons-1.3.1.jar Do you got all those? Regards, ToM Hi ToM Tobias van Treeck wrote: Hi Miguel, i had a similar problem recently. I also generated a PDF with a barcode and an image. I got the exact same error you got (root vs. page-sequence) and the reason was a wrong parameter in a table i used (for the column-with i used % instead of cm) Now i have serval suggestions for you: 1. Try to isolate your barcode 'code' - meaning create a document with just the barcode and run it. Does that work? 2. I used the same barcode 'code' like you but the following proved to be better for me: Namespace: xmlns:barcode=http://barcode4j.krysalis.org/ns; block ... fo:instream-foreign-object barcode:barcode xsl:attribute name=message xsl:text1234567890/xsl:text /xsl:attribute barcode:codabar barcode:height15mm/barcode:height barcode:module-width0.3mm/barcode:module-width barcode:wide-factor3.0/barcode:wide-factor barcode:quiet-zone enabled=true10mw/barcode:quiet-zone /barcode:codabar /barcode:barcode /fo:instream-foreign-object Try that barcodeversion in a separate stylsheet and run it. 3. Which version of xalan are you using? Put the newest one with the endorsed mechanism (http://java.sun.com/j2se/1.4.2/docs/guide/standards/ ) into your jdk. Regards, ToM Hi folks, I'm upgrading my FOP version from 0.20 up to 0.95 and I'm getting two problems. The first one, and most important, is that I can't generate barcodes with Apache FOP and Barcode4j projects. I don't know why but I'm getting this error: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format) I know that this error uses to be a follow-up error but I have no more detail and I'm lost since I have reached a strange situation. I have the following code on my xslt. - Definition: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:barcode=org.krysalis.barcode4j.xalan.BarcodeExt xmlns:svg=http://www.w3.org/2000/svg; extension-element-prefixes=barcode - Template: xsl:template match=[EMAIL PROTECTED]'CODIGO_BARRAS'] fo:block fo:instream-foreign-object xsl:variable name=barcode-cfg barcode code128 human-readablenone/human-readable height5mm/height quiet-zone enabled=false/ /code128 /barcode /xsl:variable xsl:copy-of select=barcode:generate($barcode-cfg, .)/ /fo:instream-foreign-object /fo:block /xsl:template - Call example: texto class=CODIGO_BARRAS text-align=left font-size=12pt module=0.45 height=10 D106696/texto - Java code: The following code throws the exception. public void convertXmlToPdf(final StreamSource xmlSource, final String xsl, final OutputStream pdf) throws Exception { FOUserAgent foUserAgent = instance.fopFactory.newFOUserAgent(); // todo, configure urls. foUserAgent.setBaseURL(file:///C:/TRIBUTOS/apps/gt_ear/build/gt_ear/gt_web/); foUserAgent.setFontBaseURL(file:///C:/TRIBUTOS/apps/gt_ear/build/gt_ear/gt_web/); foUserAgent.setAuthor(Miguel Tablado); //Setup XSLT Fop fop = instancia.fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, pdf); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xsl)); // Parámetro PATH de las imagenes transformer.setParameter(AG_XSLFO_PATH_IMAGES, AGFunciones.agregarProtocoloFile(AGConfig.get(VirtualDirTemplates)) + /images); //Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); //Start XSLT transformation and FOP processing transformer.transform(xmlSource, res); } The following one creates the .fo file with no problems. private void convertXML2FO(final StreamSource src, final String xslt) throws IOException, TransformerException , FOPException { //Setup output final File fo = new File(AGConfig.get(writeXmlFoPdfIntoFile)); final OutputStream out = new FileOutputStream(fo); try { //Setup XSLT TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xslt)); // Parámetro PATH de las imagenes transformer.setParameter(AG_XSLFO_PATH_IMAGES, AGFunciones.agregarProtocoloFile
Re: FOP 0.93 vs 0.94 vs 0.95
Hi, can you post your FO or your stylesheet? PercentLength.toString Seems to be a problem with that line. Do you use percent somewhere? Regards, ToM Hello I have an FO file and I want to use it to generate a PDF File. When I use FOP 0.93 by command line, everything works fine. A PDF file is generated correctly. This PDF file contains a table, text and 3 checkboxes. When I use FOP 0.93 using Java API, the PDF is generated, no error is generated but the checkboxes are not generated. They simply does not appear. With FOP 0.94 using Java API, the result is the same. With FOP 0.95, using Java API, the PDF is not generated. The following error is displayed: Exception in thread Thread-3 org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.StackOverflowError) at org.eclipse.swt.SWT.error(SWT.java:3374) at org.eclipse.swt.SWT.error(SWT.java:3297) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:178) at org.eclipse.swt.widgets.Display.syncExec(Display.java:3763) at composite.NouvelleLettreStructuree$6$1$1.run(NouvelleLettreStructuree.java:646) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.StackOverflowError at sun.misc.FloatingDecimal.dtoa(Unknown Source) at sun.misc.FloatingDecimal.init(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121) at java.lang.String.valueOf(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.apache.fop.fo.flow.table.TableColumn.toString(TableColumn.java:233) Any idea on how can I can generate the PDF correctly using FOP API? Thanks Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XMP - iText - Watermark Problem
Hi, i generate a pdf with fop and afterwards i add a watermark. Until i didn't set the following meta data this.foUserAgent.setCreator(Creator); this.foUserAgent.setAuthor(Author); this.foUserAgent.setTitle(Title); it worked but now i get the following message: The prefix x for element x:xmpmeta is not bound. After looking into the PDF i realized that the namespace is not set and that's why iText runs into problems: x:xmpmeta rdf:RDF rdf:Description rdf:about= pdf:PDFVersion1.4/pdf:PDFVersion pdf:ProducerApache FOP Version 0.95/pdf:Producer /rdf:Description rdf:Description rdf:about= xmp:CreatorToolCreator/xmp:CreatorTool xmp:CreateDate2008-10-29T10:38:07+01:00/xmp:CreateDate /rdf:Description rdf:Description rdf:about= dc:date rdf:Seq rdf:li2008-10-29T10:38:07+01:00/rdf:li /rdf:Seq /dc:date dc:creator rdf:Seq rdf:liAuthor/rdf:li /rdf:Seq /dc:creator dc:title rdf:Alt rdf:li xml:lang=x-defaultTitle/rdf:li /rdf:Alt /dc:title /rdf:Description /rdf:RDF /x:xmpmeta ?xpacket end=r? So can i add the namespace manually or is that just a bug of FOP? I know that i can set the xmp part manually with fo:declarations but i don't want to do that... Regards, ToM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XMP - iText - Watermark Problem
Yeah you are right - we are using java 1.4 here and using the endorsed mechanism it worked. Unfortunatly in production i can't do that, so is there another way? Can i set the processor directly in FOP? ...otherwise i gonna try fo:declarations Thanks ToM Looks like a bug in the JAXP/XSLT (javax.xml.transform) implementation you're using. The namespace declarations are not properly generated. Please use a recent Xalan-J or SAXON. See here for instructions: http://xml.apache.org/xalan-j/faq.html#faq-N100EF On 29.10.2008 13:26:22 Tobias van Treeck wrote: Hi, i generate a pdf with fop and afterwards i add a watermark. Until i didn't set the following meta data this.foUserAgent.setCreator(Creator); this.foUserAgent.setAuthor(Author); this.foUserAgent.setTitle(Title); it worked but now i get the following message: The prefix x for element x:xmpmeta is not bound. After looking into the PDF i realized that the namespace is not set and that's why iText runs into problems: x:xmpmeta rdf:RDF rdf:Description rdf:about= pdf:PDFVersion1.4/pdf:PDFVersion pdf:ProducerApache FOP Version 0.95/pdf:Producer /rdf:Description rdf:Description rdf:about= xmp:CreatorToolCreator/xmp:CreatorTool xmp:CreateDate2008-10-29T10:38:07+01:00/xmp:CreateDate /rdf:Description rdf:Description rdf:about= dc:date rdf:Seq rdf:li2008-10-29T10:38:07+01:00/rdf:li /rdf:Seq /dc:date dc:creator rdf:Seq rdf:liAuthor/rdf:li /rdf:Seq /dc:creator dc:title rdf:Alt rdf:li xml:lang=x-defaultTitle/rdf:li /rdf:Alt /dc:title /rdf:Description /rdf:RDF /x:xmpmeta ?xpacket end=r? So can i add the namespace manually or is that just a bug of FOP? I know that i can set the xmp part manually with fo:declarations but i don't want to do that... Regards, ToM 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: XMP - iText - Watermark Problem
Is there a way to disable xmp at all? Setting the xmp metadata with fo:declarations didn't work - in the final pdf the namespace is then missing again... So now i am out of options... ToM Unfortunatly in production i can't do that, so is there another way? Can i set the processor directly in FOP? ...otherwise i gonna try fo:declarations Thanks ToM Looks like a bug in the JAXP/XSLT (javax.xml.transform) implementation you're using. The namespace declarations are not properly generated. Please use a recent Xalan-J or SAXON. See here for instructions: http://xml.apache.org/xalan-j/faq.html#faq-N100EF On 29.10.2008 13:26:22 Tobias van Treeck wrote: Hi, i generate a pdf with fop and afterwards i add a watermark. Until i didn't set the following meta data this.foUserAgent.setCreator(Creator); this.foUserAgent.setAuthor(Author); this.foUserAgent.setTitle(Title); it worked but now i get the following message: The prefix x for element x:xmpmeta is not bound. After looking into the PDF i realized that the namespace is not set and that's why iText runs into problems: x:xmpmeta rdf:RDF rdf:Description rdf:about= pdf:PDFVersion1.4/pdf:PDFVersion pdf:ProducerApache FOP Version 0.95/pdf:Producer /rdf:Description rdf:Description rdf:about= xmp:CreatorToolCreator/xmp:CreatorTool xmp:CreateDate2008-10-29T10:38:07+01:00/xmp:CreateDate /rdf:Description rdf:Description rdf:about= dc:date rdf:Seq rdf:li2008-10-29T10:38:07+01:00/rdf:li /rdf:Seq /dc:date dc:creator rdf:Seq rdf:liAuthor/rdf:li /rdf:Seq /dc:creator dc:title rdf:Alt rdf:li xml:lang=x-defaultTitle/rdf:li /rdf:Alt /dc:title /rdf:Description /rdf:RDF /x:xmpmeta ?xpacket end=r? So can i add the namespace manually or is that just a bug of FOP? I know that i can set the xmp part manually with fo:declarations but i don't want to do that... Regards, ToM 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Add Watermark to PDF file
I don't know if that's possible with FOP. But you can use iText to easily add a watermark to an (existing) pdf. 1. GenerateFOP to generate a pdf 2. Use iText to add watermark http://itextdocs.lowagie.com/tutorial/general/copystamp/index.php Regards, ToM Hi How can i add watermark to a PDF file, i have to create a Purchase Order PDF, where i want the status of PDF like Approved, unapproved as watermark of this PDF file How can i do so using FOP Ash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP ApplicationServer Environment (Multithread)
Hi, we use FOP 0.95 in an application server environment. Recently we did some loadtests and everything is fine so far, except for one small issue: Tests: - 5 parallel users - bea application server We get an exception in the very first run in the initialization phase of FOP. When the first user starts to generate a pdf and the others try to generate also (shortly behind) - then we get the exception given below. After that the loadtest is fine. The problem seems to be that when the first user initializes FOP and during that time other threads try to access it - it fails. If we make the test with just one user or one user and 4 others which start later then everything is fine. Any ideas? Help appreciated, ToM org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format) [Fehler 88147] [de.something.OurExampleGeneratorImpl] javax.xml.transform.TransformerException: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492) at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108) at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430) at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183) Caused by: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:335) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169) at org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:309) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:716) ... 26 more We're just being cautious as we don't currently have the necessary infrastructure to continuously test multi-threading behaviour. Many people are using FOP in a multi-threading environment and FOP seems to behave well. Just go ahead and use it, but do some load tests. I know of no current issues with multi-threading in 0.94 or current FOP Trunk. On 19.02.2008 11:06:19 Laurent Berthelot wrote: Hello, I want to use Fop in a multi-thread environement (J2EE) and on the Apache site it signals that Apache FOP may currently not be completely thread safe. Have you yet experimented that ? And if yes, had you problems with ? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Acrobat Reader versions
For that we would need the PDF file for further analysis... Regards, ToM I generated a PDF using fop 0.95. I can open the resulting file with Acrobat Reader 5, but when I try to open the same file with Acrobat Reader 7 o 8 I get an Error: se ha producido un error de dibujo (translated: An error in drawing has been produced) Can anyone help me? thanx in advance -- View this message in context: http://www.nabble.com/Problem-with-Acrobat-Reader-versions-tp20814458p20814458.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fop.next release?
Hi, we also plan a new version of our product and would appreciate a new official version of FOP (0.96 then?) Until now we set on 0.95 but looking forward to the new features ... Regards, ToM 2009/9/21 spepp...@leverkruid.eu Quoting Peter Coppens pc.subscripti...@gmail.com: Fop fans, It seems the latest 'official¹ fop release ( http://xmlgraphics.apache.org/fop/0.95/changes_0.95.html) is a over a year old I was wondering whether there are any plans to release a newer version. We plan to release a new version of our product and need support for some features currently only in trunk. I guess we could try to backport or rely on a trunk build but that does not seem ideal. Anyone any thoughts on this? We should make a release. We will make a release if someone has enough time to act as the release manager. I would very much like this to be the case, but it is difficult. Regards, Simon
Re: AW: Zero width space is displayed as junk charac ter [â€] in PDF
Hi, several possibilities: 1.) try using: font-family=serif,Symbol or font-family=Helvetica 2.) Why do you still use that old FOP Version? Try upgrading... 3.) I tried the zero space character and for me it is working however i use FOP 0.95 and the default font which is Helvetica (ArialMT?) 4.) Try to load the font you are using: http://xmlgraphics.apache.org/fop/0.95/fonts.html Regards, ToM 2009/11/9 sudhir543-...@yahoo.com Hi, xsl:text#x20;/xsl:text works for me too but not xsl:text#x200B;/xsl:text I am using sans-serif fonts xsl:attribute name=font-familysans-serif/xsl:attribute Any idea... *Thanks SN Personally I'm always ready to learn, although I do not always like being taught * -- *From:* Tobias van Treeck tvtre...@nepatec.de *To:* fop-users@xmlgraphics.apache.org *Sent:* Fri, 6 November, 2009 7:01:50 PM *Subject:* Re: AW: Zero width space is displayed as junk character [â€] in PDF Hi, And why would I need UTF-8 to store #x200B; you would need UTF-8 because the sign you are using is unicode did you set the following line in your xsl file? ?xml version=1.0 encoding=UTF-8? I also use for instance: xsl:text#x20;/xsl:text and it is working fine... Regards, ToM 2009/11/6 sudhir543-...@yahoo.com Files is saved with UTF-8 .. that doesnt solve problem.. a And why would I need UTF-8 to store #x200B; other encoding would also handle it correctly.. I have no special characters in my xsl that may need UTF-8. Any way.. it does not work with UTF-8 too Thanks SN * Personally I'm always ready to learn, although I do not always like being taught * -- *From:* Georg Datterl georg.datt...@geneon.de *To:* fop-users@xmlgraphics.apache.org *Sent:* Fri, 6 November, 2009 4:04:35 PM *Subject:* AW: Zero width space is displayed as junk character [â€] in PDF Hi SN, That's most likely an encoding problem. I have seen a similar effect with the latest trunk, if I open the fo file in XMLSpy. Have a look at your application and make sure it saves the fo file with the same encoding you use for reading. Preferably UTF-8, I guess. Regards, Georg Datterl -- Kontakt -- Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH:www.irs-nbg.de Willmy PrintMedia GmbH:www.willmy.de Willmy Consult Content GmbH:www.willmycc.de -Ursprüngliche Nachricht- Von: sudhir543-...@yahoo.com [mailto:sudhir543-...@yahoo.com] Gesendet: Freitag, 6. November 2009 11:29 An: fop-users@xmlgraphics.apache.org Betreff: Zero width space is displayed as junk character [â€] in PDF I am using fop 0.20.4.. I need to wrap content inside a block so I am adding zero width spaces (#x200B; ) to the long string.. how ever Instead of breaking at zero width space.. it displays #x200B; as a special character (â€) in PDF.. Here's my xsl code that adds zero width spaces as required xsl:template name=hyphenate xsl:param name=data / xsl:param name=limit select='10'/ xsl:choose xsl:when test=string-length($data) lt; $limit xsl:value-of select=$data/ /xsl:when xsl:otherwise xsl:variable name=part select=substring($data, 1, $limit)/ xsl:variable name=remaining select=substring($data, $limit+1)/ xsl:value-of select='concat($part, #x200B;)'/ xsl:call-template name=hyphenate xsl:with-param name=data select=$remaining/ xsl:with-param name=limit select=$limit/ /xsl:call-template /xsl:otherwise /xsl:choose /xsl:template Any ideas why is it happening ? Thanks SN Personally I'm always ready to learn, although I do not always like being taught The INTERNET now has a personality. YOURS! See your Yahoo! Homepage http://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/ . -- Try the new Yahoo! India Homepage. Click herehttp://in.rd.yahoo.com/tagline_metro_1/*http://in.yahoo.com/trynew . -- Add whatever you love to the Yahoo! India homepage. Try now!http://in.rd.yahoo.com/tagline_metro_3/*http://in.yahoo.com/trynew
Re: Help me please! How to FOP + barcode4j + Code128 set C?
And in addition to that, you can see the following at the development trunk: codesets{string:ABC}/codesets - You need the C codeset so set it to 'C' - this means that you have to use the current trunk and put that lib into FOP. After that you should be able to use the codeset... Regards, ToM 2010/1/13 Pascal Sancho pascal.san...@takoma.fr Hi, You should find relevant information here: [1] Note that there are more appropriate lists for barcode4j related topics: see [2] [1] http://barcode4j.sourceforge.net/trunk/symbol-code128.html [2] http://sourceforge.net/mail/?group_id=96670 Pascal Magdikova a écrit : I read about Added support for restricting Code128 codesets to A, B, C or a combination. in this page: http://barcode4j.sourceforge.net/changes.html I have to generate Code128 codeset C with FOP. How can I use it? Help me please! I can generate code128 but I have to generate Code128 codeset C. My xsl settings are: (it works but it is not in C format the output is: 123456 instead of 12 34 56) fo:instream-foreign-object xsl:variable name=barcode-cfg barcode code128 human-readable placementbottom/placement font-nameArial Narrow/font-name font-size8pt/font-size display-start-stopfalse/display-start-stop display-checksumfalse/display-checksum /human-readable height13mm/height module-width0.3mm/module-width quiet-zone enabled=true10mm/quiet-zone /code128 /barcode /xsl:variable xsl:copy-of select=barcode:generate($barcode-cfg, /letter/case/barcode/msg)/ /fo:instream-foreign-object - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Help me please! How to FOP + barcode4j + Code128 set C?
please don't mind my asking, but to which exact value did you set the xml? Just to that? codesetsC/codesets The codeset is definied as: Code 128 codesets can be restricted to A, B, C or a combination of the three. Example: AB enables A and B. C just enables C and therefore only allows an even number of digits. Regards, ToM 2010/1/14 Magdikova kov.ma...@gmail.com: Thank you, I built the jar successfully. I can change now the code 128 codesets{string:ABC}/codesets and I get different result, but the result is still 123456 instead of 12 34 56. What is the problem? Not codesets setting depends on? Pascal Sancho wrote: Hi; After the source code is dowloaded, you have to build the jar yourself. How to build is described here: [1]. How to use it with FOP is dedcribed here: [2] [1] http://barcode4j.sourceforge.net/trunk/building.html [2] http://barcode4j.sourceforge.net/trunk/fop-ext.html I've never used barcode4J, so I cannot give you further tips. HTH, Pascal Magdikova a écrit : Thank you for the answer! It helps me a lot but I downloaded the latest development version but I do not known which files must be replaced. Help me please! Thanks in advance Pascal Sancho wrote: Hi, You should find relevant information here: [1] Note that there are more appropriate lists for barcode4j related topics: see [2] [1] http://barcode4j.sourceforge.net/trunk/symbol-code128.html [2] http://sourceforge.net/mail/?group_id=96670 Pascal Magdikova a écrit : I read about Added support for restricting Code128 codesets to A, B, C or a combination. in this page: http://barcode4j.sourceforge.net/changes.html I have to generate Code128 codeset C with FOP. How can I use it? Help me please! I can generate code128 but I have to generate Code128 codeset C. My xsl settings are: (it works but it is not in C format the output is: 123456 instead of 12 34 56) ... - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Help-me-please%21-How-to-FOP-%2B--barcode4j-%2B-Code128-set-C--tp27144885p27160729.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Help me please! How to FOP + barcode4j + Code128 set C?
Did you get any error/warning message in the console/log? Maybe you should ask in the barcode4j mailinglist or Thomas Jost directly since he added this functionality: http://barcode4j.sourceforge.net/changes.html#Contributors+to+this+release Added support for restricting Code128 codesets to A, B, C or a combination. Committed by jmaerki. Thanks to Thomas Jost. See Issue 2113589. Regards, ToM 2010/1/14 Magdikova kov.ma...@gmail.com: of course a set codesetsC/codesets fo:instream-foreign-object xsl:variable name=barcode-cfg barcode code128 human-readable placementbottom/placement font-nameHelvetica/font-name font-size8pt/font-size display-start-stopfalse/display-start-stop display-checksumfalse/display-checksum /human-readable codesetsC/codesets height13mm/height module-width0.3mm/module-width quiet-zone enabled=true10mm/quiet-zone /code128 /barcode /xsl:variable xsl:copy-of select=barcode:generate($barcode-cfg, /letter/case/barcode/msg)/ /fo:instream-foreign-object Tobias van Treeck wrote: please don't mind my asking, but to which exact value did you set the xml? Just to that? codesetsC/codesets The codeset is definied as: Code 128 codesets can be restricted to A, B, C or a combination of the three. Example: AB enables A and B. C just enables C and therefore only allows an even number of digits. Regards, ToM 2010/1/14 Magdikova kov.ma...@gmail.com: Thank you, I built the jar successfully. I can change now the code 128 codesets{string:ABC}/codesets and I get different result, but the result is still 123456 instead of 12 34 56. What is the problem? Not codesets setting depends on? Pascal Sancho wrote: Hi; After the source code is dowloaded, you have to build the jar yourself. How to build is described here: [1]. How to use it with FOP is dedcribed here: [2] [1] http://barcode4j.sourceforge.net/trunk/building.html [2] http://barcode4j.sourceforge.net/trunk/fop-ext.html I've never used barcode4J, so I cannot give you further tips. HTH, Pascal Magdikova a écrit : Thank you for the answer! It helps me a lot but I downloaded the latest development version but I do not known which files must be replaced. Help me please! Thanks in advance Pascal Sancho wrote: Hi, You should find relevant information here: [1] Note that there are more appropriate lists for barcode4j related topics: see [2] [1] http://barcode4j.sourceforge.net/trunk/symbol-code128.html [2] http://sourceforge.net/mail/?group_id=96670 Pascal Magdikova a écrit : I read about Added support for restricting Code128 codesets to A, B, C or a combination. in this page: http://barcode4j.sourceforge.net/changes.html I have to generate Code128 codeset C with FOP. How can I use it? Help me please! I can generate code128 but I have to generate Code128 codeset C. My xsl settings are: (it works but it is not in C format the output is: 123456 instead of 12 34 56) ... - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Help-me-please%21-How-to-FOP-%2B--barcode4j-%2B-Code128-set-C--tp27144885p27160729.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Help-me-please%21-How-to-FOP-%2B--barcode4j-%2B-Code128-set-C--tp27144885p27161175.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users