Re: Fopping and batch printing
(comments inline) On 22.04.2002 14:29:04 Wayne Elliott wrote: Howdy Anyone know of the best way to batch FOP generated PDF documents for printing. In our scenario documents are queued for generation, followed by printing, using threads. We print from both a Windows 2000 GUI application and Unix server, by spawning a shell command through Runtime.exec. The commands we use are along the lines of (I'm not at work Win/Dos: c:/Program Files/Adobe/Acrobat 5.0/Reader/AcroRd32.exe + /t + file + + printerName + + driverName + + portName Unix: cat blah.pdf | acroread -toPostScript | lpr The trouble we are having is tracking the print job and knowing when to kill it. In the Dos version we can't get no exit status. In fact we currently count to 10 then kill the process. I think using Acrobat Reader to launch a print job is loony tunes, but am struggling to find a better way. Does anyone know of a better way, either to better control the shell command, or to fire PDF at a printer from Java. I gave up using Acrobat Reader on Windows except for displaying a PDF in a browser. I'd do all the printing via unix if that's possible. You might also get happy using GhostScript. Yet another possibility might be to use the AWT printing functionality of FOP. I don't use it but others do and it seems to work well. Also seeing some corruptiion of the margins in the Unix case. Any Unix gurus know if lpr or acroread need some flags to shrink the margin or set the page size. So many variables... I had that, too. You have to explicitly specify the page size using one of those command line options. Prob this is all slightly off topic. Not sure. Seems printing is a reasonable thing to do with a PDF so maybe we have all floundered a bit in this area. WPE When not Fopping, can be found floundering with style. Cheers, Jeremias Maerki
Embedding FOP within Servlet
Hello All, With the example "embedding" distributed with fop-0.20.3-src.tar.gz I got stuck. The PDF generation from a *.fo file works fine. But while generating a PDF out of a xml file and a xsl stylesheet I always get the exception: org.apache.fop.apps.FOPException: javax.xml.transform.Transformer at org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandler.java:107) at FopServlet.renderXML(FopServlet.java:118) at FopServlet.doGet(FopServlet.java:67) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) I have following jar files in my tomcat/webapps/WEB_INF/lib directory and the logiles report that following jar file were found (yes I did put them there): ant.jar ant-1.3-optional.jar avalon-framework-4.0.jar batik.jar bsf.jar buildtools.jar fop.jar logkit-1.0.jar stylebook.jar xalan-2.0.0.jar xerces-1.2.3.jar I thougt the Transformer class ships with xalan-2.0.0.jar but anyway, I get the exception. Any help would be great. Thanks a lot... Georg
Re: problem with path relative - HELP ME
hi i have the same problem also images didn't appear till i write full path of the images like c:\images\image.gif and not work with this ( http://localhost:8080/cocoon/mydir/images/image.gif ) i don't know what is the reason so i hope that anybody can help in this thanx - Original Message - From: Carlos Daniel Schafer [EMAIL PROTECTED] To: Fop-Dev (Correo electrnico) fop-dev@xml.apache.org; Fop-User (Correo electrnico) [EMAIL PROTECTED] Sent: Friday, April 19, 2002 4:14 PM Subject: problem with path relative - HELP ME Hi I look distinct examples on Fop configuration. I have a problem with path relative by image. My code in servlet embeded is String baseDirPath = http://localhost:8080/portalrentas/;; org.apache.fop.configuration.Configuration.put(baseDir, baseDirPath); but, I have a problem This, show me the next error: [ERROR]: Error while creating area : Error while recovering Image Informations (http://localhost:8080/portalrentas/fop/xslfo/escudo-200.jpg) : http://localhost:8080/portalrentas/fop/xslfo/escudo-200.jpg I don't understand. What's the error? Why's ocurrs this errors? My code into xslfo is fo:external-graphic src=fop/xslfo/escudo-200.jpg/
Re: Embedding FOP within Servlet
That's a classloader issue. I haven't investigated what exactly the problem is, but putting xalan.jar in common/lib or lib instead of WEB-INF/lib should do the trick. On 22.04.2002 16:29:16 Georg Daniel Vassilopulos wrote: Hello All, With the example embedding distributed with fop-0.20.3-src.tar.gz I got stuck. The PDF generation from a *.fo file works fine. But while generating a PDF out of a xml file and a xsl stylesheet I always get the exception: org.apache.fop.apps.FOPException: javax.xml.transform.Transformer at org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandler.java:107) at FopServlet.renderXML(FopServlet.java:118) at FopServlet.doGet(FopServlet.java:67) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) I have following jar files in my tomcat/webapps/WEB_INF/lib directory and the logiles report that following jar file were found (yes I did put them there): ant.jar ant-1.3-optional.jar avalon-framework-4.0.jar batik.jar bsf.jar buildtools.jar fop.jar logkit-1.0.jar stylebook.jar xalan-2.0.0.jar xerces-1.2.3.jar I thougt the Transformer class ships with xalan-2.0.0.jar but anyway, I get the exception. Any help would be great. Thanks a lot... Georg Cheers, Jeremias Maerki
Do Fop have problems with keep-with-...?
Platform: Intel PIII, debian testing, Blackdown Java SDK 1.3.1, Saxon 6.4.4, DocBook XML 4.1.2, DocBook-XSL 1.48, Fop-0.20.3rc Does Fop still have a problem with keep-with-*? Searches on the net seem to indicate that this was the case as late as February this year: http://lists.w3.org/Archives/Public/www-xsl-fo/2002Feb/0064.html If the problem still persists, does anyone know of a good workaround? I have a problem with the title of a section, in a DocBook XML article, not sticking with the rest of the section, when a page break is inserted. Since what I'm writing is a step-by-step cookbook with screen shots, this results in pages consisting of a large image (a screen dump), the descriptive text for that image, and the section title for the next screen dump. And this looks rather silly. More info on what I have done and tried, can be found in the thread starting with: http://lists.oasis-open.org/archives/docbook-apps/200204/threads.html#00221 Thanx! - Steinar
Re: to J.Pietschmann (about keep-together)
J.Pietschmann [EMAIL PROTECTED]: MARTIN Franck wrote: Thank you for your advice but what do you mean by blind table? A table without borders, so you don't notice it's actually there. Often used for doing complicated layouts which can be fitted manually to an underlying grid. In your case, just for keeping stuff together. I have a similar problem. My problem is that my FO is generated from DocBook source, and that the only way I can see how to accomplish a blind table, is to create a different template for DocBook section elements that will create a mess for regular sections. Hm...
Refactoring / Rewriting of FOP Timeframe?
Hi i sthere a rough timeframe for the Refactoring / Rewriting of FOP? Lou _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
Re: Do Fop have problems with keep-with-...?
Steinar Bang wrote: Does Fop still have a problem with keep-with-*? Yes, and this will persist for some time. I have a problem with the title of a section, in a DocBook XML article, not sticking with the rest of the section, when a page break is inserted. The keep-with-* properties work on table rows. The usual recommendation is to use a two row, one column blind table and put the title in the first and the first paragraph in the second row. If you are generating FO from DocBook, this will probably be hard, or harder. You can try to fiddle with the docbook style sheets to achieve this effect. If you are at it, you can fix a few other problems DocBook generated have (fo:table-and-caption, references to fo:page-sequence and to fo:block with a break-before) Your alternative is to use a commercial FO processor. J.Pietschmann
Re: problem with path relative - HELP ME
Mohamed Abdel Hameed wrote: hi i have the same problem also images didn't appear till i write full path of the images like c:\images\image.gif and not work with this ( http://localhost:8080/cocoon/mydir/images/image.gif ) The second form requires a webserver running and serving the requested file. You can check whether it works by pointing your favorite browser to the URL and let surprise yourself whether the picture is displayed. If the browser has no difficulties, but FOP still can't get the images, check whether the server correctly serves the content type and other meta data. There are more, but very rare possibilites. J.Pietschmann
Re: Do Fop have problems with keep-with-...?
J.Pietschmann [EMAIL PROTECTED]: [snip!] If you are generating FO from DocBook, this will probably be hard, or harder. You can try to fiddle with the docbook style sheets to achieve this effect. Some workaround around those lines, is what I will try tomorrow. I won't fiddle with the DocBook XSL style sheets directly, but I will replace a template or several templates, in a local XSL style sheets. The local style sheet is already in place. This is where I set the page size to be a4 instead of the default letter, and this is where I override the standard table template, to fix stuff. If you are at it, you can fix a few other problems DocBook generated have (fo:table-and-caption, Already done in the local style sheet, see http://marc.theaimsgroup.com/?l=fop-userm=101829073309486w=2 references to fo:page-sequence and to fo:block with a break-before) What are the problems with these? I haven't run into them yet. Your alternative is to use a commercial FO processor. Or PassiveTex, perhaps...? http://www.hcu.ox.ac.uk/TEI/Software/passivetex/ But I think I would miss the SVG rendering of Fop.
Re: FOP on JDK 1.1
I had a good results from FOP 0.18.x you may be able to run FOP 0.19.x. The Java API changed a little, command line usage is almost identical. JohnPT [EMAIL PROTECTED] APACHE.ORG To: [EMAIL PROTECTED] cc: 04/22/02 02:48 PM Subject: Re: FOP on JDK 1.1 Please respond to fop-user I have tried fop_0_20_1 already but it seems to work with Java 2 only. I will keep downloading the older versions until I find one that I can use with Java 1.1. I need to run fop on Mac OS 9 on a machine that cannot be upgraded to Mac OS X to run Java 2. Thanks for your help. Barbara From: Jeremias Maerki [EMAIL PROTECTED] Organization: Outline AG, Switzerland Reply-To: [EMAIL PROTECTED] Date: Mon, 22 Apr 2002 18:49:38 +0200 To: [EMAIL PROTECTED] Subject: Re: FOP on JDK 1.1 Try 0.20.1 or earlier. You can download it from here: http://xml.apache.org/dist/fop/recent/ What is your environment that you still have to live with JDK 1.1? On 21.04.2002 23:58:14 Barbara Slupik wrote: Hello Which is the last version of FOP that will run under Java 1.1 ? Cheers, Jeremias Maerki
OT: Mime Types
Can anyone point me to a good references on getting various response content types/file extension mappings to work with IE and Netscape? I'm having a devil of a time getting CSV and XML to save correctly AND create the correct user prompts. We'd like the open/save dialog to come up for everything, but we'd also like to have the correct extension show up when the user goes to save the file. Customizing the filename for each instance is not important. IE - QueryOutput.pdf, QueryOutput.html, QueryOutput.csv, QueryOutput.xml is fine. For CSV, if I set the content type as application/excel and the user saves the CSV file, it gets saved as a binary file. Which is fine for everything except Notepad and Access 97, which apparently can't convert to ascii correctly and don't see the line breaks. If I change the content type to text/csv, IE works fine, but Netscape saves the file with some extra carriage returns and weird characters. I could set separate content types based on browser, but the users with Netscape who want to import their CSV into Access 97 are still out of luck. For XML, IE seems to always want to open any mapping with a .xml extension no matter what you tell it the content is. We'd rather give the user the option to save first. Also, IE 4.x tries to open every XML file it sees, but can't -- even perfectly good XML files sitting on my hard drive. XMLSpy is set up as my default app for .xml, but if you're already in the browser I guess IE just ignores that. Finally for HTML in Netscape, for some reason after I open the XSLT stylesheet in a new window, when I go back to the opening window, I have weird box characters all over the place -- on a page that doesn't get redrawn at all. I've seen the same behavior on slightly different versions of communicator 4.x on NT4 and Win2k. Very strange. I attached a screenshot. Anyone else seen similar behavior with Netscape and stylesheets? Thanks a lot, I know none of these are related to FOP. But I also know from hanging around here that a lot of you are fighting with some of the same issues in your multi-output systems. I've been searching the web and found some good info. But every other forum I find hasn't been updated for 6 months+. Thanks again for any little pointers or knowledge. Matt Savino Senior Systems Analyst Quest Diagnostics Clinical Trials boxes.jpg attachment: boxes.jpg