PDFTEX(1)
๐ PDFTEX(1) โ the pdftex manual, but make it make sense ๐
General Commands Manual ยท pdftex ยท PDF output from TeX
okay bestie sit DOWN because we're learning pdfTeX today and honestly? it's iconic. it's the TeX engine that can spit out PDF files and DVI files, it's been carrying academia on its back for decades, and you're about to understand it fr fr. let's go ๐ฆ
โจ NAME โจ
pdftex โ PDF output from TeX. that's the whole vibe. it takes your TeX and it gives you PDF. ๐
๐ SYNOPSIS ๐
pdftex [options] [&format] [file|\commands]
๐ธ DESCRIPTION ๐ธ
So you run the pdfTeX typesetter on file, and it usually creates file.pdf. if your file argument has no extension, .tex gets appended to it โ automatic, no notes, slay.
Instead of a filename, you can hand it a whole set of pdfTeX commands, but the first one has to start with a backslash. and if you pass a &format argument, pdfTeX uses a different set of precompiled commands living inside format.fmt โ though honestly it's usually better to use the -fmt format option instead. lowkey the move. ๐
pdfTeX is a version of TeX, with the e-TeX extensions, that can create PDF files as well as DVI files. periodt.
In DVI mode, pdfTeX can be used as a complete replacement for the TeX engine. no cap.
The typical use of pdfTeX is with pregenerated formats that have PDF output enabled. the pdftex command uses the equivalent of the plain TeX format, and the pdflatex command uses the equivalent of the LaTeX format. to generate formats, use the -ini switch โ that's your format-dumping era. โจ
The pdfinitex and pdfvirtex commands are pdfTeX's analogues to the initex and virtex commands. in this installation, if the links exist, they're symbolic links to the pdftex executable. ๐ซถ
In PDF mode, pdfTeX can natively handle the PDF, JPG, JBIG2, and PNG graphics formats. ๐
โ ๏ธ but here's the thing bestie: pdfTeX cannot include PostScript or Encapsulated PostScript (EPS) graphics files. first convert them to PDF using epstopdf(1). that's the rule, no exceptions.
pdfTeX's handling of its command-line arguments is similar to that of the other TeX programs in the web2c implementation.
Starting with version 1.40, pdfTeX incorporates the e-TeX extensions, and pdfeTeX is just a copy of pdfTeX. see etex(1).
๐ OPTIONS ๐
This version of pdfTeX understands the following command line options. and yes, we're doing ALL of them, every single one, because we don't skip. ๐
-cnf-line stringโ parse string as atexmf.cnfconfiguration line. see the Kpathsea manual for the deets.-draftmodeโ sets\pdfdraftmode, so pdfTeX doesn't write a PDF and doesn't read any included images, which speeds up execution. speedrun mode fr.-encโ enable the encTeX extensions. โ ๏ธ this option is only effective in combination with-ini. for documentation of the encTeX extensions see http://www.olsak.net/enctex.html.-etexโ enable the e-TeX extensions. this option is only effective in combination with-ini. seeetex(1).-file-line-errorโ print error messages in the formfile:line:error, which is similar to the way many compilers format them.-no-file-line-errorโ disable printing error messages in thefile:line:errorstyle.-file-line-error-styleโ this is the old name of the-file-line-erroroption. vintage ๐-fmt formatโ use format as the name of the format to be used, instead of the name by which pdfTeX was called or a%&line.-halt-on-errorโ exit with an error code when an error is encountered during processing. it simply refuses to continue, and honestly? valid.-helpโ print help message and exit.-iniโ start in INI mode, which is used to dump formats. INI mode can be used for typesetting, but no format is preloaded, and basic initializations like setting catcodes may be required. raw. unfiltered. main character energy.-interaction modeโ sets the interaction mode. mode can be eitherbatchmode,nonstopmode,scrollmode, anderrorstopmode. the meaning of these modes is the same as that of the corresponding\commands.-ipcโ send DVI or PDF output to a socket as well as the usual output file. whether this option is available is the choice of the installer. ๐-ipc-startโ as-ipc, and starts the server at the other end as well. whether this option is available is the choice of the installer.-jobname nameโ use name for the job name, instead of deriving it from the name of the input file.-kpathsea-debug bitmaskโ sets path searching debugging flags according to the bitmask. see the Kpathsea manual for details.-mktex fmtโ enablemktexfmt, where fmt must be eithertexortfm.-mltexโ enable MLTeX extensions. only effective in combination with-ini.-no-mktex fmtโ disablemktexfmt, where fmt must be eithertexortfm.-output-comment stringโ in DVI mode, use string for the DVI file comment instead of the date. โ ๏ธ this option is ignored in PDF mode.-output-directory directoryโ write output files in directory instead of the current directory. look up input files in directory first, then along the normal search path.-output-format formatโ set the output format mode, where format must be eitherpdfordvi. this also influences the set of graphics formats understood by pdfTeX. ๐-parse-first-lineโ if the first line of the main input file begins with%&parse it to look for a dump name or a-translate-fileoption.-no-parse-first-lineโ disable parsing of the first line of the main input file.-progname nameโ pretend to be program name. this affects both the format used and the search paths. cosplay but make it compilers ๐-recorderโ enable the filename recorder. this leaves a trace of the files opened for input and output in a file with extension.fls.-shell-escapeโ enable the\write18{command}construct. the command can be any shell command. โ ๏ธ this construct is normally disallowed for security reasons. not me enabling arbitrary shell execution ๐ญ be careful bestie.-no-shell-escapeโ disable the\write18{command}construct, even if it is enabled in thetexmf.cnffile.-shell-restrictedโ enable restricted\write18{}, as explained in the ``Shell escapes'' section of the Web2c Texinfo manual.-src-specialsโ in DVI mode, insert source specials into the DVI file. โ ๏ธ this option is ignored in PDF mode.-src-specials whereโ in DVI mode, insert source specials in certain places of the DVI file. the where argument is a comma-separated value list:cr,display,hbox,math,par,parent, orvbox. this option is ignored in PDF mode.-synctex NUMBERโ generate SyncTeX data for previewers according to bits of NUMBER. see thesynctexmanual page for details.-translate-file tcxnameโ use the tcxname translation table to set the mapping of input characters and re-mapping of output characters.-default-translate-file tcxnameโ like-translate-fileexcept that a%&line can overrule this setting.-versionโ print version information and exit.-8bitโ make all characters printable by default.
๐ ENVIRONMENT ๐
see the Kpathsea library documentation (e.g., the ``Path specifications'' node) for precise details of how the environment variables are used. the kpsewhich utility can be used to query the values of the variables โ very handy, love that for us. ๐
โ ๏ธ one caveat: in most pdfTeX formats, you cannot use~in a filename you give directly to pdfTeX, because~is an active character in TeX, and hence is expanded, not taken as part of the filename. other programs, such as Metafont, do not have this problem. so no~/myfile.texshenanigans here bestie, it will not work ๐ญ
TEXMFOUTPUTโ normally, pdfTeX puts its output files in the current directory. if any output file cannot be opened there, it tries to open it in the directory specified in the environment variableTEXMFOUTPUT. there is no default value for that variable. for example, if you saypdftex paperand the current directory is not writable andTEXMFOUTPUThas the value/tmp, pdfTeX attempts to create/tmp/paper.log(and/tmp/paper.pdf, if any output is produced.)TEXMFOUTPUTis also checked for input files, as TeX often generates files that need to be subsequently read; for input, no suffixes (such as ``.tex'') are added by default, the input name is simply checked as given.TEXINPUTSโ search path for\inputand\openinfiles. this normally starts with.'', so that user files are found before system files. an empty path component will be replaced with the paths defined in the `texmf.cnf` file. for example, set `TEXINPUTS` to `".:/home/user/tex:"` to prepend the current directory and/home/user/tex'' to the standard search path.TEXFORMATSโ search path for format files.TEXEDITโ command template for switching to editor. the default, usuallyvi, is set when pdfTeX is compiled.TFMFONTSโ search path for font metric (.tfm) files.SOURCE_DATE_EPOCHโ if set, its value, taken to be in epoch-seconds, will be used for the timestamps in the PDF output, such as theCreationDateandModDatekeys. this is useful for making reproducible builds. ๐FORCE_SOURCE_DATEโ if set to the value"1", the time-related TeX primitives (\year,\month,\day,\time) are also initialized from the value ofSOURCE_DATE_EPOCH. โ ๏ธ this is not recommended if there is any viable alternative. pdfTeX also has several primitives to support reproducible builds, which are preferable to setting these environment variables; see the main manual.
Many, many more environment variables may be consulted related to path searching. see the Kpathsea manual. (yes, many many. it's a whole ecosystem.) ๐ฆ
๐ FILES ๐
The location of the files mentioned below varies from system to system. use the kpsewhich utility to find their locations.
pdftex.mapโ font name mapping definitions.*.tfmโ metric files for pdfTeX's fonts.*.fmtโ predigested pdfTeX format (.fmt) files.
๐ญ NOTES ๐ญ
(this section is just vibes. nothing here. moving on.) ๐
๐ BUGS ๐
This version of pdfTeX fails to trap arithmetic overflow when dimensions are added or subtracted. cases where this occurs are rare, but when it does the generated DVI or PDF file will be invalid. so like... rare but catastrophic. noted. ๐ญ
๐ AVAILABILITY ๐
pdfTeX is available for a large variety of machine architectures and operating systems. pdfTeX is part of all major TeX distributions. it's everywhere. it's the moment.
- The pdfTeX home page: http://www.pdftex.org.
- pdfTeX on CTAN: https://ctan.org/pkg/pdftex.
- pdfTeX mailing list for all discussion: https://lists.tug.org/pdftex.
๐ฅ SEE ALSO ๐ฅ
This manual page is not meant to be exhaustive. the complete documentation for this version of pdfTeX can be found in the pdfTeX user manual and the Texinfo manuals Kpathsea library, Web2C: A TeX implementation. these manuals, and more, can be accessed from the pdfTeX or CTAN web pages given above.
Some related programs: epstopdf(1), etex(1), latex(1), luatex(1), mptopdf(1), tex(1), mf(1).
๐ AUTHORS ๐
okay bestie, gather round, it's credits time and we're giving every single icon their flowers ๐
pdfTeX was brought into this world by its primary author, Han The Thanh โ main character energy, no notes ๐
. And he did not do it alone, because collaboration is the vibe: Petr Sojka, Jiri Zlatuska, and Peter Breitenlohner (that's the eTeX one, iykyk) all showed up with major contributions ๐ซถ.
Now let's go back, way back, because the lore is immaculate โจ
TeX was designed by Donald E. Knuth, and he implemented it using his Web system for Pascal programs. Like. He built the whole thing. Obsessed honestly ๐ญ.
Then it went on tour ๐:
- It got ported to Unix at Stanford by Howard Trickey.
- And at Cornell by Pavel Curtis.
The version that's now offered with the Unix TeX distribution is the one generated by the Web to C system (web2c), which was originally written by Tomas Rokicki and Tim Morgan ๐ฅ.
And last but absolutely not least: the encTeX extensions? Those were written by Petr Olsak ๐.
ngl, that's a whole lineage of legends and we are literally standing on their shoulders fr fr ๐
<div style="text-align:center">๐ โจ ๐ฆ ๐ธ ๐ ๐ซถ ๐ ๐ โญ ๐ ๐ ๐ง ๐</div>
And that's a wrap on this page, bestie!! This one's from Web2C 2025, dated 2 March 2024, and it lives at PDFTEX(1) ๐ โ go forth and typeset something iconic, you absolute queen ๐โจ
๐ฆ where this page comes from
- alpine 3.24: texlive-doc 2026.0-r0 ยท GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: texlive-pdftex 12:svn77868-105.fc44 ยท GPL-2.0-or-later
- fedora 44: texlive-pdftex 12:svn77868-111.fc44 ยท GPL-2.0-or-later
- ubuntu resolute: texlive-binaries 2025.20250727.75242+ds-5build1 ยท TeX-Live
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms