gropdf
Convert troff/groff documents to PDF
SYNOPSIS
gropdf [-Celnpv] [-k ps-level] [-m media] [-P gs-options] [-s size] [files …]
PARAMETERS
-C
compatibility mode for Adobe Distiller/Acrobat
-e
disable page compression
-l
landscape page orientation
-n
omit DSC comments
-p
portrait page orientation (default)
-v
verbose output
-k ps-level
specify PostScript level (1, 2, or 3)
-m media
set media type (e.g., a4, letter)
-P gs-options
pass extra options to Ghostscript
-s size
set paper size (e.g., a4)
DESCRIPTION
gropdf is a utility from the GNU groff document formatting system that converts PostScript (.ps) files—typically produced by groff -Tps—into PDF format. It serves as a convenient wrapper around Ghostscript (gs), invoking it with optimized parameters for the pdfwrite device to ensure high-quality output, proper font embedding, and accurate page handling. This makes it ideal for traditional roff/troff users seeking PDF without direct Ghostscript configuration.
gropdf processes DSC-compliant PostScript, supports common paper sizes and orientations, and handles compression. Input files are read from arguments or stdin, with output to stdout or specified files. It preserves groff extensions like color when enabled. While effective, it's somewhat legacy; modern workflows favor pdfroff for direct PDF generation from roff sources, bypassing PostScript entirely.
CAVEATS
Requires Ghostscript; output quality depends on gs version. Not all complex PS features supported. Deprecated for new use—prefer pdfroff(1). No stdin/stdout if files specified.
EXAMPLE
groff -Tps file.ms | gropdf > file.pdf
gropdf -s a4 -m a4 input.ps
FILES
Reads PS from files or stdin; writes PDF to stdout or matching .pdf if infile given.
HISTORY
Developed in the GNU groff project (mid-1990s) by Dean Allen and others as a gs wrapper for PDF. Evolved with groff releases; largely stable since groff 1.17 (2003). Usage declined with direct PDF drivers.


