psfrem(1)

NAME
psfrem - postscript font and resource embedding utility.

SYNOPSIS
psfrem [options] input-file [output-file]

DESCRIPTION
psfrem runs supplied PostScript document through Ghostscript, gathering font usage information, then dumps loaded font data from Ghostscript memory and embeds it into the source file. The resulting document is expected to be self-containing, with no dependencies on the fonts installed in a particular postscript device. When embedding fonts, psfrem attempts to modify them, leaving only the glyphs used in the document, thus reducing the font size. psfrem also attempts to embed non-font resources in place of %%IncludeResource directives.

USAGE
Input file name must be supplied, and it must be a real seekable file. The output will be written to the specified file, or to stdout.

-Idir
    Look for resources to embed in dir. This option may be specified more than once. This option is also passed to gs.

-dvar[=val]
    Define PostScript variable name (with value val). This option is passed directly to gs(1).

-r  Do reduce/embed fonts. Without this option, just embed resources.

-xFont
    Do not dump/embed Font, which must be the PostScript font name (something like Times-Roman or FreeMono).

-aFont
    Embed Font completely, do not attempt to remove unused glyphs.

-A  Do embed Adobe core fonts. See NOTES below.

-k  Keep temporary files.

NOTES
psfrem is meant to be used with u2ps(1). It relies heavily on the input file being well-formed and well-behaved. It may or may not work with arbitrary PostScript input. psfrem only looks for resource in directories explicitly specified with -I and does not know about standard gs search path. If you need to embed anything from /usr/share/ghostscript, pass relevant directories with -I. All PostScript interpreters are assumed to have a bunch of standard fonts available (Courier, Times-Roman, Helvetica, Symbol etc), so psfrem does not try to embed those. Glyph coverage beyond basic Latin is not guaranteed for standard fonts however, so it may be necessary to use -A, forcing the fonts available to Ghostscript locally to be embedded instead of relying on whatever the target device has got.

SEE ALSO
u2ps(1), gs(1), includeres(1) from psutils package.