Re: TrueType Font works with regular and italic style but not with bold style
I Chris, I'm using 4 files True Type fonts to the regular, bold, italic and italicBold. My font's name is Parisine Office which is a commercial font. Fop is using with the latest version 0.95. I don't see a particular messages, but i can see again. Philippe Le 08/03/2010 18:15, Chris Bowditch a écrit : philippe voncken wrote: Hi, I put a breakpoint in my UriResolver to see what is calling by fop. I see my images, and the regular, italic font and not the bold and boldItalic font. Yet, with Times font, bold work normally.. :/ Some questions: Which Font is not working? Can you attach it here? If its a commercial font then I guess not because of license restrictions. What version of FOP are you using? Do you see any errors reported to stdout? Thanks, Chris - 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
TrueType Font works with regular and italic style but not with bold style
TrueType Font works with regular and italic style but not with bold style. I'm using autodetect font and my font is in ~/.fonts directory Any Ideas ? regards, philippe
Re: TrueType Font works with regular and italic style but not with bold style
I put a breakpoint in my UriResolver to see what is calling by fop. I see my images, and the regular, italic font and not the bold and boldItalic font. Yet, with Times font, bold work normally.. :/ Any ideas ? 2010/3/8 philippe voncken m...@philippevoncken.com TrueType Font works with regular and italic style but not with bold style. I'm using autodetect font and my font is in ~/.fonts directory Any Ideas ? regards, philippe
Re: Insertying javascript in resulting PDF
This exemple doesn't work in my Document Viewer (evince on Ubuntu) I think this is not an elegant solution. 2010/3/1 Igor Rosenberg igor.rosenb...@atosresearch.eu Hello, Inserting javascript to create non-static docs is possible: http://1t3xt.info/examples/results/in_action/chapter15/calculator.pdf On the FOP web-site, I found this terse information… http://xmlgraphics.apache.org/fop/dev/design/extending.html PDF Additions - This can be done with an XML Document extension. A simple xml document is defined that provides the appropriate information. When the document is rendered a handler converts the document into PDF markup. For example: my:script-link script=app.execMenuItem('AcroSrch:Query'); Search /my:script-link to result in a text box referencing the following PDF action: /S /JavaScript /JS (app.execMenuItem(AcroSrch:Query);) I don’t see how to include this in an FO-XML document… Does anyone have a working example? Or can I hack directly the PDF? Could I directly insert the javascript code directly in thee PDF Stream? /S /JavaScript /JS (app.execMenuItem(AcroSrch:Query);) Cheers Igor From: philippe voncken [mailto:m...@philippevoncken.com] Sent: lunes, 01 de marzo de 2010 9:18 To: fop-users@xmlgraphics.apache.org Subject: Re: Insertying javascript in resulting PDF Pdf document is not a dynamic document. I think it's impossible. 2010/3/1 Igor Rosenberg igor.rosenb...@atosresearch.eu Hello, I need to insert javascript code to the generated PDF. I have a very simple need: I want the date that appears in the PDF to be today's date, and note the date of creation of the document. How do I specify this in FO-XML? Regards Igor -- This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. Este mensaje y los ficheros adjuntos pueden contener informacion confidencial destinada solamente a la(s) persona(s) mencionadas anteriormente pueden estar protegidos por secreto profesional. Si usted recibe este correo electronico por error, gracias por informar inmediatamente al remitente y destruir el mensaje. Al no estar asegurada la integridad de este mensaje sobre la red, Atos Origin no se hace responsable por su contenido. Su contenido no constituye ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas partes. Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor no puede garantizar nada al respecto y no sera responsable de cualesquiera danos que puedan resultar de una transmision de virus. -- -- This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. Este mensaje y los ficheros adjuntos pueden contener informacion confidencial destinada solamente a la(s) persona(s) mencionadas anteriormente pueden estar protegidos por secreto profesional. Si usted recibe este correo electronico por error, gracias por informar inmediatamente al remitente y destruir el mensaje. Al no estar asegurada la integridad de este mensaje sobre la red, Atos Origin no se hace responsable por su contenido. Su contenido no constituye ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas partes. Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor no puede garantizar nada al respecto y no sera responsable de cualesquiera danos que puedan resultar de una transmision de virus. --
Re: AW: AW: PDF reprot with improper align data
May be a Xalan version error. 2010/2/24 jaiprakash.pa...@polaris.co.in HI, I have generated the foo.fo file [xsl+xml-fo],When try to generate the PDF file with the command Fop foo.fo jp.pdf /Fop -fo foo.fo -pdf jp.pdf getting below error. Please help to resove the same. C:\Documents and Settings\jaiprakash.pande\Desktop\fop-0.95Fop foo.fo jp.pdf [Fatal Error] foo.fo:1:1: Content is not allowed in prolog. Feb 24, 2010 8:00:46 PM org.apache.fop.cli.Main startFOP SEVERE: Exception javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) - javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf ormerIdentityImpl.java:469) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour ce) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf ormerIdentityImpl.java:452) Also ,Please find the foo.fo file fopr the same. Georg Datterl gdatt...@geneon. deTo fop-users@xmlgraphics.apache.org 02/24/2010 05:41 fop-users@xmlgraphics.apache.org PM cc Subject Please respond to AW: AW: PDF reprot with improper fop-us...@xmlgrap align data hics.apache.org Hi jaiprakash, It's not necessary for you to generate a pdf, but it's necessary for you to get better answers here, since this list deals mainly with fo-pdf, not xsl+xml-fo. 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: jaiprakash.pa...@polaris.co.in [mailto:jaiprakash.pa...@polaris.co.in ] Gesendet: Mittwoch, 24. Februar 2010 11:32 An: fop-users@xmlgraphics.apache.org Betreff: Re: AW: PDF reprot with improper align data Hi, For the old FOP 0.20 version ,we are able to genrate pdf report this XML + XSL couple only without ant XSl:FO file and is coming correctlly. Is it necessary to feed XSL-FO file for FOP 0.95 ? philippe voncken m...@philippevon cken.com To fop-users@xmlgraphics.apache.org 02/23/2010 09:23 cc PM Subject Re: AW: PDF reprot with improper Please respond to align data fop-us...@xmlgrap hics.apache.org Hi guys, to transform easly your xml source, you can also uses xsltop or Xml Copy Editor, it's are under GNU GPL license. regards, Philippe 2010/2/23 Pascal Sancho pascal.san...@takoma.fr Hi Jaiprakash, As Georg said, the most useful on this list is to provide XSL-FO file, rather than XML + XSL couple. You can easily do it by invoking FOP with the -foout option: Fop -xml foo.xml -xsl foo.xsl -foout foo.fo From that point, you can use the same source XSL-FO file to feed either FOP 0.20.0, or FOP 0.95. Note that FOP distributions comes with different versions of Xalan, depending on FOP version released; in certain cases old Xalan versions can cause some troubles, so the same Xalan for the 2 FOPs is a good start. At this stage, if the 2 ouputs are differents, you can easily find the lines that have to be tweaked, directly in you XSL-FO file. Once the result
Re: AW: PDF reprot with improper align data
Hi guys, to transform easly your xml source, you can also uses xsltophttp://xsltop.tuxfamily.org/index.xmlor Xml Copy Editor http://xml-copy-editor.sourceforge.net/, it's are under GNU GPL license. regards, Philippe 2010/2/23 Pascal Sancho pascal.san...@takoma.fr Hi Jaiprakash, As Georg said, the most useful on this list is to provide XSL-FO file, rather than XML + XSL couple. You can easily do it by invoking FOP with the -foout option: Fop -xml foo.xml -xsl foo.xsl -foout foo.fo From that point, you can use the same source XSL-FO file to feed either FOP 0.20.0, or FOP 0.95. Note that FOP distributions comes with different versions of Xalan, depending on FOP version released; in certain cases old Xalan versions can cause some troubles, so the same Xalan for the 2 FOPs is a good start. At this stage, if the 2 ouputs are differents, you can easily find the lines that have to be tweaked, directly in you XSL-FO file. Once the result make you happy, you can then report changes to your XSLT. During this process, we can help you in resolving issues that could block you, but we *need* XSL-FO. HTH, Pascal jaiprakash.pa...@polaris.co.in a écrit : Hi, Please find the xml file for the same along with the genrated pdf output .The same below outputted report is working fine in fop 0.20 version but after migration vertical alignment issue is coming. (See attached file: IntellectReport.xsl)(See attached file: IntellectReport.xml) PDF output FOR FOP 0.95 version (Embedded image moved to file: pic01200.jpg) EXPECTED OUTPUT:PDF FOR THE VERSION FOP 0.20 (Embedded image moved to file: pic26058.jpg) Georg Datterl gdatt...@geneon. de Hello jaiprakash, Your XSL file doesn't help a lot here. Can you: * take your XML file and transform it so you get a fo file * cut the irrelevant parts out so it only contains the parts you want aligned * post this shortened fo file * tell us which parts you want aligned with which (horizontally? vertically?) * and tell us which fop version you use Thanks. Georg Datterl -Ursprüngliche Nachricht- Von: jaiprakash.pa...@polaris.co.in [mailto: jaiprakash.pa...@polaris.co.in] Hi, I am unable to generate properly align data in pdf report.so what changes should i make in xsl file for correct alignment od data in pdf? here is my xsl file .Please help for the same. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: [ERROR] Image not found
Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe 2010/2/18 pjmorce pjcarva...@gmail.com Hello I used a simple example on the Internet about how to use FOP in java (http://javaboutique.internet.com/tutorials/FOP/): - I Created a simple Java application with a class that takes an XML and converts it into a PDF (using a XSL) containing an image. The name of my class is Process.java and it has a method process. It works fine when called directly as a java application. - I Created a simple web service that just call this process method of that class. However, when i call the web service, i get an error: [ERROR] Image not found: img/logo.gif = The PDF is created but without the image. Here is the code of my Process.java class: public static String process(String xml, String xsl) { String sResult = null; try { ByteArrayOutputStream foOut = new ByteArrayOutputStream(); ByteArrayOutputStream bOut = new ByteArrayOutputStream(); InputStream iss = Process.class.getClassLoader().getResourceAsStream(brique); copyFile(new BufferedInputStream(iss), bOut); SAXBuilder builder = new SAXBuilder(); Document document = builder.build(new ByteArrayInputStream(xml.getBytes())); TransformerFactory factory = TransformerFactory.newInstance(); InputStream iXsl = Process.class.getClassLoader().getResourceAsStream(xsl); StreamSource iSource = new StreamSource(iXsl); Transformer foTrans = factory.newTransformer(iSource); StreamSource strSourceXML = new StreamSource(new ByteArrayInputStream(xml.getBytes())); foTrans.transform(strSourceXML, new StreamResult(foOut)); foOut.flush(); ByteArrayOutputStream pdfOut = new ByteArrayOutputStream(); TransformerFactory tFactoryFO2PDF = TransformerFactory.newInstance(); Transformer pdfTrans = tFactoryFO2PDF.newTransformer(); FopFactory fopFactory = FopFactory.newInstance(); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, pdfOut); Result res = new SAXResult(fop.getDefaultHandler()); StreamSource streamSourceXml = new StreamSource(new ByteArrayInputStream(foOut.toByteArray())); pdfTrans.transform(streamSourceXml, res); java.io.File file = new java.io.File(d:/res.pdf); FileOutputStream foStream = new FileOutputStream(file); pdfOut.writeTo(foStream); } catch(Exception e) { e.printStackTrace(); } return sResult; } private static boolean copyFile(InputStream in, OutputStream out) { try { int c; while ((c = in.read()) != -1) out.write(c); in.close(); out.close(); } catch (IOException io) { return false; } return true; } The code of my web service is just: public static String process(String xml, String xsl) { String sResult = null; try { sResult = Process.process(xml, xsl); System.out.println(sss); } catch(Exception e) { e.printStackTrace(); } return sResult; } The web service has the JAR of the Java application in his classpath. The content of the Jar file is the following one: NamePath briques.xsd logo.gif img\ Manifest.mf meta-inf\ Process.class tst saxon-licence.lic xsl2.xslt I call the web service with the following parameters: xml = ?xml version='1.0' encoding='UTF-8'?+ Catalog+ Book+ TitleMastering EJB/Title+ AuthorEd Roman/Author+ Price$45.00/Price+ /Book+ Book+ TitleDesign Patterns/Title+ AuthorErich Gamma/Author+ Price$50.00/Price+ /Book+ Book+ TitleEffective Java/Title+ AuthorJosch Bloch/Author+ Price$30.00/Price+ /Book + /Catalog; xsl = xsl2.xslt; In the xsl2.xslt I have a part of code like this to insert the image on the pdf: ... fo:block fo:external-graphic src=img/logo.gif/ /fo:block ... The XSL is found in the JAR because
Re: [ERROR] Image not found
Yes, it's right. implement your UriResolver, set the fopFactory and debug your programme. You will see that you pass in your resolve(String href, String base) method when fop search your image. in href you'll see your image file name and so you can plugged your real image with the inputStream resolve method return. So you can put your image in the classpath and use as : resolve(String href, String base) { return YourUriResolver.class.getResourceAsStream(href); } or : public class SimpleUriResolver implements URIResolver { /** * Instantiates a new fop uri resolver. */ public SimpleUriResolver() { super(); } /* * (non-Javadoc) * @see javax.xml.transform.URIResolver#resolve(java.lang.String, java.lang.String) */ public Source resolve(String href, String base) throws TransformerException { Source src; final String file = file:; if (href.startsWith(file)) { src = new StreamSource(new File(href.substring(file.length(; } else { src = new StreamSource(SimpleUriResolver.class.getResourceAsStream(href)); } return src; } } As you want :) Philippe 2010/2/18 pjmorce pjcarva...@gmail.com Thanks for your answer. I am not familiarized with URIResolver but I check it and, if I understood, I must implement it creating a new class that implements the URIResolver class and the method resolve(String href, String base) In the javadoc the definition of both arguments are: href - An href attribute, which may be relative or absolute. base - The base URI in effect when the href attribute was encountered. If I am correct HRef is the filename. So my URIResolver will have img/logo.gif as href parameter. Correct? And in the case that I dont know the name of my image indicated on the XSL? how can I solve the problem? thank you regards Philippe Voncken wrote: Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe 2010/2/18 pjmorce pjcarva...@gmail.com Hello I used a simple example on the Internet about how to use FOP in java (http://javaboutique.internet.com/tutorials/FOP/): - I Created a simple Java application with a class that takes an XML and converts it into a PDF (using a XSL) containing an image. The name of my class is Process.java and it has a method process. It works fine when called directly as a java application. - I Created a simple web service that just call this process method of that class. However, when i call the web service, i get an error: [ERROR] Image not found: img/logo.gif = The PDF is created but without the image. Here is the code of my Process.java class: public static String process(String xml, String xsl) { String sResult = null; try { ByteArrayOutputStream foOut = new ByteArrayOutputStream(); ByteArrayOutputStream bOut = new ByteArrayOutputStream(); InputStream iss = Process.class.getClassLoader().getResourceAsStream(brique); copyFile(new BufferedInputStream(iss), bOut); SAXBuilder builder = new SAXBuilder(); Document document = builder.build(new ByteArrayInputStream(xml.getBytes())); TransformerFactory factory = TransformerFactory.newInstance(); InputStream iXsl = Process.class.getClassLoader().getResourceAsStream(xsl); StreamSource iSource = new StreamSource(iXsl); Transformer foTrans = factory.newTransformer(iSource); StreamSource strSourceXML = new StreamSource(new ByteArrayInputStream(xml.getBytes())); foTrans.transform(strSourceXML, new StreamResult(foOut)); foOut.flush(); ByteArrayOutputStream pdfOut = new ByteArrayOutputStream(); TransformerFactory tFactoryFO2PDF = TransformerFactory.newInstance(); Transformer pdfTrans = tFactoryFO2PDF.newTransformer(); FopFactory fopFactory = FopFactory.newInstance(); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, pdfOut); Result res = new SAXResult(fop.getDefaultHandler()); StreamSource streamSourceXml = new StreamSource(new ByteArrayInputStream(foOut.toByteArray())); pdfTrans.transform(streamSourceXml, res); java.io.File file = new java.io.File(d:/res.pdf); FileOutputStream foStream = new FileOutputStream(file); pdfOut.writeTo(foStream); } catch(Exception e) { e.printStackTrace(); } return sResult; } private static boolean copyFile(InputStream
Re: [ERROR] Image not found
Sorry, with this xsl it'll work in root element classpath : fo:block fo:external-graphic src=url('/logo.gif')/ /fo:block Philippe 2010/2/18 philippe voncken m...@philippevoncken.com With my SimpleUriResolver() you must use xsl as follow: fo:block fo:external-graphic src=url('logo.gif')/ /fo:block if logo.gif is in your classpath root element, it will work. Philippe 2010/2/18 Georg Datterl gdatt...@geneon.de Hi pjmorce, Assuming TstFOP.jar is on the server and found by your application server, what happens if you use fo:block fo:external-graphic src=url('file:TstFOP.jar!/img/logo.gif')/ /fo:block Mit freundlichen Grüßen 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: pjmorce [mailto:pjcarva...@gmail.com] Gesendet: Donnerstag, 18. Februar 2010 11:47 An: fop-users@xmlgraphics.apache.org Betreff: Re: [ERROR] Image not found I tried your suggestion: in the XSL I have now the following code and the problem remains: fo:block fo:external-graphic src=url('file:/img/logo.gif')/ /fo:block However, i also tried to put this and it worked: fo:block fo:external-graphic src=jar:file:///D:/eclipse_galileo/eclipse/TstFOP/TstFOP.jar!/img/logo.gif/ /fo:block It worked, but obvious reasons I cannot put this on the XSL that will be on production... :( Hi, It is more of a URL problem, try pass URL 'file:/img/logo.gif' instead of relative path. Thanks, Venkat. philippe voncken wrote: Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe -- View this message in context: http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637052.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: [ERROR] Image not found
With my SimpleUriResolver() you must use xsl as follow: fo:block fo:external-graphic src=url('logo.gif')/ /fo:block if logo.gif is in your classpath root element, it will work. Philippe 2010/2/18 Georg Datterl gdatt...@geneon.de Hi pjmorce, Assuming TstFOP.jar is on the server and found by your application server, what happens if you use fo:block fo:external-graphic src=url('file:TstFOP.jar!/img/logo.gif')/ /fo:block Mit freundlichen Grüßen 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: pjmorce [mailto:pjcarva...@gmail.com] Gesendet: Donnerstag, 18. Februar 2010 11:47 An: fop-users@xmlgraphics.apache.org Betreff: Re: [ERROR] Image not found I tried your suggestion: in the XSL I have now the following code and the problem remains: fo:block fo:external-graphic src=url('file:/img/logo.gif')/ /fo:block However, i also tried to put this and it worked: fo:block fo:external-graphic src=jar:file:///D:/eclipse_galileo/eclipse/TstFOP/TstFOP.jar!/img/logo.gif/ /fo:block It worked, but obvious reasons I cannot put this on the XSL that will be on production... :( Hi, It is more of a URL problem, try pass URL 'file:/img/logo.gif' instead of relative path. Thanks, Venkat. philippe voncken wrote: Hi, you must implementing the UriResolver and set your fopFactory with it. fopFactoy.setUriResolver() regards, Philippe -- View this message in context: http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637052.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: Table cell, vertical alignment with text and Instream
Hi, you can also uses a text-align attribute on the block element. Philippe 2010/2/18 Venkat Reddy vanukuri.ven...@googlemail.com Hi, If you keep the third cell elements in another table, then it should work. Third cell should be fo:table-cell display-align=center border-width=0.5mm border-style=solid fo:block fo:table fo:table-body fo:table-row fo:table-cell display-align=center fo:blockSome text with instream centered/fo:block /fo:table-cell fo:table-cell display-align=center fo:block fo:instream-foreign-object svg height=20pt width=20pt g style=fill:red; stroke:#00 rect height=20 width=20 x=0 y=0 / /g /svg /fo:instream-foreign-object /fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:block /fo:table-cell If you replace the above xsl:fo script with your third cell, it should work as you expected. Venkat. Jeandur wrote: Dear Fop Users, I'm facing a very strange behavior with fop095/jdk1.6 and mixed content (Instream and text) inside a table cell : . If the text is alone inside the cell, it is centered. . If the instream object is alone inside the cell, it is centered too. . But with booth inside the same cell, it doesn't work. Only the Instream object is centered and the text is bottom aligned. Following the code I'm using : !-- [..] -- fo:table-body fo:table-row fo:table-cell display-align=center border-width=0.5mm border-style=solid fo:block Some text vertical centered/fo:block /fo:table-cell fo:table-cell display-align=center border-width=0.5mm border-style=solid fo:block fo:instream-foreign-object svg height=20pt width=20pt g style=fill:red; stroke:#00 rect height=20 width=20 x=0 y=0 / /g /svg /fo:instream-foreign-object /fo:block /fo:table-cell fo:table-cell display-align=center border-width=0.5mm border-style=solid fo:blockSome text with instream centered ?fo:instream-foreign-object svg height=20pt width=20pt g style=fill:red; stroke:#00 rect height=20 width=20 x=0 y=0 / /g /svg /fo:instream-foreign-object /fo:block /fo:table-cell /fo:table-row /fo:table-body !-- [...]-- This is very annoying for us, because it seemed to work with fop025 :-( Any suggestions or advice will be armed welcome ! Thanks in advance. Jean - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Loading font error with fop
It's work thanks. It was my fault, I've created an UriResolver which don't work with FileSystem. :/ Philippe 2010/2/16 Jeremias Maerki d...@jeremias-maerki.ch metrics-url and embed-url requires a URL, not a filename. Please note that starting with FOP 0.95 you can omit the metrics-url attribute. The XML font metrics step is no longer required. So, changing /test/ParisineOffice-Regular.ttf to file:/test/ParisineOffice-Regular.ttf should do it. On 16.02.2010 12:35:14 philippe voncken wrote: Hello, I want loading a font with fop. Font is Parisine Office. I generated xml files with following command: java -cp build/fop.jar:lib/avalon-framework-4.2.0.jar:lib/xml-apis-1.3.04.jar:lib/xercesImpl-2.7.1.jar:lib/xalan-2.7.0.jar:lib/commons-logging-1.0.4.jar:lib/commons-io-1.3.1.jar:lib/xmlgraphics-commons-1.3.1.jar:lib/serializer-2.7.0.jar org.apache.fop.fonts.apps.TTFReader /test/ParisineOffice-Regular.ttf /test/ParisineOffice-Regular.xml Xml files are generating. ~500Ko per files. I'm using following file to configure my fop: fop version=1.0 renderers renderer mime=application/pdf filterList !-- provides compression using zlib flate (default is on) -- valueflate/value /filterList fonts font metrics-url=/test/ParisineOffice-Regular.xml kerning=yes embed-url=/test/ParisineOffice-Regular.ttf font-triplet name=Parisine Office style=normal weight=normal/ /font font metrics-url=/test/ParisineOffice-Bold.xml kerning=yes embed-url=/test/ParisineOffice-Bold.ttf font-triplet name=Parisine Office style=normal weight=bold/ /font font metrics-url=/test/ParisineOffice-Italic.xml kerning=yes embed-url=/test/ParisineOffice-Italic.ttf font-triplet name=Parisine Office style=italic weight=normal/ /font font metrics-url=/test/ParisineOffice-BoldItalic.xml kerning=yes embed-url=/test/ParisineOffice-BoldItalic.ttf font-triplet name=Parisine Office style=italic weight=bold/ /font /fonts /renderer /renderers /fop When I generate the Pdf in xslfo with fop, I'm this exception: [INFO] javax.xml.transform.TransformerException: java.lang.RuntimeException: Cannot load font: After URI resolution, the returned Source object does not contain an InputStream or a valid URL (system identifier) for metrics file: /home/philippe/accessio-conf/ParisineOffice-Regular.xml [INFO] Caused by: java.lang.RuntimeException: Cannot load font: After URI resolution, the returned Source object does not contain an InputStream or a valid URL (system identifier) for metrics file: /home/philippe/accessio-conf/ParisineOffice-Regular.xml [INFO] java.lang.RuntimeException: Cannot load font: After URI resolution, the returned Source object does not contain an InputStream or a valid URL (system identifier) for metrics file: /home/philippe/accessio-conf/ParisineOffice-Regular.xml Any ideas ? regards, philippe Jeremias Maerki - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Loading font error with fop
Hello, I want loading a font with fop. Font is Parisine Office. I generated xml files with following command: java -cp build/fop.jar:lib/avalon-framework-4.2.0.jar:lib/xml-apis-1.3.04.jar:lib/xercesImpl-2.7.1.jar:lib/xalan-2.7.0.jar:lib/commons-logging-1.0.4.jar:lib/commons-io-1.3.1.jar:lib/xmlgraphics-commons-1.3.1.jar:lib/serializer-2.7.0.jar org.apache.fop.fonts.apps.TTFReader /test/ParisineOffice-Regular.ttf /test/ParisineOffice-Regular.xml Xml files are generating. ~500Ko per files. I'm using following file to configure my fop: fop version=1.0 renderers renderer mime=application/pdf filterList !-- provides compression using zlib flate (default is on) -- valueflate/value /filterList fonts font metrics-url=/test/ParisineOffice-Regular.xml kerning=yes embed-url=/test/ParisineOffice-Regular.ttf font-triplet name=Parisine Office style=normal weight=normal/ /font font metrics-url=/test/ParisineOffice-Bold.xml kerning=yes embed-url=/test/ParisineOffice-Bold.ttf font-triplet name=Parisine Office style=normal weight=bold/ /font font metrics-url=/test/ParisineOffice-Italic.xml kerning=yes embed-url=/test/ParisineOffice-Italic.ttf font-triplet name=Parisine Office style=italic weight=normal/ /font font metrics-url=/test/ParisineOffice-BoldItalic.xml kerning=yes embed-url=/test/ParisineOffice-BoldItalic.ttf font-triplet name=Parisine Office style=italic weight=bold/ /font /fonts /renderer /renderers /fop When I generate the Pdf in xslfo with fop, I'm this exception: [INFO] javax.xml.transform.TransformerException: java.lang.RuntimeException: Cannot load font: After URI resolution, the returned Source object does not contain an InputStream or a valid URL (system identifier) for metrics file: /home/philippe/accessio-conf/ParisineOffice-Regular.xml [INFO] Caused by: java.lang.RuntimeException: Cannot load font: After URI resolution, the returned Source object does not contain an InputStream or a valid URL (system identifier) for metrics file: /home/philippe/accessio-conf/ParisineOffice-Regular.xml [INFO] java.lang.RuntimeException: Cannot load font: After URI resolution, the returned Source object does not contain an InputStream or a valid URL (system identifier) for metrics file: /home/philippe/accessio-conf/ParisineOffice-Regular.xml Any ideas ? regards, philippe