[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Printing portrait postscript as landscape



> 
> 
> I've got a two page postscript document which is stored in portrait,
> which results in it being printed wrongly.  I want somehow to be able
> to print it in landscape mode.
> 
> I have tried gv, but it doesn't seem to handle the switch to landscape
> properly.  I have tried xv, but it only recognises the first page.  I
> have tried to use pstops to rotate the pages but it doesn't work
> properly.  I have also tried to use pstops to separate the pages so
> that I could then use xv, but pstops didn't work properly again.
> 
> Any ideas?

In a rather low-level approach, you could use gs to convert to a bitmap
format.  Suppose you want to print in black and white on a 300dpi
printer, you would use

gs -q -sDEVICE=pbmraw -r300 -dNOPAUSE -sOutputFile=bla.%d.pbm - < file.ps

If file.ps contains 2 pages, this gives you two files bla.1.pbm and
bla.2.pbm for each page.  If they are not in the right orientation (gs
sometimes automagically rotates landscape to potrait), use pnmflip from
the netpbm package:

pnmflip -cw bla.1.pbm > bla.1.ok.pbm

Finally use `convert' from imagemagick to make a postscript file of it:

convert -page a4 bla.1.ok.pbm bla.1.ps
(assuming you want a4 paper, naturally)

Maybe check the result with gs again, then print.

If you use xv to print instead you will only get the resolution you have
on the screen, which is usually not good enough for text.  You also
loose resolution if you use xv to rotate the page.

HTH,
Eric

-- 
 E.L. Meijer (tgakem@chem.tue.nl)          | tel. office +31 40 2472189
 Eindhoven Univ. of Technology             | tel. lab.   +31 40 2475032
 Lab. for Catalysis and Inorg. Chem. (TAK) | tel. fax    +31 40 2455054


Reply to: