Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesSet PDF page size, orientation, and margins in a CSS @page rule included with the HTML you send to DocRaptor. For A4 landscape with 10 mm margins, use @page { size: A4 landscape; margin: 10mm; }. Page size and margins are independent settings, so you can choose the paper format and then control the printable content area separately.
Set a named page size and orientation
Add an @page rule to a <style> element in the HTML document or to a stylesheet included with the document. Use a recognized CSS page-size keyword, optionally followed by the orientation:
<style>
@page {
size: A4 landscape;
margin: 10mm;
}
</style>
Omit landscape for portrait orientation. For example, size: A4; selects A4 portrait. DocRaptor documents US Letter as 8.5 in × 11 in and A4 as 210 mm × 297 mm. Its page-size keyword reference includes additional ISO, US, ANSI, architectural, and book formats. See DocRaptor’s size, dimensions, and orientation guide and its page-size keyword reference.
Choose a custom page size
If a named format does not match the required output, specify the width and height with CSS units:
#1 Best Overall
@page { size: 22cm 24cm; }
@page { size: 4in 8in; }
Keep the width and height in the order shown. Include the rule in the HTML or stylesheet submitted to DocRaptor. The custom page size tutorial shows this approach in an API document that supplies HTML through its document_content field.
Set uniform or individual margins
Use margin to set all four sides at once. One value applies equally to every side; you can also provide separate values or set each side explicitly.
Rank #2
@page { margin: 10mm; }
@page {
margin-top: 20mm;
margin-right: 15mm;
margin-bottom: 20mm;
margin-left: 15mm;
}
DocRaptor’s page-styling guide gives a default of US Letter portrait with a 0.75-inch margin. Set your own values explicitly when the output must meet a particular print or delivery specification. The page rule and styling guide and margins and bleed guide describe these controls.
Account for headers, footers, binding, and bleed
Headers and footers
DocRaptor places headers and footers in page margin areas. Reserve enough top or bottom margin for them: these regions do not automatically enlarge the margins to fit their contents. If the margin is too small, a header or footer can be cropped or hidden. Changing margin size also changes the space available to the main content, which can alter pagination. Review the rendered PDF after adjusting margins. See DocRaptor’s page regions guide and headers and footers guide.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- hole punched
- high quality card stock
- 4 pages
- made in USA
- keyboard shortcuts
Binding and first-page layouts
For a binding layout, DocRaptor’s margins guide shows margin-inside and margin-outside. For a different first-page layout, it shows the @page:first selector, for example @page:first { margin: 0; }. Use these when the document design calls for inside/outside spacing or a distinct cover or title page.
Full bleed
A zero margin creates a full-bleed page. Use it only when the intended output requires content to reach the page edges; otherwise, set margins that preserve the desired space around the content.
Rank #4
Check the result when layout changes
- Choose the target paper format. Use a named keyword when it matches the specification; otherwise, give custom width and height.
- Set orientation in the size declaration. Add
landscapewhen needed; otherwise the named format is portrait. - Set margins separately. Choose a uniform margin or specify each side to leave room for content and page regions.
- Render and inspect the PDF. Confirm the page dimensions, orientation, visible margins, header and footer placement, and pagination. Margin changes affect the main content area.
Troubleshoot common layout problems
- The PDF uses the wrong paper size or orientation: Check that the
@pagerule is present in the HTML or stylesheet actually sent to DocRaptor, and verify thesizevalue and optional orientation keyword. - Content is clipped or pagination changes unexpectedly: Review the page dimensions and each margin value, then render again. Margins reduce the area available to the main content.
- A header or footer is missing or cut off: Increase the relevant top or bottom margin to reserve space for its page region, then inspect the result. DocRaptor does not expand margins automatically to fit these regions.
- Edge-to-edge output was not intended: Remove a zero-margin declaration or replace it with an appropriate margin value. Zero margins are for full-bleed output.
Or skip the browser setup
DocRaptor sets PDF page size and margins through CSS in the PDF-generation input. If your task is instead to capture a website as an image or PDF, ScreenshotNeo offers a one-request screenshot API; it does not replace DocRaptor’s CSS page-layout settings. For example, this cURL request saves a website capture as WebP. See the ScreenshotNeo documentation for request options.
Quick Recap
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for free.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteProduct 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.

