ScreenshotMachine PDF vs PNG: Which Output Should You Use for a Web Page?
Choose PDF for paginated, print-ready documents and PNG for pixel-sized page images. Here’s how ScreenshotMachine’s PDF and screenshot settings affect the result.
Choose PDF when you need a paginated document, control over paper size and orientation, or a file intended for printing. Choose PNG when you need a raster image with pixel dimensions, a particular device viewport, or a full-page screenshot. Neither is universally better: the right output depends on where the result will go.
ScreenshotMachine documents these as separate workflows: a web-to-PDF API and a website screenshot API. PDF has page and print-media settings; the screenshot workflow has image formats and viewport or full-page dimensions. The decision is about the deliverable, not a general quality ranking. See the provider’s PDF API guide and screenshot API guide.
Quick decision guide
| Need | Choose | Why |
|---|---|---|
| A document with pages and paper dimensions | The PDF workflow exposes paper size and portrait or landscape orientation. | |
| A file to send into a print workflow | PDF offers screen or print media, as well as paper-oriented settings. | |
| An image for a report, image pipeline, or visual comparison | PNG | The screenshot workflow produces an image with specified viewport dimensions. |
| A whole long page as one image | PNG | The screenshot API supports full-length capture. |
| A desktop, phone, or tablet rendering | PNG | Device and viewport dimensions belong to the screenshot workflow. |
These are workflow distinctions from the documented options. The reviewed documentation does not establish that either format is inherently smaller, more accessible, more compatible, or more faithful in every case.
What changes between PDF and PNG
PDF: pages, paper, and media
A PDF is the practical choice when the output should be handled as a document. ScreenshotMachine’s PDF API accepts a URL and provides paper sizes including Letter, Legal, Ledger, Tabloid, and A0 through A6, with portrait or landscape orientation. Its media option is separate from page size: screen aims to preserve the webpage’s browser appearance, while print uses print styling and omits web-specific graphics and elements described as unnecessary for printing. The documented default is screen.
Choose media=screen for a PDF meant to resemble the page as viewed in a browser. Choose media=print when the PDF is intended for printing and the site has print styles. A print stylesheet may deliberately hide navigation, backgrounds, or interactive controls, so inspect the result against your intended use. Paper size and orientation determine the page format; they do not select screen versus print styling.
PNG: pixels, viewport, and page length
PNG is a raster image. The screenshot API lets you set screenshot dimensions, capture a viewport or use full for a full-length page, and render desktop, phone, or tablet layouts. The documented image formats are JPG, PNG, and GIF. Use PNG when a downstream consumer needs image pixels rather than a paginated document.
A viewport capture represents the selected visible area. A full-page capture is intended to include the page’s full length in one image. If the page is responsive, changing the viewport or device rendering can change its layout; choose dimensions that match the audience or comparison you care about.
ScreenshotMachine API setup
The two workflows have different endpoints and configuration. Use your ScreenshotMachine access key as YOUR_API_KEY. Replace the example URL with the page you are authorized to capture. Check the provider’s current guides for exact parameter names and account requirements before integrating.
PDF request with cURL
curl -G "https://api.screenshotmachine.com" \
--data-urlencode "key=YOUR_API_KEY" \
--data-urlencode "url=https://example.com" \
--data-urlencode "dimension=Letter" \
--data-urlencode "orientation=portrait" \
--data-urlencode "media=screen" \
-o page.pdf
The PDF guide documents page size, orientation, media, background inclusion, conversion delay, and page interactions such as clicking or hiding selected elements. Adapt parameter names and supported values to the current PDF API reference; do not assume screenshot-image parameters apply to PDF.
PNG request with cURL
curl -G "https://api.screenshotmachine.com" \
--data-urlencode "key=YOUR_API_KEY" \
--data-urlencode "url=https://example.com" \
--data-urlencode "dimension=1024x768" \
--data-urlencode "format=png" \
-o page.png
For a full-length screenshot, use the screenshot API’s documented full-page dimension value, full, in place of the viewport dimensions. The screenshot guide also documents zoom, cache, click and hide selectors, and selecting or cropping page regions. Confirm the exact parameter spelling and limits in the provider guide.
Python request
import requests
params = {
"key": "YOUR_API_KEY",
"url": "https://example.com",
"dimension": "1024x768",
"format": "png",
}
response = requests.get(
"https://api.screenshotmachine.com",
params=params,
timeout=90,
)
response.raise_for_status()
with open("page.png", "wb") as output:
output.write(response.content)
For PDF, use the PDF endpoint and its page size, orientation, and media parameters, then save the response bytes as page.pdf. For PNG full-page capture, set the screenshot dimension to the documented full value. Validate the response content before treating it as an image or PDF; an API error may be returned instead.
Node.js request
const params = new URLSearchParams({
key: 'YOUR_API_KEY',
url: 'https://example.com',
dimension: '1024x768',
format: 'png',
});
const response = await fetch(`https://api.screenshotmachine.com/?${params}`);
if (!response.ok) {
throw new Error(`Screenshot request failed: ${response.status} ${await response.text()}`);
}
const bytes = Buffer.from(await response.arrayBuffer());
await import('node:fs/promises').then(({ writeFile }) => writeFile('page.png', bytes));
Use the PDF endpoint and PDF-specific settings for a PDF output. Keep the key out of browser-side code and public repositories; server-side requests protect credentials.
Options to choose before capture
| Setting | PDF use | PNG screenshot use |
|---|---|---|
| Output type | PDF API workflow | Set image format to PNG |
| Page size | Select a supported paper size such as Letter, Legal, Ledger, Tabloid, or A0–A6 | Use pixel dimensions for the viewport, or the documented full-page value |
| Orientation | Portrait or landscape | Choose viewport width and height that produce the intended responsive layout |
| Media | screen for browser-like styling; print for print styling |
Not the PDF media setting; configure the screenshot workflow |
| Wait and interactions | Conversion delay and documented click/hide interactions can prepare the page | Wait, click, hide, zoom, cache, or select/crop regions as supported by the screenshot API |
| Backgrounds | The PDF workflow documents background inclusion | Use screenshot options documented for the image workflow |
Both guides describe ways to wait for page rendering and interact with or hide elements. A delay that works for one site may be too short or unnecessarily long for another. If the page requires a particular control to be clicked or an overlay hidden, configure that explicitly and verify the capture.
Practical selection checklist
- Name the destination. If it expects a document or a print job, start with PDF. If it expects pixels or an image asset, use PNG.
- For PDF, decide the viewing intent. Choose screen media for browser appearance and print media for print styling.
- Set PDF paper format. Choose the paper size and orientation appropriate to the page and destination.
- For PNG, set the viewport. Match the target desktop, phone, or tablet layout, or choose full-page capture for one tall image.
- Prepare dynamic pages. Set an appropriate render delay and any required click or hide interactions.
- Open the output in its real destination. Check PDF pagination and styling, or PNG dimensions and page coverage.
Edge cases
- A long page that must print: use PDF and inspect pagination; a full-page PNG is one tall raster image, not a set of paper pages.
- A long page for visual review: use the screenshot workflow’s full-page option, while accounting for the image’s resulting dimensions in the destination tool.
- A site with print CSS: test PDF screen and print media. Print styling may intentionally remove or restyle page elements.
- A responsive site: viewport choice affects layout. Record the dimensions or device rendering when repeatability matters.
- Late-loading content: use the documented delay or page interactions, then capture after the content appears.
- Overlays and sticky elements: use supported click or hide controls where appropriate; confirm that the resulting capture still contains the content you need.
- Need an image and a document: make two captures with settings suited to each output. Do not treat a PNG as a paginated PDF or assume PDF page settings govern image dimensions.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server for developers. A single GET request can return PNG, JPEG, WebP, or PDF. For example, this call requests a PNG screenshot:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options and output configuration. Cookie and consent banners are accepted like a visitor and more than 60 known consent platforms, newsletter popups, and chat widgets can be removed before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status in headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo free: 1,000 screenshots a month, no card required.
Performance, reliability, and cost
Capture time and output size depend on the target page, selected settings, and resulting content. The reviewed ScreenshotMachine documentation does not provide comparative performance or file-size benchmarks for PDF versus PNG, so estimate these from your own target pages and downstream requirements. Full-page captures can cover much more content than a viewport capture; account for that when storing or processing images.
For repeatable results, use the same URL, viewport or paper settings, media choice, wait behavior, and interactions. Dynamic page content can change between captures. If a capture fails or is incomplete, check the page load and rendering preparation before changing output format. Cache and delay options are documented in the relevant API workflows; use them according to the freshness and latency needs of your application.
Costs depend on the provider and account plan. The research material does not establish ScreenshotMachine pricing, and it supports no cost claim that PDF is cheaper than PNG or vice versa. Check the provider’s current account and pricing terms before building a budget. For ScreenshotNeo’s stated plans, 1,000 shots monthly are free with no card; paid options are Starter $5 for 3,000, Growth $15 for 15,000, Pro $39 for 60,000, Scale $99 for 250,000, and Business $249 for 1,000,000. Yearly billing gives two months free, and every feature is on every plan.
Troubleshooting
| Symptom | Likely cause | What to check |
|---|---|---|
| The PDF looks different from the browser | Print media was selected, or the site’s print styles alter the page | Use media=screen for browser-like appearance; compare with print media when printing is the goal. |
| The PDF layout is clipped or awkwardly paginated | Paper size or orientation does not suit the content | Try an appropriate supported size and portrait or landscape; inspect the actual pages. |
| The PNG shows only part of a long page | A viewport-sized capture was requested | Use the screenshot API’s documented full-page dimension value. |
| The page is captured before content appears | Rendering or asynchronous content was not ready | Adjust conversion delay or use supported page preparation interactions. |
| A dialog or page element obscures content | An overlay or sticky element remains visible | Use the documented click or hide selector options when appropriate, then inspect the result. |
| The saved file cannot be opened | The request may have returned an error body, used the wrong workflow, or saved the wrong extension | Check HTTP status and response content, confirm the endpoint and parameters, and save with the matching extension. |
| The page layout differs across runs | Responsive layout or dynamic content changed | Keep viewport/device settings and wait behavior consistent; verify the target page content at capture time. |
FAQ
Is PDF always better for printing?
PDF is the document-oriented option, and its API exposes paper settings and print media. The result still depends on the page’s print styles and chosen settings.
Can I make a full-page PDF?
The supplied documentation describes PDF page settings and separately documents full-page capture for screenshots. It does not establish that the screenshot API’s full-page option applies to PDF.
Does PNG preserve the page as a document?
PNG is an image output. It does not provide the PDF workflow’s paper size, orientation, and page-oriented controls.
Which one is higher quality?
The reviewed sources do not establish a universal quality winner. Choose according to whether your consumer needs a paginated document or an image with pixel dimensions.
