FormaTeX

\engine{pdflatex}

pdfLaTeX Guide

pdfLaTeX is the fastest and most widely compatible LaTeX engine. It compiles .tex source directly to PDF, has the broadest package support of any engine, and remains the default engine for most LaTeX templates and online editors.

pdfLaTeX— fastest engine, maximum compatibility

\section{What is pdfLaTeX}

What is pdfLaTeX?

pdfLaTeX is an extension of Donald Knuth's original TeX typesetting engine, developed by Hàn Thế Thành in the 1990s. Where the original TeX produced DVI (device-independent) files, pdfLaTeX produces PDF directly — eliminating the DVI-to-PDF conversion step and enabling PDF-specific features like hyperlinks, bookmarks, metadata, and embedded fonts.

Fastest engine

Compiles simple documents in under 1 second. The fastest of all major LaTeX engines.

Maximum compatibility

Nearly every CTAN package targets pdfLaTeX first. Expect near-zero incompatibility issues.

microtype support

Full character protrusion and expansion for professional-grade microtypography.

\section{When to Use}

When to use pdfLaTeX

Document uses standard Latin text (English, French, German, Spanish…)
You need the fastest possible compilation speed
Template or journal requires pdfLaTeX (most academic conferences)
You rely on microtype for typographic refinement
Maximum CTAN package compatibility is required
You are teaching LaTeX and want maximum resource availability
The document is a standard article, report, or book with no special font needs
You are using tikz, pgfplots, beamer, or other pdfLaTeX-optimized packages

\subsection{Compile Commands}

Running pdfLaTeX from the command line

pdfLaTeX is available in every TeX Live installation. Below are the most common invocations, from a basic single-pass compile to a full bibliography pipeline. Or use latexmk to automate the multi-pass pipeline.

pdfLaTeX compile commands
# Basic pdfLaTeX compilation
pdflatex document.tex

# Suppress most terminal output (nonstopmode)
pdflatex -interaction=nonstopmode document.tex

# Run twice to resolve cross-references
pdflatex -interaction=nonstopmode document.tex
pdflatex -interaction=nonstopmode document.tex

# Full pipeline with bibliography
pdflatex -interaction=nonstopmode document.tex
bibtex document
pdflatex -interaction=nonstopmode document.tex
pdflatex -interaction=nonstopmode document.tex

# Write output to a specific directory
pdflatex -output-directory=./build document.tex

For most documents with cross-references, pdfLaTeX must be run at least twice — once to record references, and again to resolve them. Documents with a bibliography require a bibtex or biber run between pdfLaTeX passes.

\subsection{Common Options}

Common pdfLaTeX flags

These flags control how pdfLaTeX handles errors, output paths, and shell access. Most CI/CD pipelines use -interaction=nonstopmode and -halt-on-error together.

-interaction=nonstopmode

Run without stopping on errors. Errors are logged but compilation continues. Essential for CI/CD pipelines.

-interaction=batchmode

Like nonstopmode but also suppresses all terminal output. Useful for silent batch compilation.

-output-directory=<dir>

Write all output files (.pdf, .log, .aux) to the specified directory. Keeps your source tree clean.

-jobname=<name>

Override the output filename. Useful when your .tex file is named generically (e.g. main.tex).

-halt-on-error

Stop immediately on the first error. Combine with -interaction=nonstopmode for strict CI validation.

-shell-escape

Allow TeX to run external shell commands. Required by packages like minted (syntax highlighting) and epstopdf.

-file-line-error

Print errors in file:line:error format — easier to parse in IDEs and CI log scanners.

-synctex=1

Generate a SyncTeX file that maps PDF positions back to source lines. Enables source/PDF sync in editors.

\section{Limitations}

Known limitations

pdfLaTeX is the most mature engine, but it was designed in the 1990s and carries architectural constraints that newer engines address.

No native Unicode input

pdfLaTeX treats source files as 8-bit byte streams. You must add \usepackage[utf8]{inputenc} and \usepackage[T1]{fontenc} for UTF-8 support. Characters outside the T1 font encoding require extra packages or workarounds.

No system font access

pdfLaTeX cannot load arbitrary fonts from your operating system. You are limited to fonts pre-installed in your TeX distribution (Computer Modern, Latin Modern, etc.) or fonts packaged for TeX on CTAN.

No OpenType math fonts

Modern OpenType math fonts (XITS Math, Libertinus Math, Fira Math) are not accessible from pdfLaTeX. If you need these fonts, switch to XeLaTeX or LuaLaTeX with the unicode-math package.

Limited RTL and complex script support

Right-to-left languages (Arabic, Hebrew) and complex scripts (Devanagari, Thai) require cumbersome workarounds in pdfLaTeX. XeLaTeX and LuaLaTeX handle these natively.

microtype limitations on some features

While pdfLaTeX has the best microtype support, the full character protrusion and expansion features require fonts in Type 1 or OTF format. Some newer font packages may have reduced microtype support.

\section{Alternatives}

When to switch to a different engine

pdfLaTeX is the right default for most documents. Switch engines only when a specific requirement cannot be met.

Your document contains Arabic, Chinese, Hebrew, or other non-Latin scripts

XeLaTeX or LuaLaTeX

You need to use a custom system font (e.g. a brand font from your operating system)

XeLaTeX

You want Lua scripting to generate document content programmatically

LuaLaTeX

You need modern OpenType math fonts like XITS Math or Libertinus Math

XeLaTeX or LuaLaTeX

You want latexmk to handle the multi-pass compilation pipeline automatically

latexmk (wraps pdfLaTeX)

\subsection{API Usage}

Compiling with pdfLaTeX via the FormaTeX API

FormaTeX runs pdfLaTeX server-side. You send LaTeX source, we return a PDF. No TeX Live installation required on your end.

Pass "engine": "pdflatex" in your compile request

All four engines — pdfLaTeX, XeLaTeX, LuaLaTeX, and latexmk — are available on every plan. Switching engines requires only changing the engine field in your API request. See the engines overview for the full list of options.

pdfLaTeX available on all plans

Compile pdfLaTeX documents instantly

FormaTeX runs pdfLaTeX, XeLaTeX, LuaLaTeX, and latexmk in the cloud. No local installation needed. One API key, zero infrastructure.

One quick thing

We track anonymous usage — page views, feature usage, compilation events — to understand what works and what doesn't. No ads, no personal data, no third-party sharing.

Cookie policy