> We use Acrobat on Unix to print PDF's. Currently we have to call Acrobat
> with the correct parameters of paper size and orientation from Java code. I
> was wondering maybe I could get rid of this step by including such
> parameters into the pdf itself. It seems I can't.

No. Do I get you correctly, that you convert the PDF to PS on the
command line and print the resulting PS file? What printer are you
printing on? We're printing on big Xerox DocuPrint printers that have no
trouble with the PostScript generated by Acrobat Reader on Unix. If
you're printing on a HP LaserJet or similar there might be some special
PS commands available that you could patch the PS with to get what you
want.

> I understood from Amine's question that it is not the same case with PS (of
> course, it is a printer language). I think his question meant that in PS it
> is possible to set the orientation (and the paper size??) in PS. If so, I
> might consider changing my output format to PS, and hence get rid of the
> ugly Acrobat call, with parameters, from code. Currently I don't know if
> switching to PS is that easy, or if it would work as I expect.

Switching to PS may not be so easy, switching to PSRenderer that is. The
PS renderer still lacks considerable features when compared to the PDF
renderer. I'm still using the PDF renderer for our stuff and convert the
PDFs to PostScript using Acrobat Reader on Unix. But it may be
worthwhile to try it out if you only need Times, Helvetica or Courier.

> It all depends on whether the paper size can be set inside the fo (probably
> not?) and rendered correctly to PS using FOP. Or, possibly by using another
> workaround in PSRenderer e.g. by measuring the page width/height combination
> against standard paper sizes and setting the closest one into the PS.

You set the paper size in the page master. And FOP does everything right
what paper size is concerned. The only problem is mastering the
different target printers. PDF is meant to be portable so it doesn't
contain printer specific stuff. Printing a PDF means you have to do some
stuff before everything prints out as expected. In PS this is currently
the same, because the PS renderer doesn't support PPD's that describes
the PS printer's capabilities. When you install a PostScript printer on
Windows you often get the standard Adobe PS driver plus a PPD. I think
the solution to your problem really depends on the printer you're using.
If you can tell me which one you're using, then I can probably propose a
solution.

> But thanks for implementing the orientation for PS orientation anyway :)

You're welcome.

Cheers,
Jeremias Märki

Reply via email to