Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsSome links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
A PDF-generation API can control much more than the destination file: page size and orientation, margins, CSS page rules, headers and footers, pagination, fonts, accessibility tagging, and whether a conversion runs synchronously or asynchronously. Which controls you can set depends on the provider and on whether it renders HTML, converts office documents, or generates PDFs inside an enterprise platform.
Start with the input and rendering model
Choose an API based first on what you are converting. A browser-based renderer is a natural fit when your source is HTML and CSS: it can render a web document into pages, so CSS layout and page rules matter. An enterprise document API may instead offer controls that work with records, attachments, or document-specific inputs. These are different integration patterns, not interchangeable feature lists.
- HTML/CSS: check whether the API renders the same stylesheet, fonts, and assets your document needs, and how it handles print CSS and page breaks.
- Office documents: check which input formats and embedded-font behavior are documented for the conversion path you will use.
- Enterprise records or attachments: determine whether the API integrates with the system where the source documents and resulting PDFs live.
Cloudflare documents a Browser Rendering PDF endpoint with page and template controls. ServiceNow documents its PDFGenerationAPI with page settings, typography-related options, accessibility tagging, and asynchronous conversion. Adobe’s cited documentation addresses embedded TrueType fonts in Microsoft Word and PowerPoint inputs. The available controls vary by API and input type; a feature described for one provider should not be assumed to exist in another.
Set page size, dimensions, orientation, and margins
Decide whether you want a named paper format, custom dimensions, or a layout governed by the document’s CSS. Confirm how the selected API resolves conflicts: Cloudflare documents format, width, height, and a CSS page-size priority option, so the relationship between API settings and CSS @page rules matters.
#1 Best Overall
ServiceNow’s current API reference lists A4 at 595 × 842 points, Letter at 612 × 792 points, and Ledger at 792 × 1224 points. Its documented default margins are 72 points at the top and bottom and 36 points at the left and right. Those are ServiceNow-specific values, not universal defaults. Set the page dimensions and all four margins explicitly when predictable placement matters, and verify the units accepted by the API you use.
Orientation is another independent control. ServiceNow and Cloudflare document landscape options. A landscape page can help with wide tables, but it does not by itself prevent content from overflowing; check column widths and page breaks in the rendered output.
| Control | What the references establish | What to verify in your chosen API |
|---|---|---|
| Named or custom page size | Cloudflare documents format, width, and height; ServiceNow documents named sizes including A4, Letter, and Ledger. | Accepted names, dimension units, precedence when multiple size fields are set, and whether CSS @page takes priority. |
| Orientation | Cloudflare and ServiceNow document landscape controls. | Whether orientation changes the named page dimensions or is applied after custom dimensions. |
| Margins | Both references describe margin controls; ServiceNow documents independent left/right and top/bottom values and its own defaults. | Per-side support, units, defaults, and whether headers or footers consume margin space. |
| Scale | SolidRelay documents a scale range of 0.1–2 for its shared options object. | Whether the setting applies to the whole page, how it interacts with paper size, and the valid range for your provider. |
SolidRelay’s range is provider-specific. Do not copy its scale range or another provider’s defaults into a different API without checking that API’s versioned reference.
Free tools Windows power users keep installed
One-click scans. No signup required.
Control CSS, backgrounds, and page breaks
For HTML-to-PDF output, treat the PDF as a print rendering rather than assuming a browser screenshot will automatically become a well-paginated document. Use print-specific CSS where appropriate, and test the interaction between CSS @page and API-supplied size settings. Cloudflare documents a setting for CSS page-size priority; that is a concrete reason to test which source controls the final dimensions when both specify them.
Background printing can be useful when colors or branded elements are part of the document design. Cloudflare documents a background option. Enable it only when the background is needed, and inspect the PDF to ensure that it has not obscured text or affected legibility. Check page breaks, repeated table headings, and content that spans pages with representative documents; the references do not establish one universal pagination behavior across providers.
Add headers, footers, page numbers, and page ranges
Cloudflare documents HTML header and footer templates. ServiceNow documents header and footer text and images, page numbering, and a table of contents. These options can make a long export easier to identify and navigate, but the details differ by implementation.
- Allow enough top and bottom margin for the header and footer; otherwise they may overlap the document body or be clipped.
- Test page-number placeholders on a multi-page file, including the first and last pages.
- Check alignment and image sizing where the API accepts header or footer images.
- Use page-range controls when exporting only selected pages, and confirm the provider’s indexing and range syntax before relying on it.
- For long documents, decide whether a table of contents is needed and whether the API can generate one from the source structure.
Cloudflare documents page ranges as an available PDF control. The documentation cited for these services does not establish one shared template syntax, placeholder format, page-range notation, or header/footer behavior across them, so use the selected provider’s API reference for those details.
Check fonts and visual fidelity
Fonts can change line wrapping, page count, and the position of content even when the source markup is unchanged. Verify that the conversion environment can load the fonts your document uses, that fallback fonts cover required characters, and that embedding is permitted under the font’s license.
ServiceNow documents an optional font-family identifier. Adobe states that if a Microsoft Word or PowerPoint input file has an embedded TrueType font, the output PDF will also contain the same embedded TrueType font. That statement applies to the described Word/PowerPoint input case; it does not establish that every font, input format, or provider embeds fonts the same way. Test the actual output for font substitution and non-Latin glyph coverage.
Require accessibility tagging when it matters
If screen-reader navigation is a product requirement, look for explicit documentation of PDF accessibility tags rather than inferring accessibility from a visually correct file. ServiceNow documents an accessibilityEnabled flag that adds accessibility tags to the PDF tag tree for screen-reader users. The references do not establish equivalent behavior for every other API.
Include accessibility in acceptance criteria and inspect the result with your organization’s PDF accessibility checks. A flag name alone is not proof that every source document will produce a correctly structured, navigable PDF.
Choose synchronous or asynchronous conversion
A synchronous request is straightforward when the conversion finishes within your request path and the document is small enough for your timeout budget. For larger exports, asynchronous processing can let the application continue while conversion is underway. ServiceNow states that asynchronous processing lets you work in the instance while PDF conversion is in progress.
Rank #4
Before choosing an asynchronous workflow, establish the provider’s queueing, status polling, retry, and completion behavior. Also decide how your application handles a job that takes longer than expected or fails after submission. The cited references do not provide a shared timeout or retry policy, so these details need to come from the chosen API’s current documentation and your own operational requirements.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Compare providers by documented controls
| Provider/reference | Documented controls relevant here | Important qualification |
|---|---|---|
| Cloudflare Browser Rendering PDF endpoint | Format, width, height, landscape, margins, header and footer templates, background printing, page ranges, and CSS page-size priority. | HTML/browser rendering controls; verify exact option behavior and defaults against the API version you use. |
| ServiceNow PDFGenerationAPI | Page size, orientation, margins, header/footer text and images, page numbering, font-family selection, table of contents, accessibility tagging, and asynchronous conversion. | Enterprise API; documented defaults and supported integration context are ServiceNow-specific. |
| Adobe PDF Services API | The cited material establishes embedded TrueType-font preservation for Microsoft Word/PowerPoint inputs. | The cited fact is limited to that input/font case; it does not establish the complete option set for the API. |
| SolidRelay shared options | A documented scale range of 0.1–2. | This range is provider-specific and is not a general PDF standard. |
Use this as a shortlist of documented differences, not a complete product ranking. The references do not establish comparable pricing, service levels, or feature parity across these providers.
Or skip the browser setup
If your source is a live webpage and you need a screenshot or PDF without standing up a browser-rendering workflow, ScreenshotNeo is a developer screenshot API and MCP server from Yorker Media. It accepts a URL in a GET request and can return PNG, JPEG, WebP, or PDF. Its PDF controls include paper size, margins, landscape orientation, and page ranges. It is not a substitute for every office-document or enterprise-record conversion workflow described above.
Recommended Free Tools
For a basic website capture, this cURL request saves a WebP screenshot. For PDF output and the available PDF parameters, use the ScreenshotNeo API documentation rather than assuming an undocumented query parameter:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie/consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo free.
Implementation checklist and troubleshooting
Before shipping
- Identify the source type: HTML/CSS, an office file, a template, or structured data.
- Choose named page format or custom dimensions, then set orientation and all margins explicitly if layout precision matters.
- Decide whether API size settings or CSS
@pagerules should win, and test that choice with a real document. - Reserve room for headers and footers; test page numbering, page ranges, and table-of-contents behavior on a multi-page export.
- Check background output, font fallback and embedding, licensing, and glyph coverage.
- If accessibility is required, select a documented tagging capability and validate the generated PDF.
- For large exports, test asynchronous completion handling, polling, retries, and timeout recovery.
- Record the API version and option defaults in integration tests so a change in defaults or option names is caught.
Common failures and practical fixes
- Content is clipped or overlaps a header: increase the relevant page margin and verify that the header or footer is not occupying space reserved for the document body.
- Output uses an unexpected page size: check for conflicts between named format, width/height, orientation, and CSS
@page; make the intended precedence explicit. - Text wraps differently or the page count changes: verify loaded fonts, font fallback, and scale, then compare output using the actual production font files.
- Background colors or images are missing: check whether background printing is enabled for the selected API and whether the source styling depends on it.
- Page numbers or selected-page exports are wrong: confirm the provider’s placeholder syntax and page-range convention in its reference; test the first, middle, and last pages.
- A large conversion blocks the request or times out: investigate the provider’s asynchronous mode and define status polling and retry behavior rather than assuming a universal timeout.
- A PDF looks accessible but screen readers cannot navigate it: verify that the provider actually emits accessibility tags and check the generated tag tree instead of judging by visual appearance alone.
Frequently Asked Questions
Are PDF margin values measured in points by every API?
No. The references establish ServiceNow’s documented values in points, but they do not establish a common unit convention across providers. Confirm units in the API version you use.
Does adding a font-family setting guarantee that the font is embedded in the PDF?
No. A font-family selection and font embedding are distinct behaviors; verify both in the provider’s documentation and the generated file.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Quick Recap
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.

