ScreenshotNeo

BlogHTML to image & PDF

DocRaptor for Bulk PDF Generation: Limits and Best Practices

Plan bulk DocRaptor PDF jobs around its documented time and concurrency limits. Choose sync or async, reduce rendering delays, and control quota exposure.

By the ScreenshotNeo team4 October 20269 min read

DocRaptor documents a default limit of 30 simultaneous requests, a 60-second generation window for synchronous requests, and a 600-second window for asynchronous jobs. It does not set hard limits on page count, document complexity, input size, or output size for ordinary generated documents; hosted documents have a separate 100 MB output limit. Monthly document volume depends on the plan. These figures come from DocRaptor’s documentation, accessed October 3, 2026; check the live limits and plan terms before sizing a production workload. DocRaptor API limits.

For a bulk workload, submit jobs asynchronously when rendering may exceed a minute, cap your own parallel submissions at or below the account’s confirmed concurrency, and collect completion through polling or callbacks. DocRaptor does not publish a universal requests-per-minute limit, queue guarantee, or PDFs-per-minute benchmark in the reviewed documentation, so capacity must be measured with representative documents in the intended account.

1. Understand the limits before estimating capacity

Limit or behavior Documented value Operational meaning
Synchronous generation window 1 minute by default The request waits for PDF bytes. Use only when the document consistently completes within the window.
Asynchronous generation window 10 minutes The create request returns a status ID; retrieve completion separately.
Simultaneous requests 30 by default Treat this as an account limit to confirm. DocRaptor says it often raises the limit for larger customers.
Pages, complexity, input and output size No hard limits documented for ordinary documents This does not mean a job cannot time out or be slow. Rendering time, assets, and plan volume still matter.
Hosted document output 100 MB Hosted output has separate limits and is a paid add-on.
Monthly document volume Plan-defined Check included quota and current overage terms for the account.

The published simultaneous-request figure is not a throughput promise. Thirty requests in flight do not establish how many PDFs finish per minute: document size, scripts, external resources, and rendering complexity all affect completion. The documentation reviewed does not give a general requests-per-minute limit or bulk queue guarantee.

2. Choose synchronous or asynchronous generation

Synchronous requests

Use synchronous generation when a PDF reliably finishes within the default 60-second window and the caller can hold the request open. On success, the response contains the PDF. A long-running request can exceed the generation window, so do not use synchronous calls as a bulk queue for unpredictable documents.

Asynchronous jobs

Set async to true for longer or variable rendering. The creation response supplies a status_id rather than the final PDF. Poll the authenticated status endpoint or configure a callback URL. The documented async window is 10 minutes. Async provides more time and a different response workflow; it does not remove the concurrency limit or promise a completion rate. See DocRaptor’s async creation guide and API reference.

3. Runnable request examples

These examples use DocRaptor’s HTTP API with a placeholder API key. Replace the HTML with the document or supported document input your integration uses. Keep credentials outside source control. For async work, store the returned status ID and follow the documented status endpoint workflow.

cURL: synchronous PDF response

curl -u YOUR_API_KEY: \
  -H 'Content-Type: application/json' \
  -d '{"document_content":"<h1>Invoice 1001</h1>","name":"invoice-1001.pdf","document_type":"pdf"}' \
  https://api.docraptor.com/docs \
  -o invoice-1001.pdf

Python: asynchronous submission

import os
import requests

api_key = os.environ["DOCRAPTOR_API_KEY"]
response = requests.post(
    "https://api.docraptor.com/docs",
    auth=(api_key, ""),
    json={
        "document_content": "<h1>Invoice 1001</h1>",
        "name": "invoice-1001.pdf",
        "document_type": "pdf",
        "async": True,
    },
    timeout=30,
)
response.raise_for_status()
job = response.json()
print("status_id:", job["status_id"])
# Persist this ID, then poll the authenticated status endpoint
# or receive the configured callback. Handle failed status explicitly.

Node.js: asynchronous submission

