Split PDF
Connector ID: Split Document
Document splitting like extraction of pages may be useful for separating the documents into various portions. This feature of PDF4me is used for faster distribution of, possibly, the relevant information in parts of PDF documents.
- Method: POST
- Endpoint: /api/v2/SplitPdf
Parameters
- File ContentBase64, Required
Map source PDF file content from the previous action
- File Namestring, Required
Name of the file from the source
- splitActionstring, Required
You can select any one splitAction value -
RecurringSplitAfterPage -
Example - I have 21 pages one pdf. I give splitActionNumber value 1, output files will be 21 or splitActionNumber value 4, output files will be 6.SplitAfterPage -
Example - I have 21 pages one pdf. I give splitActionNumber value 1, output files will be 2 or splitActionNumber value 4, output files will be 2.SplitSequence -
Example - I have 21 pages one pdf. I give splitSequence value [1] output files will be 2 , or splitSequence value [1,3,8], output files will be 4.SplitRanges -
Example - I have 21 pages one pdf. I give splitRanges value “1-4”, output files will be 1 or splitRanges value “10-21”, output files will be 1.
- File NamingString, Required
File Naming of PDF file, the input must be in string format.
Output
- splited Documentsarray of object
Splited documents array that contains documents list
- File Namestring
Output file name from the split action
- File ContentBinary
Output file content from the Split action
Header
Content-Type:application/json
Authorization: Please copy key from the link.
Payload
{
"docContent": "Please put PDF base64 content",
"docName": "output.pdf",
"splitAction": "RecurringSplitAfterPage",
"splitActionNumber": 1,
"fileNaming": "NameAsPerOrder"
}
{
"docContent": "Please put PDF base64 content",
"docName": "output.pdf",
"splitAction": "SplitAfterPage",
"splitActionNumber": 1,
"fileNaming": "NameAsPerOrder"
}
{
"docContent": "Please put PDF base64 content",
"docName": "output.pdf",
"splitAction": "SplitSequence",
"splitSequence": [1],
"fileNaming": "NameAsPerOrder"
}
{
"docContent": "Please put PDF base64 content",
"docName": "output.pdf",
"splitAction": "SplitRanges",
"splitRanges": "1-4",
"fileNaming": "NameAsPerOrder"
}
PDF4me api samples
- CSharp(C#)
- Java
- JavaScript
- Python
- Salesforce
- n8n
- Google Script
- AWS Lambda