PDF Info
Get structural information about a PDF including page dimensions, encryption status, and metadata
/v1/pdf/info
curl -X POST "https://pdf.toolkitapi.io/v1/pdf/info" \
-H "Content-Type: application/json" \
-d '{"url": "https://toolkitapi.io/document.pdf"}'
import httpx
resp = httpx.post(
"https://pdf.toolkitapi.io/v1/pdf/info",
json={"url": "https://toolkitapi.io/document.pdf"},
)
print(resp.json())
const resp = await fetch("https://pdf.toolkitapi.io/v1/pdf/info", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({"url": "https://toolkitapi.io/document.pdf"}),
});
const data = await resp.json();
console.log(data);
# See curl example
{
"page_count": 8,
"file_size": 524288,
"pdf_version": "%PDF-1.7",
"is_encrypted": false,
"title": "Project Proposal",
"author": "Engineering Team",
"creator": "Google Docs",
"producer": "Skia/PDF m128",
"pages": [
{"page": 1, "width": 595.28, "height": 841.89, "width_inches": 8.27, "height_inches": 11.69, "rotation": 0},
{"page": 2, "width": 595.28, "height": 841.89, "width_inches": 8.27, "height_inches": 11.69, "rotation": 0}
]
}
Description
How to Use
1. Provide the PDF via `pdf` (base64) or `url` (public URL).
2. The response contains document-level info (page count, version, encryption) and per-page structural data.
3. Check `is_encrypted` before attempting operations that require decryption.
4. Use the page dimensions to determine paper size or identify landscape/rotated pages.
About This Tool
PDF Info gives you a structural overview of a PDF document without modifying it. It reports the page count, file size, PDF version, encryption status, metadata (title, author, creator, producer), and per-page dimensions including width, height, and rotation.
Use this tool for pre-flight checks before processing a PDF — confirm the page count, verify it isn't encrypted, or check page dimensions before rendering. It's also useful for building document inventories or validation pipelines.
The per-page dimension data is reported in both points and inches, making it easy to determine paper sizes (A4, Letter, etc.) and identify pages with non-standard dimensions or rotation.
Why Use This Tool
- Pre-flight validation — Check page count, encryption, and dimensions before processing
- Document inventory — Catalog PDF metadata across a document library
- Layout detection — Identify mixed page sizes or rotated pages in a document
- Encryption check — Verify whether a PDF needs a password before attempting extraction
Frequently Asked Questions
How do I determine the paper size from dimensions?
Does this endpoint modify the PDF?
What does rotation mean?
Start using PDF Info now
Get your free API key and make your first request in under a minute.