const apiKey = process.env.DOCRAPTOR_API_KEY;
if (!apiKey) throw new Error("Set DOCRAPTOR_API_KEY");

const response = await fetch("https://api.docraptor.com/docs", {
  method: "POST",
  headers: {
    "Authorization": "Basic " + Buffer.from(`${apiKey}:`).toString("base64"),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    document_content: "<h1>Invoice 1001</h1>",
    name: "invoice-1001.pdf",
    document_type: "pdf",
    async: true,
  }),
});
if (!response.ok) {
  throw new Error(`DocRaptor returned ${response.status}: ${await response.text()}`);
}
const job = await response.json();
console.log("status_id:", job.status_id);
// Persist the ID and collect completion through polling or a callback.

The API reference documents supported parameters and response details; verify the exact request and status response fields against the current reference before deploying. A network timeout from your client is not proof that DocRaptor stopped the job: retain identifiers when returned and make your own completion handling idempotent.

4. Structure a reliable bulk workflow

  1. Prepare jobs independently. Create one document payload per intended output and assign an application-level identifier so a retry or callback can be matched to its source record.
  2. Submit with a concurrency cap. Confirm the account’s simultaneous-request limit. Start at or below that number, and leave headroom for other application traffic.
  3. Persist each async status ID. Store it with the source job before moving on, so process restarts do not lose track of submitted work.
  4. Collect completion explicitly. Poll the authenticated status endpoint or register a callback. Treat callback delivery as a completion signal to process idempotently, not as a substitute for error handling.
  5. Handle failure as a first-class state. DocRaptor says a generation error does not invoke the success callback. Add a path for detecting and recording failed jobs rather than assuming that no callback means success.
  6. Retry selectively. Retry only errors you classify as transient, with a bounded backoff policy chosen for your application. The reviewed DocRaptor sources do not prescribe a retry schedule. Avoid duplicating user-visible outputs when a job may already have completed.
  7. Reconcile the batch. Compare submitted, completed, and failed jobs against the original batch and alert on jobs that remain unresolved beyond your application’s expected window.

Callbacks and polling are both documented options. Polling is straightforward when the batch size is modest and you can maintain a status worker. Callbacks can avoid repeated status requests but require a reachable endpoint and safe duplicate-event handling. A hybrid reconciliation process can catch missed or delayed application events; this is implementation guidance, not a DocRaptor guarantee.

5. Reduce avoidable rendering work

DocRaptor identifies fetching CSS, images, and JavaScript as a slow part of PDF generation and recommends reducing external asset work. These changes are workload-dependent; measure representative templates before and after each change. See DocRaptor’s asset performance guide.

  • Inline CSS and JavaScript where practical to reduce external fetches.
  • Embed images as data URIs when appropriate, and reduce image dimensions and file size.
  • Remove unused styles, scripts, fonts, and images from the document.
  • Disable JavaScript processing when the document does not need it.
  • For production, remove the test flag; test output is intended for testing and is watermarked.
  • DocRaptor recommends U.S.-hosted assets because its service runs in AWS East. Consider asset location when external fetch latency is material.
  • If an asset host rate-limits parallel requests, the API reference documents prince_options[no_parallel_downloads] as a control to consider.

The API reference documents a 10-second default external-resource timeout, configurable up to 60 seconds. This is an asset-fetch setting, not a general PDF generation timeout. Increasing it can help slow resources load, but can also make a document wait longer on a stalled asset. Set it based on the assets you control and test failure behavior.

6. Plan volume, overages, and hosted output

Monthly document allowances depend on the plan. DocRaptor’s overage documentation describes plan-specific charges, but monetary rates can change; check the current overage terms and plan details before forecasting spend. Do not use an old rate as a durable estimate.

The API reference describes test documents as unlimited and not counted toward monthly limits, with watermarked test PDFs and special restrictions for hosted test documents. Confirm the current plan terms before relying on that behavior for development or staging.

Hosted documents are a paid add-on and have their own output-size and billing behavior. The documented hosted output limit is 100 MB. The API supports download and expiration controls; use them according to the intended access duration and your application’s exposure requirements. Consult the API reference for current parameters.

