When generating PDFs that utilize any CSS, image, or JavaScript files, there are a number of things that will speed up the slowest part of PDF generation: asset requests. Any of these techniques will usually help speed up document generation.

  1. Eliminate all external assets by inlining CSS and JavaScript and embedding images as base64 encoded data URIs
  2. Reduce asset size. 500MB of input takes more time to transmit and process than 500KB. This extends to removing unnused assets from your document.
  3. Disable JavaScript processing if it is unnecessary. This is an additional step in our pipeline and disabling can save a small amount of time as the servers do not have to do a special processing and storage step.
  4. Remove the test flag. Production documents take priority in our background processing system and remove the processing time for inserting the test watermark.
  5. Host your assets in the U.S. We are hosted in AWS East, and proximity improves speed

If you are making PDFs synchronously and these techniques still don't get your document within the synchronous time limit, please consider using our asynchronous document generation option.

Did this answer your question?