[gs-devel] rotating pages
Ken Sharp
ken.sharp at artifex.com
Mon Feb 23 01:17:28 PST 2009
Hi Klaus,
At 20:04 17/02/2009 +0100, Klaus Darilion wrote:
>landscape format. The problem is, that fax only supports portrait
>(landscape can be shrunk to avoid clipping).
[snip]
>So what we need would be an option for ghostscript to rotate all pages to
>portrait - regardless of the original orientation of /Rotation values.
>
>Thus, is this possible? Is there such an option?
As such, no. However....
Ghostscript is a PostScript device, and PostScript is a programming
language, you can alter the behaviour of the interpreter by writing
PostScript programs. In particular you can redefine the behaviour of
setpagedevice.
In one example you could store the requested page size whenever it changes,
and write a custom /BeginPage procedure which would rotate the page if it
is landscape (or simply always rotate the page if required, but this could
have side effects, multiple definitions of the page size would result in
multiple rotations...).
>Further, I found some examples using -dAutoRotate= but I could not a
>manual which describes the meaning of these token and the possible values.
>Where can I find it?
The auto rotate feature is described in the ps2pdf documentation
(gs/doc/ps2pdf.htm) but this won't do what you require. A closer fit is
described in ps2ps2.htm (gs/doc/ps2ps2.htm), Section 6 'Controlling the
printer behavious', especially the FitPages switch.
To use either of these, however, would be a 2 pass process; first convert
the PDF to either a new PDF or a PostScript file, then render the new file
and send it to the fax device.
Ken
More information about the gs-devel
mailing list