RE: Current date integration
Hi Oleg J.Pietschmann, Sandrine Pilon wrote: OK ! But a problem persists. when I compile with FOP, It returns me errors about the line: 'exclude-result-prefixes=user' in stylesheet and I don't understand why. What is the error message ? Here is the result when I compiled with FOP: ** [INFO]: FOP 0.20.3 file:///D:/Program Files/FOP/fop-0.20.3/MCCFdConfig_FO_2.xsl; Line 7; Column 40; [ERROR]: null ** and the line 7 is this: 'extension-element-prefixes=date' Column 40 is lhe last column. I also tried J.Pietschmann advises, but the same error occurred with his example: ** ?xml version=1.0 encoding=utf-8? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:date=java.util.Date xmlns:format=java.text.SimpleDateFormat exclude-result-prefixes=date format xsl:template match=/ xsl:variable name=pattern.MM.dd G 'at' hh:mm:ss a zzz/xsl:variable xsl:variable name=SimpleDateFormat select=format:new($pattern) / xsl:variable name=Date select=date:new() / xsl:value-of select=format:format($SimpleDateFormat, $Date) / /xsl:template ** Thank you because 'I'm stumped'. ;o) Sandrine
Re: FOP memory consumption
On 2002.05.01 16:34 Bernd Brandstetter wrote: So, I have two questions/suggestions: 1) Wouldn't it be possible to let FOP create the output in two steps like for instance (La)TeX does. Doing a dry run first only to calculate the page references, store them somewhere, and then produce the actual output in a second run. As outlined on this page this is the approach that we are heading for: http://xml.apache.org/fop/design/optimise.html This should make any size document possible. 2) Are there plans to port FOP to C/C++ sometime? I guess that at least part of the memory consumption is to be blamed on Java and IIRC the underlying Xerces and Xalan are already available as C++ versions, so why not FOP? The issue of implementing FOP is not about the language. Since using java means we already have a large number of services available and reduced debugging effort then this is a logical choice (this doesn't prevent other choices). The issue is dealing with the large number of elements, properties and layout issues. Once the real problem is solved then it will be a more relevant question.
Page Sequencing to conserve memory
I'm pretty new to XSL-FO and FOP and having problems with serious memory usage on 500-1000 page docuements using tables as a reporting tool. Being that I populate the data into the page sequence from my XML data file, does anybody know of a way to end the page sequence after a screen full of data and start a new page sequence. I restrict my data in the XML to placing a screen full between FormFeed/FormFeed tags. Ideally I would like to end the page sequence when hitting a /FormFeed and start a new page sequence for an open FormFeed all within my stylesheet. Any ideas? John Bourke *** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictly prohibited. Whilst Cedar Plc takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Cedar Plc grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
Re: Current date integration
Sandrine Pilon wrote: ** [INFO]: FOP 0.20.3 file:///D:/Program Files/FOP/fop-0.20.3/MCCFdConfig_FO_2.xsl; Line 7; Column 40; [ERROR]: null ** and the line 7 is this: 'extension-element-prefixes=date' Column 40 is lhe last column. I also tried J.Pietschmann advises, but the same error occurred with his example: ** ?xml version=1.0 encoding=utf-8? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:date=java.util.Date xmlns:format=java.text.SimpleDateFormat exclude-result-prefixes=date format xsl:template match=/ xsl:variable name=pattern.MM.dd G 'at' hh:mm:ss a zzz/xsl:variable xsl:variable name=SimpleDateFormat select=format:new($pattern) / xsl:variable name=Date select=date:new() / xsl:value-of select=format:format($SimpleDateFormat, $Date) / /xsl:template ** xsl:stylesheet element must have version attribute - that's probably your error. And that stylesheet doesn't generate any fo elements also, is it test only one? -- Oleg Tkachenko Multiconn International, Israel
Re: [ERROR]: Don't know what to do with
I had the same error message since I use fop 0.20.2 and later fop 0.20.3, but I had no problems with fop 0.20.1 and earlier versions. I don't know what EXACTLY is the problem but the problem solved itself after I changed my OS from Windows ME to Windows 2000 (using the SAME UNMODIFIED fop installation!!!). Now it works fine. L'eau [EMAIL PROTECTED] schrieb am 02.05.2002, 10:55:54: Ok, so I had the time to download an old FOP version, and was glad to see it had a jimi-1.0.jar in it! It works to a degree. I did this: C:\xsl\buildFop list.fo list.pdf Now I get the following error message now: [ERROR]: Don't know what to do with .and that's it. It doesn't even tell me what it doesn't know what to do with. I'm stumped and baffled. Devon PS. who would I write to, to let Apache know that their latest FOP package is missing a jimi-1.0.jar? I can only imagine how many other people are having a problem and giving up. __ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com
Re: [ERROR]: Don't know what to do with
I'm glad I'm not the only one with this problem. Interesting you noticed a problem when using it on Windows ME (i'm using that OS myself). I just found Fop 0.20.1 works exactly as expected, but Fop 0.20.3 still gives me that strange error. I'm not sure how the OS could possibly affect a java program's ability to run though. Anyway, I'd much prefer to use 0.20.3, but I'll have to use the older version too until an update is made or something is figured out. Thank you all. I'm going to poke around the Apache site now and figure out who to e-mail about the missing jimi-1.0.jar the way Windows ME affects 0.20.3. Devon --- [EMAIL PROTECTED] wrote: I had the same error message since I use fop 0.20.2 and later fop 0.20.3, but I had no problems with fop 0.20.1 and earlier versions. I don't know what EXACTLY is the problem but the problem solved itself after I changed my OS from Windows ME to Windows 2000 (using the SAME UNMODIFIED fop installation!!!). Now it works fine. __ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com
Re: Current date integration
hmmm, well, with version attribute the transformation works fine with saxon and xalan, but it produces no fo elements, how do you use it with fop? Sandrine Pilon wrote: Version 1.0 stylesheet is included but it's a copy/paste problem . Also fo element are included but I wanted to be concise. I still have error 'null'. -- Oleg Tkachenko Multiconn International, Israel
Re: [ERROR]: Don't know what to do with
L'eau wrote: Ok, so I had the time to download an old FOP version, and was glad to see it had a jimi-1.0.jar in it! It works to a degree. I did this: C:\xsl\buildFop list.fo list.pdf Now I get the following error message now: [ERROR]: Don't know what to do with .and that's it. It doesn't even tell me what it doesn't know what to do with. I'm stumped and baffled. Strange, this error happens if you give three commandline arguments and in your case this seems to be blank (really strange .. which OS are you using?) You could try fop list.fo list.pdf (with quotes) Devon PS. who would I write to, to let Apache know that their latest This is the appropriate place but we had to remove jimi because we are not allowed to distribute it (it is mentioned in the release notes!) FOP package is missing a jimi-1.0.jar? I can only imagine how many other people are having a problem and giving up. Christian
OutOfMemory - What worked for me.
Hi guys, I had been having the memory issue over the last number of days. My fix that has worked and probably been posted before was to split up the pages of my file using a correct implementation of page sequences. Previously I had been pumping all data into one page sequence and breaking it using page breaks but FOP simply kept loading this into memory until eventually it ran out. Now I just load a page sequence at a time and this allows the garbage collector to run once all available memory has been allocated and thus free up memory used by earlier pages. As long as there is enough memory for a single page you shouldn't need much more as the collector can free this once the page has been rendered. John *** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictly prohibited. Whilst Cedar Plc takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Cedar Plc grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
Re: [ERROR]: Don't know what to do with
did you try C:\xsl\buildFop -fo list.fo -pdf list.pdf ? Christian Geisert wrote: L'eau wrote: Ok, so I had the time to download an old FOP version, and was glad to see it had a jimi-1.0.jar in it! It works to a degree. I did this: C:\xsl\buildFop list.fo list.pdf Now I get the following error message now: [ERROR]: Don't know what to do with .and that's it. It doesn't even tell me what it doesn't know what to do with. I'm stumped and baffled. Strange, this error happens if you give three commandline arguments and in your case this seems to be blank (really strange .. which OS are you using?) You could try fop list.fo list.pdf (with quotes) Devon PS. who would I write to, to let Apache know that their latest This is the appropriate place but we had to remove jimi because we are not allowed to distribute it (it is mentioned in the release notes!) FOP package is missing a jimi-1.0.jar? I can only imagine how many other people are having a problem and giving up. Christian
Re: I get a mysterious NoClassDefFoundError
Devon- Check J.Pietschmann's reply to your problem. He explains why your original command wasn't working, and why Jimi isn't included in the FOP download. I believe you can just download Jimi from the Sun site if you want it, but I've been running with the batch file as is, with no problems. It appears that if you specify a bad classpath, it's simply ignored, rather than bringing everything to a halt. -Jeff L'eau [EMAIL PROTECTED]To: [EMAIL PROTECTED] o.com cc: Subject: Re: I get a mysterious NoClassDefFoundError 05/02/2002 04:24 AM Please respond to fop-user AAhh i see. Thanx. I ignored That batch file, because it had the jimi.jar in it's path, and since that jar didn't come with my download I assumed that batch was for something totally different. Any idea where I can get a copy of the jimi.jar? I'm thinking that if I simply have that, it will solve all my problems. If I download an old copy of FOP, and use THAT jimi.jar, might it work in the latest FOP? Devon --- [EMAIL PROTECTED] wrote: Devon- OK, I'm confused too. I don't have a jimi-1.0.jar (or any jimi*.jar, for that matter) I'm attaching the .bat that came with my download (I downloaded last Friday, so I would think they'd be the same, since the download directory we both pulled from shows the package being last uploaded on March 4th. I don't think it'll make any difference, though, since you seem to be including everything that is there. I'm not familiar enough with Java (I've done a little programming in it, but when apps start using multiple jars, it becomes black magic to me) to have any answer, other than using the .bat file that works for me. I do think you're correct in the assumption that your OS shouldn't matter (I'm on XP, BTW.) Here are the contents of my batch file: java -cp build\fop.jar;lib\batik.jar;lib\xalan-2.0.0.jar;lib\xerces-1.2.3.jar;lib\avalon-framework-4.0.jar;lib\logkit-1.0.jar;lib\jimi-1.0.jar org.apache.fop.apps.Fop -c conf/userconfig.xml %1 %2 %3 %4 %5 %6 %7 %8 It should be untouched from the time I downloaded it, other than the -c conf/userconfig.xml parameter I added to use some custom fonts. Hope that helps. If not, post back, and perhaps someone wiser than I can help. -Jeff __ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com
Re: Memory consumption with large images in FOP
J.Pietschmann- Thanks for your help. I think I may be running out of memory when viewing the PDF. I'll do some playing around on my end, but your explanations should help a lot. Thanks again, -Jeff J.Pietschman n To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: oo.de Subject: Re: Memory consumption with large images in FOP 05/01/2002 06:00 PM Please respond to fop-user [EMAIL PROTECTED] wrote: the resulting PDF has a black rectangle, where the image should be. In PDF, images are rendered at 1/72 inch per pixel, or roughly 3.53 cm per 100 pixel. Higher resolution images are scaled down during rendering, you may see a resampling artifact, or simply a bug (probably in the PDF viewer). Be aware that the PDF viewer will have to decompress your 4k*5k pixel images at 3 bytes per pixel, resulting in allocating nearly 60 MB or more. It is also possible that you run into an arithmetic overflow or some similar problem. Is there a limit to the resolution of raster images FOP (or PDFs in general) can handle, or this perhaps a problem with memory? In theory, there is no limit, at least not directly imposed by FOP. FOP will, however, hold the file in memory, decompressed for some formats. It appears the images contained within a PDF are compressed. Does anyone know if this compression is JPEG, and if so, does FOP just dump a given JPEG into the PDF file, or does it uncompress the original JPEG in memory, and then recompress it to go into the PDF? For JPEG images, the file is dumped into the PDF basically unchanged. Finally, I haven't found a definitive list of the image types allowed in an external-graphic src attribute. Does anyone know where I might find such a list. From the sources: GIF, BMP, EPS and JPEG are supported natively, in part through standard Java mechanisms. There are not necessarily all subformats supported (BMP has at least a dozen, some very obscure, and there are a few exotic JPEG subformats as well). SVG is supported through Batik. FOP can take advantage of the Jimi image library and of JAI. Jimi is no longer distributed with FOP because of license reasons, you can get it yourself (there are instructions in the docs), but for some odd reasons it may be possible that you'll have to rebuild FOP from the sources, even though this is very easy nowadays. Jimi supports: AFP (dunno), BMP, CUR (MS Windows cursor?), GIF, ICO (Windows icons), PCX, PICT (dunno), PNG, PSD (dunno), Sun raster (used by Sun), TGA, TIFF and XBM (X Windows bitmap). JAI is an interface specification, FOP will support whatever your JAI conformant implementation supports if you drop it in (may require rebuild). This list is not authoritative, apply usual disclaimers. J.Pietschmann
RE: OutOfMemory - What worked for me.
This is great if you have logical page breaks. Only one of our reports has any logical page breaks however. So I can insert new page-sequences every 1000 rows or so. But unless I start counting rows and trying to guess at when a cell wraps, I have no way of preventing page breaks that leave awkward-looking partially filled pages. Matt Savino -Original Message- From: John Bourke [mailto:[EMAIL PROTECTED] Sent: Thursday, May 02, 2002 4:24 AM To: Fop Users (E-mail) Subject: OutOfMemory - What worked for me. Hi guys, I had been having the memory issue over the last number of days. My fix that has worked and probably been posted before was to split up the pages of my file using a correct implementation of page sequences. Previously I had been pumping all data into one page sequence and breaking it using page breaks but FOP simply kept loading this into memory until eventually it ran out. Now I just load a page sequence at a time and this allows the garbage collector to run once all available memory has been allocated and thus free up memory used by earlier pages. As long as there is enough memory for a single page you shouldn't need much more as the collector can free this once the page has been rendered. John ** * This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictly prohibited. Whilst Cedar Plc takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Cedar Plc grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused. ** **
Re: Basic-link problem in JSPs
Ralf Steppacher wrote: Are you, by any chance, using disable-output-escaping somewhere? Yes, but somewhere else in the stylesheet producing the fo document. It doesn't matter where. Do not use d-o-e if you expect your style sheet to work with short-circuit XSLT processor applications. XSLT doesn't del with tags, it uses a tree of nodes for input and output. What you think of as creating single tags is still plain text until serialization. A serialization never happens if the result is fed right into the XML consumer by using a DOM tree or a SAX event stream. Behaviour does not change if I comment out the two lines (that do not work with embedded fop either). If you delete the d-o-e stuff, dump the tree and check with the command line application, what happens? J.Pietschmann
Re: [ERROR]: Don't know what to do with
Christian Geisert wrote: You could try fop list.fo list.pdf (with quotes) Not a very good idea on Win95/98/ME (or any other system), it searches for a command file fop list.fo list.pdf.exe (with spaces) On Win95/98/ME, the command processor feeds the whole command line in one piece to the applications, therefore the JRE parses the command line. Either there is a bug in the parser, or the command processor appends some ugly invisible character. It's been years since i last delat with DOS based systems, but I believe the command line gets a \r\n ant the end, perhaps the JRE doesn't count the \r as white space and passes it as parameter. It would help to run a test program to see what happens: public class TestC { static final char[] hex={'0','1','2','3','4','5','6','7', '8','9','A','B','C','D','E','F'}; static public void main(String[] arg) { for( int i=0;iarg.length;i++ ) { byte[] b=arg[i].getBytes(); for( int j=0;jb.length;j++ ) { System.out.print(+hex[b[j]/16]+hex[b[j]%16]+' '); } System.out.println(); } } } J.Pietschmann
Re: Trying to resolve memory exception through correct use of pag e se quencing
John Bourke wrote: J. below is my layout-master-set followed by the way I start the page sequence for my repeatable page. fo:page-sequence-master master-name=reportDetails fo:repeatable-page-master-alternatives fo:conditional-page-master-reference master-name=detailPage blank-or-not-blank=not-blank/ /fo:repeatable-page-master-alternatives Here is the problem: You have a page master for non-blank pages, but none for blank pages. Somewhere you force a blank page, perhaps by break-before=page-even or something similar, and FOP falls over. Provide a page master for blank page, and this problem should go away. J.Pietschmann
Re: Page Sequencing to conserve memory
John Bourke wrote: I'm pretty new to XSL-FO and FOP and having problems with serious memory usage on 500-1000 page docuements using tables as a reporting tool. Being that I populate the data into the page sequence from my XML data file, does anybody know of a way to end the page sequence after a screen full of data and start a new page sequence. I restrict my data in the XML to placing a screen full between FormFeed/FormFeed tags. Ideally I would like to end the page sequence when hitting a /FormFeed and start a new page sequence for an open FormFeed all within my stylesheet. Try xsl:template match=FormFeed fo:page-sequence master-reference=... xsl:apply-templates/ /fo:page-sequence /xsl:template and use xsl:apply-templates in the context of the parent of the FormFeed elements. J.Pietschmann
Re: Setting a maximum number of charcaters in a line
Stéphane REYNIER wrote: Is there any solution for setting a maximum number of charcaters whitin a line ? I have to built two areas with 4 lines of 80 charcaters each, in a PDF document. You can't set a maximum for the number of characters in a line. You should already generate fo:block elements containing the 80 character lines. How this can be achieved depends heavily on your source and perhaps other circumstances. J.Pietschmann