Re: Problem with creation of font cache on Windows 7 64 bit
Hi Jonathan, I have just committed a fix to the missing cache-file configuration option (see http://xmlgraphics.apache.org/fop/1.0/configuration.html#general-elements) to the Fop trunk code. All the documentation regarding font caching should now reflect the actual implementation. I also added a convenience -delete-cache option to the Fop command line as quite a few users have previously asked how to delete/clear this file (when not knowing its location on the filesystem). Hope this helps, Adrian. On 14 August 2010 20:38, Adrian Cumiskey adrian.cumis...@gmail.com wrote: Sorry Jonathan, I've just looked into the matter and realised that what I told you was incorrect (partially at least). If you take a look at http://xmlgraphics.apache.org/fop/1.0/configuration.html#general-elements you'll see that there is a cache-file option that you can provide to tell Fop where you would like your font cache file to be created. Unfortunately this documentation does not reflect the current state of the system. At some stage during further development of the font caching mechanism, this setting was lost as a configuration setting and instead Fop tries to always store the font cache file in the user's home directory. I will work this weekend on reinstating this feature and integrate it into the current font caching system. Cheers, Adrian. On 14 August 2010 09:09, Adrian Cumiskey adrian.cumis...@gmail.comwrote: Hi Jonathan, The font caching was written prior to the Windows 7 release so it was never tested at the time. There is currently no way of telling Fop where to put its font cache but it shouldn't be too much effort to add this feature. I'll look at adding support for this. Adrian. On 14 August 2010 05:38, Jonathan Levinson jonathan.levin...@intersystems.com wrote: On Windows XP, fop creates it font-cache in “C:\Documents and Settings\username\.fop”. I’ve had a couple of reports that on Windows 7 64 bit, fop puts its font cache in c:\.fop, a directory to which the user may not have write permissions. Is this a known issue? Is there a way of telling fop where to put the font cache? Best Regards, Jonathan Levinson
Re: RE: Problem with creation of font cache on Windows 7 64 bit
Hi Jonathan, Well spotted, yes that should work well also. Although its a bit of a sneaky back door way of achieving it : -). Cheers, Adrian. On 2010-08-16 1:23 AM, Jonathan Levinson jonathan.levin...@intersystems.com wrote: Thank you Adrian! Also I’ve noticed you can redirect the font-cache with the Java system property –Duser.home, so one can direct it to a different place by editing the JAVAOPTS set in fop.bat. Best Regards, Jonathan Levinson *From:* Adrian Cumiskey [mailto:adrian.cumis...@gmail.com] *Sent:* Sunday, August 15, 2010 12:28 PM *To:* fop-users@xmlgraphics.apache.org *Subject:* Re: Problem with creation of font cache on Windows 7 64 bit Hi Jonathan, I have just committed a fix to the missing cache-file configuration option (...
Re: Problem with creation of font cache on Windows 7 64 bit
Sorry Jonathan, I've just looked into the matter and realised that what I told you was incorrect (partially at least). If you take a look at http://xmlgraphics.apache.org/fop/1.0/configuration.html#general-elements you'll see that there is a cache-file option that you can provide to tell Fop where you would like your font cache file to be created. Unfortunately this documentation does not reflect the current state of the system. At some stage during further development of the font caching mechanism, this setting was lost as a configuration setting and instead Fop tries to always store the font cache file in the user's home directory. I will work this weekend on reinstating this feature and integrate it into the current font caching system. Cheers, Adrian. On 14 August 2010 09:09, Adrian Cumiskey adrian.cumis...@gmail.com wrote: Hi Jonathan, The font caching was written prior to the Windows 7 release so it was never tested at the time. There is currently no way of telling Fop where to put its font cache but it shouldn't be too much effort to add this feature. I'll look at adding support for this. Adrian. On 14 August 2010 05:38, Jonathan Levinson jonathan.levin...@intersystems.com wrote: On Windows XP, fop creates it font-cache in “C:\Documents and Settings\username\.fop”. I’ve had a couple of reports that on Windows 7 64 bit, fop puts its font cache in c:\.fop, a directory to which the user may not have write permissions. Is this a known issue? Is there a way of telling fop where to put the font cache? Best Regards, Jonathan Levinson
Re: Problem with creation of font cache on Windows 7 64 bit
Hi Jonathan, The font caching was written prior to the Windows 7 release so it was never tested at the time. There is currently no way of telling Fop where to put its font cache but it shouldn't be too much effort to add this feature. I'll look at adding support for this. Adrian. On 14 August 2010 05:38, Jonathan Levinson jonathan.levin...@intersystems.com wrote: On Windows XP, fop creates it font-cache in “C:\Documents and Settings\username\.fop”. I’ve had a couple of reports that on Windows 7 64 bit, fop puts its font cache in c:\.fop, a directory to which the user may not have write permissions. Is this a known issue? Is there a way of telling fop where to put the font cache? Best Regards, Jonathan Levinson
Re: ArrayIndexOutOfBoundsException
Hi Ismail, FOP 0.20 is really out of date (many years!) and not supported anymore. I'd recommend you update to the latest release (0.95) or trunk if its possible for you project. Adrian. On 3 February 2010 06:37, ismail.k...@polaris.co.in wrote: Hi All, We are using FOP 0.20 for PDF generation form XML and XSL in threads. We are facing the below issue frequently. The same XML and XSL is getting processed successfully separately. Please help. 2010-02-02 11:19:17,243 | FATAL | [Thread-30] | com.polaris.cash.lms.batchprocessing.JPBatchReports.JPEODBatchReports:convertToPDF(262) | Exception while converting xml file to pdf report:java.lang.ArrayIndexOutOfBoundsException: 6233 javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException: 6233 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:670) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:300) convertToPDF(JPEODBatchReports.java:249) Caused by: java.lang.ArrayIndexOutOfBoundsException: 6233 at org.apache.fop.fonts.TTFSubSetFile.scanGlyphs(TTFSubSetFile.java:592) at org.apache.fop.fonts.TTFSubSetFile.readFont(TTFSubSetFile.java:660) at org.apache.fop.render.pdf.fonts.MultiByteFont.getFontFile(MultiByteFont.java:241) at org.apache.fop.render.pdf.fonts.LazyFont.getFontFile(LazyFont.java:218) at org.apache.fop.pdf.PDFDocument.makeFontDescriptor(PDFDocument.java:974) at org.apache.fop.pdf.PDFDocument.makeFont(PDFDocument.java:875) at org.apache.fop.render.pdf.FontSetup.addToResources(FontSetup.java:250) at org.apache.fop.render.pdf.PDFRenderer.stopRenderer(PDFRenderer.java:249) at org.apache.fop.apps.StreamRenderer.stopRenderer(StreamRenderer.java:204) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:246) at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.java:182) at IND_IN9_IN92009101403.transform() at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:594) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:663) ... 9 more - java.lang.ArrayIndexOutOfBoundsException: 6233 at org.apache.fop.fonts.TTFSubSetFile.scanGlyphs(TTFSubSetFile.java:592) at org.apache.fop.fonts.TTFSubSetFile.readFont(TTFSubSetFile.java:660) at org.apache.fop.render.pdf.fonts.MultiByteFont.getFontFile(MultiByteFont.java:241) at org.apache.fop.render.pdf.fonts.LazyFont.getFontFile(LazyFont.java:218) at org.apache.fop.pdf.PDFDocument.makeFontDescriptor(PDFDocument.java:974) at org.apache.fop.pdf.PDFDocument.makeFont(PDFDocument.java:875) at org.apache.fop.render.pdf.FontSetup.addToResources(FontSetup.java:250) at org.apache.fop.render.pdf.PDFRenderer.stopRenderer(PDFRenderer.java:249) at org.apache.fop.apps.StreamRenderer.stopRenderer(StreamRenderer.java:204) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:246) at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.java:182) at IND_IN9_IN92009101403.transform() at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:594) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:663) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:300) convertToPDF(JPEODBatchReports.java:249) | Thanks Regards | Ismail Khan This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. Visit us at http://www.polaris.co.in - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: AFP document not printed
Hi Alessandro, First off, FOP doesn't currently support the embedding of fonts in resource files. You have to manually configure your printing environment to make those fonts available and then declare their use in your FOP configuration. I'm not familiar with that printer, infact I've just googled Océ PRISMA and I've learnt that it is some sort of workflow software, so I'm guessing that maybe the resource configuration on that system is different than a standard IBM Infoprint Manager printing environment. There have been a lot of changes/improvements in FOP's AFP support since the last release, so I'd also recommend that you try using trunk code until we find time to do another release. Adrian. ale.marin...@alice.it wrote: I tried to generate an AFP file following the documentation at http://xmlgraphics.apache.org/fop/0.95/output.html#afp. I used the FOP built-in Base14 fonts and I wrote a configuration file (included in attachment) using the xml snippet found in the docs. The document seems correct when visualized with the BTB Browser and with the AFP Workbench Viewer, but when I print it on an Océ PRISMA printer, I get the following error and nothing is being printed. 15/10/09 16:12:28 C006E Characterset CZH200 not found.(AFPLocalFontEnvironmentData::setCharacterset(const IString):716) Analyzing the file with AFP Datastream Analyzer I get the report below (I reported only the part relative to fonts): 3: BEGIN ACTIVE ENVIRONMENT GROUP :AEG1 4:MCF: Type 2 Repeating Group Fully Qualified Name: Font Character Set Reference CZH200 (Hex) C3E9C8F2F0F04040 Fully Qualified Name: Font Code Page Reference T1V10500 (Hex) E3F1E5F1F0F5F0F0 Character Rotation 000 Resource Local Identifier: Coded Font ResLID: 01 Font Descriptor Specification: not specified not specifiedvector transformed Ft Height 220 FtWidth 0 Font Horizontal Scale Factor: 220 Repeating Group Fully Qualified Name: Font Character Set Reference CZH200 (Hex) C3E9C8F2F0F04040 Fully Qualified Name: Font Code Page Reference T1V10500 (Hex) E3F1E5F1F0F5F0F0 Character Rotation 000 Resource Local Identifier: Coded Font ResLID: 02 Font Descriptor Specification: not specified not specifiedvector transformed Ft Height 160 FtWidth 0 Font Horizontal Scale Factor: 160 Repeating Group Fully Qualified Name: Font Character Set Reference CZH200 (Hex) C3E9C8F2F0F04040 Fully Qualified Name: Font Code Page Reference T1V10500 (Hex) E3F1E5F1F0F5F0F0 Character Rotation 000 Resource Local Identifier: Coded Font ResLID: 03 Font Descriptor Specification: not specified not specifiedvector transformed Ft Height 180 FtWidth 0 Font Horizontal Scale Factor: 180 5:PGD: X Units 2400 Y Units 2400 X Size 1984 Y Size 2806 Page Size: 8.26 11.69 6:PTD: X,Y Unit Base 10 in X,Y Units/Base: 2400 2400 X,Y Text Block Size: 1,984 2,806 7: END ACTIVE ENVIRONMENT GROUP :AEG1 (Bytes: 264) Analyzing a sample document included with the AFP Workbench Viewer program, I obtain: 4: BEGIN ACTIVE ENVIRONMENT GROUP :1 5:MCF:FONT_ID CODED_FONT CODE_PAGE CHAR_SET ROTATION 3T1GI0395 C1A05580 5T1GI0395 C1A075F0 6T1GI0395 C1A05580 6:PGD: X Units 2400 Y Units 2400 X Size 1323 Y Size 2040 Page Size: 5.51 8.50 7:CTC:(CONSTANT):2D00 8:PTD: X,Y Unit Base 10 in X,Y Units/Base: 2400 2400 X,Y Text Block Size: 1,323 2,040 9: END ACTIVE ENVIRONMENT GROUP :1 (Bytes: 194) There's the message Font Descriptor Specification: not specified for the document generated with FOP. Could it be the reason with it isn't printed? I seems that the charset defined in the FOP configuration file isn't included as a resource in the AFP file. Do I need declare something else in the xsl in order to include also the proper font? Thanks and regards, Alessandro ?xml version=1.0? fop version=1.0 source-resolution72/source-resolution target-resolution72/target-resolution default-page-settings height=11in width=8.26in/ renderers renderer
Re: Fop.next release?
Hi all, At the moment I am very busy working on something really important for a client, but I plan in the next few weeks to try and automate the release process a bit more. Thanks for the pointers Vincent. I can't make any promises though, it all depends on how much time I find :) All the best, Adrian. 2009/9/23 Vincent Hennebert vhenneb...@gmail.com Hi Peter, Peter Coppens wrote: So what can the community do to make this happen? Not much I’m afraid. This is a task that requires write access to the repository. It’s just time-consuming (and tedious). Actually, the most time-consuming part is updating the website and all the links. See the checklist here: http://xmlgraphics.apache.org/fop/dev/release.html If most of the points listed there could be automatized, that would be /extremely/ helpful. Maybe something can be done with Ant’s variable substitution mechanism ([1], among others). If anyone wants to give it a go... [1] http://www.javalobby.org/articles/ant-preprocessor/ Thanks for asking, Vincent Thanks Peter From: spepp...@leverkruid.eu Reply-To: fop-users@xmlgraphics.apache.org Date: Mon, 21 Sep 2009 18:41:18 +0200 To: fop-users@xmlgraphics.apache.org Subject: Re: Fop.next release? 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 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- Adrian.
Re: Page Overlay (IPO) Extension example
Hi Venkat, Currently afp:include-page-overlay / is only supported as a child of fo:simple-page-master master-name=simple as given in the example. You'll need to adjust org.apache.fop.render.afp.extensions.AFPPageSetupElement.startOfNode() to make this extension allowable in fo:page-sequencefo:flow. Then test it out, see if the IPO finds its way into the AFP output, if not you'll have to trace through the execution. Have fun :). Adrian. Venkat Reddy wrote: Hi, Can some one provide me a basic Page Overlay (IPO) Extension example FO file? I have gone through the AFP extensions http://xmlgraphics.apache.org/fop/trunk/output.html#afp-page-overlay fo:layout-master-set fo:simple-page-master master-name=simple afp:include-page-overlay name=O1SAMP1 / ... /fo:simple-page-master /fo:layout-master-set This defines a page overlay, but how to invoke this overlay in fo:page-sequencefo:flow? Thanks, Venkat. - 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: Missing FOP classes in fop.jar
Hi Chris, Details on how to subscribe to the FOP mailing list can be found at http://xmlgraphics.apache.org/fop/maillist.html#fop-user. I'm guessing from the missing imports, that you may have upgraded from FOP 0.20 to 0.95? Its good that you have upgraded as 0.20 is very old and is no longer supported. The architecture is very different in the newer 0.95 FOP so I'm afraid you'll have to do some rework on your integration. The 0.20 release is a bit before my time, but from what I can gather the org.apache.fop.apps.Driver class has been superceded by org.apache.fop.apps.FOPFactory. In any case a good place to start is to look at FOPFactory (see http://xmlgraphics.apache.org/fop/0.95/embedding.html) Adrian. ChrisH wrote: Dear Sirs Do not know how to subscribe or use mailing lists but need to know how I can resolve compilation errors because of the following missing imports in the latest fop.jar import org.apache.fop.apps.Driver; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.tools.DocumentInputSource; Where can I get these classes? Kindest regards Chris ** This email and any files transmitted with it are private and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. All communications sent to or from this organisation may be subject to recording, monitoring and/or interception in accordance with relevant legislation. This monitoring applies internally on the GCB GSi network, and may also apply externally on the GSi network to which we are connected. ** The original of this email was scanned for viruses by the Government Secure Intranet virus scanning service supplied by CableWireless in partnership with MessageLabs. (CCTM Certificate Number 2007/11/0032.) On leaving the GSi this email was certified virus free. Communications via the GSi may be automatically logged, monitored and/or recorded for legal purposes. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Write PageSegment,Overlay to the Resource Group
Hi Bharat, Sorry for the delay in getting back to you but I'm a little swamped with work at the moment. As you have probably already discovered objects are placed in resource groups using the afp:resource-level foreign attribute (see http://xmlgraphics.apache.org/fop/trunk/output.html#afp-foreign-attributes-resource). Unfortunately only images and svg objects are currently supported using fo:external-graphic/ and instream-foreign-object/. There is however underlying support for creating overlays within resource groups in org.apache.fop.afp.AFPDataObjectFactory.createResource (see line 226). So in order to achieve this feature you would need to implement a FOP AFP extension for overlays in org.apache.fop.render.afp.extensions (see other extension implementations in this package) and have it make use of the afp:resource-level foreign attribute. Then you would need to handle this new extension in org.apache.fop.render.afp.AFPDocumentHandler.handleExtensionObject() and maybe also in org.apache.fop.render.afp.AFPRenderer.renderPageObjectExtensions() for backwards compatibility. You would also need to make some additional changes to resourceManager.createObject() and make a call to it, passing it a DataObjectInfo implementation which contains details of the overlay. The AFPResourceManager then in turn deligates the creation of resources to the AFPDataObjectFactory by making a call to dataObjectFactory.createResource(). Unfortunately I do not have any time to help implement this, I only have minimal time to spend on FOP due to other work commitments, but I would be happy to help you further and will try to support you with the implementation either on or off list. Adrian. attaluri1210 wrote: Andreas, I am able to write the page segment and Overlay e.t.c in the AFP output file. But what i am looking is how to write it in the resource group. Say for example if we write a external image and give the below in config resource-group-fileresources.afp/resource-group-file default-resource-levels goca=print-file bitmap=print-file/ the image will be written in the resource group. In the same manner when i write a overlay i was not able to see it in the resource group. Sorry, if i have to be still be more specific. Thanks, Bharat Andreas Delmelle-2 wrote: On 16 Jun 2009, at 06:04, attaluri1210 wrote: Hi Bharat Can any one Guide me how to write PageSegment,Overlay e.t.c in to the Resource Group. Can you be more specific? What precisely is missing from the samples provided at http://xmlgraphics.apache.org/fop/0.95/output.html#afp-extensions ? Does this feature included in the Trunk?. Yes, it was already supported in 0.95. Regards Andreas - 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: BCOCA Barcode Support in FOP
Hi Vijay, There is currently no BCOCA support in FOP's AFP libraries. Someone did have a go at at implementing this feature some time ago but the patch was not in an appliable state https://issues.apache.org/bugzilla/show_bug.cgi?id=41995. This work would be a good starting point for you. Adrian. vvijay wrote: We are trying to generate barcode in AFP output. We used barcode4j in FOP to generate this barcode. Barcode in the AFP output file was generated in GOCA format. However, we need to generate the barcode in BCOCA format. Is this supported in the latest version of FOP? If so, how can we achieve this? Thank you, Vijay - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Can we compress the images in AFP output?
Hi Bharat, If your AFP environment supports it, you could try embedding you images natively (instead of IOCA FS45) using the images native=true/ user configuration option (see http://xmlgraphics.apache.org/fop/trunk/output.html#afp-image-config). Adrian. attaluri1210 wrote: Hi Everybody, I am using FOP for generating the AFP output from the FO file. When we have the color Images with say 300dpi (which is not possible to use them as page segment as they come dynamically), the AFP output file size is too big. Is there a way that i can compress the images? So, that the file size will not be too long. or is there any other way to handle this kind of situation. Thanks in advance. Regards, Bharat - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Can we compress the images in AFP output?
Hi Bharat, Yes your output file size should be much smaller especially if you have repeated images. But do check that your AFP environment supports the image type you are embedding. Adrian. attaluri1210 wrote: Hi, Thanks for the very quick reply. Is that going to decrease my output file size? Thanks, Bharat Adrian Cumiskey-2 wrote: Hi Bharat, If your AFP environment supports it, you could try embedding you images natively (instead of IOCA FS45) using the images native=true/ user configuration option (see http://xmlgraphics.apache.org/fop/trunk/output.html#afp-image-config). Adrian. attaluri1210 wrote: Hi Everybody, I am using FOP for generating the AFP output from the FO file. When we have the color Images with say 300dpi (which is not possible to use them as page segment as they come dynamically), the AFP output file size is too big. Is there a way that i can compress the images? So, that the file size will not be too long. or is there any other way to handle this kind of situation. Thanks in advance. Regards, Bharat - 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: Media or paper tray selection in FOP for AFP rendering
Hi Vijay, Sorry to hear you are new to the AFP format, you have a lot of reading to do! :-). Also apologies for the delay in getting back to you but I really have no free time at the moment. First of all I'd recommend you take a look at http://wiki.apache.org/xmlgraphics-fop/AFPResources. Follow the link http://www.elink.ibmlink.ibm.com/public/applications/publications/cgibin/pbi.cgi on this page and enter publication reference SC31-6802-06 to download the MO:DCA reference guide. I suggest you take a look at Begin Medium Map (see page 122), and Map Media Type structured field (see page 260) and also Media Type Identifiers in the MO:DCA Registry (see page 544) - I say, what a lovely, easy to read reference guide... ;-). Hope this points you in the right direction and good luck! Adrian. vvijay wrote: Any pointers would be greatly appreciated. We are very new to AFP format and if possible pointers to detailed instructions/documntation/ideas will be greatly helpful. Thanks. Vijay Adrian Cumiskey-2 wrote: Hi, There is currently no support for this. I have no time at the moment to implement this feature, but let me know if you would like some pointers and I'll try to help. Adrian. 2009/5/23 vvijay vij...@me.com I have seen some discussion in 2006 in this forum about Media or paper tray selection in FOP. There were some proposals but I haven't seen any documentation in the latest version regarding this issue (other than postscript extensions) Is there a way to specify media/tray selection in FOP for AFP rendering? Thanks. -- View this message in context: http://www.nabble.com/Media-or-paper-tray-selection-in-FOP-for-AFP-rendering-tp23681345p23681345.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: Media or paper tray selection in FOP for AFP rendering
Hi Vijay, There is a specialist AFP list at http://lists.topica.com/lists/afp-l that you can subscribe to. Its not a very active list but there are a lot of knowledgeable subscribers who work at IBM and Infoprint Solutions Company who may be able to help you. Good luck. Adrian. 2009/5/27 vvijay vij...@me.com Hi Adrian, I appreciate you taking the time to respond to my request. We will go through the reference material suggested by you. Is this the right forum to post any FOP/AFP related questions. I do have a few more issues we are trying to resolve and wondering if there is another forum for these specific issues. Thank you, Vijay Adrian Cumiskey-2 wrote: Hi Vijay, Sorry to hear you are new to the AFP format, you have a lot of reading to do! :-). Also apologies for the delay in getting back to you but I really have no free time at the moment. First of all I'd recommend you take a look at http://wiki.apache.org/xmlgraphics-fop/AFPResources. Follow the link http://www.elink.ibmlink.ibm.com/public/applications/publications/cgibin/pbi.cgi on this page and enter publication reference SC31-6802-06 to download the MO:DCA reference guide. I suggest you take a look at Begin Medium Map (see page 122), and Map Media Type structured field (see page 260) and also Media Type Identifiers in the MO:DCA Registry (see page 544) - I say, what a lovely, easy to read reference guide... ;-). Hope this points you in the right direction and good luck! Adrian. vvijay wrote: Any pointers would be greatly appreciated. We are very new to AFP format and if possible pointers to detailed instructions/documntation/ideas will be greatly helpful. Thanks. Vijay Adrian Cumiskey-2 wrote: Hi, There is currently no support for this. I have no time at the moment to implement this feature, but let me know if you would like some pointers and I'll try to help. Adrian. 2009/5/23 vvijay vij...@me.com I have seen some discussion in 2006 in this forum about Media or paper tray selection in FOP. There were some proposals but I haven't seen any documentation in the latest version regarding this issue (other than postscript extensions) Is there a way to specify media/tray selection in FOP for AFP rendering? Thanks. -- View this message in context: http://www.nabble.com/Media-or-paper-tray-selection-in-FOP-for-AFP-rendering-tp23681345p23681345.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://www.nabble.com/Media-or-paper-tray-selection-in-FOP-for-AFP-rendering-tp23681345p23750539.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 -- Adrian.
Re: Media or paper tray selection in FOP for AFP rendering
Hi, There is currently no support for this. I have no time at the moment to implement this feature, but let me know if you would like some pointers and I'll try to help. Adrian. 2009/5/23 vvijay vij...@me.com I have seen some discussion in 2006 in this forum about Media or paper tray selection in FOP. There were some proposals but I haven't seen any documentation in the latest version regarding this issue (other than postscript extensions) Is there a way to specify media/tray selection in FOP for AFP rendering? Thanks. -- View this message in context: http://www.nabble.com/Media-or-paper-tray-selection-in-FOP-for-AFP-rendering-tp23681345p23681345.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
Re: Performance of Apache FOP
Hi Tobias, Do you use many page sequences in your FO documents? FOP processes documents by page sequence so if you can section the document contents into lots of small page sequence segments this can help a lot with memory consumption. Good luck! Adrian. Tobias Anstett [k15t.com] wrote: Hi, We are using Apache FOP inside a web-app deployed within Apache Tomcat. When the FO documents get to big (~20MB) we are getting out of memory exceptions (java heap space overflows) while transforming FO to PDF. We already assigned more than 1024m to the JVM but still get not rid of this problem. I already checked the http://xmlgraphics.apache.org/fop/0.94/embedding.html#performance documentation but it seams that we did everything like suggested. Any ideas? Cheers, Tobias - 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: How to create version 2.0 PS files
Hi Frank, I don't think you are missing anything, I think it may be a bug. Having stepped through the code, %!PS-Adobe-3.0 is always written as the first line of the header regardless of the language level. Could you please send us a bug report at https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop and someone will take a look at the problem. I'll try to find some time later this week. Thanks, Adrian. Frank Niedermann wrote: Hi Adrian, thanks for the link. This is my fopConfiguration.xml file: fop renderers renderer mime=application/postscript auto-rotate-landscapetrue/auto-rotate-landscape language-level2/language-level /renderer /renderers /fop And this is how I load this configuration file: String fopConfiguration = fopConfiguration.xml; FopFactory fopFactory = FopFactory.newInstance(); fopFactory.setUserConfig(new File(fopConfiguration)); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); But it still creates version 3 PS-files (I checked the header). Am I missing something else? Thanks, Frank Adrian Cumiskey-2 wrote: Hi Frank, Yes, you can do this with the language-level configuration option (see http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration). Adrian. Frank Niedermann wrote: Hi, we are using Apache FOP to create PS files which should be printed on a HP-Unix machine. Unfortunately this machine only supports version 2.0 PS files: %!PS-Adobe-2.0 Apache FOP creates version 3.0 PS files which are ignored by the HP-Unix print system. Is there a way to tell FOP to generate version 2.0 PS files? Thanks, Frank - 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: How to create version 2.0 PS files
Hi Frank, Yes, you can do this with the language-level configuration option (see http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration). Adrian. Frank Niedermann wrote: Hi, we are using Apache FOP to create PS files which should be printed on a HP-Unix machine. Unfortunately this machine only supports version 2.0 PS files: %!PS-Adobe-2.0 Apache FOP creates version 3.0 PS files which are ignored by the HP-Unix print system. Is there a way to tell FOP to generate version 2.0 PS files? Thanks, Frank - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Font registration
I did *some* cleaning up of the font configuration recently (http://svn.apache.org/viewvc?view=revrevision=756522). This should make it a little easier to programmatically hook into FOP's font configuration. PrintRendererConfigurator no longer has all the nuts and bolts that it once did which should make things easier for you. I suggest you take a look at FontInfoConfigurator (http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfoConfigurator.java?view=markuppathrev=756522) and FontDetector (http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontDetector.java?view=markuppathrev=756522) which you should be able to use independently. If you have any questions or need some more help or pointers just ask :). Good luck, Adrian. Jeremias Maerki wrote: It's a known issue that programmatic font configuration is not ideal at the moment. I see two possible routes short of doing the full refactoring of the font subsystem that would be the ideal solution but take a lot of effort: 1. Take a look at PrintRendererConfigurator to see how you could emulate the auto-detection from outside FOP: http://svn.eu.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/PrintRendererConfigurator.java?view=markup 2. Create the XML configuration in code by constructing DefaultConfiguration (from Avalon Framework) elements. This works much like a DOM. You can then pass the Configuration object to the FopFactory. HTH On 11.03.2009 22:02:21 Steve Ebersole wrote: I develop a maven plugin which does docbook processing. It's a little different in that it utilizes maven's artifact/dependency capabilities to pull the individual pieces (xslt, images, css, etc) together dynamically. I'd love for the same to happen with fonts with the fop/dpf processing. looking over http://xmlgraphics.apache.org/fop/trunk/fonts.html and http://xmlgraphics.apache.org/fop/trunk/fonts.html#autodetect but am not really seeing the way to do this. The main issue is that this most all be accomplished programatically in my plugin code. Of course part of the problem is that I really have no background in fop nor docbook :) Anyway, does anyone have thoughts on how this might be cool to accomplish? - Steve Ebersole Project Lead http://hibernate.org st...@hibernate.org Principal Software Engineer JBoss, a division of Red Hat http://jboss.com http://redhat.com steve.ebers...@jboss.com steve.ebers...@redhat.com Jeremias Maerki - 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: Font registration
Hi Jason, It really depends on which aspects of FOP's font system you wish to hook into, the changes I made were a start at what needs to be done, unfortuntely I do not have any time to go further with this at the moment. From what I can gather from what you are saying, you will indeed need to create a userConfig as this type of configuration is not yet available. Adrian. Jason Harrop wrote: This wasn't my thread, and I don't mean to take it over, but when I was trying to do this last Friday I saw that PrintRenderer has addFontList(ListEmbedFontInfo fontList), and thought that all I needed was to access PrintRenderer. But that I couldn't do (unless I set up my own from scratch?). So I do more or less what Jeremias suggested - I use my ListEmbedFontInfo fontList to create a userConfig, and go from there. thanks Jason On Tue, Mar 24, 2009 at 10:30 PM, Adrian Cumiskey d...@cumiskey.com wrote: I did *some* cleaning up of the font configuration recently (http://svn.apache.org/viewvc?view=revrevision=756522). This should make it a little easier to programmatically hook into FOP's font configuration. PrintRendererConfigurator no longer has all the nuts and bolts that it once did which should make things easier for you. I suggest you take a look at FontInfoConfigurator (http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfoConfigurator.java?view=markuppathrev=756522) and FontDetector (http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontDetector.java?view=markuppathrev=756522) which you should be able to use independently. If you have any questions or need some more help or pointers just ask :). Good luck, Adrian. Jeremias Maerki wrote: It's a known issue that programmatic font configuration is not ideal at the moment. I see two possible routes short of doing the full refactoring of the font subsystem that would be the ideal solution but take a lot of effort: 1. Take a look at PrintRendererConfigurator to see how you could emulate the auto-detection from outside FOP: http://svn.eu.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/PrintRendererConfigurator.java?view=markup 2. Create the XML configuration in code by constructing DefaultConfiguration (from Avalon Framework) elements. This works much like a DOM. You can then pass the Configuration object to the FopFactory. HTH On 11.03.2009 22:02:21 Steve Ebersole wrote: I develop a maven plugin which does docbook processing. It's a little different in that it utilizes maven's artifact/dependency capabilities to pull the individual pieces (xslt, images, css, etc) together dynamically. I'd love for the same to happen with fonts with the fop/dpf processing. looking over http://xmlgraphics.apache.org/fop/trunk/fonts.html and http://xmlgraphics.apache.org/fop/trunk/fonts.html#autodetect but am not really seeing the way to do this. The main issue is that this most all be accomplished programatically in my plugin code. Of course part of the problem is that I really have no background in fop nor docbook :) Anyway, does anyone have thoughts on how this might be cool to accomplish? - Steve Ebersole Project Lead http://hibernate.org st...@hibernate.org Principal Software Engineer JBoss, a division of Red Hat http://jboss.com http://redhat.com steve.ebers...@jboss.com steve.ebers...@redhat.com Jeremias Maerki - 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 - 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: FOP and AFPDS
Hi Davide, 2008/12/15 Davide Daccico ddacc...@ebilling.it: Hi, I'm new on FOP (but legacy afp expert which could help apache community) and would like to know evaluate AFP renderer capabilities. I really need some info: 1) How to setup a simple job to render an AFPDS stream (with embedded fonts); Currently there is no support for embedded fonts, only referenced IBM raster and outline fonts. There is no support for embedded true type fonts which would certainly be a valuable additional feature which I think many users could benefit from. This is something I could help you with. 2) Get an AFP roadmap about FOP engine (what/when about improvements); As far as I am aware I don't believe there is an AFP roadmap as such and I am unaware of any interested parties at the moment in improving the AFP support in FOP. 3) Get the list of consultant/developers involved on AFP renderer. I have the most recent knowledge of the AFP renderer code, I know the code and I know AFP having worked on that area of FOP for a number of months, rewriting much of it when adding the SVG -- GOCA support, resource group and image handling. I would be happy to help you with any questions that you may have. Kind regards, Adrian Cumiskey. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Problem upgrading from 0.94 to 0.95
Also it may be helpful if you are able to tell us which version of JEuclid you are using. Adrian. Adrian Cumiskey wrote: Hi Paul, The NullPointerException is coming from the ImageInputStream being null. This looks like one for Max as I suspect it may be a problem with the JEuclid PreloaderMathML class when it constructs its ImageInputStreamAdapter. Could you host your source document somewhere and I'll take a look at it. Adrian. Nobble wrote: I have upgraded from fop 0.94 to 0.95. However, when I try to compile my document I now get: Making portrait pages on A4 paper (210mmx297mm) 05-Nov-2008 10:24:54 org.apache.fop.cli.Main startFOP SEVERE: Exception java.lang.NullPointerException 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) - java.lang.NullPointerException at org.apache.xmlgraphics.image.loader.util.ImageInputStreamAdapter.mark(ImageInputStreamAdapter.java:77) at java.io.FilterInputStream.mark(FilterInputStream.java:175) at net.sourceforge.jeuclid.xmlgraphics.PreloaderMathML.parseSource(PreloaderMathML.java:119) at net.sourceforge.jeuclid.xmlgraphics.PreloaderMathML.preloadImage(PreloaderMathML.java:76) at org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:165) at org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:96) at org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:112) at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79) at org.apache.fop.fo.FObj.processNode(FObj.java:126) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:286) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) 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) I this a bug or something I have done wrong? I am not sure how to go about debugging it. Any help gratefully received. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem upgrading from 0.94 to 0.95
Paul, I think you may have a classpath problem as the PreloaderMathML class now resides in org.apache.fop.mathml package (as part of FOP 0.95), not net.sourceforge.jeuclid.xmlgraphics anymore - you may need to upgrade your JEuclid too. Adrian. Adrian Cumiskey wrote: Hi Paul, The NullPointerException is coming from the ImageInputStream being null. This looks like one for Max as I suspect it may be a problem with the JEuclid PreloaderMathML class when it constructs its ImageInputStreamAdapter. Could you host your source document somewhere and I'll take a look at it. Adrian. Nobble wrote: I have upgraded from fop 0.94 to 0.95. However, when I try to compile my document I now get: Making portrait pages on A4 paper (210mmx297mm) 05-Nov-2008 10:24:54 org.apache.fop.cli.Main startFOP SEVERE: Exception java.lang.NullPointerException 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) - java.lang.NullPointerException at org.apache.xmlgraphics.image.loader.util.ImageInputStreamAdapter.mark(ImageInputStreamAdapter.java:77) at java.io.FilterInputStream.mark(FilterInputStream.java:175) at net.sourceforge.jeuclid.xmlgraphics.PreloaderMathML.parseSource(PreloaderMathML.java:119) at net.sourceforge.jeuclid.xmlgraphics.PreloaderMathML.preloadImage(PreloaderMathML.java:76) at org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:165) at org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:96) at org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:112) at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79) at org.apache.fop.fo.FObj.processNode(FObj.java:126) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:286) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) 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) I this a bug or something I have done wrong? I am not sure how to go about debugging it. Any help gratefully received. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Font autodetection yields Out-of-Memory error
Hi Ingo, You definitely have a bad font somewhere on your system. I have just committed a small change to the latest FOP code which should make the string parsing a little more robust by catching the EOF exception case and when an erroneous PFM file is encountered. Hopefully you will be able to locate the offending font now. Adrian. Ingo Maas wrote: Hi Adrian, the fonts are original Adobe fonts, which I took for tests from older Acrobat Reader. Therefore, they are trustworthy, at least more than those Ghostscript fonts, which have failed for me in metrics generation. Having a look at PFMInputStream.readString(), it is evident what is going wrong. The stream only catches zero terminations but not EOF (i.e. -1). Wouldn't make it sense to catch EOF here as well? Greetings, Ingo -Ursprüngliche Nachricht- Von: Adrian Cumiskey [mailto:[EMAIL PROTECTED] Gesendet: Montag, 8. September 2008 18:15 An: fop-users@xmlgraphics.apache.org Betreff: Re: Font autodetection yields Out-of-Memory error Hi Ingo, Looking at the stack trace it doesn't look to be a problem with font autodetection, more to do with a parsing problem on one of your PFM files. I'm guessing it must be an erroneous one as I wasn't able to reproduce the problem with the PFM font file that I tried. Could you try isolating which PFM file is the offending one? You should be able to see which font file is causing you the problem by changing your LOGLEVEL variable towards the bottom of your fop launcher file to info or debug and then relaunching. Adrian. Ingo Maas wrote: Hallo, In font autodetection seems to be a bug, introduced sometime in June/July. I hoped that this has been fixed in 0.95 or current trunk, but it has not. See stacktrace for current trunk below. Regards, Ingo Stacktrace: java.lang.OutOfMemoryError: Java heap space at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.apache.fop.fonts.type1.PFMInputStream.readString(_PFMInputStream.java:10 2_) at org.apache.fop.fonts.type1.PFMFile.loadHeader(_PFMFile.java:135_) at org.apache.fop.fonts.type1.PFMFile.load(_PFMFile.java:108_) at org.apache.fop.fonts.type1.Type1FontLoader.read(_Type1FontLoader.java:102_) at org.apache.fop.fonts.FontLoader.getFont(_FontLoader.java:171_) at org.apache.fop.fonts.FontLoader.loadFont(_FontLoader.java:120_) at org.apache.fop.fonts.FontLoader.loadFont(_FontLoader.java:98_) at org.apache.fop.fonts.autodetect.FontInfoFinder.find(_FontInfoFinder.java:251 _) cut…cut/ -- Ernst Basler + Partner GmbH Ingo Maas Tuchmacherstraße 47 DE-14482 Potsdam +49 331 74 75 9 0 (Zentrale) +49 331 74 75 9 78 (Direkt) +49 331 74 75 9 90 (Fax) Geschäftsführer: Dr. Ludger Paus Amtsgericht Potsdam - HRB 6362 P USt-Id Nr. 152768391 mailto:[EMAIL PROTECTED] http://www.ebp.de - 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: Font autodetection yields Out-of-Memory error
Hi Ingo, Looking at the stack trace it doesn't look to be a problem with font autodetection, more to do with a parsing problem on one of your PFM files. I'm guessing it must be an erroneous one as I wasn't able to reproduce the problem with the PFM font file that I tried. Could you try isolating which PFM file is the offending one? You should be able to see which font file is causing you the problem by changing your LOGLEVEL variable towards the bottom of your fop launcher file to info or debug and then relaunching. Adrian. Ingo Maas wrote: Hallo, In font autodetection seems to be a bug, introduced sometime in June/July. I hoped that this has been fixed in 0.95 or current trunk, but it has not. See stacktrace for current trunk below. Regards, Ingo Stacktrace: java.lang.OutOfMemoryError: Java heap space at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.apache.fop.fonts.type1.PFMInputStream.readString(_PFMInputStream.java:102_) at org.apache.fop.fonts.type1.PFMFile.loadHeader(_PFMFile.java:135_) at org.apache.fop.fonts.type1.PFMFile.load(_PFMFile.java:108_) at org.apache.fop.fonts.type1.Type1FontLoader.read(_Type1FontLoader.java:102_) at org.apache.fop.fonts.FontLoader.getFont(_FontLoader.java:171_) at org.apache.fop.fonts.FontLoader.loadFont(_FontLoader.java:120_) at org.apache.fop.fonts.FontLoader.loadFont(_FontLoader.java:98_) at org.apache.fop.fonts.autodetect.FontInfoFinder.find(_FontInfoFinder.java:251_) cut…cut/ -- Ernst Basler + Partner GmbH Ingo Maas Tuchmacherstraße 47 DE-14482 Potsdam +49 331 74 75 9 0 (Zentrale) +49 331 74 75 9 78 (Direkt) +49 331 74 75 9 90 (Fax) Geschäftsführer: Dr. Ludger Paus Amtsgericht Potsdam - HRB 6362 P USt-Id Nr. 152768391 mailto:[EMAIL PROTECTED] http://www.ebp.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multithreading issue with fonts for PDF/Postscript renderers
Hi Ingo, Many thanks for reporting this problem. My guess is that the static (and unsynchronized) createFontKey() method in org.apache.fop.fonts.FontInfo may be causing the problem... I will commit a fix shortly and then will ask you to update your FOP trunk and re-test. Adrian. Ingo Maas wrote: Hi, I’m in serious trouble running 20 threads in parallel for PDF and Postscript rendering. Each thread uses an own FOUserAgent created by a singleton FopFactory. I’m using FOP trunk compiled at 2008-06-03. Below you can see a typical stacktrace. One of the LayoutManager-s tries to retrieve a Font instance from a FontInfo object. The returned instance is null and so a NullPointerException will be thrown at the first access to the Font reference. Usually the first PDF/PS files will be produced fine but at some point some (not all!) of the remaining tasks fail. Any help on this is very appreciated. Regards, Ingo Stacktrace: java.lang.NullPointerException at org.apache.fop.fonts.Font.getAscender(Font.java:105) at org.apache.fop.layoutmgr.inline.AlignmentContext.init(AlignmentContext.java:127) at org.apache.fop.layoutmgr.inline.InlineLayoutManager.getNextKnuthElements(InlineLayoutManager.java:254) at org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LineLayoutManager.java:658) at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:594) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:298) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:118) at org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElements(BlockContainerLayoutManager.java:287) at org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthElements(TableCellLayoutManager.java:150) at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForRowGroup(RowGroupLayoutManager.java:119) at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElements(RowGroupLayoutManager.java:61) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:234) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:173) at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:249) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:298) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:118) at org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthElements(TableCellLayoutManager.java:150) at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForRowGroup(RowGroupLayoutManager.java:119) at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElements(RowGroupLayoutManager.java:61) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:220) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:173) at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:249) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:298) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:118) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:298) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:118) at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:109) at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:142) at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:552) at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:134) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:302) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:264) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:106) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234) at
Mapping font references to a base 14 font
Hi all, As most of you probably already know, you are currently able to map font references to a custom font as follows :- !-- register a particular font -- font metrics-url=file:///C:/myfonts/FTL_.xml kerning=yes embed-url=file:///C:/myfonts/FTL_.pfb font-triplet name=FrutigerLight style=normal weight=normal/ /font But currently there is no provision for mapping a font reference to a base 14 font. I am looking to implement this feature and suggest the following configuration :- !-- register a font reference 'FrutigerLight' as the base 14 font 'Times' -- font base14=Times style=italic weight=normal font-triplet name=FrutigerLight style=italic weight=normal/ /font And possibly... font base14=Times font-triplet name=FrutigerLight / /font ...could map all flavours of FrutigerLight (style=normal,bold,italic weight=normal,bold) references to matching base 14 'Times' font flavours? Or should it just default to normal? Hope some people will find this new feature useful, and any suggestions or feedback on these suggested configurations would be gratefully appreciated. Adrian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AFP - Adding Page-Groups
Hi Fatih, What you are describing seems not to be available in 0.94 or 0.93. Without checking I'm guessing they were available in 0.20 and somehow got lost, can anyone verify this? My changes in the Temp_AFPGOCAResources code branch will include a new page group being created for each fo:page-sequence/ encountered (which is currently not the case). I will also verify this functionality you describe is working correctly and these features should make their way back into the latest FOP. Adrian. Fatih Piristine wrote: Hi guys, I want to add page-groups in to afp files including TLEs but still could not figure it out how. the oldest version of AFP renderer uses these tag to add them: ?xml version=1.0 encoding=utf-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:afp=http://org.apache.fop/extensions/afp; afp:page-group id=PAG001 afp:tag-logical-element name=HRNO value=HR001/ afp:tag-logical-element name=STAFFNO value=ST001/ afp:tag-logical-element name=NAME value=NAME001/ afp:tag-logical-element name=LASTNAME value=LAST001/ afp:tag-logical-element name=HOURSINBANK value=20/ afp:tag-logical-element name=WEEKENDINGDATE value=20080312/ /afp:page-group ... Do you know how to add them in FOP v0.94?? thanks. Fatih - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AFP output. Testing tool winafp
Many thanks for the information Tom, I'll try out his application - although I use three for testing already! Any tips, advice that the FOP community are able to offer would be much appreciated as AFP is not the easiest format to test/debug/develop due to its extensive nature, mammoth documentation, poor testing tools and binary format. Adrian. Tommo_doc_partner wrote: This is not a question but information for those working on modifications to the AFP output from FOP. I noticed that some people were looking for tools to debug and examine the internal structure of AFP. My friend and colleague, Marc G, has a tool that is available from his web site, WinAFP.com. He knows more about AFP than is healthy for anyone, but he does no his stuff. Im sure he may help with any technical questions about AFP, structured fields, formdef, etc . Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
GUI Configuration Tool
Even though FOP configuration is quite well documented (http://xmlgraphics.apache.org/fop/0.94/configuration.html), I think there is a need for a FOP configuration tool. It would help new users get up and running quickly and allow existing users to easily manage their existing configurations. Maybe even provide an automated 0.20 to 0.93 upgrade path. Users would then not have to (initially at least) spend much time learning the fine details of FOP xml configuration schema and would save a lot of time with questions on the users forum. I was thinking it could be a simple swing app. It would certainly be a good starter project for anyone interested in familiarizing themselves with the FOP code base. So the first question I ask is, would the user community find such a tool useful? And - any volunteers? :) Adrian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AFP: missed FormDef
Hi Fatih, ResourceGroups are not currently supported in AFP, but I am currently working on this and support for this feature should appear shortly in the latest FOP trunk code. Adrian. Fatih Piristine wrote: I want to add form definition tags ( called BRG; Begin Resource Group ) in AFP file. Somehow i could not find any tips or fo sample for this. I have checked so many websites and tried some other tools... could anyone help me with this?? Thanks Miller - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Rendering time configuration settings using fo:declarations
Hi all, A thought occurred to me whilst implementing something and I thought I would share it with you.. I don't have time to implement this but maybe somebody else would like to pick up this idea/suggestion... Basically, I was wondering if anyone thought it would be a useful feature to be able to provide renderer configuration settings within the fo:declarations section of an FO document? These settings could resemble and override any user configuration settings that may have been set at startup time through the API or user configuration file (e.g. fop.xconf). So the top of your FO document might look something like the following :- fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:declarations fox:strict-validationtrue/fox:strict-validation fox:renderers fox:renderer mime=application/postscript /fox:renderer fox:renderer mime=application/pdf /fox:renderer . /fox:renderers /fo:declarations fo:layout-master-set /fo:root Something like this shouldn't be too difficult to implement (any volunteers?) and I think it might provide quite a bit of value. It would be important to remember that the lifetime of these settings would only remain within the rendering run of the particular document that is being processed and subsequent documents being processed would revert back to FOP's default startup time settings. Adrian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.94 - API access to font directory
Hi Peter, I'm not quite sure why this feature would be useful, maybe it would be helpful if you could explain your requirement for this? Currently there is no public API for this. Anyhow, if you really need to make a programmatic customization you might want to take a look at buildFontListFromConfiguration() in src/java/org/apache/fop/render/PrintRendererConfigurator.java. Hope this helps, Adrian. On 30/10/2007, Peter Coppens [EMAIL PROTECTED] wrote: Dear Fop-fans, Is there a way, using the API to change the font directory as configured in the directory element in the config file. I can find the value somewhere deep in the user configuration object (FopFactory.getUserConfig) and I guess I could change that value, but I am not sure whether that would actually do something useful. Thanks, Peter -- View this message in context: http://www.nabble.com/FOP-0.94---API-access-to-font-directory-tf4720666.html#a13495749 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: font configuration
Hi Steve, I think the best way for you to achieve this is to extend the RendererConfigurator implementing class for the renderer you wish to programmatically change the fonts for. You will then need to update the instance reference to your new class in the getConfigurator() method in the corresponding RendererMaker. Both the implementing RendererMaker and RendererConfigurator can be found in packages org.apache.fop.render.xxx (where xxx is the name of the implementing renderer). Hope this helps point you in the right direction, Adrian. Steve Ebersole wrote: Following http://xmlgraphics.apache.org/fop/0.94/fonts.html, http://xmlgraphics.apache.org/fop/0.94/configuration.html and http://xmlgraphics.apache.org/fop/0.94/embedding.html#config-internal, I could not see a mechanism for programatically telling FOP about fonts. Can anyone show me how this can be achieved? Thanks, Steve - 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: Postscript Level 1?
I'm not exactly sure how stripped back postscript level 1 is and what its limitations are. But looking through the code the language-level setting is referenced only where postscript image generation is taking place and the tests seem to be upwards of level 2, 3 and 4. Adrian. Johannes Katelaan wrote: Hi, perhaps somebody can help me answering the following question: Is there a way to force fop 0.94 to generate Level 1 PostScript? I tried to set language-level in the configuration file. But this seems to have no effect at all. Johannes - 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: Help needed for generating RTF using FOP 0.94
Hi Anjuli, Please file a bug at http://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop. Please also remember to attach the FO input file that you used to the bug report. This should really help someone investigate the problem. Cheers, Adrian. [EMAIL PROTECTED] wrote: Hi, I am trying to generate *RTF* from *XSL: FO* using *FOP 0.94*. but while transforming I am getting the following error. Can anyone help me in this regard to solve the issue? java.lang.NoSuchFieldError: org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTableRow: field ATTRIB_ROW_PADDING not found at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTableRow.writePaddingAttributes(RtfTableRow.java:352) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTableRow.writeRowAndCellsDefintions(RtfTableRow.java:166) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTableRow.writeRtfContent(RtfTableRow.java:143) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFile.flush(RtfFile.java:219) at org.apache.fop.render.rtf.RTFHandler.endDocument(RTFHandler.java:181) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:171) at org.apache.xalan.transformer.TransformerIdentityImpl.endDocument(TransformerIdentityImpl.java:962) at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at ExampleFO2RTF.convertFO2RTF2(ExampleFO2RTF.java:146) at ExampleFO2RTF.main(ExampleFO2RTF.java:170) Exception in thread main **Thanks Regards** **Anjuli** Accenture - IDC Chennai Delivery Center Mail: [EMAIL PROTECTED] DID: +91-44-42674485 || Mobile: (+91) 9884072108 || AIM: anjulidamele ||MSN: anjuli.damele || Gmail! Id: [EMAIL PROTECTED] This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with postscript extension
Hi Ahmed, The first question I have is which version of FOP are you using? I believe the new extensions that I developed were very recently committed to the latest and greatest FOP trunk repository. If you are using FOP 0.94/0.93 you won't have these new features in the code and you will need to download the latest trunk source code using a subversion client and build your own (see http://xmlgraphics.apache.org/fop/dev/tools.html) for details. Adrian. [EMAIL PROTECTED] wrote: Hello, I am very insterested by FOP postscript extensions as descibed in http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript (by Adrian Cumiskey and Jeremias Maerki). But when I tried to execute the given example, I've got following error: Error(6/46): No element mapping definition found for (Namespace URI: http://xmlgraphics.apache.org/fop/postscript;, Local Name: ps-setpagedevice)javax.xml.transform.TransformerException: So the question is: how to obtain and install this extension for FOP? I haven't found web issues before posting this message. Thank you for any help. Ahmed HADDAD. - 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 task, what changed from 0.92beta to 0.94?
Hi Charles I'd advise you to check your java classpath, it sounds like you might have an old version of xmlgraphics-commons hanging around causing mischief. Fop 0.94 should be using xmlgraphics-commons-1.3svn.jar which comes in the lib folder of the distribution. Adrian. [EMAIL PROTECTED] wrote: I recently downloaded FOP version 0.94, upgrading from 0.92beta. My build.xml file now fails when I execute the fop task, giving this error: build.xml:105: java.lang.NoClassDefFound Error: org/apache/xmlgraphics/util/Service It seems that something has changed in FOP that breaks the Ant FOP task, but I don't see anything concerning this on the FOP or Ant site. All upgrade information concerns upgrading from 0.20, but I can't find any mention of a problem when upgrading from 0.92beta. Of course, I could switch to the java task, but if possible, I'd prefer to stick with the fop task. Can anyone point me to the right direction? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wrong font for bold
Hi Dan, Firstly, you may want to check your font-base/ and/or base/ settings to make sure they refer to an absolute path. I'm trying to go easy here, but if possible I'd strongly recommend that you try and upgrade to using 0.94. 0.20.5 is getting pretty old now and isn't really supported. FOP configuration checks are much stricter and tighter in 0.94 and you should be able to immediately see any problems found with your configuration. Adrian. Daniel Baptista wrote: Hi all, I'm sorry if this question has been asked before but I cant seem to find an answer for it so I thought I'd mail the list. I'm trying to generate a PDF from a DocBook using FOP 0.20.5 however I can't seem to get the any bold text to appear in the correct font. I think I have correctly registered the font with FOP via the userconfig.xml because the non-bold text is in the correct font, I have included the relevant section from the userconfig.xml below. fonts font metrics-file=FrutigerLTStd-Bold.ttf.xml kerning=yes embed-file=FrutigerLTStd-Bold.ttf font-triplet name=FrutigerLTStd-Light_Norm_Bold style=normal weight=bold/ /font font metrics-file=FrutigerLTStd-Light-vox.ttf.xml kerning=yes embed-file=FrutigerLTStd-Light-vox.ttf font-triplet name=FrutigerLTStd-Light-vox_Norm_Norm style=normal weight=normal/ /font /fonts Can anyone see what I've done incorrectly? (Go easy on me I'm new to this :) ) Thanks in advance, Dan. -- *VoxSurf Limited* Registered principal office: 2nd Floor Elme House 133 Long Acre London WC2E 9DT United Kingdom Company No (England): 4051448 http://www.voxsurf.com/ Email disclaimer: This can be viewed at http://www.voxsurf.com/disclaimer.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Generating neat RTF documents with XSLTPROC and FOP
Hi Nancy, If you want to transform your XML documents into Open Document Format you could write an XSLT stylesheet that is able to take your XML documents and achieve the transformation. Depending on the complexity of the layout you require, this would involve you spending quite a bit of time learning the semantics of ODF (see http://std.dkuug.dk/keld/iso26300-odf/is26300/OpenDocument-v1.0ed2-cs1.html). If you are a Java programmer, a potentially easier approach might be to programmatically DOM parse your input XML document and combine the traversal of this with using some of the document building blocks available in Odf4j which is part of the OpenOffice.org ODF Toolkit Project (see http://odftoolkit.openoffice.org/ and http://wiki.services.openoffice.org/wiki/Odf4j). Good luck, Adrian. nancy_b wrote: Thank you for the information, dear Jeremias! In http://xmlgraphics.apache.org/fop/0.94/output.html#rtf it is recommended to use the Open Document Format. How can I transform my XML documents into this format? Regards, Nancy Jeremias Maerki-2 wrote: No, the look of the generated RTF documents are directly derived from XSL-FO and it can only be changed by improving the Java source code. Please note that it's difficult to map XSL-FO to RTF and the RTF handler doesn't work well for more complex documents. See also: http://xmlgraphics.apache.org/fop/0.94/output.html#rtf Jeremias Maerki On 01.10.2007 11:32:44 nancy_b wrote: Hello dear all! Is there any way to improve how the RTF documents look? Is the LookFeel controlled somehow by the XSL stylesheets? Is it possible to improve the documents by substituting the default Word template with a customized one? Thank you in advance! Nancy -- View this message in context: http://www.nabble.com/Generating-neat-RTF-documents-with-XSLTPROC-and-FOP-tf4547155.html#a12975915 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: how to generate a preview output of a document using FOP
Hi Murali, I would recommend that you read http://xmlgraphics.apache.org/fop/0.94/servlets.html as a starting point for the server side component of your requirement. If you are a Java programmer I'd then look at extending either src/java/org/apache/fop/servlet/FopServlet.java src/java/org/apache/fop/servlet/FopPrintServlet.java for your purposes. Hope this helps, Adrian. Murali Krishna wrote: Hi, I've a requirement to generate various output formats of a xml document(for eg. PDF,RTF etc) and those output formats have to be sent as http response to the client browser when client requests a particular format using a http request. I've to give a print utility and a preview utility as tabs or hyperlinks links on the client browser so that he can get a preview of the document on the browser or on some applet window when he clicks on preview link or tab and a print tab has to be given so that he can get print out of the document in that output format.How should i fulfil this requirement. Please help! Thanks and regards, Murali Krishna Bhadagiri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting Ariel font recognized
My initial/first thought is that the font is called 'Arial' and *not* 'Ariel'? :-S My advice is to please carefully read and check your configuration against http://xmlgraphics.apache.org/fop/trunk/fonts.html. If you are still having problems its probably best if you post up your fop.xconf. Adrian. buddy wrote: This is probably a bit of a basic question to users on this list, so I apologize in advance. I know XML and XSLT very well, but an not a FOP expert (yet J ). I upgraded to latest version of FOP, but the Ariel font is not being recognized. Can someone help me with what I need to do to get Ariel to happen? I read some of the documentation on Fonts registering, but still a bit unclear. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Font loading problem (linux)
Hi Peter/Wilfred, Please post up your fop.xconf user configuration file. Adrian. WilfridUtz wrote: Hi Peter, I am using Cocoon and experiencing the same problem - everything fine in Windows, font not found in linux! Did you come up with a solution in 2005? Thanks, Wilfrid Peter Verhoye wrote: My problem is as follows: We have FOP to generate PDF files. On windows, the PDF's come out correctly but on Linux, they don't. More specifically, FOP complains he can't find the fonts that are used (Arial and Courrier New). Now, I've done the obvious things as adapting the path url's already. I think Courier New has just one 'r' That's a typo in the email, sorry :-) You have 3 names for the same font! ('Arial', Arial,Regular', and 'Arial,Bold'). Tried and no difference. And if I'm not mistaken, you should be able to have multiple names for a font. BB Peter - 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: Out of Memory Exception while loading Images.
Hi Jay, What type of images are they? Also please provide the full exception stack trace. If you could host the images somewhere along with the FO which references them so they could be referenced in a test that would be helpful also. Adrian. Jay wrote: Hi All, This is Digvijay. Joined recently to this group. I am using FOP 0.93 in one of my projects which went to production yesterday. As soon as users started downloading PDFs, application started throwing Out of Memory Exception. One obvious reason,we concluded was that, we need to increase some memory. But even when our Support Team added more vitual memory to the server box, exceptions kept coming. These PDFs have one page section which has 8 images (around 1MB each) and I observerd that always exception occured when FOP tried to read these images. Is anyone aware of similar issue with this version of FOP. I browsed through the archieves but did not find anything of interest. Can someone help me out ? Or give me some pointers ? Appreciate your help. Thanks, Digvijay. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fop 0.94 Font-Configuration Relative Paths
Hi Matthias, As far as I know, none of the base urls should be relative paths (see http://xmlgraphics.apache.org/fop/0.94/configuration.html#general-elements). For a guide to font registration with 0.94, see http://xmlgraphics.apache.org/fop/0.94/fonts.html#register. Adrian. Matthias Müller wrote: Hi, is there a guide/example how to register fonts with the new FOP 0.94 ? there is no more an tag to specify the font repository. all i found is this description about the new auto-detection function: http://issues.apache.org/bugzilla/show_bug.cgi?id=41831#c0 it uses absolute paths but i need to use relative paths only. in FOP 0.93 i used the context:// protocol ,e.g. basecontext:///base for defining the base-url. now i receive an error: unknown protocol: context so, there's any possibility to use relative paths? cheers, matthias Yahoo! Clever: Stellen Sie Fragen und finden Sie Antworten. Teilen Sie Ihr Wissen. www.yahoo.de/clever - 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: Cant seem to embedd Trebuchet MS.
Hi Martijn, My first thought it that it looks like you may be trying to use a 0.20 configuration with a 0.93/trunk version of FOP. If you are using 0.93 or later version of FOP (which is highly recommended) then you should change each font definition in your configuration file to use a metrics-url attribute (not metrics-file), the same goes for embed-file, this should be embed-url (see http://xmlgraphics.apache.org/fop/trunk/configuration.html#renderers). So.. font metrics-file=E:\FOPCONF\trebuc.xml kerning=yes embed-file=E:\FOPCONF\trebuc.ttf font-triplet name=Trebuchet MS style=normal weight=normal/ /font Should be something like.. font metrics-url=file:///E:/FOPCONF/trebuc.xml kerning=yes embed-url=file:///E:/FOPCONF/trebuc.ttf font-triplet name=Trebuchet MS style=normal weight=normal/ /font If you are working with a trunk version of FOP then the metrics-url is not necessary as the font metrics parsing is done for you at runtime. Hope this helps. Adrian. Martijn Laarman wrote: Hi, We are having a particularly hard time trying to get FOP to embedd Trebuchet MS in to the result PDF. We successfully use FOP as a tomcat servlet however it seems that something goes wrong when i try to add a configuration file for the servlet: public void init() throws ServletException { this.log = new SimpleLog(FOP/Servlet); log.setLevel(SimpleLog.LOG_LEVEL_WARN); this.uriResolver = new ServletContextURIResolver(getServletContext()); this.transFactory = TransformerFactory.newInstance(); this.transFactory.setURIResolver(this.uriResolver); //Configure FopFactory as desired this.fopFactory = FopFactory.newInstance (); File temp = new File(E:/FOPCONF/testconfig.xml); this.fopFactory.setUserConfig(temp); this.fopFactory.setFontBaseURL(file:///E:/FOPCONF/); this.fopFactory.setURIResolver (this.uriResolver); configureFopFactory(); } In particular its this line: this.fopFactory.setUserConfig(temp); That throws an Unhandled exception type SAXException, compiling seems to work do so errorless and placing the new war file as tomcat servlet goes ok as well and the servlet still works without errors however Trebuchet MS is still not recognized. Heres the E:/FOPCONF/testconfig.xml: ?xml version=1.0? fop version=1.0 base./base source-resolution72/source-resolution target-resolution72/target-resolution default-page-settings height=11in width=8.26in/ renderers renderer mime=application/pdf filterList valueflate/value /filterList fonts font metrics-file=E:\FOPCONF\trebuc.xml kerning=yes embed-file=E:\FOPCONF\trebuc.ttf font-triplet name=Trebuchet MS style=normal weight=normal/ /font font metrics-file=E:\FOPCONF\trebucbd.xml kerning=yes embed-file=E:\FOPCONF\trebucbd.ttf font-triplet name=Trebuchet MS style=normal weight=bold/ /font font metrics-file=E:\FOPCONF\trebucbi.xml kerning=yes embed-file=E:\FOPCONF\trebucbi.ttf font-triplet name=Trebuchet MS style=italic weight=bold/ /font font metrics-file=E:\FOPCONF\trebucit.xml kerning=yes embed-file=E:\FOPCONF\trebucit.ttf font-triplet name=Trebuchet MS style=italic weight=normal/ /font /fonts /renderer renderer mime=application/postscript /renderer renderer mime=application/vnd.hp-PCL /renderer renderer mime=image/svg+xml format type=paginated/ link value=true/ strokeText value=false/ /renderer renderer mime=application/awt /renderer renderer mime=image/png /renderer renderer mime=image/tiff /renderer renderer mime=text/xml /renderer renderer mime=text/plain pageSize columns=80/ /renderer /renderers /fop Could someone please guide me trough how to add Trebuchet MS to my PDF output ? It would be much appreciated ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cant seem to embedd Trebuchet MS.
Hi Martijn, Martijn Laarman wrote: Adrien Cumiskey , what exactly do you mean with a trunk version of FOP ? This just means you are using the 'latest and greatest' FOP code built from the Apache source repository (rather than a recognised official version). It sounds like you might be running with 0.93, is this correct? It might be worth you (just for sanities sake) testing your temp File variable references something valid too.. File temp = new File(E:/FOPCONF/testconfig.xml); if (temp.isFile() temp.canRead()) { System.out.println(temp + is ok); } It would also be helpful for everyone if you could provide a full exception stack trace for the SAXException you are experiencing when invoking this.fopFactory.setUserConfig(temp). Adrian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: embedding font Bundesbahn-Pi at FOP
Hi William, Most of the work involves entering all the charset data for ExpertEncoding and ExpertSubsetEncoding (contained in Appendix C of http://www.adobe.com/devnet/font/pdfs/5176.CFF.pdf) into src/codegen/fonts/encodings.xml - see http://issues.apache.org/bugzilla/show_bug.cgi?id=43143. Its not a difficult job, just quite a long one. If you are able to find the time to do this then I would be more happy get it working for you. Adrian. william wrote: Thanks Adrian, I wouldn't mind fixing it if there's no one wants to do it. But I would need some guidance on how to and what should I do since I've never followed fop-dev before. Thanks. Adrian Cumiskey wrote: Hi William (and all), This did turn out to be an encoding problem after all. Unfortunately I do not have the time at the moment to provide a fix for this problem. but I have provided a patch which provides the ability for FOP to correctly identify the type 1 font encoding. At least now you will be provided with a human readable log error message rather than NullPointerException :-). Maybe someone could take a look at implementing support for these encoding types? It wouldn't be too difficult, it would mostly involve adding data to src/codegen/fonts/encodings.xml. Most of the background information anyone would require for providing support for these encodings can be found in the patch I provided (http://issues.apache.org/bugzilla/show_bug.cgi?id=43143). If you are still using a metrics-url in your font configuration then you will need to regenerate your metrics file once this patch has been applied as the font encoding detection is flawed for detecting these encoding types for type 1 fonts in the existing implementation. Of course font you don't need to specify metrics-url attributes in your fop.xconf anymore in the latest trunk code and in the forthcoming 0.94 (and 0.93 if I am correct). You can just provide an embed-url and FOP will generate the metrics on the fly. e.g. font kerning=yes embed-url=Bundesba.pfb font-triplet name=Bundesbahn style=normal weight=normal/ /font All the best, Adrian. william wrote: Thanks Adrian and everyone, I have sent it to you for you to take a look at it (font and FO). if there's something that is useful for me/others to know, please do tell me. Otherwise, does anyone has any idea where else I can look for software solution that might accommodate this ? William. Adrian Cumiskey wrote: Hi William, Yes I think that might be the problem, it does look like an encoding problem to me. I took a quick look at the code and the NullPointerException you are experiencing would indicate that the encoding is not recognised by FOP and its failing to provide a CodePointMapping instance which is used internally by SingleByteFont. If you send me the font (and fo) I will try and take a quick look at it. Adrian. william wrote: Hi All, First of all, would like to thank you all developers and commiters at FOP. i've been using it for awhile now. I haven't had problem with embedding fonts before, except on this Bundesbahn-Pi font and another symbol/pi font. The error message is posted below. I'm using fop 0.93 and I need help with embedding this font. Is there anything to do with this? /currently present a problem because FOP cannot correctly determine the encoding of these two single-byte fonts through the PFM file. FOP now correctly interprets the encoding value in the XML font metrics file, but the PFMReader application writes UnknownEncoding to the generated XML file /If someone would try to work it out for me, i can send you the font to try out + .fo file. This is my configuration for the font: font metrics-url=Bundesbahn.xml kerning=yes embed-url=Bundesba.pfb font-triplet name=Bundesbahn style=normal weight=normal/ /font / *Error message generated by FOP:* 10/08/2007 06:16:13 org.apache.fop.cli.Main startFOP SEVERE: Exception java.lang.NullPointerException at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115) at org.apache.fop.cli.Main.startFOP(Main.java:160) at org.apache.fop.cli.Main.main(Main.java:191) - java.lang.NullPointerException at org.apache.fop.fonts.SingleByteFont.hasChar(SingleByteFont.java:103) at org.apache.fop.fonts.LazyFont.hasChar(LazyFont.java:166) at org.apache.fop.fonts.Font.hasChar(Font.java:189) at org.apache.fop.fonts.Font.getCharWidth(Font.java:231) at org.apache.fop.layoutmgr.inline.TextLayoutManager.initialize(TextLayoutManager.java:188) ... Thank you, / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: One question about PS extesions and string constants usage
Hi Andrejus, No I don't think there anything preventing you from making this change, although I would probably go for declaring this as a protected variable and making it package visible (as it is only ever used in org.apache.fop.render.ps.extensions). I would suggest you go ahead and submit a patch. Adrian. Andrejus Chaliapinas wrote: Hi, While looking for extensions sample implemented for PS, I've found that such string as ps-setup-code is defined as private static in org.apache.fop.render.ps.extensions.PSSetupCode as: private static final String ELEMENT = ps-setup-code; but then later used as string comparison in let say PSExtensionElementMapping here: foObjs.put(ps-setup-code, new PSSetupCodeMaker()); Do we have anything preventing from making that ELEMENT public and then referencing in all other parts of the code? I hope that then whole code could be more understandable. Andrejus - 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: One question about PS extesions and string constants usage
Hi Andrejus, Nice patch :-). It would make it easier for one of the FOP committers to process it if you could submit it to the FOP patch queue at http://issues.apache.org/bugzilla/enter_bug.cgi. Adrian. Andrejus Chaliapinas wrote: Hi Adrian, I would suggest you go ahead and submit a patch. Please find related patch attached done over today's fop trunk code. Not sure who could commit it though to the code. Andrejus Index: D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSExtensionElementMapping.java === --- D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSExtensionElementMapping.java (revision 562199) +++ D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSExtensionElementMapping.java (working copy) @@ -39,8 +39,8 @@ protected void initialize() { if (foObjs == null) { foObjs = new java.util.HashMap(); -foObjs.put(ps-setup-code, new PSSetupCodeMaker()); -foObjs.put(ps-page-setup-code, new PSPageSetupCodeMaker()); +foObjs.put(PSSetupCodeElement.ELEMENT, new PSSetupCodeMaker()); +foObjs.put(PSPageSetupCodeElement.ELEMENT, new PSPageSetupCodeMaker()); } } Index: D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSPageSetupCodeElement.java === --- D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSPageSetupCodeElement.java (revision 562199) +++ D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSPageSetupCodeElement.java (working copy) @@ -29,6 +29,8 @@ */ public class PSPageSetupCodeElement extends AbstractPSExtensionObject { +protected static final String ELEMENT = ps-page-setup-code; + /** * Main constructor * @param parent parent FO node @@ -47,7 +49,7 @@ /** [EMAIL PROTECTED] */ public String getLocalName() { -return ps-page-setup-code; +return ELEMENT; } } Index: D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSSetupCodeElement.java === --- D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSSetupCodeElement.java (revision 562199) +++ D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSSetupCodeElement.java (working copy) @@ -29,6 +29,8 @@ */ public class PSSetupCodeElement extends AbstractPSExtensionObject { +protected static final String ELEMENT = ps-setup-code; + /** * Main constructor * @param parent parent FO node @@ -47,7 +49,7 @@ /** [EMAIL PROTECTED] */ public String getLocalName() { -return ps-setup-code; +return ELEMENT; } } Index: D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java === --- D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java (revision 562199) +++ D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java (working copy) @@ -49,7 +49,7 @@ if (PSSetupCode.CATEGORY.equals(uri)) { lastAttributes = attributes; handled = true; -if (ps-setup-code.equals(localName)) { +if (PSSetupCodeElement.ELEMENT.equals(localName)) { //handled in endElement } else { handled = false; @@ -69,7 +69,7 @@ /** [EMAIL PROTECTED] */ public void endElement(String uri, String localName, String qName) throws SAXException { if (PSSetupCode.CATEGORY.equals(uri)) { -if (ps-setup-code.equals(localName)) { +if (PSSetupCodeElement.ELEMENT.equals(localName)) { String name = lastAttributes.getValue(name); this.returnedObject = new PSSetupCode(name, content.toString()); } Index: D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSSetupCode.java === --- D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSSetupCode.java (revision 562199) +++ D:/eclipse/test/fop_trunk/src/java/org/apache/fop/render/ps/extensions/PSSetupCode.java (working copy) @@ -92,7 +92,6 @@ } private static final String ATT_NAME = name; -private static final String ELEMENT = ps-setup-code; /** [EMAIL PROTECTED] */ public void toSAX(ContentHandler handler) throws SAXException { @@ -100,7 +99,7 @@ if (name != null name.length() 0) {
Re: FOP and Avalon
Hi Javier, The Avalon dependencies are minimal in the latest trunk build (and the forth coming 0.94 release). FOP uses Apache Commons logging which allows you to chose which ever logging implementation you desire. The old configuration dependencies are now minimal, I abstracted all that code out of the renderers, and it now resides in a series of Configurator classes which could be easily overriden/rewritten with different implementations in the future. Adrian. Javier Salado wrote: Hello there, I have been browsing the archive and I have read old messages regarding the dependencies between FOP and the Avalon framework. As far as I understood FOP uses the logging and configuration utilities from Avalon and I have read that there is already some work done to use commons-logging instead. Any lans to use commons-configuration as well? In summary is the latest release (0.93) Avalon-free or are there any plans to have an Avalon-free release in the near future? My concerns are due to the fact that our applications that uses FOP for report generation, and I would like to plan ahead all the details of the support issues. Thanks for the help and best regards, J. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quick survey: upcoming release of FOP 0.94
Hi Hugues, HLeonardi wrote: - font autodetection : I have tested this feature but the results were wrongs. When I have a little time, I will take a look at the doc and I test again. It would be great if you could provide me some more information about this please. I am pretty sure that the font autodetection will require *some* tweaking and refinement - so user testing and feedback is really helpful. What system do you use to run FOP? How were the results wrong? Cheers, Adrian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: why 'blank' page is not 'last' page with force-page-count=odd
Thanks Chris, just to clarify - I meant to say http://issues.apache.org/bugzilla/show_bug.cgi?id=42576. Adrian. Chris Bowditch wrote: Andreas L Delmelle wrote: On Jul 10, 2007, at 11:24, Adrian Cumiskey wrote: Hi Adrian Yes I also verified this problem. This is a different bug to the other force-page-count problem which was fixed (http:// issues.apache.org/bugzilla/show_bug.cgi?id=42779). Please open a new bug entry. I'm not following... bug 42779 is still open. Just had a quick look, and the problem indeed still exists. Hi Andreas, yes you are right. I think Adrian actually meant bug 42576. That was the issue that was fixed by a patch he supplied. The open issue 42779 is the same as the one raised by the OP of this thread, i.e. page-position=last doesn't work when using force-page-count. So I don't think a new bug needs to be opened. Thanks, Chris - 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: why 'blank' page is not 'last' page with force-page-count=odd
Hi Guillaume, Yes I also verified this problem. This is a different bug to the other force-page-count problem which was fixed (http://issues.apache.org/bugzilla/show_bug.cgi?id=42779). Please open a new bug entry. Adrian. Vincent Hennebert wrote: Hi Guillaume, guillaume levrero a écrit : Hi Chris, I tried the FO again with the latest foptrunk (554616), and I get the same output. Should I open a new bug entry ? Yes, please, I can reproduce the problem. Obviously there is still something wrong somewhere. Thanks, Vincent - 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 0.93: Java Heap Space OutOfMemory
Try increasing the amount of memory available to your VM by using the java extended argument option -Xmx{???}M, where {???} is the number of megabytes you wish to make available to the java virtual machine. Adrian. [EMAIL PROTECTED] wrote: While generating a PDF from XML+XSL using FOP 0.93, FOP stops with Exception in thread main java.lang.OutOfMemoryError: Java heap space. Are their any limitations set in FOP or this is just a problem of to few system memory? The generated PDF have more than 71 pages. Besseren Schutz gegen Spam - jetzt bei dem neuen Yahoo! Mail http://de.rd.yahoo.com/evt=40589/*http://de.docs.yahoo.com/ymail/landing.html . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SV: Font Arial is not displayed on Linux
Hi Johan, Sounds like you have an ordering problem. Each conditional-page-master is evaluated in turn as each page is processed in the page sequence so you should generally order them page-position=first, followed by page-position=rest and finally page-position=last. If I understand you correctly I believe you are looking for the following page master selection behaviour :- - fo:page-sequence-master master-name=faktura !-- used for page 1 in sequence -- fo:single-page-master-reference master-reference=framsida-first/ !-- used for page 2 in sequence -- fo:single-page-master-reference master-reference=baksida/ !-- repeatedly evaluated and conditionally selected -- !-- for all other pages in the sequence -- fo:repeatable-page-master-alternatives fo:conditional-page-master-reference page-position=rest odd-or-even=odd master-reference=framsida-helkropp/ fo:conditional-page-master-reference page-position=rest odd-or-even=even blank-or-not-blank=not-blank master-reference=baksida-hellkropp/ fo:conditional-page-master-reference page-position=rest odd-or-even=even blank-or-not-blank=blank master-reference=baksida-blank/ fo:conditional-page-master-reference page-position=last odd-or-even=even blank-or-not-blank=not-blank master-reference=baksida-last/ fo:conditional-page-master-reference page-position=last odd-or-even=odd master-reference=framsida/ /fo:repeatable-page-master-alternatives /fo:page-sequence-master - Hope this helps! :-) Adrian. Johan Johansson wrote: Hi I have a problem, is there anyway with xsl:fo to set different master-reference if i want for an example the page 2 to be different from the rest of the even pages? I want the even page 2 to be baksida and the rest even pages to be baksida-helkropp. Do anyone have any idea how to do that? fo:page-sequence-master master-name=faktura fo:conditional-page-master-reference page-position=first odd-or-even=odd master-reference=framsida-first/ fo:conditional-page-master-reference page-position=rest odd-or-even=odd master-reference=framsida-helkropp/ fo:conditional-page-master-reference page-position=rest odd-or-even=even blank-or-not-blank=not-blank master-reference=baksida/ fo:conditional-page-master-reference page-position=last odd-or-even=even blank-or-not-blank=not-blank master-reference=baksida-last/ fo:conditional-page-master-reference page-position=last odd-or-even=odd master-reference=framsida/ fo:conditional-page-master-reference page-position=rest odd-or-even=even blank-or-not-blank=blank master-reference=baksida-blank/ /fo:page-sequence-master //Johan - 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: RTF-Output with FOP 0.93 looks terrible
Hi Kerstin, Sorry but could you be a little more descriptive of the problem you are having? Providing some FO source examples would be of great help in examining any problems you are experiencing with the RTF output. Incidentally which RTF viewing application are you using to display/test the RTF output? Cheers, Adrian. [EMAIL PROTECTED] wrote: I'm using FOP 0.93 to generate e.g. PDF from DocBook-XML with DocBook-XSL. Everything looks fine in PDF. 71 sites are generated in PDF :-))) But the RTF-Output just looks terrible and has about 1900 !!! sites. Seems on every page is one line or one table row printed out. The content (e.g. lines) should be keep together or something else. Is still working on this feature or has i just configure something to make it work better? Thanks, Kerstin *BE A BETTER WELTENBUMMLER:* Jetzt Frage stellen und einen von 44 iPods gewinnen! http://de.rd.yahoo.com/evt=48734/*http://de.promotions.yahoo.com/clever/be-a-better/weltenbummler.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forcing a new line
Hi Trevor, For your table/column headings - if you wrap the textual content of your fo:table-cell/ within a block it should by default wrap the text within it since the wrap-option attribute of fo:block/ defaults to wrap. The blank line between your table headings and table rows can be achieved by adding a extra row at the beginning of your table body which contains a fo:leader/ wrapped within an fo:block/. See my example FO below. --- ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:test=http://xmlgraphics.apache.org/fop/test; fo:layout-master-set fo:simple-page-master master-name=normal page-width=2in page-height=2in fo:region-body/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=normal fo:flow flow-name=xsl-region-body fo:table table-layout=fixed width=auto fo:table-column column-width=60pt/ fo:table-header fo:table-row fo:table-cell fo:blockStart Value Portfolio/fo:block /fo:table-cell /fo:table-row /fo:table-header fo:table-body fo:table-row fo:table-cell fo:block fo:leader/ /fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell fo:block33/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell fo:block44/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell fo:block55/fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:flow /fo:page-sequence /fo:root --- If this above example doesn't solve your problems then please attach your FO file that you are having the problem with. Adrian. Trevor Keast wrote: Hi, I have a table with column headings. Sometimes the headings are quite long and I want to force a carrige return and display the heading text on two lines, for example: Currently looks like this: -- Portfolio Start Value 33 44 55 -- But I want it like this: -- Portfolio Start Value -- I also want to be able to force a blank line between the heading and the table body. Any advice would be greatly appreciated! Regards, Trevor. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tables overlap with following block
Hi Rigas, Please file a bug with an attached example FO showing the problem in the bug tracking system (http://issues.apache.org/bugzilla/enter_bug.cgi). Cheers, Adrian. Rigas Parathyras wrote: Hello everyone, I am having a problem in FOP 0.93 in the following example Test case: There is a very long table that takes several pages that has cellspacing/cellpadding (translated to fo:padding) Problem: The last cell of the table overlaps with the paragraph following it!! Quick fix: When I remove the cell's padding and margin properties, the problem stops. Possible cause: Somehow it seems that it cannot calculate the real length of the table if it takes more than one page and has padding and cell spacing Any ideas? thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PNG Outputfile different from CLI and embedded FOP
Hi Franz, Do the width and height variables in your code snippet have values? I don't see the display.width and display.height variables being passed to your stylesheet when you execute fop from the command line. To do this use the -param argument. try :- fop.bat -c userconfig.xml -xml data\data.xml -xsl FOP_Stylesheet.xsl -param display.width #1 -param display.height #2 -png Replacing #1 and #2 with your width and height values that you used in your code snippet. Also - this may sound obvious, but do you have more than one different installation of FOP on your machine? If so double check that your command line path tallies with your java classpath. Adrian. fma-001 wrote: Hi! When I create an image through command line (CLI) the png looks perfect. But when I embed FOP into Java it's a bit hazy. Here the outputfile of CLI: http://www.nabble.com/file/p11285163/data_krank.png Here the outputfile of Java embedded: http://www.nabble.com/file/p11285163/portal.png I started FOP from command line as following: fop.bat -c userconfig.xml -xml data\data.xml -xsl FOP_Stylesheet.xsl -png data.png The Java snippets looks like that: ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); Fop fop = null; fop = fopFactory.newFop(MimeConstants.MIME_PNG, foUserAgent, outputStream); // Setup XSLT TransformerFactory factory = TransformerFactory.newInstance(); SAXSource xsltSource = new SAXSource(new InputSource(Thread.currentThread().getContextClassLoader().getResourceAsStream(com/xt/icee/rendering/resource/FOP_Stylesheet.xsl))); Transformer transformer = factory.newTransformer(xsltSource); // Set the value of a lt;paramgt; in the stylesheet transformer.setParameter(versionParam, 2.0); if (width != -1) { transformer.setParameter(display.width, String.valueOf(width)); } if (height != -1) { transformer.setParameter(display.height, String.valueOf(height)); } // 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); Does anyone have a clue why the two results are different? Thanks in advance! Franz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fop doesn't style list-item-label for RTF
Hi Deryl, Which version of FOP are you using? It would be really helpful if you include the FO file in full. Cheers, Adrian. Deryl Seale wrote: I am trying to render a numbered (well, lettered really) list in RTF format, but FOP doesn't apply the styles I specify. I have tried the following: fo:list-item-label end-indent=label-end() font-weight=bold fo:blockxsl:number count=qti:simpleChoice format=A//fo:block /fo:list-item-label fo:list-item-label end-indent=label-end() fo:block font-weight=boldxsl:number count=qti:simpleChoice format=A//fo:block /fo:list-item-label Both of these correctly make the label for the list item bold, but in RTF, the label is just plain text. Any idea if this is a known bug, and if so, where I might poke around to fix it? thanks. -- Deryl Seale -- Director of Engineering c: 734.883.9636 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.intel-assess.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there possibility to embed file as attachment into resulting PDF through FOP?
I would like to suggest that users who submit patches try to remember to provide a base subversion revision id of the code they have modified along with their patch. In this way if over time the patch becomes a little out of date with the current state of the trunk code, the value of the patch shouldn't diminish and it should cause less merge problems when the committer integrates the patch into the latest trunk code. Adrian. Jeremias Maerki wrote: Yes, please do submit your patches to Bugzilla. I know we're presently quite unresponsive in terms of reviewing and processing patches as all of us seem to be very busy elsewhere. But having those patches in Bugzilla makes sure they don't get forgotten. If there's some patch that wasn't processed and you need that functionality it may help to give us a nudge. 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: PDF Problem
Hi Christian, It might also be useful if you could provide us with your original FO file that you generated the PDF from. Adrian. Stefan Heuer wrote: Hi Christian, Can you give us a little bit more information. What PDF viewer you use? And if possible a sample file. I can search in my PDF files. Do you use some encryption or other PDF features? Regards Stefan Christian Loock schrieb: Hello there, i have a little problem with PDFs created with FOP. It seems to be that you can't search inside the PDF (using CTRL+F) and when you copy something out of the PDF the pasted Text will look corrupt. Are there any known issues about that and a way to solve it? Viele Grüße/ Best Regards Christian Loock Software Engineer Viele Grüße/ Best Regards Christian Loock Software Engineer ___ telephone: +49 (0) 28 21 . 9 78 56.21 telefax: +49 (0) 28 21 . 9 78 56.77 [EMAIL PROTECTED] www.db-central.com Main office db-central gmbh, Hoffmannallee 41-51, D-47533 Kleve Subsidiary db-central gmbh, Königsallee 43, D-71638 Ludwigsburg db-central gmbh, Adalbertstr. 110, D-80798 München Managing Directors Dirk Rosomm, Benno van Aerssen Registered office Kleve - Germany, Amtsgericht Kleve, HRB 2746 ___ - 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: embedded configuration of base directory
Hi Derrill, It would be helpful if you could tell us which version of FOP you are using. If possible I would recommend you switch to trunk code as this now contains much tighter configuration that should highlight any misconfigurations (including unresolved paths) that you may have. Adrian. On 08/06/07, Dabkoski, Derrill [EMAIL PROTECTED] wrote: I am trying to load images onto my pdf file. When I use a configuration file to set my base directory, I have no issues. The problem arises when I try to programmatically set my base directory. Here is my fop.xconf (which works perfectly fine): fop version=1.0 !-- Base URL for resolving relative URLs -- base/workplace2/projects/DropShip/SelfService/mainline/Website/Central/src/main/resources//base Under Customizing the User Agent, I followed the doc: The *base URL* to use when resolving relative URLs. Example: userAgent.setBaseURL(file:///mydirectory/directory); So I tried doing: foUserAgent.setBaseURL(file:/workplace2/projects/DropShip/SelfService/mainline/Website/Central/src/main/resources); and foUserAgent.setBaseURL( file:///workplace2/projects/DropShip/SelfService/mainline/Website/Central/src/main/resources ); The error message I get is: Jun 7, 2007 5:51:48 PM org.apache.fop.fo.flow.ExternalGraphic bind SEVERE: Image not available: amazon-bw.jpg Any help with be very much appreciated! Thanks.
Re: force-page-count issue
Please raise a bug in our bugzilla bug tracking system (http://issues.apache.org/bugzilla/enter_bug.cgi) and I will look into fixing this for you. Adrian. nogunner wrote: Hi All, I've found an issue with the force-page-count: I need to start every new page-sequence on an odd page number, so that each new page-sequence is printed on the front side (recto). I'd like to use the force-page-count=end-on-even to ensure the next page-sequence starts on the front-side, not on a backside. As of the current fop implementation, force-page-count is implemented in the AreaTreeHandler calling prevPageSeqLM.doForcePageCount(initialPageNumber), which obviously does not work for the first page-sequence, as it is never called when prevPageSeqLM is null for the first sequence. Another issue is that the end-on-even does not work as expected, as it seems to create a new blank page at the beginning of the sequence, which is incorrect (specially for my need, as I have a first-page which has a distinct master-reference). As of today, I've a work-around (inserting a fo:block break-after=even-page/ at the end of the sequence), but I'd really prefer having a clean solution, not inserting arbitrary block in a sequence just for the purpose of aligning the next one. Is there any reason for the current implementation, is there someone working on it, or should I just try to fix that myself ? Thx. - 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: Not able generate parse html from xml using XSL Fo
Hi Balamurali, I believe you are using an older 0.20 release of FOP which is no longer actively supported. I'm not sure about the support for what you are trying to do in that version. If it is possible to do so, I'd recommend upgrading to 0.93 and try again. Cheers, Adrian. [EMAIL PROTECTED] wrote: Hi, I am using an xml file which has the below tag AddInfolt;fo:block font-style=quot;italicquot;gt;URGENT! Please note that comments have changed. Please review thoroughly.lt;/fo:blockgt; /AddInfo And an xsl fo which is of the below form fo:block text-align=justify line-height=20pt space-after.optimum=7pt xsl:value-of select=AddInfo disable-output-escaping=yes/ /fo:block The XSL Output.html is below fo:block font-style=italicURGENT! Please note that comments have changed. Please review thoroughly./fo:block I use org.apache.fop.apps.XSLTInputHandler to input the xml and xsl file and set driver render to pdfformat to generate pdf But the parser does not seems to be parsing the fo:block font-style in the XML file . The pdf output looks like below fo:block font-style=italicURGENT! Please note that comments have changed. Please review thoroughly./fo:block But I expect that the italic should be applied to the text The xml would generated dynamically with different attributes of fo:block or html tags How could I use these dynamically generated xml tags which has an fo:block or html tag that is parsed and converted to a pdf using xsl fo - 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: problem with fop-0.93 and fonts
Hi Andreas, This should fix the problem :- font metrics-url=file:///C:/apache_fop_fonts/batang.xml kerning=yes embed-url=file:///C:/apache_fop_fonts/BATANG.TTF I recently worked on developing a more tightly validated FOP configuration and some new font autodetection functionality. This should be appearing in the FOP trunk code soon and should make font configuration a lot easier. All the best, Adrian. On 24/05/07, Andreas Peter [EMAIL PROTECTED] wrote: Hello, I am trying to setup fop-0.93 for using different fonts for a pdf which will be created later. I use the conf/userconfig.xml file to specify the font-metrics. There I added font metrics-file=file:///C:/apache_fop_fonts/batang.xml kerning=yes embed-file=file:///C:/apache_fop_fonts/BATANG.TTF font-triplet name=Batang style=normal weight=normal/ /font Before this step I created the XML font metrics file successfully. Then I run fop using fop -c conf/userconf.xml... where I get the following error/warning message: Warnung: Font 'Batang,normal,400' not found. Substituting with 'any,normal,400' I receive the message also for 'Batang,normal,700' and 'Batang,italic,400'. Does anyone of you have a hint/solution for me? This would be very helpful for me. Thanks a lot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struck with a Problem in Fop
Hi Rakesh, Looks to me like you are missing avalon-framework-4.2.0.jar from your Tomcat classpath. You can find this jar file in lib folder underneath your top-level FOP project folder. Adrian Cumiskey. rakesh satharasi wrote: Hi, I am developing a web application which will read in a xml and convert it to a PDF file. I have written a servlet by modifying the FopServlet available in the src folder provided by apache with fop0.93. when I deploy it on Tomcat 6.0.10 server, it is throwing the following Exception. *type* Exception report *message* *description* _The server encountered an internal error () that prevented it from fulfilling this request._ *exception* javax.servlet.ServletException: Servlet.init() for servlet FopServlet threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process (Http11Protocol.java:634) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) java.lang.Thread.run(Thread.java:595) *root cause* java.lang.NoClassDefFoundError: org/apache/avalon/framework/configuration/ConfigurationException servlets.FopServlet.init(FopServlet.java:100) javax.servlet.GenericServlet.init(GenericServlet.java:212) org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:104) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) java.lang.Thread.run(Thread.java:595) *note* _The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs._ __ Kindly throw some light on this. Rakesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with XSLTInputHandler and Driver class
Hi Cesar, In order for me to try and help you with solving this problem, could you please provide a full stack trace of the exception, your fop.xconf configuration file and also the file which is referenced by PATH_TO_XSL. You might also double check the contents of these two files yourself. Adrian Cumiskey. [EMAIL PROTECTED] wrote: Hi, I need help to solve a problem with XSLTInputHadler and Driver class, working with fop 0.20.5 version. I need to generate a pdf from a xslt source existing in my project and a xml source received as a parameter. I´m using this constructor method from XSLTInputHandler: XSLTInputHandler(org.xml.sax.InputSource xmlSource, org.xml.sax.InputSource xsltSource) My code is: String xmlParam = request.getParameter(XML_REQUEST_PARAM); StringReader str = new StringReader(xmlParam); InputSource in = new InputSource(str); FileReader fr_xsl = new FileReader(PATH_TO_XSL); InputSource in_xsl = new InputSource(fr_xsl); *** XSLTInputHandler input = new XSLTInputHandler(in, in_xsl); ByteArrayOutputStream out = new ByteArrayOutputStream(); Driver driver = new Driver(); driver.setLogger(log); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); driver.render(input.getParser(), input.getInputSource()); It throws a FopException in *** and the message is: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.net.MalformedURLException What´s my problem? What i did wrong? is this a bad use from this constructor? Thanks, César. - 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: Mixing languages and Unicode
Hi Mildred, See my reply below.. Mildred wrote: Hi, I'm trying to create a document using XSL and FOP containing tibetan prayers. And I'm having troubles with fonts. At first, all my tibetan characters were represented by a #. I looked at the fop website and I managed to create a configuration file, and to create a metric for my tibetan font. And everywhere I can found tibetan characters, i added the attribute font-family=Tibetan But when there are latin characters and tibetan characters mixed together, it uses the tibetan font. But for the latin characters, the tibetan font draws them with serif. and all other latin characters in my document are sans-serif. So it doesn't look right. I would rather like to specify in my document the latin font. And let FOP use the tibetan font for tibetan characters (those characters can only be found here, it should not be too difficult). Is it possible ? I believe the functionality you are looking for hasn't been implemented in FOP yet. In the future there will be provision for providing a comma separated list of fonts in the font-family attribute so if the first font cannot be used FOP will try to use the second one in the list and so forth. In the meantime, I think there might be a workaround for you by using fo:inline to explicitly use a different font for Tibetan characters.. Example :- fo:block font-family=Sans-serif Blah blahfo:inline font-family=Tibetan#260/fo:inline, blah /fo:block I hope that I have understood your question correctly and provided you with an approach that may be of help to you. Adrian. I would like to say it works like that everywhere on my system. I use the DejaVu font for almost everything and where there are tibetan characters (in my text editor for example), the system fall back to the only tibetan font it can find. I xould like FOP to do the same. I hope you understood me. i can provide example if you ant. Thank you Mildred PS: i sent twice the subscription email to the mailing list but i had no response. So I'm using gmane. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URIResolver for svg
I have submitted a patch (http://issues.apache.org/bugzilla/show_bug.cgi?id=42278) which factors out resolving from the FopFactory. This is at least a start towards this aim of Batik and Fop sharing this same core functionality. I've only touched the surface of Batik so far, but this patch should go *some* way towards breaking out the dependencies. I imagine in the longer term the basic URI resolution should maybe go in Batik with a specialisation of this class in FOP. What does everybody else think? Adrian Cumiskey. On 27.04.2007 12:50:35 Peter wrote: Thanks Jeremias. Appreciate you take the time to help out. Is that the (only) way to tell to Batik to do something user specific when resolving relative URI's? This is the wrong place to ask this question. I guess the question should have been is there anyway I can tell fop to tell batik... I understand FOP and Batik are separate projects, but as a FOP user who wants to embed svg in fo that should not matterin a perfect world that is. My point is that before you can think about how to pass on a URIResolver to Batik from inside FOP, you have to figure out how you can integrate a URIResolver into Batik in the first place. That's why I gave you the links to Cocoon's Batik block. It can provide you with some ideas. Is there (any other) a way I can have FOP and Batik use the same URIResolver interface? Not at this time. Batik doesn't use URIResolver. You could put in an RFE with Batik or try to add direct support for it in Batik's source code. What if FOP would invoke whatever Batik mechanism available to offer its end user a URIResolver based approach driven through the FOP API. Assume I would spend a bit of time trying to implement that, would it stand a chance to get adopted? Why whouldn't it? The only problem is resources inside the FOP team to review and apply patches in due time. But good contributions are always welcome. I guess in the ideal world one would get Batik to integrate URIResolver functionality directly into the code. But if there's a clean way to do an adapter, that's fine, too. So, my tip is to concentrate on Batik first, and on FOP second. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PDF-File not save on disk
Hi Marcel, Its best if you take a look at org.apache.fop.cli package. Start by looking at Main.startFOP() and then trace to InputHandler.transformTo(OutputStream) and InputHandler.transformTo(Result). You'll see from this code that all you need to do is basically create your OutputStream (e.g. a ByteArrayOutputStream) object and then wrap it in a Result object which is passed to the transform() method of the transformer. Adrian Cumiskey. Marcel S wrote: Hello, I made an application that creates a PDF-File with the FOP-Engine. My problem is that i can only save the PDF-File on Disk.But i don't want to save it i just want it in a variable to proceed it to another method.(sending it as an email attachment) Cause this application runs on a mainframe it is not good to save it to disk. How can i do this?Are there any tutorials or examples around? With kind regards Marcel - 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: RTF list numbering incorrect
Hi David, Have not tried to reproduce this with 0.92 beta or 0.93. This FO list-block seems to work fine in the trunk. Which RTF viewer are you using to test the results? Adrian. davidl wrote: Hi, I'm using FOP 0.92 beta to convert FO to RTF. I have a numbered list in the FO but list items in the output RTF are all numbered as '1.' with no increment: 1. List item 1. 1. List item 2. 1. List item 3. FOP 0.93 also gives the same result. My FO list-block is as below: fo:list-block fo:list-item fo:list-item-label end-indent=0pt start-indent=18pt fo:block line-height=13.7pt text-align=start text-indent=0pt fo:inline font-family=Times Roman, serif font-size=12pt 1./fo:inline /fo:block /fo:list-item-label fo:list-item-body end-indent=0pt start-indent=36pt fo:block line-height=13.7pt text-align=start text-indent=0pt fo:inline font-family=Times Roman, serif font-size=12pt List item 1./fo:inline /fo:block /fo:list-item-body /fo:list-item fo:list-item fo:list-item-label end-indent=0pt start-indent=18pt fo:block line-height=13.7pt text-align=start text-indent=0pt fo:inline font-family=Times Roman, serif font-size=12pt 2./fo:inline /fo:block /fo:list-item-label fo:list-item-body end-indent=0pt start-indent=36pt fo:block line-height=13.7pt text-align=start text-indent=0pt fo:inline font-family=Times Roman, serif font-size=12pt List item 2./fo:inline /fo:block /fo:list-item-body /fo:list-item fo:list-item fo:list-item-label end-indent=0pt start-indent=18pt fo:block line-height=13.7pt text-align=start text-indent=0pt fo:inline font-family=Times Roman, serif font-size=12pt 3./fo:inline /fo:block /fo:list-item-label fo:list-item-body end-indent=0pt start-indent=36pt fo:block line-height=13.7pt text-align=start text-indent=0pt fo:inline font-family=Times Roman, serif font-size=12pt List item 3./fo:inline /fo:block /fo:list-item-body /fo:list-item /fo:list-block Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to embed fonts
Hi Robert, Firstly, have you posted a question about this on the NFOP forum (http://sourceforge.net/mailarchive/forum.php?forum_id=12848)? NFOP doesn't appear to be a very active project. This mailing list is really just focused on Apache FOP project's XSL FO implementation. There are many improvements in FOP 0.93, and font (auto)configuration/detection is about to become much easier when my patch is applied to the trunk. If it is possible for you to switch over to using FOP instead maybe via HTTP calls to the FOPServlet I would recommend that you do so. Best of luck, Adrian Cumiskey. Robert Soeding wrote: Hi, - As this is my first message here, I'd like to thank you very much for providing and maintaining FOP. - I'm using NFOP 1.1.0, which is translated almost 1:1 from FOP 0.20.5. I would like to embed fonts into the resulting PDF document. Currently, I'm registering fonts to FOP / the PDF document by code: Configuration.put(fonts, ArrayList of FontInfo objects); Configuration.put(fontBaseDir, ...); That seems to work; font information is written by the PDFFont.toPDF() method (but no (binary) font code / the font itself) (where would this be done?). Font information also appears in Acrobat Reader's document properties. Nevertheless, the fonts won't get embedded, and Acrobat Reader reports them as missing when they're not installed at the target computer. My first problem is, this doesn't work completely, and moreover, I cannot find anything else to be configurable by code. The file paths to the metrics and font files are correct BTW, and the issue concerns both TrueType and Type1 fonts. OK, an alternative was to use fop-dir/conf/userconfig.xml. My problems with that are, first, I don't know the XML root tag, resp., the XML schema (I've already found the syntax of adding fonts there, though). Second, this should produce the same results as manipulating the Configuration directly. Any ideas? Best regards Robert - 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: Exception in thread main java.lang.NoClassDefFoundError: org/apache/fop/cli/Main
Hi Jonn, You downloaded the source only. You need to build it with ant first. cd D:\fop-0.93 ant jar-main fop Adrian. jonn wrote: I have downloaded fop-0.93-src.zip and extracted it and added fop-0.93\lib folder to classpath. And simply tried ‘fop’ command without args. I got this error. D:\fop-0.93fop java Exception in thread main java.lang.NoClassDefFoundError: org/apache/fop/cli/Main I couldn't find fop.jar in the extracted folder. Please help me on this - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: suggest a filename to a generated pdf
Hi Jan, I think maybe you might need to quote the value of your filename parameter ... Try this :- response.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); Adrian. Zmitko, Jan wrote: Hi, I try do suggest a filename to the generated pdf´s. However the PDF should be display automaticly this meand without some further action of the user. This HTTP Header Information works response.setHeader(Content-Disposition, attachment; filename= + fileName); and this does not works response.setHeader(Content-Disposition, inline; filename= + fileName); Is the comibination of the values inline and filename not possible? Thanks for any Ideas, Jan - 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: Now: Path-problem
Hi Tom, If all your FO files reside in the same place then place a font-base definition in your FOP configuration file. If your FO files are located in different locations make a call to userAgent.setBaseURL(baseURL) before processing the FO file to set the base url used for resolving. Adrian. Thomas Zastrow wrote: I'm very sorry, but I have another (little) problem ... ;-) My Java-code to transform a FO-File into a PDF-file works fine now - with one exception: In the FO-File, there are relative links to external images in the art of: src=url(images/graphic1.svg) where the file graphic1.svg resists in a sub-directory images where the FO-file resists ... That produces the error: SCHWERWIEGEND: Image not available: url(images/graphic1.svg) When I change the relative-paths (images/graphic1.svg) to absolute paths, it works perfect again. So, is there a possibility to say FOP that it should use relative paths when parsing the FO-file?? I now that I peeve you, please be patient :-) Best, Tom - 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: AW: suggest a filename to a generated pdf
Maybe this can help you... http://www.jguru.com/faq/view.jsp?EID=252010 Zmitko, Jan wrote: I´ve tried response.setHeader(Content-Disposition, inline; filename=\ + fileName + \); (not attachment for the undermentioned reasons) and the behavior is the same this means the filename is not set. In the case of attachment the filename is allways set (with and without escaping). -Ursprüngliche Nachricht- Von: Adrian Cumiskey [mailto:[EMAIL PROTECTED] Gesendet: Montag, 12. März 2007 10:26 An: fop-users@xmlgraphics.apache.org Betreff: Re: suggest a filename to a generated pdf Hi Jan, I think maybe you might need to quote the value of your filename parameter ... Try this :- response.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); Adrian. Zmitko, Jan wrote: Hi, I try do suggest a filename to the generated pdf´s. However the PDF should be display automaticly this meand without some further action of the user. This HTTP Header Information works response.setHeader(Content-Disposition, attachment; filename= + fileName); and this does not works response.setHeader(Content-Disposition, inline; filename= + fileName); Is the comibination of the values inline and filename not possible? Thanks for any Ideas, Jan - 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] Maybe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.93 generated a damaged PDF File
Hi Yaya, Are you using FOP 0.20 or 0.93? Please post up your input xml/XSL-FO files and I'll take a look at it. Adrian. DIALLO Yaya wrote: Hi, I use FOP 0.93 to generate a pdf file from xml/XSL-FO. While opening, the file I get the following error, unable to open the file , the file is damaged. I past below my code *public* *static* String postPDF(*final* FOPTransformable toTransform) *throws* BindingException { // convert tree content in XML file : marshall *final* String xml = XMLBinding./marshall/(toTransform); // obtain the XSL file *final* InputStream xslStream; *try* { *if* (/logger/.isDebugEnabled()) /logger/.debug(looking for xsl stylesheet...); xslStream = XMLBinding.*class*.getClassLoader().getResourceAsStream(PropertyService./getXMLProperty/(toTransform.getKey())); } *catch* (PropertyServiceException e) { *throw* *new* BindingException(e); } OutputStream out = *null*; BufferedReader in = *null*; *try* { StringBuffer relativeUrl = *new* StringBuffer(64); relativeUrl.append(PropertyService./getXMLProperty/(biz.publication.ticketdir)); relativeUrl.append(toTransform.getGeneratedPath()); relativeUrl.append(toTransform.getGeneratedFileName()).append(.pdf); File file = *new* File(PropertyService./getXMLProperty/(biz.publication.basedir) + relativeUrl); *final* HttpURLConnection con = UploadFile./initConnection/(file.getParent(), file.getName()); // out = con.getOutputStream(); //out = con.getOutputStream(); FopFactory fopFactory = FopFactory./newInstance/(); *final* Fop fop = fopFactory.newFop(MimeConstants./MIME_PDF/, out); //driver.setOutputStream(out); //Setup XSLT *final* TransformerFactory factory = TransformerFactory./newInstance/(); *final* Transformer transformer = factory.newTransformer(*new* StreamSource(xslStream)); // set the parameters Set params = toTransform.getParameters(); *if* (params != *null*) { *for* (Iterator it = params.iterator(); it.hasNext();) { Parameter p = (Parameter) it.next(); transformer.setParameter(p.getName(), p.getValue()); } } //Setup input for XSLT transformation *final* StringReader stringReader = *new* StringReader(xml); *final* Source src = *new* StreamSource(stringReader); //Resulting SAX events (the generated FO) must be piped through to FOP *final* Result res = *new* SAXResult(fop.getDefaultHandler()); //Start XSLT transformation and FOP processing transformer.transform(src, res); // Read the response *if* (/logger/.isDebugEnabled()) /logger/.debug(treat servlet response); in = *new* BufferedReader(*new* InputStreamReader(con.getInputStream())); /treatServletResponse/(in); *return* relativeUrl.toString(); } *catch* (Exception e) { *throw* *new* BindingException(e); } *finally* { *if* (in != *null*) { *try* { in.close(); } *catch* (IOException e) { // nothing to do } } *if* (out != *null*) { *try* { out.close(); } *catch* (IOException e) { // nothing to do } } } } *public* *static* *void* treatServletResponse(BufferedReader in) *throws* IOException, UploadException { // Read and display the response: String line = ; StringBuffer buf = *new* StringBuffer(128); *while* ((line = in.readLine()) != *null*) { *final* FWKLogger logger = FWKLogger./getLogger/(UploadFile.*class*.getName()); *if* (logger.isInfoEnabled()) { logger.info(FileUploadServlet returned:); logger.info(line); } buf.append(line); } in.close();
Re: Writing to a file
Hi Johan, This is not really an XSL-FO or FOP related question, please find another mailing list for helping you with this solution. Cheers, Adrian. Johan Johansson wrote: Hi everyone, Im trying to figure out if it is possible to write som variable/text to a file and append the file if needed. Do anyone have a soloution for this? regards Johan - 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: pdf meta information
Hi Hinrich, You can use fo:declarations to do this. I think this link will help you find what you are looking for :- http://wiki.apache.org/xmlgraphics-fop/HowTo/XMP Adrian. Hinrich Aue wrote: Hello, I’m trying to add meta information to my PDF output. I’m using docbook, but since it seems like it is specific to the fo processor, I have to do some manual work to achieve this. Is it possible to add meta information to a PDF? Things like version, comment, author etc…. I’m using FOP 0.93. Thanks Hinrich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Distribute fonts in jar
This should work.. Try using the URL jar protocol :- jar:file:///c:/folder/lib.jar!fonts/font.xml Adrian. David Morales wrote: Hi all... I need to distribute all xsl-stuff in a jar file, including fonts (userconfig.xml, fonts.xml, and ttf files)... but can fop read fonts from a URL?? I mean, fop will try to read font from something like file:c:/folder/lib.jar!fonts/font.xml This is the problem if i try to do something like that [ERROR] Failed to read font metrics file file:/C:/lib/lib1.jar!/fuentes/ComicSansMSBold.xml: C:\lib\lib1.jar!\fuentes\ComicSansMSBold.xml (The system cannot find the path specified) - 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: Bad FOP configurations
Chris Bowditch wrote: Simon Pepping wrote: - A nonexistent metrics file URL for a font that is not used is not a problem. Agreed. The problem is that you only know if the font is going to be used at runtime - then you have to handle the error in some way. So I think its best to catch configuration errors/problems at initialization before any rendering is done at runtime. Adrian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bad FOP configurations
Hi Andreas, I like this idea and suggest adding a new configuration variable called 'strict-config' with a default value of false. What does everyone else think? regards, Adrian. Andreas L Delmelle wrote: On Jan 23, 2007, at 15:06, Adrian Cumiskey wrote: Hi Adrian, I am investigating some bugs with bad FOP configurations.. http://issues.apache.org/bugzilla/show_bug.cgi?id=40120 http://issues.apache.org/bugzilla/show_bug.cgi?id=40288 In your opinion, on initialization if the FopFactory and FOUserAgent discover that they have bad configurations (e.g. malformed (base) urls, urls that reference non-existent content), should they :- a) Catch exceptions (ConfigurationException) and log SEVERE errors and silently continue. I personally prefer this, but would also agree with an intermediate solution, where the user can flip a switch on the FopFactory or the FOUserAgent to have them propagate the exception if it occurs... (analogous to strict or relaxed validation). Just my 2 cents... Cheers, Andreas - 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: Fonts AWT
Hi David, The current implementation of just makes use of java fonts that have been made available from the O/S via a call to GraphicsEnvironment.getLocalGraphicsEnvironment(), it does not call upon and make use of the fonts defined in the fop configuration (as the PDF renderer does). Getting this to work would not be a small task (not something easily extendable). Its best to log or raise a bug/feature request for this feature at http://xmlgraphics.apache.org/fop/bugs.html. Adrian. David Morales wrote: Hi Adrian, And there isn't a programmatic way to achieve this??? I'va tried to set sun.java2d.fontpath system property... and also copying mt fonts to $jdk/jre/lib/fonts... What about org.apache.fop.render.java2d.FontSetup class can i extend this funcionality or anyother to add fonts?? Thanks. Adrian Cumiskey escribió: Hi David, This looks to be reasonably helpful on the subject :- http://java.sun.com/j2se/1.3/docs/guide/intl/addingfonts.html. Basically you just need to install the missing fonts on your operating system. If this doesn't work you might have to try tweaking your fonts.properties file that sits in the jre/lib folder of your java installation. Adrian. David Morales wrote: Sorry... i had problems in other apache mailing lists... And then... can't i set my own fonts when using awt?? i mean, awt-fop stablishes fonts?, or awt-java? Thanks again. Chris Bowditch escribió: David Morales wrote: Hi... Can anybody tell me how can i change fonts in fop-awt preview?? i mean, if i create a pdf with fop i can configure fonts, but when i do the same operation in awt fonts aren't the same... Why do you keep posting the same question. I already answered you here: http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200701.mbox/[EMAIL PROTECTED] If that doesn't help you then please re-phrase the question. Thanks, Chris - 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] - 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: Can't create 3of9Barcode font metric file
Hi Joerg, I have just ran the same test and looked at the code and I believe that it might be a problem with your ttf file. It looks like the ttf file could be clipped - the last instruction in the ttf reader skips 4 * 4 bytes memory usage values which takes this ttf file to the end of the file so I believe the exception thrown to be correct behaviour. Have you tried converting a different ttf font file? Cheers, Adrian. Joerg Heinrich wrote: Hello, I want use a Barcode font to create barcodes in my documents, I've started with the example examples/fo/advanced/barcode.fo . So I've got the 3of9barcode font file from: http://www.geocities.com/keith_dimmock/ And I tried to create the font metric with following command: java -cp /opt/fop/build/fop.jar:/opt/fop/lib/avalon-framework-4.2.0.jar:/opt/fop/lib/commons-logging-1.0.4.jar:/opt/fop/lib/commons-io-1.1.jar org.apache.fop.fonts.apps.TTFReader -d k3.ttf k3.xml TTF Reader for Apache FOP 0.93 Parsing font... Reading k3.ttf... Reading 10 dir tables dir tables: [cmap, hhea, OS/2, maxp, head, glyf, hmtx, name, loca, post] unit per em: 2048 Number of glyphs in font: 48 hhea.Ascender: 800 390 hhea.Descender: 0 0 Number of horizontal metrics: 2 Error while building XML font metrics file. java.io.EOFException: Reached EOF, file size=5104 offset=5104 at org.apache.fop.fonts.truetype.FontFileReader.seekSet(FontFileReader.java:86) at org.apache.fop.fonts.truetype.FontFileReader.seekAdd(FontFileReader.java:99) at org.apache.fop.fonts.truetype.FontFileReader.skip(FontFileReader.java:109) at org.apache.fop.fonts.truetype.TTFFile.readPostScript(TTFFile.java:854) at org.apache.fop.fonts.truetype.TTFFile.readFont(TTFFile.java:479) at org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:206) at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:161) If I try to use the metric file that's within the folder examples/fo/advanced I've got the following error: Failed to read font metrics file /opt/fop/fonts/k3.xml org.xml.sax.SAXException: Missing metrics-version attribute - please regenerate the font metrics file with a more recent version of FOP I'm using FOP Version 0.93 Can anyone help me? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSL transformation throws a NullPointerException
Hi Xavier, The exception is thrown on this line because of the method call on a null rootFObj object reference. 416: BookmarkTree bookmarkTree = rootFObj.getBookmarkTree(); Although not sure why the rootFObj reference is null... I am new to the fop project and still finding my way but will do my best to find some answers to your problem. Do you have the XSLT source document? Do you have the code creates the DOMSource object and which calls convertDocumentToPDF? To try and answer your question about the rootFObj. I believe it represents and object reference representation of the parent node (the fo::root node) of the page sequence node (fo::page-sequence) in your document. Adrian. Xavier Ottolini wrote: Hi, I want to build a PDF file with a XSL transformation. I use FOP 0.93 on Tomcat 4.3 (Windows) 1) I load the XSLT 2) I create a DOM Document 3) I create de DOMSource Element 4) I process the XSL transformation public ByteArrayOutputStream convertDocumentToPDF(DOMSource source, String xsltPath) throws IOException, FOPException, TransformerException, Exception { FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); // configure foUserAgent as desired // Setup output ByteArrayOutputStream out = new ByteArrayOutputStream(); try { // Construct fop with desired output format Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out); // Setup XSLT TransformerFactory factory = TransformerFactory.newInstance(); //Setup Transformer System.out.println(xsltPath:+ xsltPath); File xslFile = new File(xsltPath); Source xsltSrc = new StreamSource(xslFile); Transformer transformer = factory.newTransformer(xsltSrc); // Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); if(source == null) throw new Exception(Document DOMSource est null); // Start XSLT transformation and FOP processing Line 180 --- transformer.transform(source, res); fop = null; } finally { out.close(); } return out; } The problem is that ther is an error on the line transformer.transform(source, res); Here is the detail of the error message java.lang.NullPointerException at org.apache.fop.area.AreaTreeHandler.endDocument(AreaTreeHandler.java: 416) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:171) at org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler.java:192) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1224) 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 com.adelis.roederer.fop.DecompteSante.convertDocumentToPDF(DecompteSante.java:180) I looked at the source of the endDocument method of the AreaTreeHandler class. I did not understant why is the Exception thrown : /** * End the document. * * @throws SAXException if there is some error */ public void endDocument() throws SAXException { finishPrevPageSequence(null); // process fo:bookmark-tree Line 416 : -- BookmarkTree bookmarkTree = rootFObj.getBookmarkTree(); Has anybody any idea ? What is this rootFObj ? Regards, Xavier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]