Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk3 min

How to Set PDF Page Size and Margins in PDFShift

Choose a standard or custom PDFShift page size with format, set margins with a shorthand string or per-side values, and account for header and footer space.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set the PDFShift format option to a standard paper size such as A4 or Letter, or give it a custom width and height with units. Set margin as a shorthand string for uniform or CSS-style margins, or use an object to specify each side. If a first page spills onto a second page when headers or footers are enabled, check the space reserved for them before changing the page size.

Set page size with format

PDFShift’s API documentation extract lists standard formats including Letter, Legal, Tabloid, Ledger, and A-series sizes from A0 through A5. Choose one when the output should use a familiar paper size. For a nonstandard page, specify width and height with units; the extract documents inches, centimeters, and millimeters for custom dimensions. See the PDFShift API documentation extract and verify the current option syntax against PDFShift’s current API reference.

As an Amazon Associate I earn from qualifying purchases.

Use a standard size when recipients or printers expect a conventional sheet. Use custom dimensions when the content is intended for a specific display, label, or other nonstandard layout. Page size sets the available canvas; it does not by itself guarantee that the source HTML will fit on one page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set margins with margin

The API reference extract documents two approaches: a shorthand string or an object with top, right, bottom, and left values. The shorthand examples follow CSS-style ordering:

#1 Best Overall
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
  • Convert your PDF files into Word, Excel & Co. the easy way
  • Convert scanned documents thanks to our new 2022 OCR technology
  • Adjustable conversion settings
  • No subscription! Lifetime license!
  • Compatible with Windows 11, 10, 8.1, 7 - Internet connection required
  • 10px applies 10px to all four sides.
  • 10px 0 applies 10px to the top and bottom, with zero on the left and right.
  • 10px 0 20px applies 10px to the top, zero to the horizontal sides, and 20px to the bottom.

Use the object form when sides need different values and you want each margin to be explicit. The extract shows per-side values, but its available details do not establish every accepted unit or serialization variant for the object form; confirm those against the current API reference before deploying.

Account for headers and footers

Headers and footers need room on the page. PDFShift’s Help Center explains that it applies margin space so a header or footer can be displayed. If the first page already fills its available height, that reserved space can push content onto a second page. Read PDFShift’s explanation of first-page overflow.

Rank #2
Doxillion Free Document Converter – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
  • Convert over 50 document file formats.
  • Preview your files from Doxillion before converting them.
  • Use batch conversion to convert thousands of files at once.
  • Enjoy an easy-to-use, intuitive interface with a Drag and Drop file option.
  • Burn your converted or original files directly to disc.

When the design intentionally needs a different first-page margin, PDFShift gives these CSS examples:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • For a footer: @page:first { margin-bottom: 0 }
  • For a header: @page:first { margin-top: 0 }

These rules remove the relevant first-page margin; change the value if the page still needs some breathing room. Avoid applying a zero margin blindly if it would cause text or the header/footer to collide with page content.

Rank #3
PDF Extra Ultimate | Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Yearly License | 1 Windows PC & 2 Mobile Devices | 1 User
  • EDIT text, images & designs in PDF documents. ORGANIZE PDFs. Convert PDFs to Word, Excel & ePub.
  • READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.
  • CREATE, COMBINE, SCAN and COMPRESS PDFs
  • FILL forms & Digitally Sign PDFs. PROTECT and Encrypt PDFs
  • 1 Year License for 1 Windows & 2 Mobile (Android and/or iOS) devices.

Control page breaks when source HTML cannot change

If a particular element should start on a new page, PDFShift’s page-break guide shows that CSS can be included in the POST request to target that element. For example, a rule using break-before: page can move the targeted content to a new page. Consult the PDFShift documentation for the current request format and CSS placement. This is a page-flow adjustment, not a substitute for choosing a suitable paper size or usable margins.

Diagnose a page that unexpectedly spills over

  • Only the first page overflows: check whether a header or footer is reserving additional margin space. Consider a first-page @page override, preserving any margin the layout needs.
  • Content is clipped or crowded on every page: check whether the chosen standard or custom dimensions match the intended output and whether the margins leave enough usable area.
  • A section starts in the wrong place: target its element with request-level CSS and a page-break rule if the source HTML cannot be edited.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

For website screenshots or PDFs, ScreenshotNeo offers a one-request API; it is a separate capture service, not a PDFShift setting. This cURL example requests a PDF:

Quick Recap

Bestseller No. 1
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
Convert your PDF files into Word, Excel & Co. the easy way; Convert scanned documents thanks to our new 2022 OCR technology
$29.99
Bestseller No. 2
Doxillion Free Document Converter – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
Doxillion Free Document Converter – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
Convert over 50 document file formats.; Preview your files from Doxillion before converting them.
Bestseller No. 3
PDF Extra Ultimate | Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Yearly License | 1 Windows PC & 2 Mobile Devices | 1 User
PDF Extra Ultimate | Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Yearly License | 1 Windows PC & 2 Mobile Devices | 1 User
READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.; CREATE, COMBINE, SCAN and COMPRESS PDFs
$83.88
Bestseller No. 4
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.; EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
$99.99
Bestseller No. 5
Doxillion Free Document Converter for Mac – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
Doxillion Free Document Converter for Mac – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
Convert over 50 document file formats.; Preview your files from Doxillion before converting them.
Best Value
Doxillion Free Document Converter for Mac – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
  • Convert over 50 document file formats.
  • Preview your files from Doxillion before converting them.
  • Use batch conversion to convert thousands of files at once.
  • Enjoy an easy-to-use, intuitive interface with a Drag and Drop file option.
  • Burn your converted or original files directly to disc.
Rank #4
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
  • Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.
  • EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
  • READ and Comment on PDFs – Intuitive reading modes & document commenting and mark up tools!
  • CREATE, COMBINE, SCAN and COMPRESS PDFs.
  • FILL forms & Digitally Sign PDFs. Work with Digital certificates
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -d format=pdf -o page.pdf

See the ScreenshotNeo API documentation for supported parameters. Its clean-shot options can remove cookie banners, popups, and chat widgets before capture. Bot checks, blank pages, and failed loads are not billed; an MCP server lets AI agents take screenshots; and the free plan includes 1,000 screenshots a month with no card, with paid plans starting at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.