DocRaptor defines HTTP 422 as an input-document syntax error: “This error means your input document has syntax errors and DocRaptor can not process it as expected.” Start by checking the exact HTML or XML sent to DocRaptor and the error details in its response; a 422 is not, by itself, an API-key or concurrency error.
What DocRaptor 422 means
DocRaptor’s HTTP Status Codes documentation describes 422 as a syntax problem in the input document. The submitted HTML or XML may be malformed or otherwise contain syntax DocRaptor cannot process. Diagnose the document actually submitted—not only a local copy or a browser preview.
Distinguish 422 from nearby statuses: DocRaptor documents 400 for a bad request, 401 for an incorrect API key, and 403 for permission problems or too many simultaneous generation requests. If the response is confirmed as 422, investigate the document first; use the status and response details to identify any separate request or access issue.
Find the error details first
When synchronous generation fails, DocRaptor may return an XML error message instead of the expected document bytes. For asynchronous jobs, inspect the job’s status response and any validation details. DocRaptor explains these response patterns in its API overview.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →#1 Best Overall
- Record the HTTP status and preserve the complete response body or asynchronous job details.
- Compare the precise submitted HTML or XML with the version you intended to send, including any server-side template output.
- Validate that exact payload and use the returned error detail to narrow down the offending markup or input.
- Make one change at a time and retry with the same input and settings so you can tell whether the fix addressed the failure.
Check document syntax and request status
Inspect the generated input
Templates can produce different markup from what you see in a source file. Capture or log the final HTML or XML sent to DocRaptor, then check its structure, tags, attributes, and text for malformed syntax. If you submit a document URL rather than markup directly, inspect the content DocRaptor receives at that URL and confirm it is the intended document.
Do not treat every status as a 422 fix
Authentication, permissions, and request validity are separate checks. A 401 calls for checking the API key; a 403 calls for checking permissions or simultaneous generation requests; and a 400 indicates a bad request. Follow the response actually returned rather than applying those fixes to a confirmed 422.
Rank #2
Check rendering settings when the failure is unexpected
Rendering settings can explain incorrect output and may be relevant when diagnosing a conversion, but they are not a universal explanation for 422. DocRaptor uses print media by default. If the document is intended to render with screen styles, try setting prince_options[media] = screen. DocRaptor identifies choosing print when screen was intended as its most common issue when a document looks incorrect; this is a layout check, not a blanket 422 remedy. See the API documentation.
Check JavaScript and external resources
Script-dependent pages
JavaScript is disabled by default. If a framework or chart needs scripts to produce the document content, enable JavaScript in the request configuration. For asynchronous rendering, signal completion with docraptorJavaScriptFinished() so conversion can wait for the page’s work to finish. DocRaptor’s API documentation covers these settings.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallRank #3
- hole punched
- high quality card stock
- 4 pages
- made in USA
- keyboard shortcuts
URLs, encoding, and charts
- Use absolute URLs for external resources, or configure a base URL so relative references resolve correctly.
- Specify UTF-8 where needed to avoid encoding problems.
- Disable chart animation when it prevents a chart from reaching its final rendered state before capture.
Remote resource failures
DocRaptor says resource-download errors are ignored by default in many configurations. They can fail generation if ignore_resource_errors is disabled. In that case, investigate the specific failure reported for a resource: possible causes include HTTP 400 or 500 responses, DNS failures, unknown MIME types, timeouts, SSL problems, and rejected connections. Do not assume a missing external asset caused the 422 unless the response or configuration points to it. See the API documentation.
Troubleshoot by symptom
| Observed result | What to check | Next step |
|---|---|---|
| Confirmed 422 | The exact submitted HTML or XML and returned error details | Correct the input syntax indicated by the response and retry. |
| Expected PDF bytes are replaced by XML | The synchronous generation error body | Read and preserve the XML error details rather than treating the body as a PDF. |
| Asynchronous job fails validation | The job status response and validation details | Use the reported detail to inspect the submitted document. |
| Output looks different from a browser | Print versus screen media and document styles | If screen styling is intended, try prince_options[media] = screen. |
| Script-generated content is absent or incomplete | JavaScript setting, completion signaling, and chart animation | Enable JavaScript if required and signal asynchronous completion with docraptorJavaScriptFinished(). |
| External assets fail and generation stops | Resource URL and ignore_resource_errors configuration |
Resolve the specific asset failure or review whether resource errors should be ignored. |
| 401, 403, or 400 rather than 422 | API key, permissions or concurrency, or request validity, respectively | Follow the documented cause for the returned status. |
When to contact DocRaptor support
If the returned details do not identify a fix, DocRaptor’s dashboard Help Request can share the document input, output, and logs with support. Its support page also lists email and live chat. Include the exact status, response or asynchronous validation detail, and the input associated with the failed job.
Rank #4
Or skip the browser setup
If your goal is to capture a web page as an image or PDF rather than debug a DocRaptor conversion, ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. For example, save a screenshot of a URL with cURL:
Quick Recap
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for request options. ScreenshotNeo accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers indicating the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.
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.




