RE: Using FOP with xmlspy
I know FOP through XMLSpy doesn't work on NT, I think that may apply to Win98/95 as well. Matt Savino -Original Message- From: Malcolm Sinclair [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 3:08 PM To: [EMAIL PROTECTED] Subject: Using FOP with xmlspy Please excuse my asking this question on a developer's forum -- I realise it's off-topic. Can you give me some hints, or can you put me in touch with someone who has successfully produced PDFs from .xml files in xmlspy? I have done this quite satisfactorily with fop-0.20.3 from the command line, but not from WITHIN xmlspy. A few details: + I'm using the evaluation version of xmlspy, + I'm in touch with Altova's support people; they are trying to help, but as yet nothing resolved, + I'm a tech writer (novice in XML and no Java knowledge whatsoever) I suspect the root of the problem is my unfamiliarity with XML; however, your suggestions could be very helpful just now Thank you for your time Malcolm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Error with 20.0.3!
MostFrequentlyAskedQuestion Just adding a keyword to this thread for future archive search pointers. Matt -Original Message- From: David B. Bitton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 9:13 AM To: [EMAIL PROTECTED] Subject: Re: Error with 20.0.3! Snipped from CHANGES in the 0.20.3 distro: ... - Changed master-name to master-reference on fo:page-sequence, fo:single-page-master-reference, fo:repeatable-page-master-reference and fo:conditional-page-master-reference to comply with the latest XSL recommendation. Also changed the unimplemented property space-treatment to white-space-treatment and updated examples and tests to use the new syntax. ... You need to update you XSL-FO to reflect this change in the code. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: Klosa Uwe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 5:29 AM Subject: Error with 20.0.3! With 20.0.2 all pages worked fine, but now I'm getting the following error: org.apache.fop.apps.FOPException: 'master-reference' for 'fo:page-sequence'matches no 'simple-page-master' or 'page-sequence-master' at org.apache.fop.fo.pagination.PageSequence.getNextPageMaster(Pa geSequence.jav a:532) at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequenc e.java:334) at org.apache.fop.fo.pagination.PageSequence.format(PageSequence. java:268) at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:200) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:182) at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:463) at org.apache.fop.apps.Driver.render(Driver.java:481) at org.apache.fop.apps.Driver.render(Driver.java:501) at diva.xml.xsql.serializers.XSQLFOP203Serializer.serialize(XSQLF OP203Serialize r.java:43) at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:282) at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(Certificat esValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContex t.java:2343) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv e.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:429) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495) at java.lang.Thread.run(Thread.java:536) This is my stylesheet: ?xml version=1.0 encoding=utf-8? xsl:stylesheet
RE: Web site update request
There seem to be several approaches to this problem rather than one magic bullet. I'd be glad to explain my solution and listen to others in the processing of hammering out the FAQ entry. -Matt -Original Message- From: Keiron Liddle [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 5:45 AM To: [EMAIL PROTECTED] Subject: Re: Web site update request Sure. I'll change that. Is there any chance that you could get together all the information about viewing pdf through IE so that we don't have to go through it all again. On 2002.03.07 13:35 alex wrote: Pretty please can someone amend this page http://xml.apache.org/fop/faq.html on the website / xdocs in cvs (I don't have CVS access otherwise I'd do it myself, however I'm happy to learn how to do a diff if someone says they will apply it.) Please change For up to date information or more details please visit the Fop FAQ site. The site uses Jyve to provide an interactive FAQ: http://www.OWAL.co.uk:8090/ to this For up to date information or more details please visit the Fop FAQ site. http://www.OWAL.co.uk/cgi-bin/fopfaq.cgi Any problems with the FAQ itself or new answers for the FAQ should be mailed to [EMAIL PROTECTED] More general questions about FOP should be directed to one of the mailing lists. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FO - PDF works with Netscape, not with IE
If you don't set any of the cache properties in the response header (returned PDF) to no-cache (or expires immediately, or whatever equivalent), IE 5.5 is smart enough to internally return it's own cache on the second hit (at least in my experience). Matt Savino -Original Message- From: Katiyar, Bhawana [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 7:37 AM To: [EMAIL PROTECTED] Subject: RE: FO - PDF works with Netscape, not with IE I am using IE 5.5 SP2. My request for a PDF document is being sent twice. Does anyone has a working servlet which serves PDF requests in one shot. Thanks Bh -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 5:00 PM To: '[EMAIL PROTECTED]' Subject: RE: FO - PDF works with Netscape, not with IE If you have to support older verisons of IE (5.5), you'll also have to take a couple of steps to avoid calling FOP 2 or 3 times. One you'll want to look out for User-Agent='contype' in the request header, and only return the content type, not the actual content. But this isn't enough (even though Microsoft says it is). IE 5 likes to request the PDF doc, then kill the request, then request the contype, then request the doc again. Except sometimes, and under no reproduceable set of conditions I could discern, IE accepts the whole document on the first request. Which means you can't just only call FOP and return the whole doc on the third hit. The only full solution I've seen so far is to cache the PDF byte-array in the session after the first hit, then return it if requested on the third hit. (credit Jim Urban I believe) This doesn't save you from sending the PDF out over the wire twice, but it does save calling FOP twice. And so far the latter has proven to be much more time and resource-consuming. I've attached the servlet I use to generate HTML and PDF. It's kind of a mess, but you should be able to find all the pieces. One note: it's possible setting the 'Content-Disposition' as described below may clear up the problem. I remember experimenting with Content-Disposition a long time ago, but I didn't like the way it brought up two consecutive 'Save As...' dialogs. Matt Savino -Original Message- From: Chetan Vig [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 1:51 PM To: [EMAIL PROTECTED] Subject: Re: FO - PDF works with Netscape, not with IE Make sure you have the following set in your response // CONTENT DISPOSITION ENSURES THAT IE BROWSER RECOGNIZES THE PDF // BYTE STREAM AS A PDF FILE // SOLUTION FOUND FROM MICROSOFT SUPPORT PAGE // NO IMPACT FOR NETSCAPE BROWSER response.addHeader(Content-Disposition, inline;filename=report.pdf); response.setContentLength(contentSize); Chetan Jim Urban wrote: Be sure you set the content length, otherwise IE has problems. It also helps to call reset to clear any information in the HTTP header before setting your content type or any other values. Jim -Original Message- From: Katiyar, Bhawana [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 3:23 PM To: [EMAIL PROTECTED] Subject: FO - PDF works with Netscape, not with IE Hi! I am using version .18 to render PDF from XML. Rendering is fine with Netscape, but doesn't work with IE. Any clues? Thanks Bhawana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FO - PDF works with Netscape, not with IE
I don't set no-cache. I control caching by adding a unique string (current time in milliseconds) the query string. That way if the browser calls the exact same string, which can only happen when it is repeating the same internal request, it is allowed to use it's own internal cache. Matt Savino -Original Message- From: alex [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 9:47 AM To: [EMAIL PROTECTED] Subject: Re: FO - PDF works with Netscape, not with IE I think Matt was saying that you *shouldn't* set no-cache in order to fix the problem of IE fetching twice. However in my experience you need to set no-cache The following code is copied from an oldish posting by Matt himself I think the commented out bits are the ones you are thinking of Matt seemed to look into the possibility of setting a cache limit (eg 15 minutes) but I couldn't see how to do that Alex ByteArrayOutputStream out = new ByteArrayOutputStream(); 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); /* if (isIE4) { //response.setHeader(Cache-Control, no-cache); //response.setHeader(Pragma, no-cache); } else { response.setHeader(Cache-Control, private); } */ byte[] content =3D out.toByteArray(); response.setContentLength(content.length); System.out.println(Content length = + content.length + \n); response.getOutputStream().write(content); response.getOutputStream().flush(); } catch (Exception ex) { throw new ServletException(ex); } } At 17:11 05/03/02, [EMAIL PROTECTED] wrote: how do you set the no-cache for the output header going out of the servlet, because I saw this prob just yesterday. - Original Message - From: Savino, Matt C [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 11:34 AM Subject: RE: FO - PDF works with Netscape, not with IE If you don't set any of the cache properties in the response header (returned PDF) to no-cache (or expires immediately, or whatever equivalent), IE 5.5 is smart enough to internally return it's own cache on the second hit (at least in my experience). Matt Savino -Original Message- From: Katiyar, Bhawana [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 7:37 AM To: [EMAIL PROTECTED] Subject: RE: FO - PDF works with Netscape, not with IE I am using IE 5.5 SP2. My request for a PDF document is being sent twice. Does anyone has a working servlet which serves PDF requests in one shot. Thanks Bh -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 5:00 PM To: '[EMAIL PROTECTED]' Subject: RE: FO - PDF works with Netscape, not with IE If you have to support older verisons of IE (5.5), you'll also have to take a couple of steps to avoid calling FOP 2 or 3 times. One you'll want to look out for User-Agent='contype' in the request header, and only return the content type, not the actual content. But this isn't enough (even though Microsoft says it is). IE 5 likes to request the PDF doc, then kill the request, then request the contype, then request the doc again. Except sometimes, and under no reproduceable set of conditions I could discern, IE accepts the whole document on the first request. Which means you can't just only call FOP and return the whole doc on the third hit. The only full solution I've seen so far is to cache the PDF byte-array in the session after the first hit, then return it if requested on the third hit. (credit Jim Urban I believe) This doesn't save you from sending the PDF out over the wire twice, but it does save calling FOP twice. And so far the latter has proven to be much more time and resource-consuming. I've attached the servlet I use to generate HTML and PDF. It's kind of a mess, but you should be able to find all the pieces. One note: it's possible setting the 'Content-Disposition' as described below may clear up the problem. I remember experimenting with Content-Disposition a long time ago, but I didn't like the way it brought up two consecutive 'Save As...' dialogs. Matt Savino -Original Message- From: Chetan Vig [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 1:51 PM To: [EMAIL PROTECTED] Subject: Re: FO - PDF works with Netscape, not with IE Make sure you have
RE: Example extension
Thanks Chuck. I think I can actually get this to work if I move my current table header into a separate mirror table in the region-before. But at least on my lab report, it's going to involve moving a whole lot of the nested table structure into static-content. Also the table headers will stop lining up if we ever implement dynamic column sizing. Seems like a lot of work for one little word, but if it's the only way I may have to do it. Thanks again, I appreciate the example. Matt Savino -Original Message- From: Chuck Paussa [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 11:02 AM To: [EMAIL PROTECTED] Subject: Re: Example extension Matt, I've written the following sample fo document that puts in continued on following pages. Unfortunately fo:retrieve-marker does not work within the fo:flow so it cannot be implemented in the fo:table-header but instead in a table palced in the region-before. This is not a problem if you are starting a new page sequence for pages that will not have table elements that need a header. Also, you can use this open-source product for watermarks http://www.etymon.com/pj/index.html Chuck Paussa Matt Savino wrote I've been told than an extension is the way to go for these two needed features: 1. Add a string ['(Continued)'] to a table header if the table spans multiple pages. Note these tables are part of the content and can start anywhere in the page. They could be seen more like paragraphs or blocks with a title. Any other solution to this problem is acceptable. 2. Separate page number display for a subsection. IE - master document is page 4 of 7, but subsection is page 2 of 3. Please let me know if I'm missing any existing functionality that solves these problems. I am planning to look into writing an extension some day. An example would certainly help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Using Avalon/Logkit
I just tried to plug in fop .20.3 to an existing app that uses .20.2. I included the new avalon jar in my classpath, but I still get a logging error. From an end user persepective, I would just like to suggest that when you add a new component between non-version build changes that breaks the old build or throws an error, please just point me to what I need to do to fix the problem (url?) right there in the error message. I know I'm lazy, but if there's any way this can be done it would make my life a lot easier. thx, Matt Savino -Original Message- From: Alistair Hopkins [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 7:53 AM To: [EMAIL PROTECTED] Subject: RE: Using Avalon/Logkit Could the Avalon jar shipped with Fop include org.apache.avalon.framework.logger.Log4JLogger and org.apache.avalon.framework.logger.Logger so it's easy for us to use log4j? It's only a few kb extra and it means that we don't have to have lots of avalon jars in the classpath, or have repackaged/custom versions of Log4JLogger to get out of sync. Alistair - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: [Understanding] FO Tree
Understood. So when can we expect [Understanding] FO Tree[4]? Sorry, I couldn't resist :P -Matt -Original Message- From: Sachin Oswal [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 2:07 AM To: '[EMAIL PROTECTED]' Subject: RE: [Understanding] FO Tree Hi Michiel Brahma, To make Keiron's life easier In the first place there is nothing like [Understanding] FO Tree [2] There have been three lessons in this ongoing tutorialand they are:- Understanding FOP[1] XML Parsing[2] Understanding FO Tree [3] If you've missed the earlier ones u can find them in the archives at http://marc.theaimsgroup.com/?l=fop-devr=1w=2# Have a nice day Sachin \\\|/// \\ ~ ~ // ( @ @ ) oOOo-(_)-oOOo- Sachin Oswal Wilco Systems Hyderabad E-Mail :[EMAIL PROTECTED] Phone (040)-3408600 Extensionn : 8507 -- -Original Message- From: Michiel Verhoef [SMTP:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 3:30 PM To: '[EMAIL PROTECTED]' Subject:RE: [Understanding] FO Tree Yep, same here. I checked just about my entire mailbox but I must have deleted it. Is there an archive somewhere? TIA, Michiel -Original Message- From: BRAHMA [mailto:[EMAIL PROTECTED]] Sent: donderdag 14 februari 2002 10:41 To: [EMAIL PROTECTED] Subject: [Understanding] FO Tree Hi Keiron, Thank you very much for providing the FOP knowledge.Unfortunately I missed some how [Understanding] FO Tree [2] can you tell me where can I find it please. thanks and regards brahma - Brahmaiah Kurabalakota Software Developer eMIS eMerging Information Systems GmbH Am Friedrichsbrunnen D-24782 Büdelsdorf Tel.: +49 (4331) 447 1520 Mobile: +49 (172) 5372297 mailto: [EMAIL PROTECTED] www.emis-intl.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] This message is confidential and may also be legally privileged. If you are not the intended recipient, please notify us immediately. You should not copy it or use it for any purpose, nor disclose it's contents to any other person. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of Wilco International. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
.20.3 compatibility
I've recently tried to upgrade to FOP .20.3. I'd like to know if there's any way to avoid having to use avalon-framework-4.0.jar and logkit-1.0b4.jar. I really like my .20.2 with just fop.jar and batik.jar. Also I liked the performance bechmarking that .20.2 used to output to the console. Any way top get that back? Forgive me If this information has already been covered or is in an FAQ somewhere. Is this more of a fop-user type question? thx a lot, Matt Savino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: newbie needs help with relative address for image.
FYI - I still can't get this to work for a relative file path. Since I have NT dev boxes and Unix QA and Prod, I have to feed the explicit PDF filepath to the stylesheet as a parameter. I get the filepath form a environment-level properties file. Still looking for that elusive XSLT relative filepath if anyone has found it. Here's our solution if it helps anyone: XSLT ?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:param name=pdfImagePath / (...) fo:external-graphic src={concat($pdfImagePath,'ClinTrialLogoGreenBig.gif')} / (...) Servlet Piece transformer.setParameter(pdfImagePath, getServletConfig().getServletContext().getAttribute(pdfImagePath)); -Matt -Original Message- From: Rob Smith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 1:55 AM To: [EMAIL PROTECTED] Cc: 'Troy Bottger' Subject: RE: newbie needs help with relative address for image. From: Troy Bottger ... fo:external-graphic height=24mm width=66mm src={../companylogo/url}/ It is just when I specify the relative address when I get: Error while creating area : Invalid Image URL - error on relative URL : no protocol: null/abc/images/merchant_logo.gif Try src=file:{../companylogo/url} -- Rob Smith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Any real-life business use ?
Our app is in live beta testing right now. We use FOP to generate printable versions of a lab report and 5 canned mgmt. reports. (I've included a demo copy of the lab report, just to show some of what FOP can do.) So far the only limitations we've found are: 1) Memory. Fop runs out of memory on large reports (from 40+ pages), moreso when several are being run concurrently. (It also happens more often on our $20,000 HP-UX production machines vs. my PIII-NT4 dev box. I have all the settings to HP recommendations. I don't think the HP-UX JVM, even with Hotspot, is tuned very well for garbage collection.) I understand that they way around this is to implement new page sequences every x pages or so. The problem is some of our reports don't have natural page breaks, so I guess I will have to insert some in odd places. 2) Table-header flexibility. We sometimes have a desire to alter the table header for every instance after the first (like inserting the word 'Continued'). I'm gearing up to write a FOP extension to accomplish this. 3) Keep-with-next endless looping problem. Apparently this will be addressed very soon. 4) Complex page numbering. We have a need to display a subsection page number separately within the document. (IE - document page 4 of 9 is subsection page 1 of 3.) Haven't figured out a way to do this. Maybe another extension? 5) On the attached lab report, I can't figure out a way to get the table (or it could be cell) border to extend to the bottom of the page. Note that the report is broken into 4 sections, all of which can span multiple pages. Any ideas on this one would be greatly appreciated. I posted a message about it awhile back (subj: min table or table-cell height?) but no one got back to me. Maybe the visual of the actual lab report will help. All in all, we're very pleased with FOP. I know I surprised some people who didn't think it was possible to work the voodoo of dynamic PDF generation w/o shelling out for a $$$ product, and probably consultants on top of that. thx, Matt Savino -Original Message- From: Patrick Andries [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 13, 2002 2:31 PM To: [EMAIL PROTECTED] Subject: Any real-life business use ? Hello everyone, I have busy evaluated the FO technology and I would like to hear from people that are using it for real-life business needs. What kind of documents are they using it with ? What volume ? Embedding it in servlets ? How do they cope with the speed ? How do they justify using FO to their bosses ? Anybody with both 3B2 and FO or Compuset and FO experience ? I would love to hear your story. Patrick Andries - ° - ° - ° - ° Tout sur Unicode 3.1 en français : http://hapax.iquebec.com Traduction complète, mise à jour, texte en ligne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] SampleLabReport.pdf Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: AW: FOP-XSL:dynamic external graphics
Thanks a lot, that did the trick. I knew there was a way to use global parameters, but hadn't had time to look into it. Nothing speeds development like cutting and pasting from an email straight into your code and having it work the first time! -Matt -Original Message- From: Mark Reeves [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 7:19 AM To: [EMAIL PROTECTED] Subject: RE: AW: FOP-XSL:dynamic external graphics Try using xsl:param e.g. xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xsl:output ... xsl:param name=filepathValue/ ... fo:external-graphic src={concat($filepathValue,'anImage.gif')} / Then in your code to do the transform, use ( for TRAX) transformer.setParameter(filepathValue, the path read from properties file) ; transformer.transform(src,dest); Mark Mark Reeves Senior Software Engineer CSU Ltd 0161 277 5240 -Original Message- From: Matt Savino [mailto:[EMAIL PROTECTED]] Sent: 07 January 2002 15:02 To: [EMAIL PROTECTED] Subject: Re: AW: FOP-XSL:dynamic external graphics My problem is that I need to change the filepath between environments. (NT and Unix). In all of my Java/JSP code I use an environment-level (Weblogic domain-level) properties file for any values that must change from across environments and which I haven't figured out a way to get by with something relative (IE - absolute URL prefix for HTTPS redirects, absolute filepath to the XSLT stylesheets, etc.). The problem is I have no idea how to get Xalan to read properties from this file, or in any way be aware of it's own context. So I manually change the image source path everytime I upload a build to the Unix box. Not a big deal for me right now since I only have one image in all of my reports. But I imagine it could be a pain if you had a lot more. -Matt Beer, Christian wrote: Hello!! Well, try this one: fo:external-graphic src={$filepathValue} / { and } are kind of escape-chars, that tell xalan to process their content. You can also do this, I think, if you only need the filename one time. fo:external-graphic src={concat('file:../default/tra-app/images/',client/id,'logo .gif')} / Greetz Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Servlet called multiple times solved
Thanks to David Frankson and the other members of this board, I have finally fully solved the problem with IE calling FOP two or three times problem. The first solution came from this: http://support.microsoft.com/support/kb/articles/Q293/7/92.ASP But if you read the fine print, you notice that IE only uses user-agent=contype on the second hit. That still leaves the first and third hits calling FOP. There are some clues to tell the difference betweent the first and third hits, so I was trying to only return the full PDF on the third hit. The problem is that IE sometimes decides to be content with only one hit, and sometimes it decides to make all three. There is no apparent rhyme or reason to this decision. If you only return the content-type on the first call when IE has decided to only make one call it just sits there. Anyway, the second part of the solution was to cache the PDF byte-array in the user's session and return it on any subsequent hits on the first pass. As a key to test that the PDFs are truly the same, I use a counter in the query string which is the time in milliseconds. Anyway here's the code. As usual there's a bunch of extra stuff, but I figure it may help. Please ask if you have any questions. -Matt ReportGeneratorServlet.java ReportGeneratorServlet.java Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Servlet called multiple times solved
No problem. Just make sure you don't try to make isIE4 or the user session into member variables like I did. I did that a day or so ago for convenience and wasn't thinking. -Matt -Original Message- From: Michael Wenczel [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 03, 2002 1:08 PM To: [EMAIL PROTECTED] Subject: RE: Servlet called multiple times solved Thanks for sharing this Matt. I was just going down this road (caching) myself. This will save an afternoon or more. regards, mike -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 03, 2002 12:32 PM To: '[EMAIL PROTECTED]' Subject: Servlet called multiple times solved Thanks to David Frankson and the other members of this board, I have finally fully solved the problem with IE calling FOP two or three times problem. The first solution came from this: http://support.microsoft.com/support/kb/articles/Q293/7/92.ASP But if you read the fine print, you notice that IE only uses user-agent=contype on the second hit. That still leaves the first and third hits calling FOP. There are some clues to tell the difference betweent the first and third hits, so I was trying to only return the full PDF on the third hit. The problem is that IE sometimes decides to be content with only one hit, and sometimes it decides to make all three. There is no apparent rhyme or reason to this decision. If you only return the content-type on the first call when IE has decided to only make one call it just sits there. Anyway, the second part of the solution was to cache the PDF byte-array in the user's session and return it on any subsequent hits on the first pass. As a key to test that the PDFs are truly the same, I use a counter in the query string which is the time in milliseconds. Anyway here's the code. As usual there's a bunch of extra stuff, but I figure it may help. Please ask if you have any questions. -Matt ReportGeneratorServlet.java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: weblogic and fop
Here is the servlet we use to generate PDF and HTML from XML which is stored in the user's session on Weblogic 6.1. There is some extra stuff in it, but you should be able to filter the relevant parts. It also has a partial fix to the IE-pre-5.0 servlet called twice or three times problem. I'm working on what I hope will be the final solution right now. Here is the classpath and startup command I use on our Windows development boxes: set CLASSPATH=.\config\isappdev\lib\fop.jar;.\config\isappdev\lib\xalan-2.0.0.ja r;.\config\isappdev\lib\xmlparserv2.jar;.\config\isappdev\lib\xsu12.jar;.\co nfig\isappdev\lib\classes12.zip;.\config\isappdev\lib\batik.jar;.\config\isa ppdev\lib\xerces-1.2.3.jar;.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar; %JAVA_HOME%\bin\java -hotspot -verbose:gc -ms380m -mx380m -classpath %CLASSPATH% -Dpropfile=%BEA_HOME%\wlserver6.1.\config\isappdev\applications\RVWebApp1\W EB-INF\resultview.properties -Ddomain_propfile=%BEA_HOME%\wlserver6.1.\config\isappdev\isappdev.properti es -Dweblogic.Domain=isappdev -Dweblogic.Name=NT4Dev -Dbea.home=%BEA_HOME% -Djava.security.policy==%BEA_HOME%\wlserver6.1\lib\weblogic.policy -Dweblogic.management.password=%WLS_PW% weblogic.Server As you can see we have a domain-level properties file called isappdev.properties. These properties, which include the XSLTPathPrefix property, are loaded into the servlet context on boot. Still haven't figured out how to get a relative or dynamic image file path to work in my XSLT styleshhet that converts XML-FO. Anyone? (HTTP won't work because of the constantly changing environments from Windows-dev to Unix - dev, QA and Prod.) Also, if anyone has any questions or notices anything silly or inneficient in this servlet, please let me know. Hope this helps, Matt Savino -Original Message- From: James Richardson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 2:54 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: weblogic and fop OK, the problem is that weblogic contains in its classpath some XML parser stuff. (Off topic, but why anybody ever decided that using a single static method to get an XML parser (which one you get only controlled by the classpath is totally beyond me. It might work fine in some cases, but since everybody and their dog started writing specialised versions the whole thing has turned into a classpath nightmare. Forget it if you want dynamic classpaths - Webapp, anyone?) So, to fix this, you have to include the FOP versions in the system CLASSPATH BEFORE the weblogic ones. You then need to set up the type of parser in the system property. (Again, this is a bad idea conceptually, IMHO) So, to get the thing running, I have the following: CLASSPATH=$WL_HOME:$WL_HOME/classes:$WL_HOME/lib/weblogic_sp.j ar:$WL_HOME/lib/weblogic.jar:$WL_HOME/xmlx.jar LOCAL_CLASSPATH=$LOCAL_LIBDIR/xalan-2.0.0.jar:$LOCAL_LIBDIR/ba tik.jar:$LOCAL_LIBDIR/fop.jar:$LOCAL_LIBDIR/avalon-fr amework-4.0.jar:$LOCAL_LIBDIR/logkit-1.0b4.jar: JAVA_CMD_LINE=$JAVA_HOME/bin/java $JAVA_OPTIONS -classpath $LOCAL_CLASSPATH:$CLASSPATH (weblogic stuff here) -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser weblogic.Server $JAVA_CMD_LINE However, YMMV Other warning(s): Due to the (by design) limitations of the java classloader, you will have to make sure that any extensions that you write to FOP/XSL are also in the system classpath, and I pity you if you want to do any of this in an EJB I reckon I will spin the whole PDF rendering thing off as a Jini service and be done with the whole classpath problem. You will also need to be aware of limitations of FOP wrt headless servers. (It won't work) (Actually, any program that requres a graphics context will have problems.) You may want to look at PJA as a way around this. (Alternatively, VNC will also work). In terms of the programs etc to write, the examples work fine. Cheers James [EMAIL PROTECTED] wrote: Hi James, I am facing problem compiling and deploying , xml xsl to pdf using fop on weblogic 6.1. Would you please send me following please, [1] a sample stand alone java code generating pdf using xml and xsl file [2] a servlet generating pdf using xml and xsl file on weblogic 6.x Please help with whatever knowledge you have. Thanks and regards. Rakesh BDY.RTF Content-Type: application/rtf Content-Encoding: base64 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] ReportGeneratorServlet.java Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: image protocal in Fop on unix
This works for me: fo:external-graphic src=file:///usr/local/weblogic/config/isappdev/applications/RVWebApp1/WEB-I NF/lib/ClinTrialLogoGreenBig.gif / If you figure out how to use a relative path, PLEASE let me know. -Matt -Original Message- From: Maneshi Tuli [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 12:26 PM To: [EMAIL PROTECTED] Subject: image protocal in Fop on unix hi , I want to give the image path on unix machine i give like this fo:external-graphic src =file:/home/opt/weblogic610/wlserver6.1/config/mydomain/appli cations/DefaultWebApp/images/english/global_navbar/db_header.gif / i tried with this also fo:external-graphic src =/home/opt/weblogic610/wlserver6.1/config/mydomain/applicatio ns/DefaultWebApp/images/english/global_navbar/db_header.gif / but it is not working , it says no protocal null/home/opt/weblogic610/wlserver6.1/config/mydomain/applica tions/DefaultWebApp/images/english/global_navbar/db_header.gif not found. plz help what shouild i give thanks -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: image protocal in Fop on unix
If you have the path or filename wrong (including case), it will still give the same error. Try pasting your full path into a Unix cp command to make sure you have no typos. Other than that, I don't know. Here is the driver setup I use: 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); -Original Message- From: Maneshi Tuli [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 12:38 PM To: [EMAIL PROTECTED] Subject: RE: image protocal in Fop on unix I am giving in the same way but it gives error on relative URL : no protocol: null/home/opt/weblogic610/wlserver6.1/config/mydomain/applicat ions/DefaultWebApp/images/english/global_navbar/db_header.gif my syntex is fo:external-graphic src =file:///home/opt/weblogic610/wlserver6.1/config/mydomain/app lications/DefaultWebApp/images/english/global_navbar/db_header.gif / plz help me find out , what is the cause of this thanks Message History From: Savino, Matt C [EMAIL PROTECTED] on 01/02/2002 03:23 PM Please respond to [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc: Subject: RE: image protocal in Fop on unix This works for me: fo:external-graphic src=file:///usr/local/weblogic/config/isappdev/applications/R VWebApp1/WEB-I NF/lib/ClinTrialLogoGreenBig.gif / If you figure out how to use a relative path, PLEASE let me know. -Matt -Original Message- From: Maneshi Tuli [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 12:26 PM To: [EMAIL PROTECTED] Subject: image protocal in Fop on unix hi , I want to give the image path on unix machine i give like this fo:external-graphic src =file:/home/opt/weblogic610/wlserver6.1/config/mydomain/appli cations/DefaultWebApp/images/english/global_navbar/db_header.gif / i tried with this also fo:external-graphic src =/home/opt/weblogic610/wlserver6.1/config/mydomain/applicatio ns/DefaultWebApp/images/english/global_navbar/db_header.gif / but it is not working , it says no protocal null/home/opt/weblogic610/wlserver6.1/config/mydomain/applica tions/DefaultWebApp/images/english/global_navbar/db_header.gif not found. plz help what shouild i give thanks -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Performance difference between Unix and PC
Below I've pasted an excerpt from a post to this board a few months back. I also posted a variation of the same question on the Weblogic.performance newsgroup. The answer I got back was that basically that performance difference didn't sound surprising considering the processor speed. Which came a as a big surprise to a lot of our IT guys here who were convinced that RISC was supposed to smoke Pentium at any speed. I have a theory that the speed difference is because Java (and the hotspot implementation in particular) is much better tuned for Windows than HP-UX. I never got an explanation as to why Weblogic degraded so much more running two large reports on the UNIX box. So we know run one Weblogic instance per CPU, basically because of FOP. original email subj:benchmarking question To benchmark I used FOP to render a 200 page PDF document from an XSLT transform on a static XML-file (no database connection is involved). The XSLT transform takes very little time compared to the FOP renderer. I've attached a smaller, but otherwise identical version of the PDF doc I'm using to benchmark. I've tried a DomSource for input, a SaxSource, and the XSLTInputHandler. The results are almost exactly the same in each case. Below are the results I see. Initial heap size=max heap size in each case. Each server is running the latest JDK 131 (w/Hotspot). (I have set all the HP system variables (max_thread_proc, etc.) to Sun recommendations.) Nt dev box (NT4-Worksatation, PIII-933mhz, 512MB ram): Heap Size=64M, 1 report = 251ms/page Heap Size=64M, 2 reports = 750ms/page Heap Size=256M, 1 report = 245ms/page Heap Size=256M, 2 reports = 500/page HP server (HP-Unix, 2x550 mhz, 2GB ram): Heap Size=64M, 1 report = 545ms/page (frequent out of memory errors) Heap Size=64M, 2 reports = didn't try Heap Size=256M, 1 report = 372ms/page Heap Size=256M, 2 reports = 1700ms/page Heap Size=512M, 1 report = 350ms/page Heap Size=512M, 2 reports = 1675ms/page The only difference I can see for sure between the two boxes is that the NT machine performs at least 10 times as much garbage collection. (Sometimes several times per page, as opposed to once every 8-10 pages on the Unix box.) Garbage collection occurs a little more frequenly on the HP box when I lower the heap size, but still not nearly as often as on the NT--at any heap size. Also the HP box runs out of memory if I lower the heap size. I was hoping this was due to some HP setting, but I'm starting to come to the conclusion that it's just some difference in the hotspot implementations. Matt Savino Quest Diagnostics -Original Message- From: Jens Eckert [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 9:03 AM To: [EMAIL PROTECTED] Subject: Re: Performance difference between Unix and PC Hi Guilbert, very interesting. If you're experiencing that FOP runs faster on a NT-machine than on a UNIX machine then we are experiencing the same here. The same page on my NT machine takes 1 sec whereas on the UNIX machine it takes 10 seconds. So far I assumed it's just a load problem of this UNIX machineas it has to handle the load of 30 developers, everybody with own processes of our backend system which is very performance consuming. But would be interesting to know wether this is the case or if FOP is really slower on UNIX. Does anybody know? Jens GUILBERT Nicolas SIReS schrieb: Who can explain the huge performance difference we experience between using FOP on a NT server or a PC on one side, or on a unix platform on the other side. Is it normal ? Is FOP built to run on PC or NT ? As it is a java library, it is supposed to work on all platform ? Thanks. Nicolas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: xsl:choice
We'll I'll be darned. I didn't know you could use multiple when's like that. thx a lot -Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 09, 2001 3:28 PM To: [EMAIL PROTECTED] Subject: RE: xsl:choice I think what Scott is trying to say that it is perfectly allowable XSLT to write: xsl:choose xsl:when test=test = '1' !-- Stuff for condition 1 -- /xsl:when xsl:when test=test = '2' !-- Stuff for condition 2 -- /xsl:when xsl:when test=test = 3' !-- Stuff for condition 3 -- /xsl:when xsl:when test=test = 4' !-- Stuff for condition 4 -- /xsl:when xsl:otherwise !-- Stuff fo the 'else' equivalent -- /xsl:otherwise /xsl:choose Joshua -Original Message- From: Matt Savino [mailto:[EMAIL PROTECTED]] Sent: Monday,10 December 2001 6:57 To: [EMAIL PROTECTED] Subject: Re: xsl:choice Yeah, it just gets a little cumbersome if you have, say, five cases. Scott Moore wrote: The xsl:choose statement is exactly like a switch or case statement. You CAN have one or more xsl:when statements underneath the same xsl:choose parent followed by one xsl:otherwise, which is equivalent to default: in Java or C++. I use this construct all the time, especially when I need something similiar to if then else or a switch statement. Scott - Original Message - From: Matt Savino [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 07, 2001 10:46 PM Subject: Re: xsl:choice Sorry, I didn't read the bottom. You can only include one xsl:when as a child of xsl:choose. (There is no concept of a case switch or elsif in XSLT.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- This message and any attachment is confidential and may be privileged or otherwise protected from disclosure. If you have received it by mistake please let us know by reply and then delete it from your system; you should not copy the message or disclose its contents to anyone. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: column color
Try putting backgound-color in the table-cell element. You can even put it in the table-column element if it makes sense to do so. Also, since you explicitly define the width of columns ahead of time, you should never need a spacer image like you do in HTML. -Original Message- From: Maneshi Tuli [mailto:[EMAIL PROTECTED]] Sent: Monday, December 10, 2001 3:13 PM To: [EMAIL PROTECTED] Subject: column color Hi , I am not able to display the column color if column value is null my code is fo:table-cell number-columns-spanned=5 fo:block font-size=12px color=#33 font-family=serif text-align=center background-color=#CC vertical-align=bottom font-weight=bold fo:external-graphic src=file:C:/XMLWork/HTML/InSight/images/common/spacer.gif/ /fo:block /fo:table-cell fo:table-cell number-columns-spanned=5 fo:block font-size=12px color=#33 font-family=serif text-align=center background-color=#CC vertical-align=bottom font-weight=boldAsset Class Composition %/fo:block /fo:table-cell It displays the color for 2nd block , but not for first one . Plz help me , how can i get the color for 1st block Maneshi Tuli 212-454-1646 (O) 732 -882-0353(H) -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Problems with seeing pdf-files in IE 5.0
Jim, I've attached the servlet that we use to handle a simlar issue issue to what you describe. This serlvet handles both HTML and PDF requests and calls either method based on a parameter in the user's session (which could just as easily be in the request). Maybe it will help. -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Friday, December 07, 2001 11:02 AM To: [EMAIL PROTECTED] Subject: RE: Problems with seeing pdf-files in IE 5.0 Here is the real problem. When the servlet is posted to, the browser has no knowledge of what type of data will be sent back. We have a single servlet which looks at the request and calls the appropriate class to process the request. The request then sends XML back to the servlet. Then based upon the presence of the parameter print in the http request, our servlet attempts to locate the XSL:FO file that maps to the request. If the XSL:FO file is found, we FOP the XML and send back PDF. Otherwise we use a XSL:HTML file and send back a HTML page. Our clients are responsible for providing XSL:FO files for the pages they want PDF prints. The XSL:FO files are optional and may or may not exist. Jim -Original Message- From: Alex McLintock [mailto:[EMAIL PROTECTED]] Sent: Friday, December 07, 2001 11:05 AM To: [EMAIL PROTECTED] Subject: RE: Problems with seeing pdf-files in IE 5.0 --- Jim Urban [EMAIL PROTECTED] wrote: you also have to use an url with .pdf at the end The url the client is posting to is a servlet which uses FOP to generate a PDF and feed it back to the browser. If the client post a request to myservlet.pdf the server will look for a file called myservlet.pdf and return a 403 when it can't find it. So how do you use a url that ends with .pdf when using servlets? If you can't set up an alias in the webserver as people have suggested you could always have a servlet class called pdf within a package myservlet. End result: myservlet.pdf Could have sworn this was in the FAQ. Oh dear - that means the FAQ isn't good enough yet Alex = Alex McLintock[EMAIL PROTECTED]Open Source Consultancy in London OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ --- SF and Computing Book News and Reviews: http://news.diversebooks.com/ Get Your XML T-Shirt t-shirt/ at http://www.inversity.co.uk/ COMPETITION : http://news.diversebooks.com/article.pl?sid=01/10/08/1947255 Nokia 5510 looks weird sounds great. Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! The competition ends 16 th of December 2001. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] ReportGeneratorServlet.java Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
fo:external-graphic question
Has anyone figured out a way to use a relative path with the file:... protocol in fo:external-graphic? The path below works on my Unix boxes. The probem is I develop in an NT box and I'm getting tired of changing my stylesheets every time I upload to the staging or porduction servers. This is the full path which works: fo:external-graphic src=file:///usr/local/weblogic/config/isappdev/applications/RVWebApp1/WEB-I NF/lib/ClinTrialLogoGreenBig.gif / But every time I try to use something like this: fo:external-graphic src=file://./config/isappdev/applications/RVWebApp1/WEB-INF/lib/ClinTrialLo goGreenBig.gif / I get this error: Error while creating area : Invalid Image URL - error on relative URL : no protocol: null/config/isap pdev/applications/RVWebApp1/WEB-INF/lib/ClinTrialLogoGreenBig.gif By the way I still haven't found a way to get the file protocol to work on NT. I have to use HTTP. I could use HTTP on the Unix boxes, but I'd still have to change the port every time. Any ideas, even a pointer would be greatly appreciated. Matt Savino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: problem : centered table in FO [FAQ]
Hey Corrinna, this might actually help for my problem as well (see Subj: min table or table-cell height?). My only question is, how do I create a table as large as the page body? I knwo how to set the column width, but is there any way to set the row or cell height? thx, Matt -Original Message- From: Corinna Hischke [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 28, 2001 3:50 AM To: [EMAIL PROTECTED] Subject: Re: problem : centered table in FO [FAQ] Hi, please have a look at the FOP FAQs, I think the solution should be in there: - create a table as large as the page-body with only one cell - put your table into the block inside that cell - center the block in that cell HTH, Corinna - Original Message - From: Cyril mailto:[EMAIL PROTECTED] Rognon To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Tuesday, November 27, 2001 2:25 PM Subject: problem : centered table in FO Hi list, I am looking for a way to center a table (not the data in the table cells) in a page. I have tried to set padding and margin to a surrounding block but FOP doesn't pay attention to this... I have also tried a start-indent but it changes nothing. I am using FOP 0.20.2RC. What am I doing wrong ? Thanks Cyril Rognon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
min table or table-cell height?
Is there any way to make sure a table border extends to the bottom of the page (minus margins)? A picture may help. This is the structure of my document. The '-'s and '|'s represent actual line borders: --- | Header (fo:region-before) | --- (blank space) --- | Body | | (contains data within | | nested tables) | --- The report has up to four sections which can all span multiple pages. The body part changes but the header stays constant across all 4 sections. Right now I'm creating the border around the body as a border around table-cells. Each section of the report is contained within one table-cell. The problem is that I would like to make sure the bottom border extends to the bottom of the page (even if the data only spans a few rows) and that the side borders come down to meet it. It seems like this should be a pretty simple problem but I haven't come up with anything yet. Any help would be greatly appreciated. Thanks Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: keep-with-next, orphans, widows
It's my understanding, that right now keep-with-next is only implemented on the table-row element. What's more, you can only use it when you know you will not have any more rows than will fit on a page. Otherwise FOP goes into an endless loop. -Original Message- From: Jörg Flotho [mailto:[EMAIL PROTECTED]] Sent: Monday, November 26, 2001 5:33 AM To: [EMAIL PROTECTED] Subject: keep-with-next, orphans, widows fo:block space-after=3.0pt space-before=0.0pt text-align=start text-indent=0.0pt line-height=1.2 orphans=1 widows=1 fo:inline font-family=Helvetica font-size=10pt xsl:apply-templates/ /fo:inline /fo:block what's wrong with this? there is no result, whatever which parameter is given in orphans ans widows. The next problem is keep-with-next: fo:block margin-left=0.0pt space-after=0.0pt space-before=5.0pt text-align=left text-indent=0.0pt keep-with-next=true fo:inline font-family=Helvetica font-size=11pt font-weight=bold font-style=italic xsl:apply-templates/ /fo:inline /fo:block It doesn't work either. Can anyone help please? Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Problems with PCL Output
alt-propeller-F13 sorry, it's late -Matt -Original Message- From: Ulrich Mayring [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 21, 2001 1:23 AM To: [EMAIL PROTECTED] Subject: Re: Problems with PCL Output Martin Roob wrote: 2. There is no EURO-sign in the PCL Umm... how do I get the Euro-Sign anyway? Ulrich -- Ulrich Mayring DENIC eG, Systementwicklung - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
page numbering question
I need to separately keep track of and print out page numbers within a sub-section of the master document. I could start a new page-sequence, but the problem is that I have a master header which needs to show the running page number of the entire document. Page |-- Header --| |-- Page 5 of 25 --| || |-- Subsection | |-- Page 1 of 6 | || Page |-- Header --| |-- Page 6 of 25 --| || |-- Subsection | |-- Page 2 of 6 | || Can FOP do anything like this? I hope I'm making myself clear. It would be easy enough if I could manipulate fo:page-number to add or subtract a fixed number. But I don't see this ability. Any ideas at all would be greatly appreciated. Thanks -Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: servlet called thrice on IE 4.0
Thanks for all the ideas. Interstingly, I only get the problem on IE 4.0. not 4.72 an above. I wonder if Weblogic is doing something behind the scenes to mitigate the calls. Also strange is that it doesn't seem to happen all the time. When I get a minute to come up for air I'll sit down and try to troubleshoot the problem. Our application is for a very limited number of end users, and we can pretty much tell them to use IE 4.72 and higher. So I hope I'm ok on this one. I really don't feel like trying to implememnt Microsoft's Active-X solution. -Original Message- From: Joerg Pietschmann [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 11:28 PM To: FOP List Subject: Re: servlet called thrice on IE 4.0 Savino, Matt C [EMAIL PROTECTED] wrote: I know this has been discussed here before, but I just wanted to ask in case anyone has discovered a solution. Basically I'm etting that problem where IE is calling the FOP servelt twice. It is said this is caused by IE trying to derive the content type form the URL first, then loading the content, thereby reading the MIME type supplied by the server, and loading again if it doesn't match (bad architecture...). Try to use an URL ending in .pdf, for example http://localhost:7001/resultview/ReportGenerator.jsp?counter=2 5ext=.pdf HTH J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: New FOP Code Don't Work
Make sure you have both namespaces in your stylesheet: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; I spent several days wrestling with this one :( -Matt -Original Message- From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]] Sent: Monday, November 19, 2001 12:09 PM To: '[EMAIL PROTECTED]' Subject: RE: New FOP Code Don't Work I could not get driver.setLogger(logger); to compile. The versions I have of FOP (0.19 and 0.20.1) do not have a ^^^ Wow! You neglected to mention that, didn't you? ;-) I guess I had to be more specific about which version of FOP I use when I posted the code. 0.20.1 never worked for me at all, I had to build from CVS until 0.20.2RC came out. With 0.19 the method works, but FOP doesn't really produce the PDF on the fly, instead it builds the whole FO tree in memory, and after the parsing is done you have to call driver.format(); driver.render(); In other words, you don't buy much by using SAX events with 0.19. 0.20.2RC has a major improvement for more streamlined processing. Yuri. -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Monday, November 19, 2001 3:02 PM To: [EMAIL PROTECTED] Subject: RE: New FOP Code Don't Work The method that calls my renderFo creates the iInputSource as follows: Source iInputSource= new StreamSource(new StringReader(xmlString)); My translator is cached, and worked fine with my orginal code. I get no exceptions. Where would I see error messages? I could not get driver.setLogger(logger); to compile. The versions I have of FOP (0.19 and 0.20.1) do not have a org.apache.fop.apps.Driver.setLogger(org.apache.log.Logger) method. I am using Xalan/Xerces, does this matter? Jim -Original Message- From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]] Sent: Monday, November 19, 2001 1:42 PM To: '[EMAIL PROTECTED]' Subject: RE: New FOP Code Don't Work As far as I can tell, the code is correct (although you didn't indicate how you create iInputSource). Are you sure you are not getting any exceptions, error messages, etc.? -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Monday, November 19, 2001 2:38 PM To: [EMAIL PROTECTED] Subject:New FOP Code Don't Work Recently someone suggested using SAX events to run XML through XSLT then FOP and to send the PDF back to the browser from a servlet. I tried implmenting this (see code below) but all I don't get any output back. I even routed the output to a file, and the file was empty. My old code worked great, but I was told I was wasting memory. Can someone tell me why this code does not work? Thanks, Jim Urban Product Manager Netsteps Inc. Suite 505E 1 Pierce Pl. Itasca, IL 60143 Voice: (630) 250-3045 x2164 Fax: (630) 250-3046 public void renderFO(Transformer pdfTransformer, Source iInputSource, HttpServletResponse uResponse) { try { OutputStream out = uResponse.getOutputStream(); uResponse.setContentType(application/pdf); Driver driver = new Driver(); driver.setRenderer(driver.RENDER_PDF); driver.setOutputStream(out); // --- // Create SAXResult based on FOP Driver content handler // which will accept SAX events and build FOP tree // --- Result saxResult = new SAXResult(driver.getContentHandler()); // Use the Transformer to transform an XML Source and // send the output to a Result object. Implicitely it will // create the FOP tree by firing SAX events. pdfTransformer.transform(iInputSource, saxResult); // The user is already viewing the PDF! out.flush(); out.close(); } catch (TransformerException e1) { System.err.println(Unable to generate PDF: + e1.toString()); } catch (IOException e2) { System.err.println(File error: + e2.toString()); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail:
keep-with-next?
It's my understanding that keep-with-next=always at the row level is the only keep-together | with-*=* property currently implemented in FOP. Is this true? I've also noticed that if the number of rows included is too big to fit on one page, you get an endless loop. This makes keep-with-next unusable for me in 90% of the places where I would like to use it. Are there any solutions I'm overlooking here? Thanks a lot, -Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: w3c.jar
You don't need w3c.jar anymore. Some of the documentation hasn't been updated for a while. Go with what comes in the build. Trust java-docs over html-docs. -Original Message- From: Noel Coloma [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 15, 2001 6:53 AM To: [EMAIL PROTECTED] Subject: w3c.jar Hi, I'm completely new to this world of FOP and Java but am slowly working my way through it all. I've found some documentation on converting an .fo file to a .pdf which is what I'm looking for. The documentation said that I need w3c.jar file that comes with FOP. I've downloaded the latest version of FOP(0.20.2) but I can't find that file anywhere. I'm very confused and any help would be appreciated. Thanks Noel ___ Build your own website in minutes and for free at http://ca.geocities.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: [Xslfo-proc-devel] Re: Crossposts
Can someone point me to what xslfo-proc is? I searched Google and the Apache dev archives and couldn't find anything. Thx, Matt Savino -Original Message- From: Arved Sandstrom [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 7:35 AM To: Peter B. West Cc: fop-dev Subject: Re: [Xslfo-proc-devel] Re: Crossposts At 12:37 AM 11/2/01 +1000, Peter B. West wrote: This is a response to some suggestions from Arved, excerpted below. Please excuse the cross-posting, but the explanation should go to both ends of the posts. Similarly, please excuse the temporary crosspost. I find myself, willy-nilly, in the process of re-designing and, piecemeal, rewriting chunks of FOP. I'm doing it because I can't read the existing code, because I need a clean and flexible design base to work from, and because I want to. At the moment I'm pretty much on my own, but that may change. If not, too bad. That's the beauty of open source. It's not Software Corp. My code blindness may simply reflect my not yet having an adequate grasp of this OO stuff, but I don't think that is the whole story. If the current design were good (and beautiful and true), rather than merely adequate, then surely the sensible thing would be to map the lot into C++ and C where necessary. That's not what is going to happen. In fact, a more likely scenario is that the C design, if it proves successful, will be retro-fitted into Java. What is currently happening with FOP is a pragmatic rewrite of just those things that absolutely have to be changed, spearheaded by Keiron Liddle (with support and encouragement...). The point is, the original FOP design was exceeded a year ago, give or take - many things were not accounted for, and they are not easily added. Hopefully xslfo-proc will do things right from scratch (one possible right way, mind you, not the only one). Maybe decisions made, and experience gained, during this process will inform a FOP 2 design. When I have cross-posted, it has been for very specific reasons; either because it was a design issue which is of common interest to both the direction I am taking, and to any design discussion for the problem domain, or because specific things that I am doing map trivially into a C/C++ solution. All that I have posted concerning FObjects.java and FOPropertyConsts.java falls into this latter category. These classes represent a great deal of donkey work in providing useful expressions of the sets of constants which I imagine are absolutely essential to C, at any rate. A few vi or emacs regular expressions will convert them into pure C, and save someone days of effort. I agree. I think that this helps clarify what you are about. I tend to agree that there is a fair amount to be learned from how FOP does things, whether good or bad. As for switching my efforts entirely into xslfo-proc: I would have to learn C++, which I am loathe to do. FOP is my Java training ground, and Java will hopefully allow me to remain in a unix/linux ghetto, forever shunning NT and all its spawn. I'm a terrible bigot when it comes to Microsoft. So I will continue with my attempts to wrestle, for my own satisfaction, some comprehensive and comprehensible design from the spec. Successful or no, I can't see that process being irrelevant to xslfo-proc. And along the way there may be some more bits of multi-cultural code. I don't think it is irrelevant either. You are operating at the high-level design level, where Java or C or C++ is not really an issue. I think the extra input into design is valuable, certainly from the xslfo-proc perspective. I should ask, are you using a UML tool, and if so, which one? If not, it would be nice to get some of your ideas translated into formal concepts. Good thoughts seem to wither away and be ignored if they stay in email. Thanks for the feedback, Arved. What's your work situation like in - where are you? - Nova Scotia? Thank you for asking. :-) The company I worked for ceased operations last week. It disappeared. It closed down. It went away. It shuffled off this mortal coil. c. c. So I am starting up an interesting contract that will occupy me for a month or two, something that fortunately does not involve wireless or J2EE at all, and plan to conduct a job search at the same time. But not here...Nova Scotia IT has been hammered pretty badly. Regards, AHS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: table-header with (Con't)
Anyone have any ideas? As powerful as FO is, I would think it would have some facility for this situation. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 8:54 AM To: [EMAIL PROTECTED] Subject: RE: table-header with (Con't) Sorry. I guess I misunderstood your question. Jim Urban [EMAIL PROTECTED] on 10/23/2001 11:39:10 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RE: table-header with (Con't) Lou, Would you please see if you can find the code. I need to be able to change the contents of the header on the fly. This will give me a starting point. Thanks, Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 9:29 AM To: [EMAIL PROTECTED] Subject: RE: table-header with (Con't) Jim: We did something a while back using the following archaic procedure: 1. get current page # into var 2. use xsl:if to determine whether to put out Cont I don't have the code readily available, but if you really need it I can take a look. -Lou Jim Urban [EMAIL PROTECTED] on 10/23/2001 10:12:21 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RE: table-header with (Con't) Does anyone have an answer to this question? I need to do the same thing. Thanks, Jim -Original Message- From: Matt Savino [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 1:50 AM To: [EMAIL PROTECTED] Subject: table-header with (Con't) Is there anyway to get a table header to print differently after the first time/page? Namely I want to reprint the title above a particular table everytime the page breaks, but I want to add '(Con't)' to the end of the title. I'm already using a page header and then a table header within that. These blocks are sub-tables with their own headers within that master table. So far, thanks to your help I've managed to avoid counting rows. I hope there's a solution to this problem as well. Thanks a lot, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: table-header with (Con't)
Thanks, I kind of figured that. Still really hoping to see the page # into var example Louis spoke of. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 7:54 PM To: [EMAIL PROTECTED] Subject: RE: table-header with (Con't) NO! FOP does not understand xsl:xxx commands. FOP only renders XSL:FO to PDF. How you generate FO is up to you, you can use XSLT or a java program or type it by hand. If you input XML XSL into FOP the transformation is done prior to and independently of the FO formatting. Savino, Matt C Matt.C.Savino@questdiagno To: '[EMAIL PROTECTED]' stics.com [EMAIL PROTECTED] cc: 24/10/2001 08:50 AM Subject: RE: table-header with (Con't) Please respond to fop-dev I'd love to see that too. I can't figure out how you get the fo:page-number to be a condition in your XSLT stylesheet. Does FOP understand xsl:xxx commands? -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 8:39 AM To: [EMAIL PROTECTED] Subject: RE: table-header with (Con't) Lou, Would you please see if you can find the code. I need to be able to change the contents of the header on the fly. This will give me a starting point. Thanks, Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 9:29 AM To: [EMAIL PROTECTED] Subject: RE: table-header with (Con't) Jim: We did something a while back using the following archaic procedure: 1. get current page # into var 2. use xsl:if to determine whether to put out Cont I don't have the code readily available, but if you really need it I can take a look. -Lou Jim Urban [EMAIL PROTECTED] on 10/23/2001 10:12:21 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RE: table-header with (Con't) Does anyone have an answer to this question? I need to do the same thing. Thanks, Jim -Original Message- From: Matt Savino [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 1:50 AM To: [EMAIL PROTECTED] Subject: table-header with (Con't) Is there anyway to get a table header to print differently after the first time/page? Namely I want to reprint the title above a particular table everytime the page breaks, but I want to add '(Con't)' to the end of the title. I'm already using a page header and then a table header within that. These blocks are sub-tables with their own headers within that master table. So far, thanks to your help I've managed to avoid counting rows. I hope there's a solution to this problem as well. Thanks a lot, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: table-header with (Con't)
I'd love to see that too. I can't figure out how you get the fo:page-number to be a condition in your XSLT stylesheet. Does FOP understand xsl:xxx commands? -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 8:39 AM To: [EMAIL PROTECTED] Subject: RE: table-header with (Con't) Lou, Would you please see if you can find the code. I need to be able to change the contents of the header on the fly. This will give me a starting point. Thanks, Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 9:29 AM To: [EMAIL PROTECTED] Subject: RE: table-header with (Con't) Jim: We did something a while back using the following archaic procedure: 1. get current page # into var 2. use xsl:if to determine whether to put out Cont I don't have the code readily available, but if you really need it I can take a look. -Lou Jim Urban [EMAIL PROTECTED] on 10/23/2001 10:12:21 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RE: table-header with (Con't) Does anyone have an answer to this question? I need to do the same thing. Thanks, Jim -Original Message- From: Matt Savino [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 1:50 AM To: [EMAIL PROTECTED] Subject: table-header with (Con't) Is there anyway to get a table header to print differently after the first time/page? Namely I want to reprint the title above a particular table everytime the page breaks, but I want to add '(Con't)' to the end of the title. I'm already using a page header and then a table header within that. These blocks are sub-tables with their own headers within that master table. So far, thanks to your help I've managed to avoid counting rows. I hope there's a solution to this problem as well. Thanks a lot, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FOP Adobe 5.0
I'm using Acrobat 5.0/Fop 20.2 and haven't seen any problems. -Original Message- From: Clute, Andrew [mailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 7:25 AM To: '[EMAIL PROTECTED] ' Subject: RE: FOP Adobe 5.0 I have no problems opening or moving through any PDF's generated with FOP (.20.1) with Acrobat 5.0. -Original Message- From: Mitchell A. Cohen To: [EMAIL PROTECTED] Sent: 10/22/2001 10:20 AM Subject: RE: FOP Adobe 5.0 The PDF is generated fine and displays OK but I get a message box complaining about the content when I move between pages the first time. -Original Message- From: Linda Zammit [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Monday, October 22, 2001 10:07 AM To: '[EMAIL PROTECTED]' Subject: RE: FOP Adobe 5.0 I use FOP with Acrobat 4.0 and have no problem. Is there something specific that doesn't work for you? -Original Message- From: Mitchell A. Cohen [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: October 22, 2001 10:07 AM To: [EMAIL PROTECTED] Subject: FOP Adobe 5.0 Does anyone know if the FOP has been fixed to work with Adobe Acrobat 5.0? Mitchell A. Cohen eePulse, Inc. 905 W. Eisenhower Circle, Suite 110 Ann Arbor, MI 48103 phone: 734-996-2321 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FOP WARNING - Please Help!
I downloaded and built the latest CVS. When I tried to use the XSLTInputHandler, my error switched from the weird one I was getting to yet another null pointer exception. That got me thinking maybe I should just try doing the simplest transform of all time and see if it isn't something with my stylesheet. Anyway the problem was I only had the xsl namespace defined in my stylesheet root element and not the fo namespace. xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xmlns:fo=http://www.w3.org/1999/XSL/Format; (missing) I probably should have known this. I think someone even mentioned it, but I wasn't sure what they were talking about. Anyway, the good news is that after three days of fiddling I feel like I know FOP pretty well. I also have a much better grasp of SAX and DOM. Again, thanks for all your help. You probably haven't heard the last of me. -Matt Savino -Original Message- From: Beer, Christian [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 11:32 PM To: '[EMAIL PROTECTED]' Subject: AW: FOP WARNING - Please Help! I had the same problem with the 0.20.1 release. Try using the actual cvs version. There it works! Christian -Ursprüngliche Nachricht- Von: Savino, Matt C [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 26. September 2001 01:37 An: '[EMAIL PROTECTED]' Betreff: RE: FOP WARNING - Please Help! (I just realize this message might be pretty hard to read, so I added at the beginning and end of code and error blocks.) Shkuro, I have tried to replicate your solution and I still get strange errors. Here is the error I get: D:\Precision\RV40_Working\pvhjava FOtoPDF building formatting object tree building formatting object tree javax.xml.transform.TransformerException at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j ava:1212) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 479) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 1118) at FOtoPDF.applyFop(FOtoPDF.java:143) at FOtoPDF.main(FOtoPDF.java:41) - java.lang.NullPointerException at org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:167) at org.apache.xalan.transformer.QueuedStartDocument.flush(QueuedStartDocument.j ava:108) at org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandle r.java:758) at org.apache.xalan.transformer.ResultTreeHandler.startElement(ResultTreeHandle r.java:245) at org.apache.xalan.transformer.ResultTreeHandler.startElement(ResultTreeHandle r.java:209) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java: 704) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform erImpl.java:2154) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform erImpl.java:2097) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer Impl.java:2029) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j ava:1189) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 479) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 1118) at FOtoPDF.applyFop(FOtoPDF.java:143) at FOtoPDF.main(FOtoPDF.java:41) It looks like maybe it's trying to build the formatting tree twice? Here is my code: DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance(); dFactory.setNamespaceAware(true); DocumentBuilder dBuilder = dFactory.newDocumentBuilder(); org.w3c.dom.Document xmlDoc = dBuilder.parse(xmlFilename); DOMSource xmlDomSource = new DOMSource(xmlDoc); org.w3c.dom.Document xslDoc = dBuilder.parse(xslFilename); DOMSource xslDomSource = new DOMSource(xslDoc); TransformerFactory tFactory = TransformerFactory.newInstance(); javax.xml.transform.Templates templates = tFactory.newTemplates(xslDomSource); Transformer transformer = templates.newTransformer(); org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setErrorDump(true); driver.setRenderer(driver.RENDER_PDF); driver.setOutputStream(new FileOutputStream(pdfFilename)); javax.xml.transform.sax.SAXResult saxResult = new javax.xml.transform.sax.SAXResult( driver.getContentHandler() ); transformer.transform(xmlDomSource, saxResult); Someone also said this may be fixed in the latest CVS. I downloaded Fop-0.20.1-src.tar.gz on 9/17/01. Is there something more recent? I only ask because my ridiculous company still hasn't restored our internet access since Nimda. I would also be happy if I could get render(dom) working when applied
RE: Does render(dom) actually work?
) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:191) at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:444) at org.apache.fop.apps.Driver.render(Driver.java:449) at FOtoPDF.applyFop(FOtoPDF.java:214) at FOtoPDF.main(FOtoPDF.java:41) -Original Message- From: Keiron Liddle [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 20, 2001 12:00 AM To: [EMAIL PROTECTED] Subject: Re: Does render(dom) actually work? Hi, This may be a problem that I have fixed. The line number (167) doesn't seem to match anything I can find so I'm not sure. There was a problem where text outside the root element would cause a null pointer exception. Actually after a second look I think it was due to the stream redner changes. Could you try the current cvs and see if that helps. Thanks Keiron On Thu, 20 Sep 2001 08:46:08 Beer, Christian wrote: Hi Savino, hi Suhail, hi group! In the moment I transform my source-xml to a ByteArrayOutputStream and then use a ByteArrayInputStream as input for FOP. I tried to do it the same way as Suhails example, but I get the same error Savino got. How can I be sure there are no nulls in the source?? Christian -Ursprüngliche Nachricht- Von: Suhail Rashid [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 20. September 2001 06:29 An: [EMAIL PROTECTED] Betreff: RE: Does render(dom) actually work? Hi Savino, Make sure there are NO nulls making their way into the text nodes of your xml stream. these would not give problems if u wrote the xml to a file first suhail -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 20, 2001 3:59 AM To: '[EMAIL PROTECTED]' Subject: RE: Does render(dom) actually work? Yuri, thanks for your help. I tried your solution and I still get the following error: building formatting object tree building formatting object tree javax.xml.transform.TransformerException at org.apache.xalan.transformer.TransformerImpl.transformNode(Tra nsformerIm pl.j ava:1212) at org.apache.xalan.transformer.TransformerImpl.transform(Transfo rmerImpl.j ava: 479) at org.apache.xalan.transformer.TransformerImpl.transform(Transfo rmerImpl.j ava: 1118) at FOtoPDF.applyFop(FOtoPDF.java:127) at FOtoPDF.main(FOtoPDF.java:40) - java.lang.NullPointerException at org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:167) at org.apache.xalan.transformer.QueuedStartDocument.flush(QueuedS tartDocume nt.j ava:108) at org.apache.xalan.transformer.ResultTreeHandler.flushPending(Re sultTreeHa ndle r.java:758) at org.apache.xalan.transformer.ResultTreeHandler.startElement(Re sultTreeHa ndle r.java:245) at org.apache.xalan.transformer.ResultTreeHandler.startElement(Re sultTreeHa ndle r.java:209) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiter alResult.j ava: 704) at org.apache.xalan.transformer.TransformerImpl.executeChildTempl ates(Trans form erImpl.java:2154) at org.apache.xalan.transformer.TransformerImpl.executeChildTempl ates(Trans form erImpl.java:2097) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNo de(Transfo rmer Impl.java:2029) at org.apache.xalan.transformer.TransformerImpl.transformNode(Tra nsformerIm pl.j ava:1189) at org.apache.xalan.transformer.TransformerImpl.transform(Transfo rmerImpl.j ava: 479) at org.apache.xalan.transformer.TransformerImpl.transform(Transfo rmerImpl.j ava: 1118) at FOtoPDF.applyFop(FOtoPDF.java:127) at FOtoPDF.main(FOtoPDF.java:40) It looks very similar to the one before to me. Has anyone tried this with v.0.20.1 yet? Should it say building formatting object tree twice? I'm wondering if this is some kind of issue with namespaces and the DOM2 implementation. Anyone have any ideas? By the way, if I use a DOMResult instead of a SAXResult I get no error. I then serialized the DOMResult to a file and FO works fine with that file as an input. Thanks, Matt -Original Message- From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 2:03 PM To: '[EMAIL PROTECTED]' Subject: RE: Does render(dom) actually work? Matt, Why don't you do it all in one pass? I have a servlet, that calls some bean to get XML document in a DOM format (actually JDOM), then registers fop driver as receiver of SAX events and runs XSLT on the JDOM tree. // 1. Generate XML tree Document xmlSummary = DataLoader.getSummary
RE: FOP with Java
It's in batik.jar (at least my version that comes w/ 0.20.1) -Original Message- From: Carmelo Montanez [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 20, 2001 12:16 PM To: [EMAIL PROTECTED] Subject: Re: FOP with Java Thanks for the answer. Actually anyone knows where I can find the package org.w3c.dom.svg?, thats where the class is. I can't find it anywhere. Carmelo - Original Message - From: toby cabot [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 20, 2001 3:10 PM Subject: Re: FOP with Java java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGLength Just guessing here - do you have your Batik jar where the classloader can find it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Does render(dom) actually work?
Hello everyone. By any chance can someone point me to some example code which uses render(dom)? No matter what combination of driver methods or Fop versions (.17,.19,.20.1) I use I seem to get the same error: building formatting object tree setting up fonts java.lang.NullPointerException at java.util.Hashtable.get(Hashtable.java:320) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:191) at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:444) at org.apache.fop.apps.Driver.render(Driver.java:449) at FOtoPDF.applyFop(FOtoPDF.java:83) at FOtoPDF.main(FOtoPDF.java:24) Here is the source I'm using under v.0.20.1: org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF); driver.setOutputStream(new FileOutputStream(pdfFilename)); driver.setupDefaultMappings() ; driver.addElementMapping(org.apache.fop.fo.StandardElementMapping); driver.addElementMapping(org.apache.fop.svg.SVGElementMapping); driver.addElementMapping(org.apache.fop.extensions.ExtensionElementMapping ); driver.render(dom); I have tried it with and without any of the mapping methods. I am building the Dom object from a file. The sax input handler created from the same file works fine in render(parser, inputSource). I have read through the dev archives and found a few suggestions but none helped. Is there some configuration I'm missing? Or did this break a long time ago as someone suggested in the archives? I am hoping to use FOP in a major production app, but if I can't solve this I may not be able to. I am currently receiving a DOM object (a small report) from some database access classes. I then perform an XSLT transform which outputs my FO input as another DOM object. I suppose I could pipe the output of that to SAX? I'd really rather not have to do anything klugy like serialize it to a stream and then feed it in as SAX. But I'll consider anything that doesn't cause too much of a performace hit. We definitely don't want to have temp files sitting around, for a host of reasons. Thank you very much for your help. Matt Savino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Does render(dom) actually work?
Yuri, thanks for your help. I tried your solution and I still get the following error: building formatting object tree building formatting object tree javax.xml.transform.TransformerException at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j ava:1212) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 479) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 1118) at FOtoPDF.applyFop(FOtoPDF.java:127) at FOtoPDF.main(FOtoPDF.java:40) - java.lang.NullPointerException at org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:167) at org.apache.xalan.transformer.QueuedStartDocument.flush(QueuedStartDocument.j ava:108) at org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandle r.java:758) at org.apache.xalan.transformer.ResultTreeHandler.startElement(ResultTreeHandle r.java:245) at org.apache.xalan.transformer.ResultTreeHandler.startElement(ResultTreeHandle r.java:209) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java: 704) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform erImpl.java:2154) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform erImpl.java:2097) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer Impl.java:2029) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j ava:1189) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 479) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 1118) at FOtoPDF.applyFop(FOtoPDF.java:127) at FOtoPDF.main(FOtoPDF.java:40) It looks very similar to the one before to me. Has anyone tried this with v.0.20.1 yet? Should it say building formatting object tree twice? I'm wondering if this is some kind of issue with namespaces and the DOM2 implementation. Anyone have any ideas? By the way, if I use a DOMResult instead of a SAXResult I get no error. I then serialized the DOMResult to a file and FO works fine with that file as an input. Thanks, Matt -Original Message- From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 2:03 PM To: '[EMAIL PROTECTED]' Subject: RE: Does render(dom) actually work? Matt, Why don't you do it all in one pass? I have a servlet, that calls some bean to get XML document in a DOM format (actually JDOM), then registers fop driver as receiver of SAX events and runs XSLT on the JDOM tree. // 1. Generate XML tree Document xmlSummary = DataLoader.getSummary(); // 2. Get stylesheet transformer Transformer transformer = transformerFactory.getTransformer( xsl-file ); // 3. Create FOP driver and set rendering mode and output stream org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setRenderer(driver.RENDER_PDF); driver.setOutputStream( out ); // 4. Create SAXResult based on FOP Driver content handler which will accept // SAX events and build FOP tree javax.xml.transform.sax.SAXResult saxResult = new javax.xml.transform.sax.SAXResult( driver.getContentHandler() ); // 5. Use the Transformer to transform an XML Source and send the output // to a Result object. // Implicitely it will create the FOP tree by firing SAX events transformer.transform( new org.jdom.transform.JDOMSource( xml ), saxResult ); YS -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 4:33 PM To: '[EMAIL PROTECTED]' Subject: Does render(dom) actually work? Hello everyone. By any chance can someone point me to some example code which uses render(dom)? No matter what combination of driver methods or Fop versions (.17,.19,.20.1) I use I seem to get the same error: building formatting object tree setting up fonts java.lang.NullPointerException at java.util.Hashtable.get(Hashtable.java:320) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:191) at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:444) at org.apache.fop.apps.Driver.render(Driver.java:449) at FOtoPDF.applyFop(FOtoPDF.java:83) at FOtoPDF.main(FOtoPDF.java:24) Here is the source I'm using under v.0.20.1: org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF); driver.setOutputStream(new FileOutputStream(pdfFilename)); driver.setupDefaultMappings