Ghostscript

From ArchWiki
Revision as of 19:58, 24 November 2018 by Larivact (talk | contribs) (flag for merging)
Jump to navigation Jump to search

Merge-arrows-2.pngThis article or section is a candidate for merging with PDF, PS and DjVu.Merge-arrows-2.png

Notes: New article. (Discuss in ArchWiki:Requests#PDF, PS and DjVu)

Ghostscript is an interpreter for PostScript and PDF.

Installation

Install the ghostscript package.

Usage

See gs(1).

ps2pdf

ps2pdf is a wrapper around ghostscript to convert PostScript to PDF:

$ ps2pdf -sPAPERSIZE=a4 -dOptimize=true -dEmbedAllFonts=true YourPSFile.ps

Explanation:

  • with -sPAPERSIZE=something you define the paper size. For valid PAPERSIZE values, see [1].
  • -dOptimize=true let's the created PDF be optimised for loading
  • -dEmbedAllFonts=true makes the fonts look always nice
Note: You cannot choose the paper orientation in ps2pdf. If your input PS file is healthy, it already contains the orientation information. If you are trying to use an Encapsulated PS file, you will have problems, if it does not fit in the -sPAPERSIZE you specified, because EPS files usually do not contain paper orientation informaiton. a workaround is creating a new paper in ghostscript settings (call it e.g. "slide") and use it as -sPAPERSIZE=slide.

See also