LinuxCommandLibrary

pdftops

Convert PDF files to PostScript

SYNOPSIS

pdftops [options] PDF-file [PS-file]

PARAMETERS

-f
    Specifies the first page to convert.

-l
    Specifies the last page to convert.

-o
    Specifies the output PostScript file name. If omitted, output goes to standard output.

-level1, -level2, -level3
    Generates PostScript output conforming to language level 1, 2, or 3 respectively.

-paper
    Sets the paper size (e.g., letter, A4).

-paperw , -paperh
    Sets custom paper width and height in points.

-r
    Sets the resolution for rasterized content in DPI.

-eps
    Generates Encapsulated PostScript (EPS). This implies -level2.

-form
    Generates a PostScript form suitable for embedding.

-duplex
    Sets the Duplex flag in the PostScript output.

-nocrop
    Disables cropping pages to the CropBox.

-opw
    Specifies the owner password for encrypted PDF files.

-upw
    Specifies the user password for encrypted PDF files.

-q
    Suppresses all error and informational messages.

-v
    Prints copyright and version information.

DESCRIPTION

pdftops is a command-line utility used to convert Portable Document Format (PDF) files into PostScript. This conversion is often necessary for printing PDF documents on PostScript-only printers, or for further processing with PostScript-aware applications. It supports various PostScript language levels (Level 1, 2, 3) and allows for control over output characteristics such as resolution, paper size, page range, and whether to generate Encapsulated PostScript (EPS) or PostScript Forms. The utility handles fonts, images, and vector graphics within the PDF, attempting to preserve the original document's layout and appearance in the PostScript output.

CAVEATS

The PostScript output can sometimes be significantly larger than the original PDF, especially if the PDF contains complex vector graphics or transparency effects that need to be rasterized.
Font issues may occur if fonts are not embedded or if substitutions are inaccurate.
Password-protected PDFs require the correct user or owner password for conversion.

RETURN CODES

Returns 0 on success, or a non-zero exit code on error. Common errors include file not found, incorrect password, or invalid options.

CONFIGURATION FILES

In some configurations, pdftops may use printer-specific PostScript prolog files to customize the output. These are typically located in system-specific directories (e.g., /etc/poppler/printers.conf or similar).

HISTORY

pdftops is part of the Poppler rendering library, which itself originated from the Xpdf project. Xpdf was developed by Derek Noonburg and released in 1998, providing the foundational PDF rendering engine. The Poppler library forked from Xpdf in 2005 to foster a more open development model, and pdftops has been a core utility within this suite, evolving to support newer PDF features and PostScript standards. Its continuous development aims to provide accurate and efficient PDF to PostScript conversion on Linux and other Unix-like systems.

SEE ALSO

Copied to clipboard