[gs-devel] Convert PDF to PS - Automatic page rotation to Portrait

Lakos Dániel dlakos at nicro.hu
Sat Nov 7 04:21:03 PST 2009


Ken Sharp írta:
> At 11:23 07/11/2009 +0100, =?ISO-8859-2?Q?Lakos_D=E1niel?= wrote:
>
>> Ive found a solution in the GS archives, and the rotation works as it
>> should, but some text are malformed/characters missing after conversion.
>> Does Anybody have an idea whats wrong?
>> Is there any other method to "auto rotate" pages?
>> My GhostScript Version is 8.15.
>
> First suggestion, upgrade to something more recent. The current
> version is 8.70 and 8.15 is quite old.
>
> You might also consider using ps2write instead of pswrite as ps2write
> generally does a better job.
>
> By the way, the code you are using only auto-rotates pages if they are
> landscape letter (842x595 points), other page sizes may be scaled
> and/or centered.
>
>             Ken
>
>
>
Thank you for taking time to answer.

I upgraded to 8.70.
with '-sDevice=pswrite' the output page size is correct A4 (8.26 x 11.69 inches) -- characters and page size are OK.
using '-sDevice=ps2write' the output 8.50 x 11.00 inches -- charachters ar ok, but the document doesnt fit

As I know the 842x592 points are correct for A4 papersize.  

It seems that the code i using (device=pswrite) is correctly convert the pdf to ps (checked using adobe distiller).
When Hylafax conerts this PS to Tiff, things go wrong.

How to get ps2write working with the correct papersize? 
I hope the output of ps2write is going to give better results when converted to tiff. 



More information about the gs-devel mailing list