Convert any web page to a high-quality PDF using the SnapAPI /v1/pdf endpoint. Choose paper format, margins, orientation, and background colors.
curl "https://snapapi.tech/v1/pdf?url=https://example.com&api_key=YOUR_KEY&format=A4" -o page.pdfimport requests
response = requests.get("https://snapapi.tech/v1/pdf", params={
"url": "https://example.com",
"api_key": "YOUR_KEY",
"format": "A4",
"print_background": "true"
})
with open("page.pdf", "wb") as f:
f.write(response.content)
print("PDF saved!")const res = await fetch(
"https://snapapi.tech/v1/pdf?" + new URLSearchParams({
url: "https://example.com",
api_key: "YOUR_KEY",
format: "A4",
print_background: "true"
})
);
require("fs").writeFileSync("page.pdf", Buffer.from(await res.arrayBuffer()));