Portable Document Format (.pdf)
ISO StandardThe Portable Document Format (PDF) is a ubiquitous digital paper standard designed to present documents consistently independent of application software, hardware, and operating systems.
Convert PDF to JPG
Free in-browser PDF to JPG converter. Convert files instantly on your device.
Compress PDF Online
Private - files never leave your device
Inspect & Metadata
Operating systems and file analyzers identify PDF files by inspecting the leading binary byte sequence:
Byte-Level Header Signature (Magic Bytes)
Operating systems and file analyzers identify PDF files by inspecting the leading binary byte sequence:
HEX SIGNATURE (OFFSET 0):
25 50 44 46ASCII REPRESENTATION: %PDF
Standardization: ISO 32000-1 (2008) / ISO 32000-2 (2020)
Technical Specifications
| Container Architecture | Binary/ASCII hybrid object hierarchy with cross-reference table |
| Compression | FlateDecode (Deflate), DCTDecode (JPEG), CCITT Fax, JBIG2, JPXDecode |
| Byte Endianness | Big-Endian (network byte order) for binary object streams |
| Color Spaces | sRGB, Display P3, DeviceCMYK, Grayscale, Spot Colors (Pantone) |
| Channels & Structure | Multi-layer vector, typography, raster streams, and embedded metadata |
| Max Dimensions | 200 x 200 inches (UserUnit allows up to 15,000,000 inches in PDF 1.6+) |
| Transparency | Full alpha transparency, blend modes, and opacity masks |
| Streaming & Progressive | Linearized PDF ('Fast Web View') allows byte-range streaming via HTTP Range requests |
Technical Comparison Matrix: PDF vs Competitors
| Technical Attribute | PDF (Current) | DOCX | EPUB | HTML5 |
|---|---|---|---|---|
| Visual Layout Fidelity | Fixed page layout designed to preserve positioning; rendering varies by viewer and output device | Flow-based; varies across Word versions and installed fonts | Reflowable reader layout; no fixed typography guarantees | Fluid CSS box model; screen-dependent rendering |
| Self-Containment | Can embed fonts and image assets, but contents depend on document and authoring settings | Self-contained XML container (system fonts usually un-embedded) | Self-contained ZIP container (packaged XHTML/CSS assets) | Requires external HTTP resources unless packaged via MHTML |
| Cryptographic Signatures | Native PAdES and X.509 cryptographic digital signatures built into ISO spec | Office XML DSig digital signatures supported | Requires custom digital container signatures | Requires Web Crypto API or external TLS transport guarantees |
| Mobile Responsiveness | Fixed-page canvas (requires zooming and panning on small screens) | Excellent responsive text reflow | Engineered specifically for fluid mobile e-reading | Native responsive layout with CSS media queries |
| Standardization | Open International Standard (ISO 32000-2:2020) | ECMA-376 / ISO/IEC 29500 | W3C / IDPF Open Standard | W3C Living Standard / WHATWG |
Common Corruption Modes & Hex Recovery Guide
Acrobat or PDF viewer reports 'The file is damaged and could not be repaired' or opens completely blank.
Root Cause: FTP or HTTP transfer in ASCII mode converted binary byte sequences (replacing 0x0A with 0x0D 0x0A), mangling the cross-reference (xref) table byte offsets.
Recovery: Modern PDF repair utilities (e.g. qpdf --repair or File2File.app repair) rescan the file linearly, rebuild the object dictionary, and regenerate a new xref table.
PDF viewer fails to load the document or crashes on the last page.
Root Cause: Truncated download or incomplete disk write missing the '%%EOF' marker and trailer dictionary.
Recovery: Inspect file tail using 'tail -c 128 document.pdf'. If missing %%EOF, verify if the root catalog object exists and append an artificial xref table pointing to the highest valid object number.
Embedded fonts render as illegible symbols, blank blocks (.notdef), or question marks.
Root Cause: Non-embedded subset fonts referencing system fonts that are missing on the viewing machine, or corrupted ToUnicode CMap tables.
Recovery: Re-embed missing font subsets via Ghostscript (gs -o fixed.pdf -sDEVICE=pdfwrite -dEmbedAllFonts=true broken.pdf) or convert text elements to vector curves.
Security Analysis & Parser Attack Vectors
PDF supports features such as active scripting, embedded files, and compressed object streams, which readers must parse and handle safely. Browser PDF viewers may use sandboxing to isolate document processing.
Known Attack Vectors
- Embedded Acrobat JavaScript (JS API) executing arbitrary code or phishing exploits upon document open.
- Launch Actions (/Launch) configured to execute external system binaries or shell scripts.
- Font rendering vulnerabilities in legacy Type 1 and TrueType font parsing engines triggering buffer overflows.
- Server-Side Request Forgery (SSRF) and NTLM hash credential theft via malicious URI actions (/URI) or form submissions.
Defensive Best Practices: Never open untrusted PDFs with Adobe Acrobat JavaScript execution enabled. For web viewing, always render via browser sandboxed WebAssembly/PDF.js engines, or convert untrusted PDFs to sanitized PDF/A-1b documents.
Historical Origins & Milestones
Key Advantages & Pros
- Designed to preserve page layout across different systems, though appearance can vary with fonts, viewers, and print settings.
- Supports digital cryptographic signatures, redaction annotations, and DRM access permissions.
- Can contain vector graphics, fonts, and compressed raster streams; fonts and other resources are not always embedded.
Technical Limitations & Cons
- Fixed-layout page canvas makes automatic responsive reflowing on small smartphones challenging.
- Complex internal object stream hierarchy can lead to bloated file sizes without compaction and unreferenced object elimination.
- Embedded JavaScript and dynamic launch action capabilities present an expansive attack surface.
Interesting Technical Trivia
- The original Camelot project paper envisioned printing documents electronically from any application directly to any display.
- Every PDF file ends with the exact string '%%EOF' marking the end-of-file trailer.
- Some courts and archival organizations specify PDF/A for preservation workflows; requirements vary by jurisdiction and institution.
Frequently Asked Technical Questions
Why can PDF pages look similar across screens and printers?
PDF stores page content with fixed coordinates, which helps preserve layout. The rendered appearance can still vary with font embedding, viewer behavior, color management, and printer settings.
What is the difference between standard PDF and PDF/A?
PDF/A (ISO 19005) is a specialized subset designed for long-term archiving. It strictly bans features that could compromise future readability, such as JavaScript, external font linking, encryption, sound/video embedding, and device-dependent color spaces. All fonts and color profiles must be 100% embedded.
How does PDF compression work in modern documents?
PDF uses multiple discrete compression filters tailored to content types. Text, vector commands, and font metrics are compressed using FlateDecode (zlib/deflate). Photographic images use DCTDecode (JPEG) or JPXDecode (JPEG 2000), while bi-level monochrome scanned text uses JBIG2 or CCITT Fax Group 4 compression.
Why does a PDF file often stay large even after deleting pages or images?
When modifying a PDF, many editors perform an 'incremental update' - they append new object streams and a new xref table to the end of the file without deleting the old objects, allowing fast undo. To actually reduce the file size, the document must undergo an optimization pass that garbage-collects unreferenced objects.
Related PDF Conversion Pairs
Turn each page of a PDF into a JPG image you can post, send in a chat or insert into a slide. Pages are rendered at 150 dpi, and a PDF with several pages gives you a ZIP with one JPG per page.
Save each page of a PDF as a lossless PNG image, sharp enough for text, tables and diagrams. Pages are rendered at 150 dpi, and a PDF with several pages gives you a ZIP with one PNG per page.
Share a PNG screenshot or diagram as a one-page PDF with its pixels and transparency intact. The PDF page is a fixed image, not an editable PNG file.
Put a JPEG photograph on one PDF page for review or printing. Its existing image data is embedded, but the PDF does not provide photo-editing controls.
Make a one-page PDF from a WebP graphic for a document or approval round. The browser redraws it as an image, so WebP data and motion are not retained.
Share an SVG logo or illustration as a one-page PDF. Its scalable paths become a fixed-resolution image, so zooming cannot recover vector detail.
Turn a still HEIC photo into a one-page PDF for sharing or forms. The page uses 8-bit image data and does not include HEIC sequences or HDR source data.
Place an AVIF web image on one PDF page for a campaign review. It is drawn to a standard canvas image, so AVIF coding and HDR auxiliary data are lost.