What is PDF?
Portable Document Format, standardized as ISO 32000, describes fixed-layout documents independently of application software, hardware, and operating systems. A PDF may contain text, fonts, graphics, forms, annotations, and embedded files.
How PDF works
PDF serializes a page-oriented object graph containing content streams, resources, fonts, images, annotations, and document structure. Cross-reference information lets readers locate indirect objects, while incremental updates can append changes without rewriting the earlier bytes. A page may combine live text and vector marks with scanned raster content, so visual similarity does not imply identical extractability or accessibility. Document pipelines choose render, parse, optimize, sign, or archive operations according to the actual features and conformance goals.
Key facts
- 1Saving a PDF incrementally appends the changed objects, a new cross-reference section, and a new trailer, and leaves every earlier byte in place. The PDF Reference notes that saved changes can be undone by removing the appended sections, and that deleted objects stay in the file and are only marked as deleted. Content removed or covered in the latest revision can therefore still be recovered unless the file is rewritten without the old objects.
- 2A signed PDF can only be changed through incremental updates, because altering any existing byte invalidates its signatures. A processing step that rewrites the file, such as recompression or optimization, will break them; decide whether signatures must survive before adding such a step.
- 3Displaying text and extracting it use different data. A viewer needs only glyphs, while search, copy, and indexing need a mapping from character codes to Unicode, which comes from a standard encoding, a
ToUnicodeCMap, orActualText. Without one, the page still looks right but extraction returns wrong or missing characters, and embedding the font does not change that. The pdfminer.six documentation gives a quick test: copy the text from a viewer into an editor, and if the result is gibberish, an extraction library will not do better. A scanned page has no text objects at all and needs OCR. - 4PDF/A is a family of ISO 19005 profiles, not a file extension. Parts 1 to 3 require all fonts to be embedded, device-independent color, and standards-based metadata, and they forbid encryption, audio, video, and JavaScript, so embedding fonts alone does not make a file conform. A file declares its part and level in XMP metadata (
pdfaid:partandpdfaid:conformance); confirming the declaration takes a validator such as veraPDF. Level B covers visual appearance only, so a level B file built from scanned pages may have no extractable text. - 5The
%PDF-header line is not always the file’s version: since PDF 1.4, aVersionentry in the document catalog can override it, which is how an incremental update raises the version. ISO 32000-1 standardized PDF 1.7, and ISO 32000-2, first published in 2017 and revised in 2020, defines PDF 2.0.
When PDF matters
Inspect a PDF’s actual contents before choosing thumbnailing, extraction, merging, or optimization steps. Embedded fonts, interactive features, encryption, and scanned pages can limit compatibility or require specialized handling.
How Transloadit helps with PDF
Transloadit’s document Robots take PDF as input or produce it: /document/thumbs renders pages as images, /document/extract returns selectable text and embedded raster images, /document/ocr recognizes text in scanned documents, /document/split and /document/merge extract and concatenate pages, /document/optimize reduces file size, and /document/convert produces PDF from other document formats.
In its native text mode, /document/extract returns little or no text for scanned PDFs, and its OCR modes cannot be combined with a password. /document/convert converts files to PDF, not from PDF. The Robot documentation does not mention PDF/A output or signature preservation, so do not assume either.
- /document/thumbs Robot→
- /document/extract Robot→
- /document/ocr Robot→
- /document/merge Robot→
- /document/optimize Robot→
- /document/convert Robot→
Explore Transloadit’s file formats & compression capabilities
Sources
- Adobe PDF Reference, sixth edition (PDF 1.7): file structure, incremental updates, encryption, and extraction of text content
- Library of Congress: PDF 2.0, ISO 32000-2 (2017, revised 2020)
- Library of Congress: PDF/A family, PDF for Long-term Preservation
- veraPDF: validation of PDF/A and PDF/UA
- pdfminer.six FAQ: why extracted text contains raw character ids