GET/api/v1/screenshot

PDF Options

Render any URL or HTML as a PDF with full control over paper size, orientation, margins, and print-media CSS.

Set format=pdf to render as a PDF document. All standard parameters (viewport, wait, custom CSS, etc.) still apply.

Parameters

NameTypeRequiredDescription
formatstringrequiredMust be pdf.
pdf_paper_formatstringoptionalPaper size: A0, A1, A2, A3, A4 (default), A5, A6, Letter, Legal, Tabloid.
pdf_landscapebooleanoptionalLandscape orientation. Default: false.
pdf_print_backgroundbooleanoptionalPrint background graphics and colors. Default: true.
pdf_fit_one_pagebooleanoptionalScale content to fit on a single page. Default: false.
pdf_marginstringoptionalShorthand for all four margins (CSS units, e.g. 1cm). Overridden by individual margin params.
pdf_margin_topstringoptionalTop margin (CSS units). Max 50 chars.
pdf_margin_rightstringoptionalRight margin.
pdf_margin_bottomstringoptionalBottom margin.
pdf_margin_leftstringoptionalLeft margin.

Code Examples

# A4 PDF with print styles and 1cm margins
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&format=pdf&pdf_paper_format=A4&media_type=print&pdf_margin=1cm" \
  --output page.pdf

# Letter landscape, fit to one page
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&format=pdf&pdf_paper_format=Letter&pdf_landscape=true&pdf_fit_one_page=true" \
  --output wide.pdf

Response

(Raw PDF bytes, Content-Type: application/pdf)