Is DocRaptor Free for Testing HTML to PDF?
DocRaptor test PDFs are free and unlimited, but they carry a watermark. Here is how test mode differs from the Free plan and how to try it.
Yes. DocRaptor allows unlimited test documents on all plans when you set test to true. Test PDFs have a watermark, so they are useful for checking rendering and layout but are not clean production files. DocRaptor also documents a sample API key for test-mode requests without an account or credit card. Its Free plan is separate: it lists five non-test documents per month at $0. Test document rules · plan details.
1. What free testing includes
Test mode is for development and evaluation. DocRaptor says test documents do not count against plan limits, and the allowance is unlimited across plans. For PDF output, the trade-off is a watermark.
- Unlimited test PDFs: Use
test: true; test documents are excluded from the plan quota. - Watermarked output: Inspect page breaks, typography, CSS, and rendering, but do not use test PDFs as final deliverables.
- No-account trial: DocRaptor documents an example API key for requests made in test mode. This is distinct from creating a Free plan account.
- Hosted test documents: The documented hosted-test delivery limit is five downloads, with a one-day expiry.
- Excel is different: Test Excel files are truncated after 20 rows; that limit does not apply to PDF tests.
These are DocRaptor-documented service rules, not independent performance measurements. See the official test documents documentation.
2. Try a test PDF with cURL
The API accepts HTML/XML through document_content or a reachable URL through document_url. This minimal request sends HTML directly, which is convenient for a self-contained local experiment. The example uses the documented sample key; use your own API key if you have one.
curl https://docraptor.com/docs \
--user YOUR_API_KEY: \
--header "Content-Type: application/json" \
--data '{
"test": true,
"document_type": "pdf",
"document_content": "<html><body><h1>Test PDF</h1><p>Check layout here.</p></body></html>"
}' \
--output test.pdf
For an account-free trial, substitute DocRaptor’s documented example key for YOUR_API_KEY and keep test set to true. Confirm the current sample key and request format in DocRaptor’s no-account testing guide and API reference. Treat the response as a test artifact and check it for the watermark.
3. Runnable Python example
This uses Python’s standard library, so it has no package installation step. Basic authentication sends the API key as the username and an empty password.
import base64
import json
import urllib.request
api_key = "YOUR_API_KEY" # Or DocRaptor's documented sample key for test mode
payload = {
"test": True,
"document_type": "pdf",
"document_content": "<html><body><h1>Test PDF</h1><p>Check layout here.</p></body></html>",
}
credentials = base64.b64encode(f"{api_key}:".encode()).decode()
request = urllib.request.Request(
"https://docraptor.com/docs",
data=json.dumps(payload).encode(),
headers={
"Content-Type": "application/json",
"Authorization": f"Basic {credentials}",
},
method="POST",
)
with urllib.request.urlopen(request, timeout=90) as response:
pdf = response.read()
with open("test.pdf", "wb") as output:
output.write(pdf)
print(f"Saved {len(pdf)} bytes to test.pdf")
4. Runnable Node.js example
Node.js 18 or later includes fetch. This example uses built-in modules only and writes the returned bytes to test.pdf.
import { writeFile } from "node:fs/promises";
const apiKey = process.env.DOCRAPTOR_API_KEY || "YOUR_API_KEY";
const credentials = Buffer.from(`${apiKey}:`).toString("base64");
const payload = {
test: true,
document_type: "pdf",
document_content: "<html><body><h1>Test PDF</h1><p>Check layout here.</p></body></html>",
};
const response = await fetch("https://docraptor.com/docs", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Basic ${credentials}`,
},
body: JSON.stringify(payload),
});
if (!response.ok) {
throw new Error(`DocRaptor returned HTTP ${response.status}: ${await response.text()}`);
}
await writeFile("test.pdf", Buffer.from(await response.arrayBuffer()));
console.log("Saved test.pdf");
For production code, store credentials in environment variables or a secret manager, check the HTTP status before treating the body as a PDF, and use a timeout suitable for the size and complexity of your documents.
5. Send a URL or HTML content?
| Input method | Use it when | Things to check |
|---|---|---|
document_content |
You are rendering a local template or want a small, reproducible test. | Include or make reachable the CSS, fonts, images, and other resources the document needs. |
document_url |
The document is already hosted and DocRaptor can reach it. | The URL and its external assets must be publicly accessible to DocRaptor; localhost and private network addresses are not reachable by default. |
For a local app, DocRaptor suggests sending the HTML as document_content, embedding assets where practical, or exposing a development server through a temporary tunnel. Avoid putting private production content on a public tunnel. See DocRaptor’s localhost testing guidance.
6. Test mode versus the Free plan
| Option | What it provides | Output and limits |
|---|---|---|
Test mode (test: true) |
Unlimited test documents according to DocRaptor; a documented sample key can be used without an account. | PDFs are watermarked. Hosted test documents have five downloads and expire after one day. |
| Free subscription plan | $0, with five non-test documents per month on the pricing page checked October 3, 2026. | No overage is allowed on the Free plan. Check the live signup page before relying on current quotas. |
The distinction matters: test mode is for iterating on output, while the Free plan’s monthly allowance is for non-test documents. The signup page also listed these paid tiers when checked on October 3, 2026:
| Plan | Listed documents/month | Listed price/month |
|---|---|---|
| Basic | 125 | $15 |
| Professional | 325 | $29 |
| Premium | 1,250 | $75 |
| Max | 5,000 | $149 |
| Bronze | 15,000 | $399 |
| Silver | 40,000 | $1,000 |
| Enterprise | Custom | Custom |
Prices and quotas can change; verify the current plan page when choosing a plan.
7. What to check in a test PDF
- Confirm the document loads with the expected fonts, images, stylesheets, and scripts.
- Review page breaks, margins, headers, footers, and long tables at page boundaries.
- Test the longest realistic content, including long URLs, unbroken strings, and missing optional fields.
- Compare the PDF with the browser layout where exact visual fidelity matters; HTML-to-PDF rendering can have different pagination constraints.
- Keep in mind the watermark is expected in test output. Do not debug it as a template artifact.
8. Common problems and fixes
| Symptom | Likely cause | What to do |
|---|---|---|
| Watermark appears | The request correctly ran in test mode. | Expected behavior. Use a non-test request for a production deliverable, subject to your plan allowance. |
| Test document counts toward usage | The request may have omitted or misspelled the test flag, or sent it in the wrong place. | Send the boolean true in the API request and inspect the request payload. Consult the test-mode documentation. |
| Authentication fails | Incorrect key, malformed Basic authentication, or a sample key used outside test mode. | Check the key and encode key: as Basic credentials. For the documented sample key, use test mode as required. |
| Local URL cannot be fetched | DocRaptor cannot reach your machine’s localhost or private network. | Submit HTML as content, make the URL and its assets reachable, or use a temporary development tunnel. |
| Styles or images are missing | Assets are relative to a local path or are inaccessible to the service. | Use resolvable public asset URLs or embed small assets and CSS into the supplied HTML. |
| PDF is truncated or malformed in your application | The client saved an error response as though it were a PDF, or the transfer was interrupted. | Check HTTP status and response details before writing the file; retry transient network failures with bounded backoff. |
| Hosted test file no longer downloads | It reached the five-download limit or one-day expiry. | Generate a new test document and download it promptly. |
9. Performance, reliability, and cost
The supplied research establishes no independent render-speed, uptime, or load benchmark, so do not infer throughput from the unlimited test allowance. Rendering time depends on the HTML and resources being processed; keep test documents representative, but small while iterating.
- Reliability: Check response status and content before saving. For transient network errors, use a small bounded retry policy with backoff; do not retry authentication or invalid-input errors unchanged.
- Dependencies: Public URLs and external assets must be reachable from DocRaptor. For repeatable tests, inline or version your assets where practical.
- Cost: Test-mode renders are documented as unlimited and excluded from plan limits. Non-test use follows plan quotas; the Free plan lists five monthly documents and permits no overage. Verify current prices and limits before production use.
- Test delivery: Hosted test documents have a one-day expiry and five-download limit, so they are unsuitable as durable artifact storage.
10. Or skip the browser setup
If your task is to capture a web page as a visual image or PDF rather than convert a document template with DocRaptor, ScreenshotNeo is a website screenshot API and MCP server. It is a different workflow from HTML-to-PDF document generation: one GET request takes a URL and returns a PNG, JPEG, WebP, or PDF.
For a PDF capture of a public page, use the ScreenshotNeo API’s PDF output option as described in the API documentation. Here is the basic one-call screenshot request; change the target URL as needed:
curl -G "https://api.screenshotneo.com/v1/shot" \
-d access_key=YOUR_API_KEY \
--data-urlencode url=https://stripe.com \
-o shot.webp
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo removes cookie banners, popups, and chat widgets before the shot. Bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
11. FAQ
Can a test PDF be used as the final customer file?
No. DocRaptor says test PDFs are watermarked. Use a non-test render for a clean deliverable and account for the plan’s document allowance.
Do I need a credit card to try test mode?
DocRaptor documents a sample API key for test-mode requests without an account or credit card. Follow its current instructions.
Does the Free plan mean unlimited PDFs?
No. The unlimited allowance applies to test-mode documents. The listed Free plan separately provides five non-test documents per month.
Can I test a private page on localhost?
Not by giving DocRaptor a localhost URL directly. Send the HTML as content, make the needed resources reachable, or use a temporary tunnel for development.
Does the 20-row test limit affect PDFs?
No. That limit applies to test Excel documents, not PDF output.