7. Test capacity without inventing a throughput target

Because DocRaptor does not publish a universal PDFs-per-minute benchmark or queue-latency SLA in the reviewed material, estimate capacity empirically for your account:

  1. Select representative templates, including the largest and most asset-heavy documents.
  2. Run a controlled batch at a low concurrency, recording submission time, completion time, failures, and output size.
  3. Increase concurrency gradually while staying within the account limit confirmed with DocRaptor.
  4. Repeat with realistic asset locations, scripts, page counts, and peak application traffic.
  5. Choose a production cap that leaves room for latency variation and other users of the account.
  6. Revisit the estimate when templates, assets, account limits, or pipeline versions change.

Simple documents may take seconds while complex documents with scripts or external resources may take several minutes, according to DocRaptor’s qualitative guidance. These are not workload-specific estimates. Do not extrapolate a completion promise from them.

8. Pipeline and rendering compatibility

The API reference accessed October 3, 2026 lists pipeline 10.1 as the default and maps it to Prince 15.1 and JavaScript engine 2. It also lists earlier pipeline versions. Rendering can change when the pipeline changes, so test the candidate pipeline with representative documents before changing a production dashboard default. The documentation recommends testing a newer pipeline through the request parameter first. Recheck version availability and mappings before publication or deployment.

9. Troubleshooting

Symptom Likely cause What to do
Synchronous request times out or exceeds its window Rendering took longer than the default 60 seconds Use async for jobs that may run longer; reduce asset work and test the actual template.
Async job has no success callback Generation failed, or callback handling did not complete Do not mark it successful by absence. Check status using the documented authenticated endpoint and record failure explicitly.
Jobs wait or fail when many are submitted together Submission concurrency exceeds the account’s simultaneous-request allowance Cap in-flight requests and confirm whether the account has a higher limit.
Rendering is slow despite a small HTML payload External CSS, images, fonts, or scripts may require slow fetches or processing Inline or embed appropriate assets, trim unused resources, and inspect asset response times.
An image or stylesheet is missing Remote resource is unreachable, slow, or blocked by its host Verify the resource URL and access from the rendering service; reduce dependence on remote assets or adjust the external resource timeout where justified.
Output exceeds hosted-document constraints Hosted documents have a separate 100 MB output limit Reduce output size or use a non-hosted delivery design; confirm current hosted-document terms.
Rendered PDF differs after a pipeline change Renderer or JavaScript engine behavior changed Compare representative output using the request-level pipeline option before switching the production default.
Unexpected monthly charges Plan quota was exceeded or hosted-document charges applied Review current plan and overage terms, track document counts, and account for hosted output separately.

10. Or skip the browser setup

If the output you need is a page screenshot rather than a generated PDF, ScreenshotNeo is a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP, or PDF. The call below saves a screenshot of Stripe as WebP; replace the URL with your target. See the ScreenshotNeo API documentation for options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers report page verdict and billing. Its MCP server lets AI agents using Claude, Cursor, or another MCP client take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. It is for capturing webpages as images or PDFs, not a replacement for HTML-to-PDF document generation from your own templates. Create a free ScreenshotNeo account.

FAQ

How many PDFs can DocRaptor generate at once?

The published default is 30 simultaneous requests, subject to account-specific increases. The documentation does not state a universal number of PDFs per minute.

Does async remove the concurrency limit?

No. Async extends the documented generation window to 10 minutes and returns a status ID for later completion handling. The default simultaneous-request limit still needs to be considered.

Are there hard limits on ordinary PDF page count or file size?

DocRaptor says it does not impose hard limits on pages, complexity, input size, or output size except for hosted documents. A job can still take too long or depend on slow assets.

What is the default rendering pipeline?

The API reference accessed October 3, 2026 identifies pipeline 10.1 as the default, mapped to Prince 15.1 and JavaScript engine 2. Confirm the live reference before depending on that mapping.