BT % begin text object; text matrix reset /F1 12 Tf % font resource F1 at 12 pt 14 TL % leading 72 720 Td % move to start of line (First line) Tj T* (Second line) Tj % T* = next line using leading [(W) 80 (orld)] TJ % TJ: strings plus kerning in 1/1000 em (positive moves left) ET
/ToUnicode CMap. Without one, extraction is guesswork.
Font types
| Kind | Subtype | What it is |
|---|---|---|
| Simple fonts 1-byte codes, up to 256 glyphs | Type1 | PostScript Type 1 (and CFF via FontFile3). Includes the standard 14 (Helvetica, Times, Courier families, Symbol, ZapfDingbats) that pre-2.0 readers must supply without embedding. |
TrueType | TrueType outlines, embedded as FontFile2 | |
Type3 | Glyphs defined by content streams (/CharProcs), each starting with d0 or d1. Bitmap fonts, odd symbols. | |
MMType1 | Multiple Master instances (legacy) | |
| Composite multi-byte codes, CJK, large glyph sets | Type0 | A CMap (e.g. Identity-H) maps codes → CIDs, and one descendant CIDFont (CIDFontType0 = CFF, CIDFontType2 = TrueType) maps CIDs → glyphs. This is what modern generators use for any Unicode text. |
A font descriptor holds metrics and flags plus the embedded program (/FontFile, /FontFile2, /FontFile3). In 1.6+, /FontFile3 can be /Subtype /OpenType. Subset fonts have names like /ABCDEF+Helvetica. The Font types and Standard 14 fonts references go into each in detail.
Read:
Text rendering modes (Tr)
0 fill; 1 stroke; 2 fill+stroke; 3 invisible; 4–7 the same plus add to clipping path. Mode 3 is how OCR'd scans put a searchable invisible text layer over the image.