Re: FOP usage Error
You seem to have an XSLT problem somewhere judging from the log. I could not reproduce the NullPointerException so I guess it's only a subsequent error from the first. I'd go after the SAXParserException first but that one is not generated by FOP. Good luck. On 22.03.2006 21:16:54 Kiranmai Bellam wrote: Hello, I am new to fop.I installed the FOP-0.91 beta version on my linux box. When I run the command [EMAIL PROTECTED] fop-0.91beta]# ./fop -d -xml monkey.xml -xsl tcc_fo.xsl -pdf monkey.pdf It is giving me the following error. [Fatal Error] docbook.xsl:1:50: White spaces are required between publicId and systemId. http://www.nmt.edu/tcc/doc/docbook42xep/docbook- xsl-1.65.1/fo/docbook.xsl; Line #1; Column #50; org.xml.sax.SAXParseException: White spaces are required between publicId and systemId. Exception java.lang.NullPointerException at org.apache.fop.cli.InputHandler.transformTo (javax.xml.transform.Result) (Unknown Source) at org.apache.fop.cli.InputHandler.render(org.apache.fop.apps.Fop) (Unknown Source) at org.apache.fop.cli.Main.startFOP(java.lang.String[]) (Unknown Source) at org.apache.fop.cli.Main.main(java.lang.String[]) (Unknown Source) - java.lang.NullPointerException at org.apache.xalan.transformer.TransformerImpl.setParameter (java.lang.String, java.lang.String, java.lang.Object) (Unknown Source) at org.apache.xalan.transformer.TransformerImpl.setParameter (java.lang.String, java.lang.Object) (Unknown Source) at org.apache.fop.cli.InputHandler.transformTo (javax.xml.transform.Result) (Unknown Source) at org.apache.fop.cli.InputHandler.render(org.apache.fop.apps.Fop) (Unknown Source) at org.apache.fop.cli.Main.startFOP(java.lang.String[]) (Unknown Source) at org.apache.fop.cli.Main.main(java.lang.String[]) (Unknown Source) --- I dont know where I am making mistake.So please help me. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running FOP without JRE
Jeremias Maerki [EMAIL PROTECTED] wrote on 03/22/2006 08:43:58: Not yet. I'm working on that in my free time but only at low priority. Same here, but I just started. Sounds like a fop-dev-native newsgroup to me. But what you can do is bundle the JRE since it doesn't need to be installed. I'm sure there are tutorials for that on the net. On 22.03.2006 14:33:48 Prakash R wrote: Is there a way to natively compile FOP so it can be run on Windows without needing a JRE installed on the system? I'm trying to bundle FOP with a windows application but the user of the application is not needed to have JRE. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TTF Reader : file not found exception ?
Hi, i've finally found the problem. TTFReader does no work on Java 1.5. It only work on java 1.4... sob sob.. Pierre-Yves Landur Dorigo consultants http://www.dorigo-consultants.com Pierre-Yves Landur a crit: Hi Chrish here is the command that i use. /usr/bin/java -cp /var/www/ecd/modules/movie/common/fopFonts/fop.jar:/var/www/ecd/modules/movie/common/fopFonts/avalon-framework.jar:/var/www/ecd/modules/movie/common/fopFonts/xml-apis.jar:/var/www/ecd/modules/movie/common/fopFonts/xercesImpl.jar:/var/www/ecd/modules/movie/common/fopFonts/xalan.jar org.apache.fop.fonts.apps.TTFReader upirpaw.ttf upirpaw.ttf.xml I believe that it is correct... Pierre-Yves Landur Dorigo consultants http://www.dorigo-consultants.com Chris Bowditch a crit: Pierre-Yves Landur wrote: snip/ TTF Reader v1.1.1 Reading upirpaw.ttf... Number of glyphs in font: 280 Creating xml font file... Creating CID encoded metrics Writing xml font file upirpaw.ttf.xml... javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:/var/www/ecd/media/fonts/upirpaw.ttf.xml (No such file or directory) Can you post up the command line used to invoke the TTFReader? Either you specified a URL as the destination file. Which I don't think is valid, or maybe FOP is using the fontBaseURL in the output path. In either case the URL quoted above looks invalid to me. I reckon it should be: file:///var/www/ecd/media/fonts/upirpaw.ttf.xml Chris snip/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TTF Reader : file not found exception ?
Good, we're one step further. Now that we know that it's a problem on Java 1.5, would someone with access to a Unix machine please try to debug the problem and possibly check if the problem is still present with the latest source code from FOP Trunk? On 23.03.2006 15:57:56 Pierre-Yves Landuré wrote: i've finally found the problem. TTFReader does no work on Java 1.5. It only work on java 1.4... sob sob.. snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TTF Reader : file not found exception ?
Oh, that's good news because it means the problem doesn't exist anymore in FOP Trunk. I've tested with 1.5.0_03 on WinXP SP2 today and couldn't reproduce the problem. On 23.03.2006 16:31:00 Sascha Schmidt wrote: The problem also comes up on Windows XP, SP2, JRE 1.5.0_03-b07, it's not Linux/Unix specific. NORTHBIT Sascha Schmidt [EMAIL PROTECTED] www.northbit.de -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Thursday, March 23, 2006 4:25 PM To: fop-users@xmlgraphics.apache.org Subject: Re: TTF Reader : file not found exception ? Good, we're one step further. Now that we know that it's a problem on Java 1.5, would someone with access to a Unix machine please try to debug the problem and possibly check if the problem is still present with the latest source code from FOP Trunk? On 23.03.2006 15:57:56 Pierre-Yves Landuré wrote: i've finally found the problem. TTFReader does no work on Java 1.5. It only work on java 1.4... sob sob.. snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Rép. : unable to generate alpha (α ) through FOP
-Message d'origine- De : Willy Reinhardt [mailto:[EMAIL PROTECTED] Envoyé : mardi 21 mars 2006 13:19 You need to include your font into your PDF see: http://xmlgraphics.apache.org/fop/0.20.5/fonts.html [EMAIL PROTECTED] I am generating PDF rendition through fop and am unable to generate few special characters like alpha (α) in PDF rendition. It would be really great if you please suggest how to generate these special characters. Hi Amit, Greek letters are part of the Symbol PDF standard font. You just need to set the font-family property. Take care with font-weight font-style properties, because Courier font contains only Normal glyphes. Pascal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TTF Reader : file not found exception ?
On Mar 23, 2006, at 16:43, Jeremias Maerki wrote: Oh, that's good news because it means the problem doesn't exist anymore in FOP Trunk. I've tested with 1.5.0_03 on WinXP SP2 today and couldn't reproduce the problem. For the die-hard 0.20.5 users: can someone try --don't have the codebase here myself, and don't feel like setting it all up :)-- and see if changing TTFReader.writeFontXML() to use StreamResult's String constructor instead of the File constructor helps? Just curious... Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TTF Reader : file not found exception ?
On Mar 23, 2006, at 20:09, Andreas L Delmelle wrote: On Mar 23, 2006, at 16:43, Jeremias Maerki wrote: Oh, that's good news because it means the problem doesn't exist anymore in FOP Trunk. I've tested with 1.5.0_03 on WinXP SP2 today and couldn't reproduce the problem. For the die-hard 0.20.5 users: can someone try --don't have the codebase here myself, and don't feel like setting it all up :)-- and see if changing TTFReader.writeFontXML() to use StreamResult's String constructor instead of the File constructor helps? It may be of interest to note that the main difference between 0.20.5 and 0.91 in this respect is the fact that 0.91 passes in a File (rather than the filename as a String), then explicitly instantiates an OutputStream which in its turn is used in the StreamResult's constructor. Taking control over the details avoids the dependency on the JVM internals and/or the XSL Transformer implementation... Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Performance issue in generating PDFs for Custom Fonts in UNIX env.
Title: Performance issue in generating PDFs for Custom Fonts in UNIX env. Hi, We are using FOP 0.20.5 for PDF conversion. We registered Courier New custom font by following the steps given at http://xmlgraphics.apache.org/fop/0.20.5/fonts.html#custom We generated appropriate font metrics file(cour.xml) for cour.ttf file using TTFReader on different operating systems(Windows and UNIX) based on their usage. The performance of generating PDF in Windows env is excellent, but in UNIX environment it is very bad. For 27 pages document in windows it is taking 500 ms(approx), where as in UNIX( Solaris) 43587ms (approx). This is a major hit for us in using FOP. We need a solution ASAP. Have you ever faced such problem with FOP? Your suggestions will be greatly appreciated. Here is the log taken from UNIX environment. --- 17:30:29,492 INFO FOP - Using org.apache.xerces.parsers.SAXParser as SAX2 Parser 17:30:29,493 INFO Driver - building formatting object tree 17:30:29,493 INFO FOP - setting up fonts 17:30:29,528 INFO Driver - [1] 17:30:29,533 INFO FOP - Using org.apache.xerces.parsers.SAXParser as SAX2 Parser 17:30:30,714 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:30,717 INFO Driver - [2] 17:30:32,522 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:32,525 INFO Driver - [3] 17:30:34,424 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:34,427 INFO Driver - [4] 17:30:36,418 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:36,422 INFO Driver - [5] 17:30:38,060 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:38,062 INFO Driver - [6] 17:30:39,384 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:39,387 INFO Driver - [7] 17:30:41,190 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:41,193 INFO Driver - [8] 17:30:42,963 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:42,967 INFO Driver - [9] 17:30:44,895 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:44,898 INFO Driver - [10] 17:30:46,886 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:46,889 INFO Driver - [11] 17:30:48,769 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:48,772 INFO Driver - [12] 17:30:50,647 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:50,650 INFO Driver - [13] 17:30:52,481 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:52,484 INFO Driver - [14] 17:30:54,052 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:54,055 INFO Driver - [15] 17:30:56,036 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:56,039 INFO Driver - [16] 17:30:57,995 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:57,998 INFO Driver - [17] 17:30:59,381 DEBUG Driver - Last page-sequence produced 1 pages. 17:30:59,384 INFO Driver - [18] 17:31:00,792 DEBUG Driver - Last page-sequence produced 1 pages. 17:31:00,795 INFO Driver - [19] 17:31:02,672 DEBUG Driver - Last page-sequence produced 1 pages. 17:31:02,675 INFO Driver - [20] 17:31:04,609 DEBUG Driver - Last page-sequence produced 1 pages. 17:31:04,612 INFO Driver - [21] 17:31:06,393 DEBUG Driver - Last page-sequence produced 1 pages. 17:31:06,396 INFO Driver - [22] 17:31:07,987 DEBUG Driver - Last page-sequence produced 1 pages. 17:31:07,990 INFO Driver - [23] 17:31:09,494 DEBUG Driver - Last page-sequence produced 1 pages. 17:31:09,496 INFO Driver - [24] 17:31:10,336 DEBUG Driver - Last page-sequence produced 1 pages. 17:31:10,339 INFO Driver - [25] 17:31:10,858 DEBUG Driver - Last page-sequence produced 1 pages. 17:31:10,861 INFO Driver - [26] 17:31:11,966 DEBUG Driver - Last page-sequence produced 1 pages. 17:31:11,968 INFO Driver - [27] 17:31:13,005 DEBUG Driver - Last page-sequence produced 1 pages. 17:31:13,006 INFO Driver - Parsing of document complete, stopping renderer 17:31:13,079 DEBUG Driver - Initial heap size: 27296Kb 17:31:13,080 DEBUG Driver - Current heap size: 36756Kb 17:31:13,080 DEBUG Driver - Total memory used: 9459Kb 17:31:13,080 DEBUG Driver - Memory use is indicative; no GC was performed 17:31:13,080 DEBUG Driver - These figures should not be used comparatively 17:31:13,080 DEBUG Driver - Total time used: 43587ms 17:31:13,080 DEBUG Driver - Pages rendered: 27 17:31:13,080 DEBUG Driver - Avg render time: 1614ms/page Thanks in advance, Ganji
RE: Setting fop 0.91 to know relative path.
The default URIReader doesn't know how to handle the ServletContext paths. I had a similar issue where embedded font URL's and external graphics were not being found under the webapp. Jeremias Mearki added another URIResolver called ServletContextURIResolver to the trunk http://svn.apache.org/viewcvs?rev=379810view=rev Which lets you specify URI's like servlet-context:/path/from/servlet/context/myImage.gif you just need to add it to the FOUserAgent while configuring your FOP, Like: ServletContext context= .; InputSource fopconfigInputSource = new InputSource(..blah blah ..); //Set up stuff from fop config file if it exists if(this.fopconfigInputSource!=null) { DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder(); Configuration cfg = cfgBuilder.build(this.fopconfigInputSource); //If ServletContext is not null then setup ServletContextURIReader(context); if(context!=null) { URIResolver uriResolver = new ServletContextURIResolver(context); userAgent.setURIResolver(uriResolver); } this.userAgent.setUserConfig(cfg); Fop fop = new Fop(MimeConstants.MIME_PDF,this.userAgent); //...etcetc } This works as is for images, but the URIResolver passed in isn't used throughout FOP yet, and so embedded font URL's read from the fop config fail. I wrote a work around (see this thread: http://marc.theaimsgroup.com/?l=fop-userm=114099192412561w=2 and http://marc.theaimsgroup.com/?l=fop-userm=114099649120178w=2 ) that does use the URIResolver and so you can specify font URL's in fopconfig.xml like: renderers renderer mime=application/pdf filterList valueflate/value /filterList fonts font metrics-url=servlet-context:///WEB-INF/Arial.xml kerning=no font-triplet name=Arial style=normal weight=normal/ font-triplet name=ArialMT style=normal weight=normal/ /font font metrics-url=servlet-context:///WEB-INF/ArialBd.xml kerning=no font-triplet name=Arial style=normal weight=bold/ font-triplet name=ArialMT style=normal weight=bold/ /font /fonts /renderer /renderers Which allows you to package all external images and font metrics with your webapp. The work around isn't in trunk yet (perhaps because I've not submitted it as a patch yet), but hopefully soon Cheers Karl -Original Message- From: John Wiberg [mailto:[EMAIL PROTECTED] Sent: Thursday, 16 March 2006 11:13 AM To: fop-users@xmlgraphics.apache.org Subject: Setting fop 0.91 to know relative path. I have a java class that runs fop. It looks like it handles relative paths just fine when run directly from the OS command prompt but when I call the class from a web application running under tomcat, it looks like it is using the path from where I started tomcat. Any ideas? Thanks, John -- View this message in context: http://www.nabble.com/Setting-fop-0.91-to-know-relative-path.-t1288332.h tml#a3427422 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTICE This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hyphenation
FYI Reworked hyphenation has been committed to Folio. It implements TeX's discretionary hyphen in the patterns and exceptions. Takes more space and runs more slowly. For the discretionary hyphens to work, the hyphenation pattern files will have to be changed to reflect this, which could be very useful for old German orthography, at least. HyphenationTree.hyphenate returns a WordHyphenator which includes the discretionary patterns. In fact, all inter-letter positions are marked by discretionary patterns, mostly degenerate. Oh, and it requires javax.xml.stream to build; i.e. Mustang. -- Peter B. West http://cv.pbw.id.au/ Folio http://defoe.sourceforge.net/folio/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]