LinuxCommandLibrary

gropdf

Convert troff/groff documents to PDF

SYNOPSIS

gropdf [-d arg] [-e] [-l arg] [-m arg] [-o arg] [-p arg] [-s arg] [-t arg] [-v] [file...]

PARAMETERS

-d arg
    Pass arg to groff with a -d option.

-e
    Pass -e option to groff (preprocessor eqn).

-l arg
    Pass -l option to groff.

-m arg
    Pass arg to groff with a -m option.

-o arg
    Write output to arg. If this option is not present, gropdf uses the standard output.

-p arg
    Set paper size to arg.

-s arg
    Pass arg to groff with a -s option.

-t arg
    Pass -t option to groff (preprocessor tbl).

-v
    Print version number.

file...
    Groff input files. Can be more than one. Can be omitted to use standard input.

DESCRIPTION

The gropdf command is a utility that converts the output of the groff typesetting system into PDF format. It essentially acts as a bridge, piping the groff output through a post-processor (typically ps2pdf or ghostscript) to generate the PDF file. It simplifies the process of creating PDF documents from groff source files, offering a convenient way to produce portable documents from traditional Unix typesetting tools.
By default, gropdf uses standard output, the name of the groff source file or STDIN is passed to the Title DSC comment for PDF generation. If no standard output is specified using the "-o" parameter, then the PDF file is created with the same name as the source file.
Gropdf also manages fonts.
It is commonly used in conjunction with tools like man to generate PDF versions of manual pages.

FONT HANDLING

gropdf does not directly handle font embedding or subsetting in the PDF output. It relies on the capabilities of the underlying ps2pdf (or equivalent) tool to manage fonts.
If specific fonts are required, they need to be configured correctly for the ps2pdf processor.
This is achieved through font mapping or embedding options within the ps2pdf configuration.

HISTORY

gropdf is a relatively recent addition to the GNU groff toolchain.
It was created to provide a simple and direct way to convert groff output into PDF format without needing to manually pipe commands together.
Prior to the existence of gropdf, users had to manually construct pipelines using groff, ps2pdf (or similar tools), often involving intermediate PostScript files. gropdf streamlines this process.

SEE ALSO

groff(1), ps2pdf(1)

Copied to clipboard