Convert multiple HTML documents to PDFs in a single request. Process up to 20 PDFs at once, with optional merging into a single file.
Batch HTML to PDF allows you to convert up to 20 HTML documents into PDFs in a single API call.
You can also merge all generated PDFs into a single file.
By default, the request waits for all PDFs to be generated before returning a response (synchronous behavior). If the batch takes longer than 30 seconds, it will return a 202 Accepted response with a status URL to poll.
{ "batchRequestId": "pdfnoodle_batch_123456789", "statusUrl": "https://api.pdfnoodle.com/v1/pdf/batch/status/pdfnoodle_batch_123456789", "message": "Batch couldn't complete within 30 seconds. Check the batch status URL for progress."}
The status field indicates the overall outcome of the batch:
SUCCESS - All PDFs were generated successfully
PARTIAL_SUCCESS - Some PDFs were generated, but at least one failed
The path, including subdirectories and the filename without extension, to use
when saving the render in your S3 bucket. (only available if being stored in
custom s3_bucket)
If true, all successfully generated PDFs will be merged into a single file.
The merged file URL will be available in the mergedUrl field of the response.
Cannot be used when any item has convertToImage set to true.
The request body is limited to 3MB. Since batch requests contain multiple items with raw HTML content, this limit can be reached quickly when sending many items with large HTML documents.If your request exceeds this limit, you’ll receive a 413 status code with the following error:
{ "message": "request entity too large"}
If you’re hitting the 3MB payload limit, consider splitting your batch into
multiple smaller requests. For example, instead of sending 20 items in a single
request, send two requests with 10 items each.
You can check the status of your batch at any time using the Get Batch PDF Status endpoint with the batchRequestId.To check the status of an individual PDF within the batch, use the Get PDF Status endpoint with the individual requestId from the results.