Re: Glyphs in TrueType font file not found by FOP
I think you misunderstand the arial.xml file. Most of the glpyhs in the font are not in the section of the arial.xml file which has glyph indices. The font has ~1600 glpyhs, the arial.xml file only has index data for ~500 of them. - Original Message - From: kev martin To: fop-users@xmlgraphics.apache.org Sent: Monday, October 09, 2006 2:00 PM Subject: Glyphs in TrueType font file not found by FOP Using FOP 0.92. I have created an XML file to use the the arial.ttf font file, like this: java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging-1.0.4.jar;lib\commons-io-1.1.jar org.apache.fop.fonts.apps.TTFReader C:\windows\fonts\arial.ttf arial.xml I have written some code for Arabic charcter shaping, which tells me that the glyph I need has glyph index 1509. Using FontLab Studio (www.fontlab.com), and opening arial.ttf, I can see that this is correct, and the glyph I want is indeed at index 1509. But the arial.xml file has no glyph index 1509, and I am unable to understand why. I have checked the FOP source against the TrueType specification and I cannot see the problem – does anyone have any ideas ? Thanks Kev
Re: Barcodes in fop 0.92 - Batik
Please see http://xmlgraphics.apache.org/fop/faq.html#svg-attribute-required You probably added Xalan 2.7.0 only to your classpath but not to your bootclasspath which is needed since J2SE 1.4 if you want to replace the default JAXP implementation (endorsed standards override mechanism). You don't need to update Batik for that. On 09.10.2006 14:55:22 Richard King wrote: > Thanks for that. I appreciate it and the jar looks good. > > Downloaded and updated my jar ... unfortunately now have a new problem! > > Running the fop.bat or via java I get a FATAL. The message of concern I > believe is: > "The attribute "width" of the element is required" > > Checked the version of xalan and I'm using "xalan-2.7.0.jar" which was > provided with fop version 0.92. > After some research on the web I believe the latest batik trunk will solve > the problem. > > Is there any chance I could have a link to this jar? > > Cheers, > Richard > > -Original Message- > From: Jeremias Maerki [mailto:[EMAIL PROTECTED] > Sent: 07 October 2006 16:04 > To: fop-users@xmlgraphics.apache.org > Subject: Re: Barcodes in fop 0.92 > > > The OfBiz people probably compiled Barcode4J from its CVS code. > > I've uploaded a development snapshot (no official release!) two months > ago at the following URL. There's currently no new release with FOP 0.92 > compatibility. I'm working on adding some new features and plan to > release Barcode4J 2.0 before the end of the year. > > http://www.jeremias-maerki.ch/download/fop/barcode4j-fop-ext-trunk-complete.jar > > On 06.10.2006 13:58:09 Richard King wrote: > > Heya, > > Thank you all for your help previously. > > > > One last question ... I hope! > > I was wondering if barcode4j is available for version 0.92 of fop > > > > I had a look through the net and the closest I can find is a reference to > > "barcode4j-fop-ext-0.92.jar" > > http://www.mail-archive.com/ofbiz-dev@incubator.apache.org/msg03681.html > Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fop from PHP/Java...
Ok... This was a very simple problem... Tomcat runned out of memory... after adding more memory in the pools... it runned to completion. Thanx for beign aware ;) LF -- View this message in context: http://www.nabble.com/Fop-from-PHP-Java...-tf2411567.html#a6722546 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Barcodes in fop 0.92 - Batik
Richard King wrote: Heya, What I'm doing is trying to implement a barcode via barcode4j. Oh! This is a Jeremias question then. My knowledge of barcodes is limited to finding them on products so I can use the self-serve checkout at the grocery store. I did not realize that the was generated from the barcode program and not from your code. Full FATAL: 09-Oct-2006 17:47:52 org.apache.fop.fo.FONode attributeWarning WARNING: Warning(Unknown location): fo:table, table-layout="auto" is currently n ot supported by FOP 09-Oct-2006 17:47:52 org.apache.fop.fo.FONode attributeWarning WARNING: Warning(Unknown location): fo:table, table-layout="auto" is currently n ot supported by FOP Still, leaving aside the barcode error, I would place a table-layout="fixed" to get rid of this error. (Note I believe you will need to also subsequently give table-column widths as a result. Google on fo:table for a billion examples.) It *might* be related to the barcode error you are getting, if the barcode program uses table dimensions to determine the width attribute. Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fop from PHP/Java...
I managed to make a piece of source that "seams" to work... but something is amiss because tomcat is freeing the thread too soon and the file is still in processing: java_require("C:\\Program Files\\fop-0.92beta\\build\\fop.jar;C:\\Program Files\\fop-0.92beta\\lib\\xml-apis-1.3.02.jar;" . "C:\\Program Files\\fop-0.92beta\\lib\\xercesImpl-2.7.1.jar;C:\\Program Files\\fop-0.92beta\\lib\\xalan-2.7.0.jar;" . "C:\\Program Files\\fop-0.92beta\\lib\\serializer-2.7.0.jar;C:\\Program Files\\fop-0.92beta\\lib\\batik-all-1.6.jar;" . "C:\\Program Files\\fop-0.92beta\\lib\\xmlgraphics-commons-1.1-snapshot.jar;C:\\Program Files\\fop-0.92beta\\lib\\avalon-framework-4.2.0.jar;" . "C:\\Program Files\\fop-0.92beta\\lib\\commons-io-1.1.jar;C:\\Program Files\\fop-0.92beta\\lib\\commons-logging-1.0.4.jar;" . "C:\\Program Files\\fop-0.92beta\\lib\\servlet-2.2.jar"); $pdffile = new Java("java.io.FileOutputStream", $output . "\\" . $destfile); $mimes = new Java("org.apache.fop.apps.MimeConstants"); $fopfactory = new Java("org.apache.fop.apps.FopFactory"); $fopf = $fopfactory->newInstance(); $fopf->setUserConfig( new Java("java.io.File", "D:/sites/mapaterapeutico/config/fop.xconf") ); $fopf->setFontBaseURL("file:///D:/sites/mapaterapeutico/fonts"); $userf = $fopf->newFOUserAgent(); $fop = $fopf->newFop( $mimes->MIME_PDF, $userf, $pdffile ); $transformerclass = new Java("javax.xml.transform.TransformerFactory"); $transformerfactory = $transformerclass->newInstance(); $transformerf = $transformerfactory->newTransformer(); $src = new Java("javax.xml.transform.stream.StreamSource", new Java("java.io.File", $input . "\\" . $sourcefile )); $res = new Java("javax.xml.transform.sax.SAXResult", $fop->getDefaultHandler()); $transformerf->transform($src, $res); This starts to build the PDF on the directory, but somewhere in the way, Tomcat releases the task and quits working... (and the file only has a few kb, when it should have 2mb more or less). The log from tomcat doesn't give a clue... it process everything but... it crashes in the transform method: 2006-10-09 18:17:36 StandardContext[/JavaBridge] JavaBridge DEBUG: @4bfe6b <-- 2006-10-09 18:17:36 StandardContext[/JavaBridge] JavaBridge DEBUG: @4bfe6b --> 2006-10-09 18:17:36 StandardContext[/JavaBridge] JavaBridge DEBUG: @4bfe6b --> 2006-10-09 18:17:36 StandardContext[/JavaBridge] JavaBridge DEBUG: @4bfe6b --> 2006-10-09 18:17:36 StandardContext[/JavaBridge] JavaBridge DEBUG: @4bfe6b <-- 2006-10-09 18:17:36 StandardContext[/JavaBridge] JavaBridge DEBUG: @4bfe6b --> 2006-10-09 18:17:36 StandardContext[/JavaBridge] JavaBridge DEBUG: @4bfe6b --> 2006-10-09 18:17:36 StandardContext[/JavaBridge] JavaBridge DEBUG: @4bfe6b --> 2006-10-09 18:17:36 StandardContext[/JavaBridge] JavaBridge DEBUG: @4bfe6b --> 2006-10-09 18:17:36 StandardContext[/JavaBridge] JavaBridge DEBUG: @4bfe6b --> 2006-10-09 18:18:17 StandardContext[/JavaBridge] JavaBridge DEBUG: @4bfe6b context finished: 1 2006-10-09 18:18:17 StandardContext[/JavaBridge]JavaBridge Exception: java.lang.NullPointerException at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1142) at php.java.bridge.Request.handleRequest(Request.java:204) at php.java.bridge.Request.handleRequests(Request.java:221) at php.java.servlet.ContextRunner.run(ContextRunner.java:71) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:20) The file with a "custom" fop.bat (custom to use a config file and add some more memory to the process) runs ok... Unfortunatly, when i try to run the bat file from php, the process hang right on the start (loads java and exits). Any help would be appresciated... Thanx Luis Ferro -- View this message in context: http://www.nabble.com/Fop-from-PHP-Java...-tf2411567.html#a6722053 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Barcodes in fop 0.92 - Batik
Heya, What I'm doing is trying to implement a barcode via barcode4j. I am running the following: A normal barcode: My stylesheet is set up as follows: http://www.w3.org/1999/XSL/Transform"; version="1.0" xmlns:barcode="org.krysalis.barcode4j.xalan.BarcodeExt" xmlns:fo="http://www.w3.org/1999/XSL/Format";> Am I missing something in the implementation of barcodes? I am very new to barcodes so it is very possible I'm missed something. When I comment out the last block all appear fine. Full FATAL: 09-Oct-2006 17:47:52 org.apache.fop.fo.FONode attributeWarning WARNING: Warning(Unknown location): fo:table, table-layout="auto" is currently n ot supported by FOP 09-Oct-2006 17:47:52 org.apache.fop.fo.FONode attributeWarning WARNING: Warning(Unknown location): fo:table, table-layout="auto" is currently n ot supported by FOP 09-Oct-2006 17:47:52 org.apache.fop.render.java2d.Java2DRenderer getPageImage INFO: Rendering Page 1 (pageWidth 595, pageHeight 842) 09-Oct-2006 17:47:53 org.apache.fop.render.java2d.Java2DSVGHandler renderSVGDocu ment SEVERE: SVG graphic could not be built: file:/C:/xpb/fop092/fop-0.92beta/:-1 The attribute "width" of the element is required org.apache.batik.bridge.BridgeException: file:/C:/xpb/fop092/fop-0.92beta/:-1 The attribute "width" of the element is required at org.apache.batik.bridge.SVGRectElementBridge.buildShape(Unknown Sourc e) at org.apache.batik.bridge.SVGShapeElementBridge.createGraphicsNode(Unkn own Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown Source) at org.apache.fop.render.java2d.Java2DSVGHandler.renderSVGDocument(Java2 DSVGHandler.java:133) at org.apache.fop.render.java2d.Java2DSVGHandler.handleXML(Java2DSVGHand ler.java:64) at org.apache.fop.render.AbstractRenderer.renderXML(AbstractRenderer.jav a:843) at org.apache.fop.render.java2d.Java2DRenderer.renderDocument(Java2DRend erer.java:1143) at org.apache.fop.render.java2d.Java2DRenderer.renderForeignObject(Java2 DRenderer.java:1116) at org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRendere r.java:743) at org.apache.fop.render.java2d.Java2DRenderer.renderViewport(Java2DRend erer.java:407) at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRende rer.java:634) at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRendere r.java:609) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer. java:535) at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.j ava:585) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer. java:525) at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.ja va:430) at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRe nderer.java:409) at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRende rer.java:343) at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractR enderer.java:288) at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRender er.java:261) at org.apache.fop.render.java2d.Java2DRenderer.getPageImage(Java2DRender er.java:325) at org.apache.fop.render.java2d.Java2DRenderer.getPageImage(Java2DRender er.java:356) at org.apache.fop.render.awt.viewer.ImageProxyPanel.paintComponent(Image ProxyPanel.java:123) at javax.swing.JComponent.paint(JComponent.java:808) at javax.swing.JComponent.paintChildren(JComponent.java:647) at javax.swing.JComponent.paint(JComponent.java:817) at javax.swing.JComponent.paintChildren(JComponent.java:647) at javax.swing.JComponent.paint(JComponent.java:817) at javax.swing.JViewport.paint(JViewport.java:722) at javax.swing.JComponent.paintChildren(JComponent.java:647) at javax.swing.JComponent.paint(JComponent.java:817) at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4787) at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4740) at javax.swing.JComponent._paintImmediately(JComponent.java:4685) at javax.swing.JComponent.paintImmediately(JComponent.java:4488) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(System EventQueueUtilities.java:117)
Re: Barcodes in fop 0.92 - Batik
Richard King wrote: Thanks for that. I appreciate it and the jar looks good. Downloaded and updated my jar ... unfortunately now have a new problem! Running the fop.bat or via java I get a FATAL. The message of concern I believe is: "The attribute "width" of the element is required" Ummm, just to confirm, you *do* have a "width" attribute on that , right? I want to make sure that this is not an EBKAC problem. Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Barcodes in fop 0.92 - Batik
Thanks for that. I appreciate it and the jar looks good. Downloaded and updated my jar ... unfortunately now have a new problem! Running the fop.bat or via java I get a FATAL. The message of concern I believe is: "The attribute "width" of the element is required" Checked the version of xalan and I'm using "xalan-2.7.0.jar" which was provided with fop version 0.92. After some research on the web I believe the latest batik trunk will solve the problem. Is there any chance I could have a link to this jar? Cheers, Richard -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: 07 October 2006 16:04 To: fop-users@xmlgraphics.apache.org Subject: Re: Barcodes in fop 0.92 The OfBiz people probably compiled Barcode4J from its CVS code. I've uploaded a development snapshot (no official release!) two months ago at the following URL. There's currently no new release with FOP 0.92 compatibility. I'm working on adding some new features and plan to release Barcode4J 2.0 before the end of the year. http://www.jeremias-maerki.ch/download/fop/barcode4j-fop-ext-trunk-complete.jar On 06.10.2006 13:58:09 Richard King wrote: > Heya, > Thank you all for your help previously. > > One last question ... I hope! > I was wondering if barcode4j is available for version 0.92 of fop > > I had a look through the net and the closest I can find is a reference to > "barcode4j-fop-ext-0.92.jar" > http://www.mail-archive.com/ofbiz-dev@incubator.apache.org/msg03681.html 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: fop in a servlet in 0.91beta very different from 0.20.5
Better late than never. :-) Thanks so much for your feedback! It's always good to hear stuff like that. On 09.10.2006 09:37:13 Roberto Nunnari wrote: > Hello list. > > > Jeremias Maerki wrote: > > On 10.02.2006 20:14:06 Roberto Nunnari wrote: > >> Hello Jeremias. > >> > >> Yes. You're right. There was a problem with the FO document.. > >> in effect it was the same as the one I had a week ago caused > >> by the title element. > >> > >> Anyways, I managed to move from 0.20.5 to 0.91beta and have it > >> generate correctly the pdf. > >> > >> The only problem was with the trick I had used in 0.20.5 > >> with the last marker so that the last page would not have the > >> subtotal on the last page. The difference: > >> - 0.20.5: > >> - 0.91beta: > >> > >> as you see, the only difference is that in 0.91beta a space > >> is necessary to have fop use an empty string on the last page > >> instead of the last non empty marker. > >> > >> Also, 0.91beta correctly renders the subtotal in bold while > >> 0.20.5 doesn't. > >> > >> Ok. Next week I'll deploy 0.91beta in the production environment > >> and if all will be well, after a couple of weeks I'll report > >> here. > > > > Thanks for the feedback. > > ok.. a bit late, but here I am: > I'm happy to say that the system has been online for 8 months > now and I've had no problem reports since. FOP rocks! > > Thank you all for the great work guys! > > > > > >> Just one more question: > >> I need be sure a small table will be shown all on the same page > >> and not split across two pages.. What is the best way to go > >> with 0.91beta ? Is it possible to achive that using several table-row > >> or should I use put all content in a single table-row? > > > > You can use multiple table-rows and keep-together.within-page="always" > > on the fo:table. (works only in 0.91beta and later) > > > > > > > > Jeremias Maerki > > > > > > -- > Robi Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fop in a servlet in 0.91beta very different from 0.20.5
Hello list. Jeremias Maerki wrote: On 10.02.2006 20:14:06 Roberto Nunnari wrote: Hello Jeremias. Yes. You're right. There was a problem with the FO document.. in effect it was the same as the one I had a week ago caused by the title element. Anyways, I managed to move from 0.20.5 to 0.91beta and have it generate correctly the pdf. The only problem was with the trick I had used in 0.20.5 with the last marker so that the last page would not have the subtotal on the last page. The difference: - 0.20.5: - 0.91beta: as you see, the only difference is that in 0.91beta a space is necessary to have fop use an empty string on the last page instead of the last non empty marker. Also, 0.91beta correctly renders the subtotal in bold while 0.20.5 doesn't. Ok. Next week I'll deploy 0.91beta in the production environment and if all will be well, after a couple of weeks I'll report here. Thanks for the feedback. ok.. a bit late, but here I am: I'm happy to say that the system has been online for 8 months now and I've had no problem reports since. FOP rocks! Thank you all for the great work guys! Just one more question: I need be sure a small table will be shown all on the same page and not split across two pages.. What is the best way to go with 0.91beta ? Is it possible to achive that using several table-row or should I use put all content in a single table-row? You can use multiple table-rows and keep-together.within-page="always" on the fo:table. (works only in 0.91beta and later) Jeremias Maerki -- Robi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]