Insert Pages from PDF
Purpose
This API allows you to insert an entire PDF file into another existing PDF at any position based on the specified page number.
HTTP Request URL
https://{zohoapis_domain}/pdfeditor/api/v1/pdf/pages/insert
Body Parameters
Parameter | Data Type | Description |
Mandatory Parameters | ||
original_file
| File or String
| Upload the existing PDF file into which another PDF will be inserted using one of the following methods:
Note: The maximum file size allowed for the input PDF is 50 MB. |
source_file
| File or String
| Upload the source PDF file to be inserted using either of the following methods:
Note: The maximum allowed file size for the source PDF is 50 MB. |
input_options |
| page_number -> Specify the page number at which the source PDF file needs to be inserted. position -> Specify the position at which the source PDF file should be inserted. before – To insert the PDF file before the selected page. |
output_settings | { "name": "<new document name>" } | Specify the name for the modified PDF document. |
Note: To use this API, an OAuth token should be generated with the following scopes; ZohoWriter.pdfEditor.ALL
Sample Request
Copiedcurl --location --request POST "https://www.zohoapis.com/pdfeditor/api/v1/pdf/pages/insert" \
--header "Authorization: Zoho-oauthtoken xxx.yyy.zzz" \
--form 'original_file=@"/Users/username/Documents/Existing.pdf"' \
--form 'source_file=@"/Users/username/Documents/Source.pdf"' \
--form 'input_options=“{\”page_number\”:\”3\",\”position\”:\”after\"}"' \
--form 'output_settings=“{\”name\”:\”ModifiedFile.pdf\"}"'
Once the process begins, you will initially receive the 'status_url'. By invoking the 'status_url', you will be able to monitor the status of the scheduled job.
Sample Response
Copied{
"status_check_url": "https://pdf.zoho.com/pdfeditor/api/v1/pdf/pages/insert/job/f931a01183b33",
"status": "inprogress"
}
Success Response
Copied{
"download_url" : "https://pdf.zoho.com/pdfeditor/api/v1/pdf/pages/insert/download/f931a01183b33",
"status": "success"
}