Upland OL User community

Merge PDF's based on 'Like' names

A customer will be sending us 1000’s of PDF files that require a number of steps to process, merge and concat. I have most of the steps figured out with the exception of merging PDF’s for ‘householding’.

Ex. customer will send us PDF files with file names of [parentacct#_date].pdf and [childacct#-parentacct#_date].pdf. The PDF’s that have the same ‘parentacct#’ need to be merged so that there is a single mailing to that household.

To further the example,
PDFA = (123456789_20230101.pdf) is the parent PDF and has 4 pages
PDFB = (987654321-123456789_20230101.pdf) would be the child PDF and has 6 pages
PDFA would have Pages 1-4 from the original (PDFA) and pages 5-10 from the child PDF (PDFB).

Also, there could be more than 1 child PDF that needs to be merged with PDFA so the script would need to loop until ALL child PDF’s are merged with the parent PDF.

your help is much appreciated!

thank you

1 Like

Hello @kmolloy10,

Sorry that no one answered your post. Do you still need help with this situation?