apyhub
FILE CONVERSION

Advanced Webpage to PDF API

What it does

PDF from URL turns a web page into a PDF file from a single request. Send the page URL in the body, and get back a binary PDF you can store, email, or attach to a workflow.

Use it when you need a consistent snapshot of a page for reporting, archiving, invoicing, or customer-facing exports. The request supports common rendering controls: landscape orientation, page size, margins, header HTML, footer HTML, and whether background graphics are printed. Page size defaults to A4, margins default to 10mm on each side, and background printing is enabled by default.

Because the output is a PDF binary, it fits cleanly into document pipelines without extra parsing. You can generate receipts from order pages, capture articles for review, or create printable versions of internal dashboards and web reports.

If you need page-level control over layout, PDF from URL gives you the basic options you expect without exposing unnecessary complexity.

POST
PDF from URL
https://api.eu.apyverse.com/chisleroff/pdf-from-url

QUICKSTART

GUIDE

Quickstart

Convert a web page into a PDF by sending its URL.

curl -X POST "https://api.eu.apyverse.com/chisleroff/pdf-from-url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

What you'll get back

Returns a binary file response containing the generated PDF.

``
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
URL of the web page to convert to PDF (http/https only).
Page orientation: true for landscape, false for portrait.
Page size: A4, Letter, Legal, A3, Tabloid.
Top margin with CSS units, e.g. 10mm.
Custom footer HTML, supports pageNumber/totalPages spans.
Custom header HTML, supports pageNumber/totalPages spans.
Left margin with CSS units.
Right margin with CSS units.
Bottom margin with CSS units.
Print background graphics.

About this endpoint

What it does

Converts a web page at the given URL into a PDF file. The request body controls page orientation, paper size, margins, and optional custom header/footer HTML, and the response is the generated PDF as binary data.

Request Body

ParameterTypeMandatoryDescription
urlStringYesURL of the web page to convert to PDF. Must be an http/https URI.
landscapeBooleanNoPage orientation. true for landscape, false for portrait. Default: false.
page_sizeStringNoPage size. Default: A4. Allowed values: A4, Letter, Legal, A3, Tabloid.
margin_topStringNoTop margin with CSS units. Default: 10mm.
footer_htmlStringNoCustom footer HTML. Supports pageNumber and totalPages spans.
header_htmlStringNoCustom header HTML. Supports pageNumber and totalPages spans.
margin_leftStringNoLeft margin with CSS units. Default: 10mm.
margin_rightStringNoRight margin with CSS units. Default: 10mm.
margin_bottomStringNoBottom margin with CSS units. Default: 10mm.
print_backgroundBooleanNoPrint background graphics. Default: true.

Response

Returns a binary string containing the generated PDF file.

AttributeTypeMandatoryDescription
binaryStringYesThe generated PDF document returned as binary data.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.