RE: Java script with xsl in FOP ?
Here's how we insert a dynamicly generated script it in the xslt that passes through to the HTML: script language=JavaScriptloadTopFrame(quot;xsl:value-of select=$print-csr/quot;,quot;xsl:value-of select=$print-quick-trend/quot;,quot;xsl:value-of select=$print-quick-visit-history/quot;);var protocolId = 'xsl:value-of select=@PROTOCOL_ID /';/script As you can see it could get a little ugly with large functions, but I think it should still be possible to carry anything through to the HTML. Good luck. -Matt -Original Message- From: Clay Leeds [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:05 AM To: [EMAIL PROTECTED] Subject: Re: Java script with xsl in FOP ? Abhi, Abhijit Junnare wrote: Is it possible to use javascript inside the XSL that will be used with FOP. I need to do some calculations and so I need this. Is there any other way to do some basic math or some string manipulation? I know the string functions in xsl but I am afraid they wont solve my problem. Any help if appreciated. Thanks, Abhi I've heard that XML (and/or XSLT?) has the capability to do JavaScript during processing. However, I've never needed to do this in my calculations. I've done some fairly complicated mathematical calculations using a combination of XSLT and XPath functions. In either case, this is somewhat off-topic for the FOP-user list. You should be able to find more information by searching for numeric functions in XSL or XPath. HTH! - 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: Java script with xsl in FOP ?
As long as the calculations get done somewhere, either by the XLST processor or the browser, the end result should be the same correct? (Unless some other XSLT process is dependent on the outcome of these calcs.) -Original Message- From: Victor Mote [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:11 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? Abhijit Junnare wrote: Is it possible to use javascript inside the XSL that will be used with FOP. I need to do some calculations and so I need this. Is there any other way to do some basic math or some string manipulation? I know the string functions in xsl but I am afraid they wont solve my problem. Any help if appreciated. (This is really an XSLT question.) I haven't ever done it with javascript, but I understand that it can be done. See the bottom of: http://groups.yahoo.com/group/XSL-FO/message/3857 where a method for using java in XSLT (to get today's date) is demonstrated. Note also that this must be dependent on your XSLT engine, so check its docs or mailing lists for more specific information. Victor Mote - 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: Java script with xsl in FOP ?
Duh, I forgot this was the FOP board. Is this output going to PDF? I think PDF can also do some form of JavaScript processing but I've never tried. -Original Message- From: Savino, Matt C Sent: Friday, September 12, 2003 10:16 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? As long as the calculations get done somewhere, either by the XLST processor or the browser, the end result should be the same correct? (Unless some other XSLT process is dependent on the outcome of these calcs.) -Original Message- From: Victor Mote [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:11 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? Abhijit Junnare wrote: Is it possible to use javascript inside the XSL that will be used with FOP. I need to do some calculations and so I need this. Is there any other way to do some basic math or some string manipulation? I know the string functions in xsl but I am afraid they wont solve my problem. Any help if appreciated. (This is really an XSLT question.) I haven't ever done it with javascript, but I understand that it can be done. See the bottom of: http://groups.yahoo.com/group/XSL-FO/message/3857 where a method for using java in XSLT (to get today's date) is demonstrated. Note also that this must be dependent on your XSLT engine, so check its docs or mailing lists for more specific information. Victor Mote - 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: Java script with xsl in FOP ?
Can you paste the entire JavaScript functionality you are trying to emulate with XSLT, or is it too much? X-PATH is tricky, but you can do a lot with it. -Original Message- From: Abhijit Junnare [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:25 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? YES. The output will be pdf. So I dont want to proceed if I know that it wont work in the future. So I am asking everyone so that I can think what I should be doing. Abhi --- Savino, Matt C [EMAIL PROTECTED] wrote: Duh, I forgot this was the FOP board. Is this output going to PDF? I think PDF can also do some form of JavaScript processing but I've never tried. -Original Message- From: Savino, Matt C Sent: Friday, September 12, 2003 10:16 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? As long as the calculations get done somewhere, either by the XLST processor or the browser, the end result should be the same correct? (Unless some other XSLT process is dependent on the outcome of these calcs.) -Original Message- From: Victor Mote [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:11 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? Abhijit Junnare wrote: Is it possible to use javascript inside the XSL that will be used with FOP. I need to do some calculations and so I need this. Is there any other way to do some basic math or some string manipulation? I know the string functions in xsl but I am afraid they wont solve my problem. Any help if appreciated. (This is really an XSLT question.) I haven't ever done it with javascript, but I understand that it can be done. See the bottom of: http://groups.yahoo.com/group/XSL-FO/message/3857 where a method for using java in XSLT (to get today's date) is demonstrated. Note also that this must be dependent on your XSLT engine, so check its docs or mailing lists for more specific information. Victor Mote - 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] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.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: Java script with xsl in FOP ?
You don't have the actual JavaScript do you? I find code usually works better than prose. -Original Message- From: Abhijit Junnare [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:33 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? [EMAIL PROTECTED] wrote: Can you paste the entire JavaScript functionality you are trying to emulate with XSLT, or is it too much? X-PATH is tricky, but you can do a lot with it. Here is some functionality that I would like to emulate in XSLT. I have some xml element called Name. I want to check the length of the Name element. If the string length for this is for example 10. I want to write it in a fixed width for example 20. So since I want the field to be fixed I want to add 10 fill charaters. The number of fill characters I want to add will vary as per the string length. Also the alignment can be different. If the alignment is center then I want to add fill characters before(here 5) and after (here 5) the actual Name. If alignment is left then I want to add fill characters (here 10)after the name and similarly for right aligned I want to add before the Name. Do you think something like this is feasible using XSL for variable lengths of the strings that come from xml? Your help is really appreciated. Thanks, Abhi --- Savino, Matt C [EMAIL PROTECTED] wrote: Can you paste the entire JavaScript functionality you are trying to emulate with XSLT, or is it too much? X-PATH is tricky, but you can do a lot with it. -Original Message- From: Abhijit Junnare [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:25 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? YES. The output will be pdf. So I dont want to proceed if I know that it wont work in the future. So I am asking everyone so that I can think what I should be doing. Abhi --- Savino, Matt C [EMAIL PROTECTED] wrote: Duh, I forgot this was the FOP board. Is this output going to PDF? I think PDF can also do some form of JavaScript processing but I've never tried. -Original Message- From: Savino, Matt C Sent: Friday, September 12, 2003 10:16 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? As long as the calculations get done somewhere, either by the XLST processor or the browser, the end result should be the same correct? (Unless some other XSLT process is dependent on the outcome of these calcs.) -Original Message- From: Victor Mote [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:11 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? Abhijit Junnare wrote: Is it possible to use javascript inside the XSL that will be used with FOP. I need to do some calculations and so I need this. Is there any other way to do some basic math or some string manipulation? I know the string functions in xsl but I am afraid they wont solve my problem. Any help if appreciated. (This is really an XSLT question.) I haven't ever done it with javascript, but I understand that it can be done. See the bottom of: http://groups.yahoo.com/group/XSL-FO/message/3857 where a method for using java in XSLT (to get today's date) is demonstrated. Note also that this must be dependent on your XSLT engine, so check its docs or mailing lists for more specific information. Victor Mote - 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] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.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: Java script with xsl in FOP ?
Yes, I think it is feasible. Here's some XSLT code we have that tests string length and forks based on the result: xsl:choose xsl:when test=string-length(@PRIMARY_ID) lt; 11 xsl:value-of select=@PRIMARY_ID / /xsl:when xsl:otherwise xsl:value-of select=substring(@PRIMARY_ID, 1, 10) /#xA0; xsl:value-of select=substring(@PRIMARY_ID, 11) / /xsl:otherwise /xsl:choose I think everything else you require would just involve a few more nested xsl:choose statements for the alignment types. -Original Message- From: Abhijit Junnare [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:47 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? Nope. I didnt write the code yet. I thought it would be better to know if it is worth trying before going long down the road. Sorry about that. If you still want the code I write it and send. Thanks Abhi --- Savino, Matt C [EMAIL PROTECTED] wrote: You don't have the actual JavaScript do you? I find code usually works better than prose. -Original Message- From: Abhijit Junnare [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:33 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? [EMAIL PROTECTED] wrote: Can you paste the entire JavaScript functionality you are trying to emulate with XSLT, or is it too much? X-PATH is tricky, but you can do a lot with it. Here is some functionality that I would like to emulate in XSLT. I have some xml element called Name. I want to check the length of the Name element. If the string length for this is for example 10. I want to write it in a fixed width for example 20. So since I want the field to be fixed I want to add 10 fill charaters. The number of fill characters I want to add will vary as per the string length. Also the alignment can be different. If the alignment is center then I want to add fill characters before(here 5) and after (here 5) the actual Name. If alignment is left then I want to add fill characters (here 10)after the name and similarly for right aligned I want to add before the Name. Do you think something like this is feasible using XSL for variable lengths of the strings that come from xml? Your help is really appreciated. Thanks, Abhi --- Savino, Matt C [EMAIL PROTECTED] wrote: Can you paste the entire JavaScript functionality you are trying to emulate with XSLT, or is it too much? X-PATH is tricky, but you can do a lot with it. -Original Message- From: Abhijit Junnare [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:25 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? YES. The output will be pdf. So I dont want to proceed if I know that it wont work in the future. So I am asking everyone so that I can think what I should be doing. Abhi --- Savino, Matt C [EMAIL PROTECTED] wrote: Duh, I forgot this was the FOP board. Is this output going to PDF? I think PDF can also do some form of JavaScript processing but I've never tried. -Original Message- From: Savino, Matt C Sent: Friday, September 12, 2003 10:16 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? As long as the calculations get done somewhere, either by the XLST processor or the browser, the end result should be the same correct? (Unless some other XSLT process is dependent on the outcome of these calcs.) -Original Message- From: Victor Mote [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:11 AM To: [EMAIL PROTECTED] Subject: RE: Java script with xsl in FOP ? Abhijit Junnare wrote: Is it possible to use javascript inside the XSL that will be used with FOP. I need to do some calculations and so I need this. Is there any other way to do some basic math or some string manipulation? I know the string functions in xsl but I am afraid they wont solve my problem. Any help if appreciated. (This is really an XSLT question.) I haven't ever done it with javascript, but I understand that it can be done. See the bottom of: http://groups.yahoo.com/group/XSL-FO/message/3857 where a method for using java in XSLT (to get today's date) is demonstrated. Note also
RE: Convert existing PDF to XSL-FO tool
We started using FOP based on the same requirements and have been thrilled with the results. If you can get from XSL-FO to PDF, I'm not sure why you might need a path *back*. If you are looking to create the PDF through something like Acrobat Exchange, then spit out the xsl:fo, you may be in trouble. But if you're willing to sit down and learn xsl:fo, IMO FOP makes a nice, powerful, free solution. Although I have heard of XSL:FO WSYWIG editors in the works. Any updates? -Matt -Original Message- From: John Marshall [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2003 12:48 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Convert existing PDF to XSL-FO tool I am glad to see that the expert advice is *don't*. I was given the project of finding an alternative to HTML that allowed pagination and my colleagues' suggestion was to try PDF. I found that by the time a document is in PDF it is decomposed into glyphs and vectors and all of the context information has been filtered out. The answer to my problem was, of course, XSL-FO with an easy and rational path to PDF, but I do not believe there is any way back from PDF to XSL-FO that will not involve pain and heartache. John Marshall Accurate Software 80 Peach Street, Wokingham, Berkshire, RG40 1XH, UK. Tel: +44 (0)118 977 3889 Fax: +44 (0)118 977 1260 http://www.accuratesoftware.com http://www.accuratesoftware.com -Original Message- From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED] Sent: 09 September 2003 18:31 To: [EMAIL PROTECTED] Subject: RE: Convert existing PDF to XSL-FO tool From: Ganesh [mailto:[EMAIL PROTECTED] I am not using XSL-FO from XSLT. I using Apache Velocity which has an inbuilt template language (VTL) to fetch data from Java Beans on to any text file. The dynamic data are merged with XSL-FO template using Velocity and the resulting XSL-FO file is then given to FOP for generating PDF. Not sure what to make of this: first you don't use XSL-FO from XSLT, but you *are* using an XSL-FO template? (Would the latter be a FO in which some sort of a classic search-and-replace is performed? In that case, I do think XML+XSL-FO is a more than valid alternative. Meaning: perform the merging with Velocity in a 'template XML' that could afterwards be styled - e.g. via Xalan - to deliver the FO) I agree that reverse compiler are not precise, but I am a novice in XSL-FO template creation. It would be of great help if any tool can provide a good start on which I can build on. It would be good enough if I could copy-paste the PDF file content onto some XSL-FO editor and it generates the XSL-FO for me. Is anybody aware of such a XSL-FO editor?. I heard of XMLSpy, when I searched the Google, but not sure which is best for my requirement(ie., with existing PDF and free if possible). First of all, I know of no such tool ( In fact there are AFAIK no tools that take a pdf as basis and deliver some other output-format, I guess the process would just be too complicated ). Also, difficulties would probably arise when a tool like this would deliver XSL-FO containing tags or constructs not yet supported by FOP ... Second, I think XMLSpy would not help you out here ( AFAIK they do offer an alternative to FOP, so I cannot help but NOT recommend you this ... ;) ) And third, I really think this would not be a good way for an XSL-FO-novice to start learning XSL-FO template creation. Start from scratch as this will definitely learn you more about what the fo-tags do... (first-hand experience and all that) If you insist, however, on having someone/something else perform the pdf to fo translation, send us a pdf and I would be more than willing to help you on your way to make a fo for that kind of layout. Greetz, Andreas Delmelle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Accurate Software [EMAIL PROTECTED] www.accuratesoftware.com Europe . North America . Australasia . Africa The information in this email is confidential and privileged and is intended only for the use of the individual or entity listed above. If you are neither the intended individual, or entity listed above, nor the person responsible for the delivery of this email to the intended recipients, you are hereby notified that any unauthorised distribution, copying or use of this email is prohibited. If you have received this email in error, please notify the Accurate system manager at [EMAIL PROTECTED] or on +44 (0)118 977 3889. The views expressed in this communication may not necessarily be the views held by the Accurate Group. - To unsubscribe, e-mail: [EMAIL PROTECTED] For
RE: Big/Huge XMLs
Wow. Thanks for the extremely throrough investigation. This has me wondering if I use region-before for by column headers, could I just break the table every 100 rows or so? So I started working on it, but now I'm stumped. For some reason the attacehd FO, which looks fine to me is crashing not only FOP, but Weblogic entirely, with no warning at all. Can anyone see why? Very very strange. -Matt -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Friday, May 23, 2003 11:43 AM To: [EMAIL PROTECTED] Subject: Re: Big/Huge XMLs Savino, Matt C wrote: Below is the log output for a slightly larger (66 page) report... Reports are the root of all evil, oh well. Your small attachment expands to an impressive 4MB file, which contains a single table with roughly 30'000 cells. It ultimately run out of memory around page 4 on my JDK 1.3.1 -Xmx64M on WinNT. The FO tree for the file soaks up a good chunk of the allocated memory, according to Jochen Wiedmann's Dr.Mem memory profiler: bytes class 4440832 org.apache.fop.fo.flow.Block 4376280 org.apache.fop.fo.flow.TableCell 3964032 org.apache.fop.fo.PropertyList 2973024 org.apache.fop.fo.PropertyManager 2355840 org.apache.fop.fo.FOText 703200 org.apache.fop.fo.LengthProperty 468640 org.apache.fop.datatypes.FixedLength 163296 org.apache.fop.datatypes.KeepValue 438912 org.apache.fop.fo.flow.TableRow 81024 org.apache.fop.datatypes.Keep 81024 org.apache.fop.fo.KeepProperty 54432 org.apache.fop.fo.flow.TableRow$CellArray 20100536 bytes Another 18MB of java base objects like HashMap also contribute quite a bit. This means that memory is already pretty tight before the layout process even starts. I also the repeated font-size=8pt and text-align=start causes some bloat, and deleting them reduced the overall number of created objects by 10%. However, the effect on run time was neglible. Increasing the mx setting resulted in memory thrashing :-/. A closer look at the memory profiler statistics showed that all the layout data associated with table cells still hung around in memory at the time memory runs out. Digging further this turned out to be caused by table objects clinging to their layout data indefinitely. That's bad. I put in a small hack, using the area's back pointer to release the data for Table, AbstractTableBody, TableRow and TableCell after rendering. This allowed me to render the file, albeit slowly due to frequent GC. Unfortunately I'm reluctant to commit the change because it is likely to break some things, in particular putting IDs on a table will cause trouble in certain situations. This could probably be fixed too, but the more the scope of the code change is broadened the more testing would be necessary before the next release. Conclusion: don't use tables, as they lock up a lot of memory until the page sequence ends. If you have to use tables, use short page sequences. Some additional notes: the most objects created in total were of class String (3'738'853), which is no surprise, followed by java.lang.Object (571'663), ArrayList (389'319), HashMap$Entry(278'527) and HashMap (122'702), which *is* a bit of a surprise. I guess the j.l.Object counts the various arrays. Hashmap entries, lists and the objects tended to be fairly persistent, with more than 100'000 lists and objects as well as 135'000 hashmap entries still being referenced at the end of the run. The hashmaps itself are less likely to be kept, only 7'500 out of a total of 122'000 have been left. This means the persistently referenced hashmaps keep an average of 13 entries, while the overall average is 4.7 entries per hash map. A few maps with lots of entries, like the ones holding the mapping from element names to element factories may account for much of the difference. OTOH the low overall average indicates that many of the hashmaps stay empty, there ought to be quite some potential for optimization. I suspect many of the lists stay empty too. Does anybody have ideas or knowledge of tools which allow more detailed investigations of this kind of issues? J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] attachment: ReportOutput.zip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Big/Huge XMLs
[I'll give J. a breather on this one] Assuming you've made certain that the bottleneck is in FOP and not your XSLT transformation, the only thing you can really do to help with very large reports is to break the PDFs into multiple page-sequences. IE start a new page-sequence every X nodes. If you have natural page break that you can use, no one will ever notice in the final output. Otherwise you may have awkward page breaks in your document. I have attached an XSLT stylesheet that we use to essentially break theXSL:FO into "chunks". Every 10 Investigator (=doctor) nodes we start a new page-sequence. Since this report has a page breakfor each new investigator anyway, the end result is no different. We increased our max PDF size on this report from 30 pages to 200 using this method, and seriously sped up rendering time for large reports. FYI - weare runningWeblogic on HP-UX with -hotspot, max-heap-size=512MB. For some reason, the Wintel JVM seems to perform a lot better than HP-UX on FOP, and in general. Note: as originally pointed out on this board, there is actually a slicker, and probably more efficient, way to do the node processing using a recurring template. ButI just found out how to do that and our bottleneck isn't in the XSLT so I haven't had any motiviation to go back and fix it. Here's the example: http://www.dpawson.co.uk/xsl/sect2/N4486.html#d4085e94I like Steve Tinney's solution to the grouping problem. Hope this helps, Matt -Original Message-From: Mohit Sharma [mailto:[EMAIL PROTECTED]Sent: Wednesday, May 21, 2003 6:34 PMTo: [EMAIL PROTECTED]Subject: Big/Huge XMLs I havebig/huge XMLs, and I need to convertthem intoPDFs using FOP.Benchmarking the latest FOP gives poor results, both memory-wise andprocessing-wise. Its just taking too much time. The XML cannot really be broken down into chunks, as its all part of a report. And I need to process a lot of reports overnight, and I don't have a cluster at my disposal to distribute the load. Is there a way to speed up the processing time ? Best, Mohit Sharma pvh_XmlToFo.xsl Description: pvh_XmlToFo.xsl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Big/Huge XMLs
30 pages is not our absolute max, but we have set a requirement that we have to be able to handle at least two concurrent reports, so we need some cushion. I have attached some FO for a report that runs around 50 pages, using only one page-sequence. I would really appreciate it if you coule run it through your FOP processor and tell me what kind of performance you see. It runs on our system, but two of these at once will come very close to an out of memory error. I have a feeling the large performance discrepancy may be because our report is one large table. Please let me know what you find. Below is the log output for a slightly larger (66 page) report also using only one page-sequence. I had to do some de-indefication to create the report I attached. But this log output is from the exact same report, just slightly different data. As you can see at -mx256m, we come close to an out of memory error on just this report. Once we implemented the page-sequence chunking though, full garbage collection knocks memory-in-use down to the range of 25-75MB depending on the report. This is a big improvement over the 215MB that you still see in use below even after a full GC. This was run on my Windows dev box (PIII 850Mhz 512MB ram) set to -mx256m. Memory performance and speed are always much worse on our production boxes( HP-UX, 2x550 RISC, 2GB ram) set to -mx512M -- especially on 2 or more concurrent reports. We're trying to talk our infrastructure police into letting us set up a Win2k server with Weblogic as a dedicated PDF report generator. No luck yet. [GC 41503K-39768K(216920K), 0.0604714 secs] [GC 41816K-40081K(216920K), 0.0734613 secs] (... FOP processing begins below ...) building formatting object tree setting up fonts [GC 42128K-40544K(216920K), 0.0598146 secs] [GC 42592K-41074K(216920K), 0.0308461 secs] (... many more partial garbage collections ...) [GC 113914K-112394K(216920K), 0.0217497 secs] [GC 114442K-112925K(216920K), 0.077 secs] [GC 114973K-113455K(216920K), 0.0222500 secs] [GC 115503K-113983K(216920K), 0.0219170 secs] (... FOP is done pre-processing, page generation begins ...) [1[GC 116031K-114464K(216920K), 0.0214575 secs] [GC 116512K-114883K(216920K), 0.0216715 secs] [GC 116931K-115305K(216920K), 0.0224520 secs] [GC 117353K-115722K(216920K), 0.0233072 secs] ] [2[GC 117770K-116113K(216920K), 0.0208135 secs] [GC 118161K-116531K(216920K), 0.0223947 secs] [GC 118579K-116951K(216920K), 0.0220651 secs] ][GC 118999K-117329K(216920K), 0.0211273 secs] [3[GC 119377K-117768K(216920K), 0.0220210 secs] [GC 119816K-118186K(216920K), 0.0219897 secs] [GC 120234K-118606K(216920K), 0.0223495 secs] (... pages 4-62 output and steady partial garbage collection ...) [63[GC 212110K-210967K(216920K), 0.0201827 secs] [GC 213011K-211792K(216920K), 0.0224984 secs] [GC 213370K-212929K(216920K), 0.0238419 secs] [GC 214977K-214223K(216920K), 0.0349902 secs] [GC 216271K-215075K(217464K), 0.0221023 secs] (... full garbage collection, at this point we know most memory in use is for FOP ...) (... IE - normal full garbage collection brings memory in use down to ~20MB ...) (... So at -mx256m, FOP is ~40MB away from an out of memory error ...) [Full GC 217123K-215866K(261888K), 5.5263608 secs] [GC 217207K-216127K(261888K), 1.4741779 secs] ] [64[GC 218175K-216477K(261888K), 0.0265551 secs] [GC 218525K-216896K(261888K), 0.0246568 secs] [GC 218944K-217318K(261888K), 0.0252940 secs] ][GC 219366K-217700K(261888K), 0.0236608 secs] [65[GC 219748K-218130K(261888K), 0.0244581 secs] [GC 220178K-218552K(261888K), 0.0248638 secs] [GC 220600K-218971K(261888K), 0.0303567 secs] ] [66[GC 221019K-219361K(261888K), 0.0230088 secs] ] Parsing of document complete, stopping renderer Initial heap size: 40908Kb Current heap size: 219991Kb Total memory used: 179083Kb Memory use is indicative; no GC was performed These figures should not be used comparatively Total time used: 66075ms Pages rendererd: 66 Avg render time: 1001ms/page -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Thursday, May 22, 2003 12:35 PM To: [EMAIL PROTECTED] Subject: Re: Big/Huge XMLs Savino, Matt C wrote: We increased our max PDF size on this report from 30 pages to 200 Huh? What complications do you add to the layout to run out of memory at only *30* pages? I never had any problems until I got well past 1000 pages (using -mx128M, JDK 1.3.1) J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] attachment: NAReportOutput.zip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: Error when piping XSL-FO to FOP driver using SAXResult
Below is something we use as part of a much more involved stylesheet. Although looking at it now it's not the most efficient piece of code as it loops through the same nodes several times. (We use it to break output into groups of five columns and know we'll never have more than 3 or 4 groups, so we didn't need to worry about running through the same nodes a few extra times.) I think for efficiency and straighforwardness, the Steve Tinney example from the link in the previous post is probably the best way to go. (http://www.dpawson.co.uk/xsl/sect2/N4486.html#d4085e94) -matt [...] fo:table-body xsl:for-each select=customerPF xsl:if test=(position()-1) mod 3 = 0 xsl:call-template name=new-row xsl:with-param name=row-num select=position() - 1 / /xsl:call-template /xsl:if fo:table-cellfo:blockxsl:value-of select=position()//fo:block/fo:table-cell /xsl:for-each /fo:table-body [...] xsl:template name=new-row xsl:param name=row-num/ fo:table-row xsl:for-each select=../customerPF xsl:if test=$row-num lt; position() xsl:if test=$row-num+4 gt; position() fo:table-cellfo:blockxsl:value-of select=position()//fo:block/fo:table-cell /xsl:if /xsl:if /xsl:for-each /fo:table-row xsl:template Thanks for the response. Yes, its definitely a hack because I could not put a /fo:table-row inside the xsl:if tag. I get an error message saying The element type xsl:if must be terminated by the matching end-tag /xsl:if Is there a better way to accomplish what I need to do...i.e. ouputting portions of table-row tags depending on certain conditions? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: Error when piping XSL-FO to FOP driver using SAXResult
Woops, that first fo:table-cell... tag below should have been removed. Actually if you use this: xsl:for-each select=../customerPF[$row-num lt; position() and $row-num+4 gt; position()] instead of the xsl:for-each followed by 2 xsl:if-s below, our code might be somewhat efficient after all. I just tested and it seems ok on first pass. Apparently we were still learning our XSLT back then. Now comes the age-old question of whether or not to rewrite code that works fine just because we know it can be done better. I think that question usually comes down on the do-not-rewrite side. -Original Message- From: Savino, Matt C Sent: Wednesday, May 14, 2003 11:47 AM To: [EMAIL PROTECTED] Subject: RE: Re: Error when piping XSL-FO to FOP driver using SAXResult Below is something we use as part of a much more involved stylesheet. Although looking at it now it's not the most efficient piece of code as it loops through the same nodes several times. (We use it to break output into groups of five columns and know we'll never have more than 3 or 4 groups, so we didn't need to worry about running through the same nodes a few extra times.) I think for efficiency and straighforwardness, the Steve Tinney example from the link in the previous post is probably the best way to go. (http://www.dpawson.co.uk/xsl/sect2/N4486.html#d4085e94) -matt [...] fo:table-body xsl:for-each select=customerPF xsl:if test=(position()-1) mod 3 = 0 xsl:call-template name=new-row xsl:with-param name=row-num select=position() - 1 / /xsl:call-template /xsl:if fo:table-cellfo:blockxsl:value-of select=position()//fo:block/fo:table-cell /xsl:for-each /fo:table-body [...] xsl:template name=new-row xsl:param name=row-num/ fo:table-row xsl:for-each select=../customerPF xsl:if test=$row-num lt; position() xsl:if test=$row-num+4 gt; position() fo:table-cellfo:blockxsl:value-of select=position()//fo:block/fo:table-cell /xsl:if /xsl:if /xsl:for-each /fo:table-row xsl:template Thanks for the response. Yes, its definitely a hack because I could not put a /fo:table-row inside the xsl:if tag. I get an error message saying The element type xsl:if must be terminated by the matching end-tag /xsl:if Is there a better way to accomplish what I need to do...i.e. ouputting portions of table-row tags depending on certain conditions? Thanks. - 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: Column / character width question
I can't read the text because I'm missing a font (Might want to look into that for your end users. I have the latest Acrobat 5.0 Exchange.) So if I understand, the problem is creating flow in the main/body two-column section around the top section two-column thing on page 2, which is different from the one on page 1. Is this correct? I think there may be something you could do with markers and table headers to set each block as a table header, then switch the content. This is what I need to figure out (someday) for our tables where we want to add 'CONTINUED' on every page after the first that the table spans. Although I don't know if you can wrap this whole 2-column flow into a table. Maybe you could do the same with region-before. Have you looked at the attached example from FOP? Could you use something similar to block 4, but put your images and tables in it? -matt -Original Message- From: Ben Galbraith [mailto:[EMAIL PROTECTED] Sent: Thursday, May 08, 2003 3:56 PM To: [EMAIL PROTECTED] Subject: Re: Column / character width question Savino, Matt C wrote: So I'm guessing the text below the pics in the upper split section is a continuous paragraph? If you don't mind my asking, can you just divide the content in half? Or do you really need the split between the text part? Don't mind you asking, but your assertion is wrong. They are two separate captions for the two different images. The current captions are dummys and are misleading. As for my column problem on page 2, I can't arbitrarily divide the content in half. But... you've given me an idea. Instead of trying to determine when the first cell is filled up to wrap to the second, I could simply balance the two cells -- calculate the total number of items -- oh, but wait, I still have the same problem because to properly balance them I would need to know how many lines each item occupies. Oh well. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] attachment: simplecol.zip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Column / character width question
Thanks Clay, looks promising. I may have to finally upgrade from FOP .20.2 to test it. From what I understand markers weren't well-implemented in this version. Basically what I need is for the word 'Continued' to appear at the top a block (table) of results every time there is a page break. The table is nested within several others. Do you think your system will work within tables? My first thought is no. The surronding tables have several sections of varying height, so I can't implement them as region-before. If only they had a table-omit-header-before-break to go along with table-omit-header-after-break. -matt (OT) I've got 'continued' working in my FO, where it indicates Continued on next page... on all pages except the last. Here's the message I wrote some time ago with the information required to make it work: http://marc.theaimsgroup.com/?l=fop-userm=104446457129434w=2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Column / character width question
I'm missing a font so I can't see the text. Does the upper two-column section need to flow like the lower one? Can it be the same height every time? Is there a new upper two-column section on every page? That's some complicated layout you have there, almost looks more like a catalog you would do in Quark. -Matt Scott Moore wrote: Is the text in Key Facts dynamic? Why can't you use a 2 column table in that region? If the text is always the same, you should be able to format it in such a way so that it looks like it flows from one column to the other. Sadly, it is quite dynamic. 1000's of PDFs just like the one I've uploaded to my FTP server will be generated by FOP from XML source in a matter of months. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Column / character width question
So I'm guessing the text below the pics in the upper split section is a continuous paragraph? If you don't mind my asking, can you just divide the content in half? Or do you really need the split between the text part? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Seeking advice on HSSF
*/ /*-*/ /*-*/ /*- Begin common code again ---*/ /*-*/ byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); /*-*/ /*- End ---*/ /*-*/ -Original Message- From: Adam Shelley [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 29, 2003 3:53 PM To: [EMAIL PROTECTED] Subject: RE: Seeking advice on HSSF I am currently seeking the same information. I'll post some info if I come up with something. -Adam -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED] Sent: April 29, 2003 3:41 PM To: [EMAIL PROTECTED] Subject: Seeking advice on HSSF Hi, I figured I'd ask this here just in case anyone had any opinions. We have a web-app which currently uses FOP in a servlet to generate PDFs. We are looking into using HSSF to generate .xls files in a similar fashion. Is anyone out there swapping FOP and HSSF like this? I've read all of the HSSF/POI and Cocoon-HSSF-Serializer stuff from the Apache site and I am still unclear on how I would go from XML to GMR (via XSLT) to .xls (via serializer) as I would with FOP. Do we have to go through cocoon? It seems like a lot of overhead for this one function. I know this is a little off topic but if any FOP people out here have experience on this I would really appreciate hearing it. thanks a lot, Matt Savino - 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] attachment: HSSF_example.zip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Seeking advice on HSSF
Thanks Jeremias. I think the main reason we are parsing the fodoc into a DOM is so we can serialize the FO out to a file for debugging (it's either that or do the transformation twice). I'm actually in the process of altering the HSSF stuff now so I can debug the GMR output. On your adive I will change both of them back to a stream source for production. Although I seem to remember experimenting extensively when we first started with SAX vs. DOM input sources using the FOP XSLTInputHandler, SAXHandler, etc. As I recall, we didn't see much difference in performance. But I will try it again for this round and let you know how it goes. Actually here is the old commented out code from these tests: File xmlFile = new File(xmlFilename); File xsltFile = new File(xsltFilename); org.apache.fop.apps.InputHandler inputHandler2 = new org.apache.fop.apps.XSLTInputHandler(xmlFile, xsltFile); org.xml.sax.XMLReader parser2 = inputHandler2.getParser(); driver.render(parser2, inputHandler2.getInputSource()); Is there a more efficient method I should try? thx, Matt org.w3c.dom.Document xmlDoc = dBuilder.parse(xmlFile); javax.xml.transform.dom.DOMSource xmlDomSource = new javax.xml.transform.dom.DOMSource(xmlDoc); org.w3c.dom.Document xslDoc = dBuilder.parse(xsltFile); javax.xml.transform.dom.DOMSource xslDomSource = new javax.xml.transform.dom.DOMSource(xslDoc); Why do you parse the whole thing into a DOM? That's very inefficient when you subsequently give it to JAXP anyway. A StreamSource would be a lot better! Have a look at the Example*.java in the latest FOP distribution under examples/embedding. javax.xml.transform.TransformerFactory tFactory = javax.xml.transform.TransformerFactory.newInstance(); javax.xml.transform.Templates templates = tFactory.newTemplates(xslDomSource); javax.xml.transform.Transformer transformer = templates.newTransformer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); org.w3c.dom.Document foDoc = (org.w3c.dom.Document)domResult.getNode(); Again, don't do that. Use SAX as with the HSSF serializer: Result result = new SAXResult(driver.getContentHandler()); transformer.transform(xml, result); See how similar the code is to the one for HSSF? org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setErrorDump(true); driver.setRenderer(driver.RENDER_PDF); driver.setupDefaultMappings() ; driver.setOutputStream(out); driver.render(foDoc); response.setContentType(application/pdf); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Seeking advice on HSSF
Cool. I will. I think the main reason this hasn't been much of an issue is that the FOP render time is always an order of magnitude over the XML/XSLT parsing/transforming. (And from my preliminary results it's looking like HSSF is even more of a resource hog.) thx. -Matt -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Thursday, May 01, 2003 11:13 AM To: [EMAIL PROTECTED] Subject: Re: Seeking advice on HSSF I see. Please do have a look at the Example*.java files. They don't use XSLTInputHandler anymore. Just plain JAXP as you are used to. Going via DOM just means you generate quite a lot of little objects which slows the JVM and uses up memory. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Seeking advice on HSSF
Arg. Here's the last line I was trying to paste when I accidentally hit Ctrl-Enter: But that still doesn't mean it's ok to be wasteful on the XSLT side. -matt -Original Message- From: Savino, Matt C Sent: Thursday, May 01, 2003 11:17 AM To: '[EMAIL PROTECTED]' Subject: RE: Seeking advice on HSSF Cool. I will. I think the main reason this hasn't been much of an issue is that the FOP render time is always an order of magnitude over the XML/XSLT parsing/transforming. (And from my preliminary results it's looking like HSSF is even more of a resource hog.) thx. -Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Seeking advice on HSSF
Hi, I figured I'd ask this here just in case anyone had any opinions. We have a web-app which currently uses FOP in a servlet to generate PDFs. We are looking into using HSSF to generate .xls files in a similar fashion. Is anyone out there swapping FOP and HSSF like this? I've read all of the HSSF/POI and Cocoon-HSSF-Serializer stuff from the Apache site and I am still unclear on how I would go from XML to GMR (via XSLT) to .xls (via serializer) as I would with FOP. Do we have to go through cocoon? It seems like a lot of overhead for this one function. I know this is a little off topic but if any FOP people out here have experience on this I would really appreciate hearing it. thanks a lot, Matt Savino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP in production app
FYI - we use FOP in an online production app to deliver on-demand print verions of our managment reports and lab reports. Our clients (drug companies) use the app to log on and see how their clinical trials are going. Luckily we haven't had much demand for large (50+ pages) PDFs or many medium-sized reports being run concurrently. If this demand ever does appear, we know we would have a major performance issue on our hands. We would have to create a task-scheduler to run larger reports during off-hours. We did test RenderX's product, XEP, and generally found performance the same or worse than FOP. Support was really spotty as well. One report took about 10 times longer on XEP than FOP. I emailed their sales address and made it clear that only chance these guys had for a sale was to help me figure out what was causing this gap. After a week or so wait, the president of the company called and told me to call tech support, but not to tell them he told me to call because they don't like that. Tech support finally said they couldn't help me. At $5000/CPU (not even purchased yet!) I was expecting a little more. It was kind of surreal. IMO anyone who thinks you are guranteed to get any kind of support after the contract is signed is living in the past. There are good companies out there (I would put BEA at the top of the list), but don't assume you're going to get top-notch support just because you spend some $$$ or sign a maintenance contract. I hope I don't sound too much like a commercial for FOP, but given this experience I'll take an open-source project with a dedicated user and dev community over a sketchy dotcom-ish company any day. Matt Savino -Original Message- From: Holk, David A [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 9:37 AM To: '[EMAIL PROTECTED]' Subject: FOP in production app Is anyone using FOP in a production app? Should I expect a commercial product like XEP or XSLFormatter to be more robust in a production application? Any experiences/comments appreciated. David Holk LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. - 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: logo contest again
I set Photoshop to Save for Web highest quality. Let me know if you want it larger/smaller or higher/lower DPI. -Original Message- From: Peter B. West [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 3:28 PM To: [EMAIL PROTECTED] Subject: Re: logo contest again Oleg Tkachenko wrote: PS. I think we should prolong the contest term for another week or two if nobody objects. Oleg, Yes please. I'm attaching a PDF of a design a friend of mine is working on. She can't get the jpeg output to work from Illustrator, for some reason, and I need to help her sort out the problems. Does anyone have access to Photoshop or Illustrator? -- Peter B. West [EMAIL PROTECTED] http://www.powerup.com.au/~pbwest/ Lord, to whom shall we go? attachment: logo.jpg- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logo contest again
Here is the PSD file. -Original Message- From: Savino, Matt C Sent: Thursday, February 27, 2003 3:34 PM To: [EMAIL PROTECTED] Subject: RE: logo contest again I set Photoshop to Save for Web highest quality. Let me know if you want it larger/smaller or higher/lower DPI. -Original Message- From: Peter B. West [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 3:28 PM To: [EMAIL PROTECTED] Subject: Re: logo contest again Oleg Tkachenko wrote: PS. I think we should prolong the contest term for another week or two if nobody objects. Oleg, Yes please. I'm attaching a PDF of a design a friend of mine is working on. She can't get the jpeg output to work from Illustrator, for some reason, and I need to help her sort out the problems. Does anyone have access to Photoshop or Illustrator? -- Peter B. West [EMAIL PROTECTED] http://www.powerup.com.au/~pbwest/ Lord, to whom shall we go? ApacheXMLLogo.psd Description: ApacheXMLLogo.psd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Writing efficient XSL
Title: RE: Writing efficient XSL I can tell you from experience FOP processingon Unix is much slower than Windows/Intel and garbage collection is much less efficient. From my understanding, this is all mainly due to the differences in JVM and hotspot implementation. But 5 mintues for 20 pages still seems veryhigh. Can you attach your FO (zipped)? I'll look at it. Are you processing images or SVG? -Original Message-From: Lee, Insoo [mailto:[EMAIL PROTECTED]Sent: Thursday, February 20, 2003 4:09 PMTo: '[EMAIL PROTECTED]'Subject: RE: Writing efficient XSL Matt, Mymax memorygoes up to 256MB.. When I generate *.fo by merging XML with XSL : that takes 40 seconds.. (Using command like java -cp ~leeins/weblogic/3rd_party_jars_SUN/xalan-j_2_3_1_01.jar:/home/amchitmgr/build/jakarta-ant-1.5.1/lib/xml-apis.jar:/home/amchitmgr/build/jakarta-ant-1.5.1/lib/xercesImpl.jar org.apache.xalan.xslt.Process -IN rates.xml -XSL rates_pdf.xsl -OUT rates.fo) When I put this rates.fo thru Driver, it takes 5 minutes... generating 20 pages of pdf file... Where is the bottleneck? The machine is UNIX with 8 CPU and 10GB memroy... it seems that JDK1.3 and Xalan2.4.1 performs slightly better.., but not much.. Thanks -Original Message-From: Savino, Matt C [mailto:[EMAIL PROTECTED]Sent: Thursday, February 20, 2003 6:35 PMTo: [EMAIL PROTECTED]Subject: RE: Writing efficient XSL If you can "generate the FO object relatively quickly", then you should be already past the XSL stage and into the FO processing (Driver.run()). Unless I am interpreting this wrong. If so try writing your FO out to a file to see how long it takes. How many pages is your report when it finally finishes? Other people on this board are better experts when it comes to performance-tuning your FO. 20 minutes sounds excessive for about anything though. What is your heap size? -Matt -Original Message-From: Lee, Insoo [mailto:[EMAIL PROTECTED]Sent: Thursday, February 20, 2003 3:17 PMTo: '[EMAIL PROTECTED]'Subject: RE: Writing efficient XSL Hi, I have something like this ?xml version="1.0" encoding="UTF-8" ? REPORT REPORT_NAMEPrior Day Rates/REPORT_NAME DATE_RANGEfor 19 Feb 2003/DATE_RANGE REPORT_TAG / DATE_FROM1 Feb 2003/DATE_FROM DATE_TO19 Feb 2003/DATE_TO CREATED_BYleeins/CREATED_BY EXCEL_DATE_FROM1%20Feb%202003/EXCEL_DATE_FROM EXCEL_DATE_TO19%20Feb%202003/EXCEL_DATE_TO EXCEL_CREATED_DATE_AND_TIMEThu%2023%20Jan%202003%203:05:34%20PM%20ET/EXCEL_CREATED_DATE_AND_TIME CREATED_DATE_AND_TIMEThu 23 Jan 2003 3:05:34 PM ET/CREATED_DATE_AND_TIME SELECTED_SORT0/SELECTED_SORT SELECTED_FUNDALL/SELECTED_FUND FUND_GROUP CURRENCY="GBP" STATUS="Active" FUND_ROW TA_FUND_CODEGF6/TA_FUND_CODE LONG_NAMEILA Treasury Obligations Inst/LONG_NAME DAILY_FACTOR0.2156000/DAILY_FACTOR SHORT_RATE_3651.02/SHORT_RATE_365 LONG_RATE_3651.0449400/LONG_RATE_365 RATE_3601.0642200/RATE_360 CURR_7_DAY_YIELDNA/CURR_7_DAY_YIELD SEVEN_DAY_EFF_YIELD0.99/SEVEN_DAY_EFF_YIELD AVG_30_DAY_RATE1.26/AVG_30_DAY_RATE PRICE1./PRICE RATE_DATE1 Feb 2003/RATE_DATE CURRENCYGBP/CURRENCY AS_OF_DATE20 Feb 2003/AS_OF_DATE PERIODIC_FAMILY_NAMEMy Fund/PERIODIC_FAMILY_NAME ISIN / CUSIP38XX2B765/CUSIP /FUND_ROW and 1,000 or so FUND_ROW Thanks! -Original Message-From: Calero, Roberto [mailto:[EMAIL PROTECTED]Sent: Thursday, February 20, 2003 5:35 PMTo: '[EMAIL PROTECTED]'Subject: RE: Writing efficient XSLImportance: High How about the data file? -Original Message- From: Lee, Insoo [mailto:[EMAIL PROTECTED]] Sent: Friday, February 21, 2003 4:01 AM To: [EMAIL PROTECTED] Subject: Writing efficient XSL Could you please take a quick look at my XSL and see where I can improve it?... I know it's a very vague request, but I would appreciate any comments or advice... I can generate FO object relative quickly, but when generating 20 pages, it takes about 5 minutes.. (Driver.run()) and I think my XSL is not efficiently written.. I basically have one big table because I need to repeat column headings.. people say I need to make smaller tables, but how would I do that without counting lines to be on one page... (without relying on page header) Thanks ?xml version="1.0"? xsl:stylesheet version="1.0"
RE: Writing efficient XSL
Title: RE: Writing efficient XSL If you can "generate the FO object relatively quickly", then you should be already past the XSL stage and into the FO processing (Driver.run()). Unless I am interpreting this wrong. If so try writing your FO out to a file to see how long it takes. How many pages is your report when it finally finishes? Other people on this board are better experts when it comes to performance-tuning your FO. 20 minutes sounds excessive for about anything though. What is your heap size? -Matt -Original Message-From: Lee, Insoo [mailto:[EMAIL PROTECTED]Sent: Thursday, February 20, 2003 3:17 PMTo: '[EMAIL PROTECTED]'Subject: RE: Writing efficient XSL Hi, I have something like this ?xml version="1.0" encoding="UTF-8" ? REPORT REPORT_NAMEPrior Day Rates/REPORT_NAME DATE_RANGEfor 19 Feb 2003/DATE_RANGE REPORT_TAG / DATE_FROM1 Feb 2003/DATE_FROM DATE_TO19 Feb 2003/DATE_TO CREATED_BYleeins/CREATED_BY EXCEL_DATE_FROM1%20Feb%202003/EXCEL_DATE_FROM EXCEL_DATE_TO19%20Feb%202003/EXCEL_DATE_TO EXCEL_CREATED_DATE_AND_TIMEThu%2023%20Jan%202003%203:05:34%20PM%20ET/EXCEL_CREATED_DATE_AND_TIME CREATED_DATE_AND_TIMEThu 23 Jan 2003 3:05:34 PM ET/CREATED_DATE_AND_TIME SELECTED_SORT0/SELECTED_SORT SELECTED_FUNDALL/SELECTED_FUND FUND_GROUP CURRENCY="GBP" STATUS="Active" FUND_ROW TA_FUND_CODEGF6/TA_FUND_CODE LONG_NAMEILA Treasury Obligations Inst/LONG_NAME DAILY_FACTOR0.2156000/DAILY_FACTOR SHORT_RATE_3651.02/SHORT_RATE_365 LONG_RATE_3651.0449400/LONG_RATE_365 RATE_3601.0642200/RATE_360 CURR_7_DAY_YIELDNA/CURR_7_DAY_YIELD SEVEN_DAY_EFF_YIELD0.99/SEVEN_DAY_EFF_YIELD AVG_30_DAY_RATE1.26/AVG_30_DAY_RATE PRICE1./PRICE RATE_DATE1 Feb 2003/RATE_DATE CURRENCYGBP/CURRENCY AS_OF_DATE20 Feb 2003/AS_OF_DATE PERIODIC_FAMILY_NAMEMy Fund/PERIODIC_FAMILY_NAME ISIN / CUSIP38XX2B765/CUSIP /FUND_ROW and 1,000 or so FUND_ROW Thanks! -Original Message-From: Calero, Roberto [mailto:[EMAIL PROTECTED]Sent: Thursday, February 20, 2003 5:35 PMTo: '[EMAIL PROTECTED]'Subject: RE: Writing efficient XSLImportance: High How about the data file? -Original Message- From: Lee, Insoo [mailto:[EMAIL PROTECTED]] Sent: Friday, February 21, 2003 4:01 AM To: [EMAIL PROTECTED] Subject: Writing efficient XSL Could you please take a quick look at my XSL and see where I can improve it?... I know it's a very vague request, but I would appreciate any comments or advice... I can generate FO object relative quickly, but when generating 20 pages, it takes about 5 minutes.. (Driver.run()) and I think my XSL is not efficiently written.. I basically have one big table because I need to repeat column headings.. people say I need to make smaller tables, but how would I do that without counting lines to be on one page... (without relying on page header) Thanks ?xml version="1.0"? xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:attribute-set name="column-heading" xsl:attribute name="font-family"Helvetica/xsl:attribute xsl:attribute name="font-weight"bold/xsl:attribute xsl:attribute name="font-size"8pt/xsl:attribute xsl:attribute name="text-align"left/xsl:attribute /xsl:attribute-set xsl:attribute-set name="table-content" xsl:attribute name="font-family"Helvetica/xsl:attribute xsl:attribute name="font-size"8pt/xsl:attribute /xsl:attribute-set xsl:attribute-set name="table-content-right" xsl:attribute name="font-family"Helvetica/xsl:attribute xsl:attribute name="font-size"8pt/xsl:attribute xsl:attribute name="text-align"right/xsl:attribute /xsl:attribute-set xsl:attribute-set name="table-content-bold" xsl:attribute name="font-family"Helvetica/xsl:attribute xsl:attribute name="font-weight"bold/xsl:attribute xsl:attribute name="font-size"8pt/xsl:attribute /xsl:attribute-set xsl:template match="/REPORT" fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" !-- START OF LAYOUT-MASTER-SET -- fo:layout-master-set fo:simple-page-master master-name="anypage" page-width="29.7cm" page-height="21.0cm" margin-top="0.5cm" margin-bottom="0.5cm" margin-left="1.5cm" margin-right="1.5cm" fo:region-body margin-top="0.5cm" margin-bottom="1.5cm"/ fo:region-before extent="0cm"/ fo:region-after extent="0.5cm"/ /fo:simple-page-master /fo:layout-master-set !-- END OF LAYOUT-MASTER-SET -- fo:page-sequence master-reference="anypage" fo:flow flow-name="xsl-region-body" xsl:apply-templates select="REPORT_NAME"/ xsl:apply-templates
RE: How do you set the memory size for FOP
450 pages is pretty good. Just curious did you use multiple page sequences? no large tables? Also do you see how much memory it did use? thanks -Original Message- From: Jon Steeves [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 3:26 PM To: '[EMAIL PROTECTED]' Subject: RE: How do you set the memory size for FOP The missing m was the culprit. I put it in and FOP churned out a 450 page document. Thank you FOPlisters for all the help! Jon -Original Message- From: Patrick Dean Rusk [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 2:53 PM To: [EMAIL PROTECTED] Subject: RE: How do you set the memory size for FOP Try -Xms128m The m at the end means megabytes, of course. Not sure what it defaults to if you don't specify a unit. Pat -Original Message- From: Jon Steeves [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 5:33 PM To: '[EMAIL PROTECTED]' Subject: RE: How do you set the memory size for FOP Roland: Actually, java -Xmx128 -cp etc... was the order of the arguments I originally used -- and it was with this that FOP gave the out of memory error even before it started generating pages. Cheers -Original Message- From: Roland Neilands [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 2:26 PM To: [EMAIL PROTECTED] Subject: RE: How do you set the memory size for FOP Jon, java -cp -Xmx128 Try switching these two (-cp expects the path below as an argument. build\fop.jar;lib\batik.jar;lib\xalan-2.0.0.jar;lib\xerces-1.2 .3.jar;li b\avalon-framework-4.0.jar;lib\logkit-1.0.jar;lib\jimi-1.0.jar org.apache.fop.apps.Fop c:\drb\output.fo c:\drb\output.pdf Cheers, Roland - 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: XSL_FO generator
The new XMLSpy is supposed to contain a graphical xsl:fo generator. We haven't received our licenses yet so I haven't had a chance to play with it. And no unfortunately it's not cheap. -Original Message- From: Steve Pitchford [mailto:[EMAIL PROTECTED] Sent: Friday, February 07, 2003 3:14 AM To: [EMAIL PROTECTED] Subject: RE: XSL_FO generator I haven't found a nice one, let alone a free one, and I would imagine that a product would have to become very sophisticated ( and hence very likely to be expensive ) in order to allow a user to generate a stylesheet effectively. IMHO allowing users to create stylesheets is a can of worms and I would consider myself better off leaving users to populate the xml source and using a contractor/in-house designer to produce your stylesheets separately. Steve. This message is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you receive this message in error please contact the sender by return e-mail and delete the message from your computer. Any opinions contained in this message are those of the author and are not given or endorsed by Metalogic PLC unless otherwise clearly indicated in this message and the authority of the author to bind Metalogic is duly verified. Metalogic PLC accepts no liability for any errors or omissions in the context of this message which arise as a result of internet transmission. -Original Message- From: Matthew Lancashire [mailto:[EMAIL PROTECTED] Sent: 07 February 2003 10:48 To: Fop-User-Help (E-mail) Subject: XSL_FO generator Is there a nice simple graphical (and free) product that I can have my users use to create fo stylesheetsfor use with FOP Matthew Lancashire IT Project Manager Intitial Electronic Security Ltd Tel: +44 1282 473554 Fax: +44 1254 267552 - 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: Pass xsl:param value to FOP through command line
Not sure exactly if your .BAT file is calling a Java app or something else, but here is how we set an external xsl:param within our report generator servlet: transformer.setParameter(pdfImagePath, getServletConfig().getServletContext().getAttribute(pdfImagePath)); Then the xslt stylesheet access it like: xsl:param name=pdfImagePath / We use this to get the environment-dependent path to our image directory: fo:external-graphic src={concat($pdfImagePath,'ClinTrialLogoGreenBig.gif')} / But you could use the value of this param to make decisions within your stylesheet. Hope this helps. -Matt -Original Message- From: Clay Leeds [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 26, 2002 9:40 AM To: [EMAIL PROTECTED] Subject: Re: Pass xsl:param value to FOP through command line Won't work. The .BAT is *not* for generating XML. It just prints it. Our primary app does the XML file generation. Regards stuff. :-) At 09:37 AM 11/26/2002, you wrote: STOP! I tought about something: the .bat is for generating the the xml, right? Then just do like you wanted: take an element call it e.g. rear/. then if rear rear1/rear else rear0/rear From there it is stylesheet work: xsl:if test=rear=1Backpage/xsl:if xsl:if test=rear=0front only/xsl:if Regards Clay Leeds wrote: ... At 09:22 AM 11/26/2002, you wrote: So I would store the information in that script. Then you need two fop-Stylesheets. 1) with the rear page 2) without As they say here in the United States... Well, duh! That solves it for me. The only problem now, is that I'll have two separate files to maintain. But then, if I IMPORT/INCLUDE the stylesheets, then I won't have to... THANKS A MILLION! :-) - Clay Leeds - Web Developer - [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] - Clay Leeds - Web Developer - [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: Pass xsl:param value to FOP through command line
Do you use XSLT to generate your FO file from XML data, or are you building it some other way? I know you can pass properties to FOP through the command line, but as far as something like don't print the second page, I imagine that would have to be in your FO. -Matt -Original Message- From: Clay Leeds [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 26, 2002 12:07 PM To: [EMAIL PROTECTED] Subject: RE: Pass xsl:param value to FOP through command line Matt, Thanks. Actually, my .BAT file is calling _FOP_ through the command line. As for servlets, I don't think we are using them at all. Because all the examples I've seen discuss how to pass param values to servlets instead of how to pass them to FOP, I was stuck. However, Thorsten gave me a great workaround for the problem I was trying to resolve by passing a param to FOP. I still would like to know if there's a way to pass param variable values through the command line, though. At 11:59 AM 11/26/2002, you wrote: Not sure exactly if your .BAT file is calling a Java app or something else, but here is how we set an external xsl:param within our report generator servlet: transformer.setParameter(pdfImagePath, getServletConfig().getServletContext().getAttribute(pdfImagePath)); Then the xslt stylesheet access it like: xsl:param name=pdfImagePath / We use this to get the environment-dependent path to our image directory: fo:external-graphic src={concat($pdfImagePath,'ClinTrialLogoGreenBig.gif')} / But you could use the value of this param to make decisions within your stylesheet. Hope this helps. -Matt -Original Message- From: Clay Leeds [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 26, 2002 9:40 AM To: [EMAIL PROTECTED] Subject: Re: Pass xsl:param value to FOP through command line Won't work. The .BAT is *not* for generating XML. It just prints it. Our primary app does the XML file generation. Regards stuff. :-) At 09:37 AM 11/26/2002, you wrote: STOP! I tought about something: the .bat is for generating the the xml, right? Then just do like you wanted: take an element call it e.g. rear/. then if rear rear1/rear else rear0/rear From there it is stylesheet work: xsl:if test=rear=1Backpage/xsl:if xsl:if test=rear=0front only/xsl:if Regards Clay Leeds wrote: ... At 09:22 AM 11/26/2002, you wrote: So I would store the information in that script. Then you need two fop-Stylesheets. 1) with the rear page 2) without As they say here in the United States... Well, duh! That solves it for me. The only problem now, is that I'll have two separate files to maintain. But then, if I IMPORT/INCLUDE the stylesheets, then I won't have to... THANKS A MILLION! :-) - Clay Leeds - Web Developer - [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] - Clay Leeds - Web Developer - [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] - Clay Leeds - Web Developer - [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: blank screen in browser
Check to see if there's anything different about their internet settings or IE build than the other 99%. Look behind the scenes to see if your servlet is being called twice. It sounds like it could be some quirky caching behvior on just those browsers. Even the newest versions of IE call the PDF generator servlet two or three times, it's just that they usually call their own cache on the second or third hit, so you don't see anything. If you set the response-header to no-cache you'll see what I'm talking about. Are you using SSL? If so, check that [Internet Options:Advanced:Security:Do Not Save Encrypted Pages to Disk] is not checked. We had some problems with corporate builds that have this setting checked by default. IE can't handle dynamic PDFs over SSL w/o caching them apparently. Hope this helps. -Matt -Original Message- From: Zahigian, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, November 21, 2002 11:38 AM To: '[EMAIL PROTECTED]' Subject: RE: blank screen in browser As far as I can tell all users are on IE 5.x to 6.x MZ -Original Message- From: Thorsten Scherler [mailto:[EMAIL PROTECTED] Sent: Thursday, November 21, 2002 11:36 AM To: [EMAIL PROTECTED] Subject: Re: blank screen in browser What browser use this 1%? Not all browser support adope reader as a plugin! Zahigian, Mike wrote: I am using FOP embedded in a Servlet. Users trigger the servlet by clicking a button on a web page. The servlet then takes the response and performs a transformation and renders to pdf. The browser pops up a new window and displays the pdf output. 1% or so of my user population cannot get the pdf to display in the browser window that pops up (or any other browser window). These users can open pdf files that exist on their local machine. When these users click the print button on my web page, the new browser window pops up, but the contents are blank. Any idea what is going on? Mike Z. - 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: blank screen in browser
Oh yeah, putting '...dummy=.pdf' at the end of your query string also seems to help sometimes. -Original Message- From: Thorsten Scherler [mailto:[EMAIL PROTECTED] Sent: Thursday, November 21, 2002 12:24 PM To: [EMAIL PROTECTED] Subject: Re: blank screen in browser It happends a couple of times to me to. I always installed the Acrobat again and then it was alright. I am now using Mozilla http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.2b/mozill a-win32-1.2b-installer.exe and now I don't have that problem anymore. You can download the page and then view it in Acrobat, right? But not online in the browser. Plugin Problem! Zahigian, Mike wrote: As far as I can tell all users are on IE 5.x to 6.x MZ -Original Message- From: Thorsten Scherler [mailto:[EMAIL PROTECTED] Sent: Thursday, November 21, 2002 11:36 AM To: [EMAIL PROTECTED] Subject: Re: blank screen in browser What browser use this 1%? Not all browser support adope reader as a plugin! Zahigian, Mike wrote: I am using FOP embedded in a Servlet. Users trigger the servlet by clicking a button on a web page. The servlet then takes the response and performs a transformation and renders to pdf. The browser pops up a new window and displays the pdf output. 1% or so of my user population cannot get the pdf to display in the browser window that pops up (or any other browser window). These users can open pdf files that exist on their local machine. When these users click the print button on my web page, the new browser window pops up, but the contents are blank. Any idea what is going on? Mike Z. - 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: blank screen in browser
Not necessarily. If only a few people's browsers are actually sending a second request through to the servlet you might only see an error then. (Say if you were storing the byte-stream in the user session for some reason, but then deleting it after the first hit to the servlet, it would return and empty byte-strem-blank page.) -Original Message- From: Thorsten Scherler [mailto:[EMAIL PROTECTED] Sent: Thursday, November 21, 2002 1:14 PM To: [EMAIL PROTECTED] Subject: Re: blank screen in browser But he wrote: 1% or so of my user population cannot get the pdf Cox, Charlie wrote: could an exception be occurring that prevents anything from being written to the output stream? This would cause a blank screen. Check your server's log files. then I guess it would be 100% Charlie -Original Message- From: Zahigian, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, November 21, 2002 1:59 PM To: 'fop-dev@xml.apache.org'; '[EMAIL PROTECTED]' Subject: blank screen in browser I am using FOP embedded in a Servlet. Users trigger the servlet by clicking a button on a web page. The servlet then takes the response and performs a transformation and renders to pdf. The browser pops up a new window and displays the pdf output. 1% or so of my user population cannot get the pdf to display in the browser window that pops up (or any other browser window). These users can open pdf files that exist on their local machine. When these users click the print button on my web page, the new browser window pops up, but the contents are blank. Any idea what is going on? Mike Z. - 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: Possibility of converting from XML to PDF without the interme dia te stage of FO format
If performance is everything, you might look into some of the proprietary PDF engines like faceless.org. But either way I believe you're still going to have to convert your raw xml into something marked up for display, then feed it to the PDF generator. Does anyone have any experieince with faceless compared to FOP performance-wise? Matt -Original Message- From: Jie Wang [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 2:31 PM To: '[EMAIL PROTECTED]' Subject: Possibility of converting from XML to PDF without the intermedia te stage of FO format How to decrease the responding time of converting from XML to PDF ? Currently it took me about 2 Mins to generate my 56 page PDF from XML files. Is that possible to convert from XML to PDF without the intermediate stage of FO format ? Thanks, Jie -Original Message- From: Oleg Tkachenko [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Tuesday, June 04, 2002 11:47 AM To: [EMAIL PROTECTED] Subject: Re: FOP error with xsl:copy-of .../ There are no chapter_title or sub formatting objects in xsl-fo, you have to transform it in xslt to fo objects, like fo:inline rather than just copying them to the fo. [EMAIL PROTECTED] wrote: Hi, I am attaching the test xsl,xml and the java files. The problem is that the description of any node could have tags and text mixed. If I use xsl:value-of (with FOP), I get only the text and when I use xsl:copy-of (without FOP embeded), I get the desired result, but with FOP I am getting 'error 10231' I have tried everything that I could think of and could not come up with the correct stylesheet. I truly could use your help I am anxiously waiting for a solution. Thank you so much in advance. Norm --- ERROR - ERROR 10231 [fop ] (): Unknown formatting object null^chapter_title Exception in thread main org.apache.fop.apps.FOPException: java.lang.NullPoin erException at org.apache.fop.apps.Driver.render(Driver.java:486) at test1.main(test1.java:102) test.xml -- ?xml version=1.0 encoding=iso-8859-1? ?xml-stylesheet type='text/xsl' href='test.xsl'? document id=DOCUMENT 810-005_103 chapter id=test chapter_titleTesting Chapter sub3/sub/chapter_title /chapter /document -- test.xsl --- xsl:stylesheet xmlns:xsl= http://www.w3.org/1999/XSL/Transform http://www.w3.org/1999/XSL/Transform version=1.0 xmlns:fo= http://www.w3.org/1999/XSL/Format http://www.w3.org/1999/XSL/Format xsl:template match=document fo:root xmlns:fo= http://www.w3.org/1999/XSL/Format http://www.w3.org/1999/XSL/Format fo:layout-master-set fo:simple-page-master page-width=200mm master-name=Page1 page-height=280mm margin-top=10mm margin-bottom=10mm margin-left=20mm margin-right=20mm fo:region-body margin-top=0mm margin-bottom=10mm margin-left=0mm margin-right=0mm/ /fo:simple-page-master fo:page-sequence-master master-name=PS1 fo:single-page-master-reference master-name=Page1/ /fo:page-sequence-master /fo:layout-master-set fo:page-sequence master-reference=Page1 fo:flow flow-name=xsl-region-body xsl:apply-templates/ /fo:flow /fo:page-sequence /fo:root /xsl:template xsl:template match=document/chapter/chapter_title fo:block space-after=3mm font-size=14pt text-align=center break-before=page break-after=page xsl:copy-of select=./ /fo:block /xsl:template /xsl:stylesheet --- test.java file just the main() public static void main () { File xmlFile=new File(test.xml); File xslFile=new File(test.xsl); File pdfFile=new File(test.pdf); Logger log = null; if(log == null) { Hierarchy hierarchy = Hierarchy.getDefaultHierarchy(); log = hierarchy.getLoggerFor(fop); log.setPriority(Priority.WARN); } FileOutputStream OutFile = new FileOutputStream(pdfFile); ByteArrayOutputStream out = new ByteArrayOutputStream(); Driver driver=new Driver(); driver.setLogger(log); driver.setRenderer(Driver.RENDER_PDF); InputHandler ih=new XSLTInputHandler(xmlFile,xslFile); XMLReader p=ih.getParser(); driver.setOutputStream(OutFile); driver.render(p, ih.getInputSource()); OutFile.close();
RE: Performance Guidance
J: No offense meant, but most people start with the most inefficient ways to generate XML, usually doing a lookup in a remote database (which is slow, but hard to avoid), building an XML string or a DOM tree (which is slow, memory consuming and avoidable) and then feed it to the XSLT processor. I meant to ask--what alternatives do you suggest to that avoidable second step as far as getting to the XSLT processor? thx a lot Matt Savino
RE: Performance Guidance
That's really good to know. Thanks Matt Savino Doesn't XSLT ultimately need it's source XML in a DOM object to run? It depends. One point is that DOM is an interface, and there exist heavyweight and leightweight implementations. Some XSLT processors can work directly from an arbitrary DOM tree as long as read interface is supported. Many XSLT processors prefer to build their own internal representation of the XML tree for efficiency rather than using a DOM implementation from a library, quite a few do this even if they are fed a DOM tree. The internal XML tree representation may or may not resemble a DOM implementation, and may or may not use or provide a DOM conformant interface. Some processors, specifically Xalan, are capable of streaming processing. They analyze the templates and start processing immediately once a sufficiently large subtree is read. Subtrees which has been processed are discarded, so there is never a complete DOM in memory. This work especially well if you are creating a (HTML-) table from a DB query result. J.Pietschmann
RE: Performance Guidance
I mean every other thread has to wait. I have the FOP processor wrapped in a stateless session bean and I limit the number of instances of that bean to one. This is because of the serious performance drop-off we see when FOP is run more than once concurrently. I'm still working out some of the details. Matt Savino -Original Message- From: Zahigian, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, June 06, 2002 2:13 PM To: '[EMAIL PROTECTED]' Subject: RE: Performance Guidance Matt, I'm not sure what you mean by a one FOP processing thread per appserver instance? J., I am getting data out of some javabeans in the form of xml, then this xml is transformed using a stylesheet, then another transformation takes place to create the xsl:fo and then FOP takes over. I'll go ahead and try and profile--you think the bottleneck might be in the transformations and not in the final rendering? Do you have a profiler you can recommend? Thanks very much for the feedback. Mike Z. -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED] Sent: Thursday, June 06, 2002 1:51 PM To: '[EMAIL PROTECTED]' Subject: RE: Performance Guidance I am curently working on a system to only allow one FOP processing thread per appserver instance. You can search my earlier posts for some benchmarking results. Matt Savino Senior Systems Analyst Quest Diagnostics Inc. 33608 Ortega Hwy Building C San Juan Capistrano, CA 92690 949.728.4832 cel - 310-344-0889 pg - 949-452-4566 -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Thursday, June 06, 2002 1:47 PM To: [EMAIL PROTECTED] Subject: Re: Performance Guidance Zahigian, Mike wrote: I am using FOP to take a single page of XSL:FO content and convert to PDF. I have embedded FOP in a servlet. When I have one user requesting a page it takes about 6 or 7 seconds to get the page formatted as PDF. It seems like each additional simultaneous request pushes the response time by 6 or 7 seconds. So, if 10 users request pages at about the same time, the 10th user gets his page back in about a minute--and this is only one page. Is this the performance I should expect? What the ideal way to handle the rendering process? Should I create a Rendering object that had a rendering method or should I simply have a class with one static method that renders? Any guidance on how to embed FOP and get better response time is appreciated. The design of the embedding hardly matters for performance. The complexity of the layout usually matters. How much time does FOP need to render your FO from the command line? Does the time include the XSL transformation or is it FO rendering only? Use the -d switch to get timings. Do you use JDK1.3? Is HotSpot enabled? FOP is much slower on JDK 1.2 and earlier. Try to isolate the steps. Apply a profiler. You might find bottlenecks where you'd expect them last. In your case, I strongly suspect the bottleneck is data retrieval, not FO rendering, 7 seconds for a page sounds too much. You ought to get 1-2 pages per second on moderatly dated machines. J.Pietschmann
RE: Memory usage on lage documents
If you know that none of your table cells are going to wrap you could count rows at the XSLT level and put in a new page sequence every x pages. This defeats a lot of the elegance of FOP, but could work. My problem is I have lots of random cell-wrapping, and I'm not about to start trying to calculate in my XSLT when FOP will wrap a cell. Matt Savino -Original Message- From: Mirko Sertic [mailto:[EMAIL PROTECTED] Sent: Monday, May 06, 2002 8:00 AM To: [EMAIL PROTECTED] Subject: AW: Memory usage on lage documents Hi there again! Thanks for your help. I think you are right and my extremly long page sequences are the matter. In fact, i have only one page-sequence. The problem is, i cannot create multiple page sequences because i do not know where to break my pages. Every table-row in my document is unique and so i do not know where to break. I could limit the page-sequence to let me say 20 rows per page, but this would destroy my cool report layout ( I know that sounds silly but you know customers whishes !!! ) Is there any other way? Bye Mirko -Ursprungliche Nachricht- Von: Cyril Rognon [mailto:[EMAIL PROTECTED] Gesendet: Montag, 6. Mai 2002 16:49 An: [EMAIL PROTECTED] Betreff: Re: Memory usage on lage documents Mirko, there are many post on this list that point out the weaknesses of the FOP engine. The main enemies are : long page sequence and forward references. If you use long tables, then you most certainly have long page sequences. If you have logical page break in your tables, please, change your XSLT code to generate page-sequence break in your tables. The shortest page sequence the least memory used. As for the lot of time to complete the work, it appear that forward reference may be responsible for this. I hav had the same proble for 400 to 1000 pages documents that have the famous total number of pages at the bottom of every pages. I have successfully set up an unclean workaround : I generate my total number of pages after PDF generation is complete using iText software. I even generate my toc at the end of the fo file and then I move it at the top of the document and then write the number of pages at the right place on every pages. This is pretty simple if you look at iText sample code (itext.sourceforge.net). The last thing : C++ or C or ASM formatter won't help much because it is the global design that makes FOP slow and memory consumer. The redesign is on it's way. The workarounds I have mentionned are just gizmo to allow one to wait for the next generation of FOP. Hope that helps, Cyril At 16:29 06/05/2002 +0200, you wrote: Hi there folks! I've a question regarding the memory usage of the fop formatter with large documents. I'm rendering a large list with about 450 pages and 1 table entries. When i look ad the memory usage of the fop formatter in my win32 enrironment, i see that it consumes about 180 MBytes of memory and it needs a lot of time to complete its work! Is there any way to make it faster or to let it use not so much memory without throwing an out ot memory error? Is there any c++ formatter out there that is open source and can do the work faster and without so much memory usage? Thanks a lot Mirko
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: stress test FOP in a servlet?
Just make a frameset that loads as many identical pages as you want. You'll get near concurrent loading. Or you can shell out $30k for loadrunner. Matt Savino -Original Message- From: Carter, Will [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 01, 2002 8:58 AM To: '[EMAIL PROTECTED]' Subject: stress test FOP in a servlet? What is the best way to stress test fop in a servlet find out how many users it would take to produce out of memory errors? is there an easy way to send multiple concurrent requests to a servlet? thanks, will
RE: Why is FO(P) a superior model than what most proprietary tool s propose
Thanks Scott. Can you share a little more detail on how you queue the reports? Matt Savino -Original Message- From: Scott Moore [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 30, 2002 2:29 PM To: '[EMAIL PROTECTED]' Subject: RE: Why is FO(P) a superior model than what most proprietary tool s propose The short answer is you can't expect a large number of users to ask for reports at the same time and not run into memory problems. Believe me, I've stress tested my report server and hit this wall quickly. However, if you write your server to only run X number of reports at once and queue any other requests until other reports are finished, you can avoid those problems and achieve a robust and stable FOP server. At that point, adding more servers can get you better scalability. So far, this has worked well for me. -Original Message- From: Carter, Will [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 30, 2002 5:29 PM To: '[EMAIL PROTECTED]' Subject: RE: Why is FO(P) a superior model than what most proprietary tool s propose This one has got me scared... I am in the process of working out an embedded (servlet) FOP solution for some financial reporting. The generated pdfs are probably around 20 pages.. does anyone have any info about memory requirements or problems I will run into with multiple concurrent users?
RE: Why is FO(P) a superior model than what most proprietary tool s propose
From: Matt Savino To: Bob Leif Sounds great. Tell me where I can get a good Ada app-server and a Java-Ada translator for all the existing code--and I'll run it by the corporate brass. Matt Savino -Original Message- From: Robert C. Leif [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 30, 2002 2:35 PM To: [EMAIL PROTECTED] Subject: RE: Why is FO(P) a superior model than what most proprietary tool s propose From: Bob Leif To: Matt Savino It sounds like you need the performance of an efficient compiled language that performs wherever possible its inheritance at compile rather than run time. Ada is an ISO standard which is available as a GNU compiler, GNAT. It should be noted that Java is a proprietary language owned by SUN. -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 30, 2002 2:01 PM To: '[EMAIL PROTECTED]' Subject: RE: Why is FO(P) a superior model than what most proprietary tool s propose We're using FOP in a production environment to render some management reports and a very complicated lab report. We've had to limit the management reports to about 2000 rows (~50 page PDF) because of FOP's memory issues w/large PDFs. Also I worry about serious slowdown if we ever get 3 or 4 users on the same instance of the app server all running a decent sized PDF at once. Does anyone know if wrapping FOP in a session bean would allow me to distribute processing around to unused servers or otherwise handle the java.lang.outOfMemoryError better? (We're on Weblogic 6.1) I compared FOP to RenderX from XEP. RenderX was the only solution that really mathces FOP's profile (XSL:FO based, java-based or at least platform neutral, no extra servers to run or programs to install - if there are any more out there, please post). For the report I was running, FOP was about 10 times faster than RenderX. But from most accounts performance between the two should similar. I figure there must be something particular about my stylesheet that RenderX didn't like. So I called XEP to see what kind of support my interest in purchasing their $5k/cpu product might garner. They weren't very helpful but did say they were insanely busy. I have a feeling if you could come up with a high-performing commerical all Java FO-PDF engine, you'd be very rich very quick. Matt Savino
RE: Why is FO(P) a superior model than what most proprietary tool s propose
Our application absolutely requires tables spanning mulitple pages. Are we trying to fit a square peg into a round hole incorporating FOP into a reporting app as opposed to book publishing? Matt Savino -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 30, 2002 3:05 PM To: [EMAIL PROTECTED] Subject: Re: Why is FO(P) a superior model than what most proprietary tool s propose Carter, Will wrote: I am in the process of working out an embedded (servlet) FOP solution for some financial reporting. The generated pdfs are probably around 20 pages.. does anyone have any info about memory requirements or problems I will run into with multiple concurrent users? The memory requirements depend on the complexity of the layout (tables spanning multiple pages are bad), how big included graphics are (they are all held in memory), and, often the worst of all, whether you are using forward references, like the popular page x of y (which forces all pages and dependent data to be held in memory until rendering is finished). I've been able to render 500 Page books without problems. J.Pietschmann
OT: Mime Types
Can anyone point me to a good references on getting various response content types/file extension mappings to work with IE and Netscape? I'm having a devil of a time getting CSV and XML to save correctly AND create the correct user prompts. We'd like the open/save dialog to come up for everything, but we'd also like to have the correct extension show up when the user goes to save the file. Customizing the filename for each instance is not important. IE - QueryOutput.pdf, QueryOutput.html, QueryOutput.csv, QueryOutput.xml is fine. For CSV, if I set the content type as application/excel and the user saves the CSV file, it gets saved as a binary file. Which is fine for everything except Notepad and Access 97, which apparently can't convert to ascii correctly and don't see the line breaks. If I change the content type to text/csv, IE works fine, but Netscape saves the file with some extra carriage returns and weird characters. I could set separate content types based on browser, but the users with Netscape who want to import their CSV into Access 97 are still out of luck. For XML, IE seems to always want to open any mapping with a .xml extension no matter what you tell it the content is. We'd rather give the user the option to save first. Also, IE 4.x tries to open every XML file it sees, but can't -- even perfectly good XML files sitting on my hard drive. XMLSpy is set up as my default app for .xml, but if you're already in the browser I guess IE just ignores that. Finally for HTML in Netscape, for some reason after I open the XSLT stylesheet in a new window, when I go back to the opening window, I have weird box characters all over the place -- on a page that doesn't get redrawn at all. I've seen the same behavior on slightly different versions of communicator 4.x on NT4 and Win2k. Very strange. I attached a screenshot. Anyone else seen similar behavior with Netscape and stylesheets? Thanks a lot, I know none of these are related to FOP. But I also know from hanging around here that a lot of you are fighting with some of the same issues in your multi-output systems. I've been searching the web and found some good info. But every other forum I find hasn't been updated for 6 months+. Thanks again for any little pointers or knowledge. Matt Savino Senior Systems Analyst Quest Diagnostics Clinical Trials boxes.jpg attachment: boxes.jpg
RE: IE reloads the PDF document generated from servlet multiplet imes (2 times!)
I looked at setting the max-age. But our reports can take two seconds or 2 minutes, so I really couldn't figure out a good setting. Matt Savino -Original Message- From: Sharan, Dharmendra [mailto:[EMAIL PROTECTED] Sent: Thursday, March 07, 2002 1:38 PM To: '[EMAIL PROTECTED]' Subject: RE: IE reloads the PDF document generated from servlet multiplet imes (2 times!) Hi Savino, Thanks so much, it works for me. It definitely saves the extra time spent in reload of servlet. However I used the cache-control directive for IE :- -- response.setHeader(Cache-Control, max-age=10); // workaround so IE does not refresh/reload PDF page again/twice -- regds, Dharmendra -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED] Sent: Thursday, March 07, 2002 1:51 PM To: '[EMAIL PROTECTED]' Subject: RE: IE reloads the PDF document generated from servlet multiplet imes (2 times!) This is a known issue. There seem to be several approaches, which may depend on your particular situation. There's a full discusssion of this on the fop-dev list under the subject 'FO - PDF works with Netscape, not with IE' which has the code for my solution (you can find it in the archives if not subscribed). I believe this is also going to be in the FAQ soon. Please let me know if you have more questions. -Matt -Original Message- From: Sharan, Dharmendra [mailto:[EMAIL PROTECTED] Sent: Thursday, March 07, 2002 9:41 AM To: [EMAIL PROTECTED] Subject: IE reloads the PDF document generated from servlet multiple times (2 times!) Hi FOP Users, Has anyone come across the problem of Servlet getting called multiple times by IE (ver 5.5) I use the following to render PDF using an input source, however I see in log that that IE calls my servlet 2 times! I use the following code as in the example for embedding fop in servlet - -- response.setContentType(application/pdf); Driver driver = new Driver(inputSource, response.getOutputStream()); driver.setRenderer(Driver.RENDER_PDF); driver.run(); -- Aparently I noticed that after the first time my servlet is done processing the XSLT, IE 5.5 launches the PDF pluggin!, The PDF pluggin again repeats the whole XSLT transform, and only then it display the PDF output. Anybody has similar experience with IE 5.5 ? any ideas/suggestions are appreciated. Thanks!, Dharmendra
RE: XMLSpy - FOP
Thanks Peter. I'm really glad to hear some positive news about the redesign! I'll try to get on that list and check out the code. I like reading Perl, it's therapeutic when you have to deal with Java all day long. I'm sure FOP is a very tough problem. I regretted the tone of that last email as soon as I spit it out. I'm just not having a very great day. I know from watching the fop-dev list for the last year or so that all the active players on FOP are very concientious, hard-working and know what they're doing. Maybe you can look at my little outburst as a rare window into the frustrations that some of the end users are feeling but have the tact to withhold. Just to give you an idea of my personal situation w/FOP, I work for a company of about 27,000 people. In the course of fighting to convince the higher-ups that we could do our little project just fine without Cognos or Crystal Reports, I've sort of become the chief FOP evangelist/programmer. (When you looked at our requirements and resources, building really did make more sense than buying--which is the whole promise of J2EE right?) We're trying to pull together a corporate culture that could have entire separate teams working on similar projects who didn't even know of the other's existstence. People are starting to look at my PDF solution. I'm just afraid they're going to look behind the curtain and see that I can't generate five 10-page reports at once (or one 100-page report) on one instance of Weblogic running on $80k worth of hardware--w/o running out of memory or coming to a standstill. I like where it sounds like you're going with the memory issues. I don't think the speed is a showstopper, but those out of memory issues sure are. I've upped my max-heap size to 768M. Anyone know of major pitfalls to this? (I have 1GB available per instance.) I guess even the roughest non-binding ETA on the redesign might help some of us sleep better at night - 6 mos? 1 year? 2 years? more? And just out of curiosity, why are you starving to finish this - love? future consulting gigs? both? Thanks again, that's all the rambling I have in me for now. Matt Savino Senior Systems Analyst Quest Diagnostics Clinical Trials -Original Message- From: Peter B. West [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 4:43 PM To: [EMAIL PROTECTED] Subject: Re: XMLSpy - FOP Matt, I'm sure Arved will have something to say about this, but are you subscribed to SourceForge's xslfo-proc list? Have you seen Arved's perl prototyping code? This is a *difficult* problem. A large part of the spec can be implemented relatively easily, but if you get the design of the first, say, 85% wrong, the last 15% becomes well-nigh impossible. I *have* been living off savings and credit cards for over 12 months now, initially struggling with the original code base before deciding to start from scratch, and I can say that I am beginning to get a handle on the design. Good luck. Peter Savino, Matt C wrote: I'm 99% sure there is a huge corporate demand for an FO-PDF engine right NOW. Those guys at RenderX are nice but unresponsive, their product is on par with FOP at best, and the're too busy to breathe selling $5k/CPU licenses! I'm about ready to quit and starting working on one myself. Anyone who knows the PDF spec inside and out and can live off savings or credit cards for 6 months is welcome to join.
RE: XMLSpy - FOP
So basically, the nuts are on the anvil? I hope no-one reads this mailing list. Or just run a search on Google in a few days. Better not put any fudges on your resume that can be contradicted by any post you've *ever* made to a newsgroup, mailing list or website. At least not if you have an uncommon name like mine. Matt Savino Senior Systems Analyst Quest Diagnostics Clinical Trials -Original Message- From: C Brian O'Kelley [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 7:05 PM To: [EMAIL PROTECTED] Subject: Re: XMLSpy - FOP Random question, but is there incentive for a company to hire someone to enhance FOP and release the updates to the public domain? Are most of the developers employed to do this, or is this done in their free time? Brian On Wed, 27 February 2002, Peter B. West wrote: Savino, Matt C wrote: I regretted the tone of that last email as soon as I spit it out. I'm just not having a very great day. I know from watching the fop-dev list for the last year or so that all the active players on FOP are very concientious, hard-working and know what they're doing. Maybe you can look at my little outburst as a rare window into the frustrations that some of the end users are feeling but have the tact to withhold. I think your comments will be read in that light. ... I've sort of become the chief FOP evangelist/programmer. ... People are starting to look at my PDF solution. I'm just afraid they're going to look behind the curtain and see that I can't generate five 10-page reports at once (or one 100-page report) on one instance of Weblogic running on $80k worth of hardware--w/o running out of memory or coming to a standstill. So basically, the nuts are on the anvil? I hope no-one reads this mailing list. I guess even the roughest non-binding ETA on the redesign might help some of us sleep better at night - 6 mos? *** 1 year? *** My guess. I think the design is getting towards critical mass. See my other post responding to Arved. 2 years? more? And just out of curiosity, why are you starving to finish this - love? future consulting gigs? both? Things slowed down a lot after dot.con, and here in Brisbane they were slow to start with. I have a (voluntary) application for FOP, and I had a need to learn Java to spruce up my skill set. Future consulting? I suppose I can dream. Peter
XMLSpy - FOP
Has anyone gotten FO transformations to work on XMLSpy w/FOP .20.2? No matter what I try I keep getting the following error: Output of external XSL converter: The filename, directory name, or volume label syntax is incorrect. thx a lot, Matt Savino Senior Systems Analyst Quest Diagnostics Clinical Trials
RE: Newbie: Vertical Lines in region start and region end
Is this basicaly the same problem I'm having? I've been trying for some time now to figure out how to get a table that spans multiple pages to always have the same size border on each page. Simplified, my page needs to look like this (The '_'s and '|' represent the actual printed border): top of page __ |static header | |__| __ |table header | - |__| | | table | | | content| | | | I'd like this height to be constant | (can span| | | multiple| | | pages) | | |__| - bottom of page The problem is I can't figure out how to get the border around the table to always extend to the bottom of the page. Right now if the table ends after three rows on the third page, so does the border. I keep thinking there must be some simple way to do this that I'm missing. This border can/should be in the exact same position for every page in my report, so maybe I can do something with region-before and region-after? I think the tricky part is that the table can span multiple pages. Right now I wrap the entire content table in a single-cell table, and put the border in the column definition of that outer table. I used column because I also have some stuff in the header of the outer table that may or may not be repeated after the first page--depending on business rules. I'm pretty sure if I put the border in cell or block has the same effect. I've attached the FO and PDF if anyone wants to look at it. I marked the spot in the FO where I set the border with '!-- BORDER SET HERE --'. thx a lot, Matt Savino -Original Message- From: Josh Campbell [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 1:14 PM To: [EMAIL PROTECTED] Subject: Re: Newbie: Vertical Lines in region start and region end I have been trying to draw a thin vertical line down the Region-start and Region-end sections of the simple page master in FO. I managed some boxes in these areas in FO which showed up in Antenna house but they would show up. So what I want to know is, can I draw vertical lines? is it possible to use these regions in FOP? and how can I learn how to do that if its possible? It's a mission to say the least. I managed to make up a border using these regions and fo:block with a line-height (the only way I've found to increase the height of a block). The only major issue was that the fo:block in the start and end regions needed something in them to actually display. I did a workaround using a lowercase 'l' (being the narrowest character I could find...possibly a '.' would be better) and making it the same colour as the background it appears on (which is a very sloppy workaround I'm sure but it works). FO still has a long way to go before it's a useful design tool. Anyway, here's my code: fo:static-content flow-name=xsl-region-before fo:block background-color=#00/ /fo:static-content fo:static-content flow-name=xsl-region-after fo:block background-color=#00/ /fo:static-content fo:static-content flow-name=xsl-region-start fo:block color=#33 background-color=#00 line-height=27.7cml/fo:block /fo:static-content fo:static-content flow-name=xsl-region-end fo:block color=#ff background-color=#00 line-height=27.7cml/fo:block /fo:static-content Josh Campbell ZYPE - Graphical Interface Design Phone: 03 3862094 Mobile: 021 400 472 Web: www.zype.co.nz attachment: ReportOutput.zip
RE: setting a property with value of a variable
If you need to use a variable instead of an attribute, try this (don't forget the '$'): fo:table background-color={$bakColor} / Or if you need the attribute to be the result of something more complicated like a choose statement, you can use xsl:attribute: fo:table xsl:attribute name=background-color xsl:choose xsl:when test=position() mod 2 = '1'white/xsl:when xsl:otherwisegrey/xsl:otherwise /xsl:choose /xsl:attribute good luck, Matt -Original Message- From: Sampige, Srinivas [mailto:[EMAIL PROTECTED] Sent: Monday, February 18, 2002 5:41 PM To: '[EMAIL PROTECTED]' Subject: RE: setting a property with value of a variable Okay ,found the answer fo:table background-color=@bakColor -Srinivas -Original Message- From: Sampige, Srinivas [mailto:[EMAIL PROTECTED] Sent: Monday, February 18, 2002 5:35 PM To: FOPuser (E-mail) Subject: setting a property with value of a variable Hi I want a set of tables with alternating background colours. To do this I intend to set the background of the table with the value of a variable which will contain white or grey. How do I do that?. Presently my .XSL contains this - xsl:template match=record xsl:variable name=bakColor select=yellow/ fo:table background-color='xsl:value-of select=bakColor/\' fo:table-column column-width=20mm/ fo:table-column column-width=20mm/ fo:table-column column-width=20mm/ fo:table-column column-width=20mm/ fo:table-column column-width=20mm/ fo:table-column column-width=20mm/ fo:table-column column-width=20mm/ fo:table-column column-width=20mm/ fo:table-column column-width=20mm/ fo:table-column column-width=20mm/ fo:table-column column-width=20mm/ fo:table-column column-width=20mm/ fo:table-body xsl:apply-templates/ /fo:table-body /fo:table /xsl:template But I am getting this error when I try to apply it to my XML file - -- -- -- -- - C:\Apps\Apache Group\xalan-j_1_2_2\samples\SimpleTransformjava SimpleTransform file:///C:/Apps/Apache Group/xalan-j_1_2_2/samples/SimpleTransform/jeffReport.xsl; Line 71; Column 31 XSL Error: Could not parse jeffReport.xsl document! XSL Error: SAX Exception Exception in thread main org.apache.xalan.xslt.XSLProcessorException: The value of attribute ba ckground-color must not contain the '' character. at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1753) at org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEng ineImpl.java:8 13) at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:647) at SimpleTransform.main(SimpleTransform.java:81) -- -- -- -- - can sombody please help? thanks Srinivas
RE: Keeping it together
Supposedly in .20.3, fo:table-row keep-with-next=always works. In previous versions it went into an endless loop if the rows went beyond the end of the page. Has anyone used .20.3? I didn't like the the logging errors and two new jar files I was supposed to use. And I missed my benchmarking output (the time not the memory). I posted on fop-dev to ask if there was any way around these issues but no one replied. -Matt -Original Message- From: Jozef Chocholacek [mailto:[EMAIL PROTECTED] Sent: Monday, February 18, 2002 11:12 PM To: [EMAIL PROTECTED] Subject: Re: Keeping it together Lars Karschen wrote: ... I tried to connect them via keep-with-next.within-page=always, but there's no change on the output, maybe i overlooked something, since i'm not sure if i understand the definition on the W3C-Page ;) You understand it good, but FOP has no or just a symbolic implementation of this property(-ies). Keeps doesn't work in FOP :( It is the most important feature to be implemented, from my point of view, anything else works good enough for my purposes. Regards, J.Ch. -- Ing. Jozef Chocholacek Qbizm Technologies, Inc. Chief Project Analyst ... the art of internet. Kralovopolska 139 tel: +420 5 4124 2414 601 12 Brno, CZ http://www.qbizm.com fax: +420 5 4121 2696