pstoedit
Convert PostScript and PDF files
TLDR
Convert a PDF page to PNG or JPEG format
Convert multiple PDF pages to numbered images
SYNOPSIS
pstoedit [options] <input_file> <output_file>
PARAMETERS
-f <format>
Specifies the desired output format. Examples include emf, wmf, svg, dxf, pdf, etc. A full list can be obtained via pstoedit -help.
-ps2ps
Utilizes the ps2ps filter for PostScript processing. This can be beneficial for handling complex or problematic PostScript input files.
-x
Extracts text objects as editable text rather than converting them into outlines or polygons, improving text editability in the output format.
-z
Treats lines and curves as distinct line segments rather than converting them into filled polygons, preserving vector line integrity.
-s <scale>
Applies a scaling factor to the output graphics. For example, -s 2 would double the size of the output.
-dpi <resolution>
Sets the resolution in dots per inch for any raster (bitmap) images that might be embedded within the output vector file.
-rotate <angle>
Rotates the entire output by the specified angle in degrees. Useful for correcting orientation issues.
-gs <options>
Passes additional, comma-separated options directly to the underlying Ghostscript interpreter, allowing fine-grained control over rendering.
-debug
Enables verbose debug output, which can be helpful for troubleshooting conversion issues.
DESCRIPTION
pstoedit is a versatile command-line utility designed to convert PostScript and PDF files into a wide range of editable vector graphics formats. It serves as a crucial bridge, allowing users to repurpose content from these document formats into applications like CAD software, vector drawing programs, or office suites. The tool leverages the powerful Ghostscript interpreter to process the input files, extract graphical elements, and then translate them into structured vector formats such as SVG, EMF, WMF, DXF, and various PostScript versions. This capability is invaluable for designers, engineers, and anyone needing to modify or extract vector data embedded within PostScript or PDF documents, providing a flexible workflow for graphic manipulation.
CAVEATS
pstoedit's performance and output quality are heavily reliant on the installed Ghostscript version and its configuration.
Complex PostScript or PDF files, especially those using non-standard fonts, transparency, or intricate graphic effects, may not always convert perfectly to all target vector formats.
Text extraction can sometimes be challenging, leading to text being converted into outlines instead of editable text strings, depending on the input file's structure and the chosen output format.
SUPPORTED OUTPUT FORMATS
pstoedit supports a vast array of output formats, including various versions of SVG (Scalable Vector Graphics), EMF (Enhanced Metafile), WMF (Windows Metafile), DXF (Drawing Exchange Format for CAD), PDF, various levels of PostScript, HPGL, CGM, and more. The specific formats available depend on the installed plugins and Ghostscript version.
DEPENDENCIES
The core functionality of pstoedit critically relies on the Ghostscript interpreter. For optimal performance and a wide range of output formats, ensure that a recent and properly configured Ghostscript installation is available on your system.
HISTORY
pstoedit has a long and active development history, primarily maintained by Wolfgang Glunz. It has consistently evolved to support new PostScript and PDF features, as well as an expanding array of output formats. Its enduring presence in the Linux and Unix utility landscape underscores its significance as a robust tool for vector graphic conversion.
SEE ALSO
gs(1), inkscape(1), convert(1), pdftocairo(1)