FILE FORMAT GUIDE
Portable Document Format (.PDF): Structure & Inspection
A PDF file describes a paginated document using numbered objects, streams, cross-reference information and a trailer. It can also contain forms, attachments or interactive features.
Check supported header evidence locally. Identification is not file validation or a malware scan.
Analyze a file locallyQuick facts
- Extension
- Format
- Portable Document Format
- Category
- document
- MIME type
- application/pdf
- Standard / developer
- ISO / Adobe
- Open with
- pypdf PdfReader
What is PDF?
PDF begins with a version header containing %PDF-. Readers locate document structures beyond that prefix; a matching header alone does not prove the file is complete, safe or standards-conforming.
- Exchange a fixed-layout document across applications and platforms
How to open PDF
This workflow inspects structure or metadata without rendering embedded content. It does not establish safety, authenticity, rights or visual fidelity.
pypdf PdfReaderCommand-line tool or library
Construct PdfReader("document.pdf", strict=True) and inspect page count or metadata without writing the file. Handle encryption and parser errors explicitly; successful parsing is not a security scan.
Technical details
- Signature
- 25 50 44 46 2D (%PDF-)
- Encoding
- Not applicable
- Container
- PDF object and stream structure
- Compression
- Not reviewed
Things to check
- PDF content can be encrypted or contain interactive features and attachments; metadata inspection is not a safe-content verdict.
Related formats
- XML Paper Specification Document
Both represent paginated documents, but XPS uses an OPC-based package and a different fixed-layout specification.
- EPUB Publication
EPUB packages publication resources for reading systems and may reflow, unlike a typical fixed-layout PDF workflow.
Sources & review
Fact review: 2026-09-19. Unknown fields are not inferred from the file extension.