Use case
Use it when your product needs scheduled webpage snapshots, customer page exports, or PDF evidence from public URLs.
PDF Tools API
Capture public webpages as PDF from backend jobs, monitoring systems, or customer-facing export flows.
Credits
1 Credit / call
1 Credit per successful API request. Failed processing attempts are refunded automatically.
Pricing
1,000 Credits = $1
Every signed-in user receives 100 free API Credits each month.
Endpoint
/api/external/webpage-to-pdf/pdfUse your API Key in the x-api-key header.
Use it when your product needs scheduled webpage snapshots, customer page exports, or PDF evidence from public URLs.
curl -X POST https://itextmaster.com/api/external/webpage-to-pdf/pdf \
-H 'x-api-key: YOUR_API_KEY' \
-F 'url=https://example.com/report' \
-F 'pageSize=A4' \
-F 'waitDelay=2' \
--output webpage.pdfcurl -X POST https://itextmaster.com/api/external/webpage-to-pdf/pdf \
-H 'x-api-key: YOUR_API_KEY' \
-F 'url=https://example.com/report' \
-F 'pageSize=A4' \
-F 'waitDelay=2' \
--output webpage.pdfcurl -X POST https://itextmaster.com/api/external/webpage-to-pdf/pdf \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"url": "https://example.com/report",
"pageSize": "A4",
"waitDelay": 2
}' \
--output webpage.pdfimport { writeFile } from 'node:fs/promises';
const response = await fetch('https://itextmaster.com/api/external/webpage-to-pdf/pdf', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.ITEXTMASTER_API_KEY
},
body: JSON.stringify({
url: 'https://example.com/report',
pageSize: 'A4',
waitDelay: 2
})
});
if (!response.ok) {
throw new Error(await response.text());
}
await writeFile('webpage.pdf', Buffer.from(await response.arrayBuffer()));import os
import requests
response = requests.post(
'https://itextmaster.com/api/external/webpage-to-pdf/pdf',
headers={
'Content-Type': 'application/json',
'x-api-key': os.environ['ITEXTMASTER_API_KEY'],
},
json={
'url': 'https://example.com/report',
'pageSize': 'A4',
'waitDelay': 2,
},
)
response.raise_for_status()
with open('webpage.pdf', 'wb') as f:
f.write(response.content)invalid_payloadThe JSON or multipart payload is missing required HTML or URL input.
invalid_api_keyThe x-api-key header is missing, invalid, or has been rotated.
insufficient_creditsThe account does not have enough API Credits for the request.
conversion_failedThe server-side rendering service could not complete the conversion. Failed processing attempts are refunded automatically.
webpage.pdf with Credits response headers.
Content-TypeContent-DispositionX-Credits-ChargedX-Credit-BalanceEach successful Webpage to PDF API request uses 1 Credit. 1,000 Credits cost $1, and every signed-in user receives 100 free API Credits each month.
Failed processing attempts are refunded automatically, and the API returns an error response you can log or retry.
No. Keep API Keys server-side and call the endpoint from your backend, queue, or automation job when you need to convert webpages to PDF.
Create an API Key, test Webpage to PDF API, and buy more Credits only when automation volume grows.