📄

PDF Info

Get structural information about a PDF including page dimensions, encryption status, and metadata

POST 1 credit /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
Response 200 OK
{
  "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

Get structural information about a PDF including page dimensions, encryption status, and metadata

How to Use

1

1. Provide the PDF via `pdf` (base64) or `url` (public URL).

2

2. The response contains document-level info (page count, version, encryption) and per-page structural data.

3

3. Check `is_encrypted` before attempting operations that require decryption.

4

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

Frequently Asked Questions

How do I determine the paper size from dimensions?
A4 pages are 595.28 × 841.89 points (8.27 × 11.69 inches). US Letter is 612 × 792 points (8.5 × 11 inches). Compare the `width` and `height` values to identify the paper size.
Does this endpoint modify the PDF?
No. PDF Info is completely read-only — it inspects the document and returns structural data without changing anything.
What does rotation mean?
The `rotation` field shows the page's display rotation in degrees (0, 90, 180, or 270). A value of 90 means the page is displayed in landscape orientation.

Start using PDF Info now

Get your free API key and make your first request in under a minute.