Get links to output PDF files in the response when running in async mode
By default pdf/split
and other functions like pdf to images returns url
param with the link to .json
file that will contain all links to output files generated.
but you can tell PDF.co to include links to output files right away in the final response. Just add inline
parameter in the very first request and the response from job/check
will contain direct links to output files.
Example:
POST /pdf/split
{
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"pages": "1-2,3-",
"name": "result.pdf",
"inline": true
}
200
{
"url": "https://pdf-temp-files.s3.amazonaws.com/b424c33752284188848c71b4750483a7/result.json",
"name": "result.pdf",
"error": false,
"jobId": "81ff17b3c94b463d9706792c442734c5",
"status": 200,
"credits": 2,
"remainingCredits": 2405069
}
POST /job/check
{
"jobid": "81ff17b3c94b463d9706792c442734c5"
}
200
{
"status": "success",
"message": "Success",
"pageCount": 4,
"url": "https://pdf-temp-files.s3.amazonaws.com/498bb2ee8bd94375be663d59b68b653f/result.json",
"body": [
"https://pdf-temp-files.s3.amazonaws.com/b507fff8bdae424d9b500afb897c281d/result_page1-2.pdf",
"https://pdf-temp-files.s3.amazonaws.com/0a5eacef1aa841b0bd11b0eb63b934d3/result_page3-4.pdf"
],
"jobId": "a5d5f9ebd727402ca316e92014cf9384",
"remainingCredits": 2405049,
"credits": 8
}