Hi,
I am new to PI. Hence kindly excuse me for any ignorance / mistakes.
My requirement is :
To pick a pdf file from a file server location, split it into multiple pdf files and place it in the Target file server location. Splitting of PDF is per page. i.e. if the PDF input file has 4 pages, then i need to create 4 PDF files for each page and place these files in the target location.
Would like to know if this is something acheivable in PI?
I have tried the below approach:
Custom Module Development
Pik up the pdf file from file location using file adapter, read it, get the number of pages, loop in for each page and create a pdf attachment, considering i will write a custom code to get the attachments at the receiver end.
I am able to create 4 pdf attachments along with the main payload but PDF file is not opening.
attachment.setContentType("application/pdf");
Also would like to know how i can get these attachment and write it to the Target directory.
Or please let me know how this can be acheived otherwise.
Second Approach:
Java Mapping was suggested by few people. Would like to know how to split the file and send all the splitted files to the receiver.
Thanks