How to open .PK files on Linux

To open .PK files on Linux, install TeX Live packages that provide the PK utilities (the pktype tool is documented as a standard PK verifier/translator).

Step-by-step instructions

  1. Install TeX Live packages that provide the PK utilities (the pktype tool is documented as a standard PK verifier/translator).
  2. Run in a terminal: pktype yourfont.pk to inspect the file and confirm it is a valid PK font.
  3. If you need to transform it, use pktogf (PK → GF) or gftopk (GF → PK) as appropriate.

Common issues

The .pk file won’t open in a viewer or editor

A PK file is a packed bitmap font for TeX, not a document or image format meant for general-purpose viewers.

  1. Use TeX font utilities to inspect it (run pktype on the file).
  2. If you need an intermediate format for a font workflow, convert it using pktogf (PK → GF) or regenerate it from GF using gftopk.

“Command not found” when running pktype/gftopk/pktogf

The required TeX utilities are not installed or not in your PATH.

  1. Install a TeX distribution that includes these tools (for example, TeX Live).
  2. Verify the tools are available by running pktype --help (or checking your TeX installation’s documentation) and ensure the TeX bin directory is on your PATH.

The file is not a valid PK font (or pktype reports errors)

The file may be corrupted, truncated, or not actually a TeX PK font despite the .pk extension.

  1. Re-download or re-copy the file (binary-safe transfer) and try pktype again.
  2. Confirm the file’s origin: PK fonts are typically produced by gftopk from Metafont GF output; if the source is unknown, it may be a different format using the same extension.

TeX can’t find or use the PK font during typesetting

Even if the PK file is valid, TeX-related tools may not locate it due to font map/path configuration or mismatched resolution/filename conventions.

  1. Confirm the font is the expected one by inspecting it with pktype (name/checksum/metrics-related info as shown by the tool).
  2. Ensure the PK file is placed in a location your TeX setup searches for fonts (consult your TeX distribution’s font path configuration) or regenerate the PK at the required resolution via the normal Metafont → GF → PK process (gftopk).

Security note

PK files are data-only bitmap font files, not executable programs, but they are parsed by complex tooling; only open/inspect PK files from sources you trust to reduce the risk of triggering parser bugs in font utilities.

Back to .PK extension page