Bursting allows you to explode the PDF into all the individual pages and run them all in parallel on Blitline’s massive image processing cloud. This allows HUGE PDF’s to be processed in a fraction of the time it would take to do it on your own machine or in a linear fashion.
Here is what happens behind the scenes:
Blitline downloads the src pdf
Blitline breaks the PDF into individual pages, and uploads these pages to a temp storage location
Blitline automatically creates a new “job” copying over the functions and data you have specified in the “burst_job”, for each page of the PDF, automatically renaming the output files to have a “__X” suffix (THAT IS 2 UNDERSCORES, NOT 1). Where X refers to page number.
Blitline will track the jobs and when they are all completed will issue a “postback” to your postback_url or put the item in the long polling cache.
How to submit a PDF for bursting?
To tell Blitline that you wish to burst a PDF, you must set the src_type to “burst_pdf”.
An example job would look like this:
The resulting RESPONSE will look like this:
Notice there is a group_completion_job_id, which is a “virtual job_id” indicating the completion of the group of jobs. You can poll this group_completion_job_id just as you would a regular job. It will also be the job_id of the postback when ALL the individual jobs are completed.
When outputting the PDF files, Blitline will automatically append two underscores (“__”) and a page number to the filename. When you specify an s3_destination, Blitline will automatically output to your key + “__” + (page number). This is a canonical format that Blitline uses.