PDF (Portable Document Format) was created by Adobe in 1993 to solve a simple problem: making documents look the same on every computer, every printer, every screen. Nearly 35 years later, PDF is the universal document format — used for contracts, invoices, academic papers, ebooks, and government forms worldwide. Understanding how it works helps you work with PDFs more effectively.
What Makes PDFs Universal
A PDF file contains a complete description of a document — text, fonts, images, vector graphics, and layout instructions — all in one self-contained file. When you open a PDF, the viewer renders it according to these instructions, producing the same visual result regardless of the operating system, screen size, or software used.
This is fundamentally different from formats like .docx or .html, which are reflowed and re-rendered depending on the viewing environment. A PDF always looks the same because it doesn't reflow — the layout is fixed.
Internal Structure
A PDF file is organised into four main sections:
- Header: Identifies the file as a PDF and specifies the version (e.g., %PDF-1.7)
- Body: Contains the document content as a series of objects — text, fonts, images, page descriptions, and metadata
- Cross-reference table: An index that tells the viewer where each object is located in the file, enabling random access
- Trailer: Points to the cross-reference table and the root object, allowing the viewer to start reading from the end of the file
Text and Fonts in PDFs
PDFs can embed fonts directly in the file. This means the document looks identical on every machine, even if the viewer doesn't have the same fonts installed. Font embedding is what makes PDFs reliable for professional printing and legal documents.
However, not all PDFs embed all fonts. If a PDF references a font that isn't embedded and the viewer doesn't have it, the viewer substitutes a similar font, which can change the layout. This is why some PDFs look slightly different on different systems.
Images and Compression
PDFs support multiple image formats: JPEG, PNG, TIFF, and CCITT (for black-and-white scanned documents). Images can be compressed using different algorithms depending on the content — lossy JPEG for photographs, lossless Flate (zlib) for graphics, and JBIG2 for high-compression black-and-white scans.
PDF 1.5 introduced JPEG 2000 support, and PDF 2.0 added support for more modern codecs. The choice of image compression significantly affects file size — a 50MB PDF with uncompressed images might be 2MB with proper compression.
Interactive Features
Beyond static content, PDFs support:
- Hyperlinks: Internal links (table of contents) and external URLs
- Form fields: Text boxes, checkboxes, radio buttons, dropdowns, and digital signatures
- Annotations: Comments, highlights, stamps, and drawing marks
- Bookmarks: Navigation panel for long documents
- Embedded media: Audio, video, and 3D models (though browser support varies)
- JavaScript: Interactive forms with validation and calculation (be cautious — PDF JavaScript can be a security risk)
PDF Versions and Standards
- PDF 1.0 - 1.7: The original Adobe specifications, with increasing features
- PDF/A: Archival standard — restricts features that might not render correctly in the future (no JavaScript, no encryption, fonts must be embedded)
- PDF/X: Printing standard — ensures colour management and font embedding for professional printing
- PDF/UA: Universal accessibility standard — requires tagged content for screen readers
- PDF 2.0 (ISO 32000-2): Current international standard, maintained by ISO
Working with PDFs Programmatically
PDF.js, used by the viewer on this site, is Mozilla's JavaScript library for rendering PDFs in the browser. It parses the PDF structure, extracts text and images, and renders pages to a canvas element. Because it runs entirely in the browser, your documents never leave your device — making it safe for sensitive PDFs.
Common PDF operations you can perform in the browser:
- View and navigate multi-page documents
- Extract text from PDF pages
- Merge multiple PDFs into one
- Split a PDF into individual pages
- Convert PDF pages to images
- Search for text within the document
The PDF tool on this site handles all of these operations in your browser using PDF.js and JSZip. No documents are uploaded to a server, which makes it safe for confidential files like contracts, bank statements, or medical records.