RE: Fopping and batch printing
I have the same problem. Did you find a solution ? Otherwise, I made attempts with ghostscript 7.04 but there are the other problems... The landscape does not work -Message d'origine- De : Wayne Elliott [mailto:[EMAIL PROTECTED] Envoyé : lundi 22 avril 2002 14:29 À : [EMAIL PROTECTED] Objet : Fopping and batch printing 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. 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... 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.
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
Fopping and batch printing
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. 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... 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.