---
title: Advanced Webpage to PDF API
slug: pdf-from-url
url: https://apyhub.com/chisleroff/service/pdf-from-url
provider: Website Intelligence
categories: [File Conversion, Smart Generation]
tags: [pdf-conversion, html-to-pdf, web-to-pdf, document-generation, file-conversion]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 1
atoms: 100
alias: chisleroff-advanced-webpage-to-pdf-api
---

# Advanced Webpage to PDF API

Convert any http or https page into a PDF binary. Set page size, margins, headers, footers, and background printing for archive-ready output.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/chisleroff/pdf-from-url` | What it does Converts a web page at a given URL into a PDF file. The request body lets you control… | 100 |

## Endpoint reference

### PDF from URL

`POST https://api.eu.apyhub.com/chisleroff/pdf-from-url` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | body | string (uri) | yes | URL of the web page to convert to PDF (http/https only). |
| `landscape` | body | boolean | no | Page orientation: true for landscape, false for portrait. Default: `false`. |
| `page_size` | body | string | no | Page size: A4, Letter, Legal, A3, Tabloid. Default: `A4`. |
| `margin_top` | body | string | no | Top margin with CSS units, e.g. 10mm. Default: `10mm`. |
| `footer_html` | body | string | no | Custom footer HTML, supports pageNumber/totalPages spans. |
| `header_html` | body | string | no | Custom header HTML, supports pageNumber/totalPages spans. |
| `margin_left` | body | string | no | Left margin with CSS units. Default: `10mm`. |
| `margin_right` | body | string | no | Right margin with CSS units. Default: `10mm`. |
| `margin_bottom` | body | string | no | Bottom margin with CSS units. Default: `10mm`. |
| `print_background` | body | boolean | no | Print background graphics. Default: `true`. |

#### Quickstart

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

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

#### What you'll get back

Returns a binary PDF file, which is the generated PDF content.

## About

## What it does
PDF from URL turns a web page URL into a PDF file. Send an http or https page address and receive a binary PDF in return, ready to store, download, or attach to a workflow.

Use it when you need a printable snapshot of live web content: invoices rendered from a customer portal, archived copies of articles, internal documentation exports, or reports generated from dashboard pages. The request body accepts a required `url` plus layout options like `landscape`, `page_size`, margins, `print_background`, and optional `header_html` and `footer_html` for page numbering or custom branding.

The output is a PDF binary, so it fits cleanly into document pipelines and file-handling jobs. If your application needs to capture exactly what a browser renders without building your own print flow, this endpoint gives you a direct conversion path from URL to PDF.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/chisleroff/service/pdf-from-url
