Resize PDF page size
A US Letter page of 612 by 792 points fits on A4 at a scale of 0.972673, keeping its proportions and leaving equal margins at the top and bottom. Enter the page size, pick the paper, and get the scale, new size and margins. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Width
- 612
- Height
- 792
- Target size
- A4
- Scale factor
- 0.972673
- Scale percent
- 97.26732
Resize PDF page size calculations without guessing at percentages or mixing measurement systems. Enter the current page width and height in PDF points, then choose A4, Letter, Legal, A3, or A5 as the destination. The calculator returns a uniform scale factor that preserves the page’s aspect ratio, the scaled content dimensions, and the centered margins that remain on the target sheet. It performs deterministic geometry only, so identical inputs always produce identical results.
Measure the current PDF page correctly
Begin with the effective width and height of the PDF page in points. PDF software commonly exposes a media box, crop box, or another page box, and the chosen box determines what you are actually fitting. Use one box consistently rather than combining the width of one with the height of another.
One PDF point is one seventy-second of an inch, so a US Letter page is normally 612 by 792 points. The calculator accepts positive decimal measurements because imported documents, scans, and generated files can have fractional coordinates. Width and height describe the current orientation exactly as reported: do not swap them merely because the document looks like a familiar paper format.
This capability does not open, decode, rewrite, or rotate PDF bytes. It calculates from page dimensions supplied by a PDF reader or library, which keeps the operation transparent and makes it suitable for planning a later resize. Invalid, zero, negative, infinite, or missing measurements are rejected instead of being silently corrected.
Understand the fit scale and resulting margins
The calculation compares the target width with the current width and the target height with the current height. It uses the smaller of those two ratios as the scale factor. That is the standard fit-inside rule: both dimensions remain within the destination sheet, no content is cropped, and the original aspect ratio is preserved.
A scale factor below one means the content must shrink; a value above one means it can grow; exactly one means no scaling is required. The response also provides the same value as a percentage for software or print settings that use percent rather than a decimal multiplier. Scaled width and height are computed with the uniform factor.
Any unused area is split equally across opposite edges, producing centered left, right, top, and bottom margins. The target dimensions are returned explicitly in PDF points so downstream code never has to infer which paper-size convention was used.
Choose a supported destination and apply the result
Select one of the five exact target names: A4, Letter, Legal, A3, or A5. The list is deliberately closed because a misspelled or ambiguous paper name should not produce a plausible but incorrect print result. Each target uses its standard portrait dimensions in PDF points.
Landscape output can still be planned by supplying page geometry appropriately in a separate rotation step, but this calculator does not rotate the destination or choose an orientation automatically. The result is a geometry plan, not a modified file. This separation is useful in browser tools, preflight checks, print workflows, and batch systems where another component performs the actual PDF rewrite.
What you can do with it
Prepare mixed documents for printing
Calculate a safe uniform fit before placing pages from different sources onto one standard paper size.
Preview resize settings
Show the final content dimensions, percentage, and centered margins before a user rewrites or prints the PDF.
Validate a document workflow
Compare deterministic geometry with a PDF library’s resize output and catch cropping or orientation mistakes.
FAQ
Does this capability modify my PDF?
No. It returns the scale and placement geometry needed for a later resize; it does not read or rewrite PDF bytes.
What unit should I use for width and height?
Use PDF points, where 72 points equal one inch. The returned source, target, scaled dimensions, and margins are also in points.
Will the calculation crop the page?
No. It uses the smaller width or height ratio, so the whole source page fits inside the target while preserving its aspect ratio.
Which target paper sizes are supported?
The accepted names are A4, Letter, Legal, A3, and A5.
What does a scale factor above or below one mean?
Below one, the content has to shrink to fit the new sheet; above one, it can grow; exactly one means no scaling is needed. The same value is also given as a percentage for print settings.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/pdf/resize-pages \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"width":612,"height":792,"target_size":"A4"}'const res = await fetch("https://api.kit.forhosting.com/pdf/resize-pages", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"width": 612,
"height": 792,
"target_size": "A4"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/pdf/resize-pages",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"width": 612,
"height": 792,
"target_size": "A4"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/pdf/resize-pages", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"width":612,"height":792,"target_size":"A4"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"width":612,"height":792,"target_size":"A4"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/pdf/resize-pages", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"width": 612,
"height": 792,
"target_size": "A4"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "pdf.resize_pages",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 25 |
max_pages | 200 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Choose a supported destination and apply the result
Apply scale_factor uniformly to the page content or transformation matrix in your PDF library, create a destination page with the returned target width and height, and translate the scaled content by the returned left and top margins if centered placement is desired. The API costs $0.002 per request, while the same deterministic calculation can run interactively in the browser.
Technical questions
How much does the API calculation cost?
Each API request costs $0.002. The browser calculation uses the same deterministic logic.