Page 1 of 1

merge PDF

Posted: Tue Nov 26, 2019 5:21 pm
by ReproPJ
Hello everybody.

I've got a problem in merging several PDF with 2 others ones.
I explain :
I have a folder with letters in PDF, each letter is one file, it look like this :

12345-letter-01
12345-letter-02
12345-letter-03
67890-letter-01
67890-letter-02
00001-letter-01
00001-letter-02

in this folder the 5 first digit are the order number, then "letter" is the type of document and the last 2 digit are the number of the letter (because there are several letters in each order)

then there is another folder with this
12345-pdg
67890-pdg
00001-pdg

And the last folder is :
12345-plan
67890-plan
00001-plan


What i would like to do is to merge each letter of each order with the pdf "pdg" and "plan" with the same order
so 12345-letter-01 + 12345-pdg + 12345-plan
12345-letter-02 + 12345-pdg + 12345-plan
12345-letter-03 + 12345-pdg + 12345-plan
67890-letter-01 + 67890-pdg + 67890-plan
and so on...


The problem is that there is only one file for the "PDG" and "plan" document but several letters to merge with and the numbers of letters vary.
Is there someone who knows how to do that ? Maybe with a script ?

Thanks in advance for your help.
Best regards

Re: merge PDF

Posted: Wed Nov 27, 2019 1:49 pm
by billy.olvestad
I would do it with two instances of "inject job".
I have attached a sample flow. You need to change the job repository folders for the two "inject job" configurators to match the folders with the "pdg" and "plan" files. You also need to change the infolder to the folder with the "letter" files.

I have only tried with the sample names you have provided.

You will probably also need a flow to clean the folders with the "pdg" and "plan" files periodically, since they are never removed in this flow.

Re: merge PDF

Posted: Wed Nov 27, 2019 5:29 pm
by ReproPJ
Hello Billy.

Thanks you for your help, it seems a good idea, i'm gonna try that.
Best regards.