ps2pdf
Convert PostScript files to PDF
SYNOPSIS
ps2pdf [options] [input.ps [output.pdf]]
PARAMETERS
-dAutoRotatePages=/None|All|PageByPage
Controls automatic page rotation. None prevents rotation, All rotates all pages, and PageByPage uses the orientation with the most text.
-dCompatibilityLevel=1.0|1.1|1.2|1.3|1.4|1.5|1.6|1.7|1.8|2.0
Sets the PDF compatibility level, influencing features available in the output.
-dPDFSETTINGS=/screen|/ebook|/printer|/prepress|/default
Sets predefined settings for PDF generation. /screen for low-resolution on-screen viewing, /ebook for e-books, /printer for printing on standard printers, /prepress for high-quality printing, and /default is a good compromise.
-dDetectDuplicateImages
Enables detection of duplicate images to reduce PDF size.
-sOutputFile=filename.pdf
Specifies the output PDF file name.
input.ps
The input PostScript file.
output.pdf
The output PDF file (optional; if omitted, the name is derived from the input file, or output is sent to standard output).
DESCRIPTION
The ps2pdf command converts PostScript files into Portable Document Format (PDF) files. It is a wrapper script that simplifies the process of calling Ghostscript (gs) with the appropriate options for performing this conversion.
ps2pdf utilizes Ghostscript's built-in PDF writer to create the PDF. It can accept input from standard input or from a specified PostScript file. The resulting PDF can be written to standard output or to a named file.
The command automatically determines the correct Ghostscript command based on available settings on a particular system. Using it is the most robust way to convert PostScript files to PDF files. Options exist to further refine conversion characteristics such as PDF version and image compression.
CAVEATS
ps2pdf relies on Ghostscript. If Ghostscript is not properly installed or configured, ps2pdf will not function correctly. It also may not correctly convert every PostScript file, especially those with very complex or unusual features. ps2pdf is essentially a wrapper script, it is important to understand that different Ghostscript versions may produce slightly different output for the same input.
STANDARD INPUT/OUTPUT
If the input file is not specified, ps2pdf reads from standard input. If the output file is not specified, ps2pdf writes to standard output. This can be useful for piping commands together.
COLOR MANAGEMENT
Color management profiles are often embedded in PDF files for accurate reproduction of colors. ps2pdf allows controlling color management options through Ghostscript. To achieve optimal color reproduction, ensure that your Ghostscript installation has appropriate color profiles.
HISTORY
ps2pdf was developed as a convenient utility to simplify the conversion of PostScript files to PDF format, leveraging the capabilities of Ghostscript. Its purpose was to provide a user-friendly interface to Ghostscript's PDF generation features. The command has been widely adopted as a standard tool on Unix-like systems for handling PostScript to PDF conversion tasks. The command's development reflects the need for an easy to use tool for generating PDF documents. It has evolved over time to support different PDF compatibility levels and advanced features, such as image compression and page rotation.