Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsAuthenticate Html2Pdf.app requests with the X-API-Key HTTP header. Send a JSON POST to https://api.html2pdf.app/v1/generate with an html field, then handle a successful synchronous response as PDF bytes—not as JSON or text. Keep the key in trusted server-side code.
What header and endpoint should you use?
Html2Pdf.app’s official documentation specifies the X-API-Key header and the generation endpoint POST https://api.html2pdf.app/v1/generate. Include Content-Type: application/json and a JSON body containing html. The value can be a publicly accessible URL or raw HTML markup. See the official API documentation for current details.
POST /v1/generate HTTP/1.1
Host: api.html2pdf.app
X-API-Key: YOUR_API_KEY
Content-Type: application/json
{"html":"https://www.example.com"}
Use the exact header name X-API-Key; do not put the key in the JSON body or URL. The service emails the API key after registration, according to its official site.
Where should you store the API key?
Treat the key as a credential. Put it in server-side configuration or an environment variable such as HTML2PDF_API_KEY, and read it from backend code or a trusted job. Do not expose it in browser JavaScript, a public repository, or a client-side template. Html2Pdf.app’s documented Node.js and cURL examples use server-side invocation or an environment variable.
#1 Best Overall
- POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
Make a synchronous request
The following cURL command sends a URL for conversion and writes the successful response body to a PDF file. Set HTML2PDF_API_KEY in the environment before running it.
curl --fail --show-error
--request POST https://api.html2pdf.app/v1/generate
--header 'Content-Type: application/json'
--header "X-API-Key: $HTML2PDF_API_KEY"
--data '{"html":"https://www.example.com"}'
--output document.pdf
For raw markup, put the HTML string in the JSON html value and ensure it is correctly escaped for JSON. POST is the recommended approach. GET is also supported, but query parameters must be URL-encoded; it is a poor fit for raw HTML or long template values.
Rank #2
- POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
- PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
Python example
This example uses the requests package. It checks the HTTP status before saving the response as binary data.
import os
import requests
api_key = os.environ["HTML2PDF_API_KEY"]
response = requests.post(
"https://api.html2pdf.app/v1/generate",
headers={
"X-API-Key": api_key,
"Content-Type": "application/json",
},
json={"html": "https://www.example.com"},
timeout=90,
)
response.raise_for_status()
with open("document.pdf", "wb") as pdf:
pdf.write(response.content)
Node.js example
Use a server-side Node.js process with the key supplied through the environment. The response body is binary PDF data, so convert the response’s ArrayBuffer to a buffer before writing it.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
- PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
import { writeFile } from "node:fs/promises";
const apiKey = process.env.HTML2PDF_API_KEY;
if (!apiKey) throw new Error("Set HTML2PDF_API_KEY first");
const response = await fetch("https://api.html2pdf.app/v1/generate", {
method: "POST",
headers: {
"X-API-Key": apiKey,
"Content-Type": "application/json",
},
body: JSON.stringify({ html: "https://www.example.com" }),
});
if (!response.ok) {
throw new Error(`Html2Pdf.app request failed: HTTP ${response.status}`);
}
await writeFile("document.pdf", Buffer.from(await response.arrayBuffer()));
Handle synchronous and callback responses differently
Synchronous generation
By default, the request stays open while the PDF is generated. On success, the response contains PDF bytes. Check the HTTP status before saving or forwarding the body; do not attempt to parse a successful response as JSON.
Background generation with a callback
To queue work, include callBackUrl in the request and continue sending the API key in the X-API-Key header. The documented initial response is 202 Accepted, meaning the job was queued rather than completed. Html2Pdf.app says it later POSTs the generated document, encoded in the callback payload, to that URL. Verify the current callback payload format and endpoint handling in the official documentation before implementing a receiver.
Rank #4
- POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
Troubleshoot failed requests and unexpected PDFs
- Authentication failure: Confirm that the key is present, current, and sent as
X-API-Keyin the request header. Ensure the server process can read the environment variable; never work around the problem by putting the key in a public URL or browser code. - Unexpected response handling: Inspect the HTTP status first. A successful synchronous response is a binary PDF; a
202 Acceptedin callback mode means queued work, not a ready-to-save PDF. - Blank page or missing styles: If
htmlis a URL, check that the page and its CSS, fonts, and images are publicly reachable. Html2Pdf.app identifies its conversion engine as headless Chromium; media mode, available fonts and resources, and JavaScript load timing can affect rendering. - Output differs from browser view: Test representative pages and account for CSS media mode, resource availability, and when page JavaScript finishes loading. These are rendering issues, separate from API-key authentication.
- GET behaves incorrectly: URL-encode query parameters. Prefer POST for raw HTML or long template values, as the service recommends.
Or skip the browser setup
If the task is capturing a website screenshot rather than generating a PDF through Html2Pdf.app, ScreenshotNeo offers a one-request screenshot API. Its endpoint returns an image or PDF; for a screenshot, save the response as an image file:
Quick Recap
Best Value
- Security Key : Protect your online accounts against unauthorized access by using FIDO2 and U2F authentication with T110. It's the world's most protective security key that works with windows, Mac OS, Linux as well as Chrome, Firefox, Edge and many other major browsers.
- Certified with the new FIDO2 standard, T110 provides the benefit of fast login and strong protection against phishing, account takeover as well as many other online attactks.
- Works with : Bank of America, Github, Google, Microsoft, DUO, Twitter, Facebook, Dropbox, Apple, ebay, BINANCE, mor and more.
- Fits USB-A port : Insert the T110 security key into the USB-A port of each service and log in conveniently with one touch
- For the driver download and user guide, please visit TrustKey Solutions Home support page.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://www.example.com -o shot.webp
See the ScreenshotNeo documentation for request options. Cookie banners are accepted and removed before capture, along with known newsletter popups and chat widgets. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. An MCP server lets AI agents use screenshot tools. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.
Recommended Free Tools
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




