Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96892

Re: Postscript to pdf

From Laura Creighton <lac@openend.se>
Subject Re: Postscript to pdf
References <f1c3720b-ee32-4a22-bdfa-7a1bedebc16f@googlegroups.com> <mailman.42.1442767228.21674.python-list@python.org> <ed98eb8c-8316-41bc-97ff-008c2f0c91f3@googlegroups.com> <201509201812.t8KICXHu004041@fido.openend.se> <CAKSfFmhqTWzem6aW+3KOxKTo4C35JdmoRv=BrkSu8+Hruz3WmA@mail.gmail.com>
Date 2015-09-20 21:09 +0200
Newsgroups comp.lang.python
Message-ID <mailman.1.1442776152.28679.python-list@python.org> (permalink)

Show all headers | View raw


In a message of Sun, 20 Sep 2015 20:27:48 +0200, Baladjy KICHENASSAMY writes:
>Hello,
>
>I'm using macosx, ps2pdf version i don't know :/ sorry....
>ok actually i found what is the problem...
>
>There is no problem with the ps file every thing is fine =)
>
>Can u please just tell me how to change paper settings ?
>i want to go from portait to landscape ?
>

Aha!  Great to know.
Do you have a real printer there, in which case is this a printer problem?
If so, I need the name of the printer and its model number to help look up
the way to make it do landscape.

If you just want to have ps2pdf produce landscape files, that is
surprisingly difficult, for the ps2pdf that uses ghostscript to
get the work done.  ps2pdf 'guesses' what is the correct orientation
and, stupidly, there is no way to tell it 'stop guessing, I know
what I want'.  It's very bad at guessing things that don't have
text -- or enough text -- in them.

Most of the time ps2pdf is just this:

gs \
  -o output.pdf \
  -sDEVICE=pdfwrite \
  -dPDFSETTINGS=/prepress \
  -dHaveTrueTypes=true \
  -dEmbedAllFonts=true \
  -dSubsetFonts=false \
  -c ".setpdfwrite <</NeverEmbed [ ]>> setdistillerparams" \
  -f input.ps

where input.ps is the file you have and output.pdf is the pdf you want.
and we can make gs orient itself as you want with

    -c "<</Orientation 3>> setpagedevice"

Orientation 3 is landscape.  Orientation 0 is portrait.

If this is your problem, then see if you have gs (ghostscript)
and in that case see if this horrible long command works.

Laura

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Postscript to pdf Bala Ji <baladjy@gmail.com> - 2015-09-20 09:20 -0700
  Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 18:40 +0200
    Re: Postscript to pdf Bala Ji <baladjy@gmail.com> - 2015-09-20 09:50 -0700
      Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 20:12 +0200
      Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 21:09 +0200
      Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-20 20:27 +0200
        Re: Postscript to pdf Christian Gollwitzer <auriocus@gmx.de> - 2015-09-21 15:39 +0200
      Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-20 21:32 +0200
      Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 21:52 +0200
      Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-21 00:50 +0200
      Re: Postscript to pdf Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-09-20 20:25 -0400
      Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-20 23:11 +0200
        Re: Postscript to pdf Nobody <nobody@nowhere.invalid> - 2015-09-21 13:56 +0100
      Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-21 17:20 +0200
        Re: Postscript to pdf Christian Gollwitzer <auriocus@gmx.de> - 2015-09-23 08:40 +0200
        Re: Postscript to pdf mithra <curtis.rendon@gmail.com> - 2015-09-23 17:01 -0700
  Re: Postscript to pdf Terry Reedy <tjreedy@udel.edu> - 2015-09-21 00:17 -0400

csiph-web