Question

Merging Multiple PDF documents A360

  • 22 March 2024
  • 2 replies
  • 60 views

Userlevel 2
Badge +6
  • Automate the Universe SME
  • 7 replies

Using A360, I am struggling to merge multiple pdf documents. The exact number of documents is variable. Therefore, the activity PDF: Merge Documents is not suitable because it requires the bot developer to declare ahead of time the documents to merge. I’ve even tries the bot store PDFUtils. The “Merge all PDF files” action works, however I can’t sort which order the documents should be merged into, so the final file shows out of page order. I’ve also tried the PDFUtils: Merge PDF files but receive an error as if the package is not working correctly. 

 

Thank you very much for any help and advice! It is greatly appreciated as this issue has stalled bot development for our use case.


2 replies

Badge +1

Hi Jaye,

 

You can try to use the Merge Documents action in a loop. Iterate through the directory containing your files that you would like merged and add an if else statement “If <merged document path> does not exist, copy the current file in the iteration to the merged doc path; else merge documents: merged doc path + current file in iteration.

 

Although this runs slowly, it works. Also, you would have to already have your files in the directory listed in the order that you wanted. 

 

On another note, I saw your post as I was looking for information the PDF Utilities Merge All PDFs action. Whenever I use this, it just copies the first PDF over and over so I have a merged file of just the first PDF repeated. Have you encountered this using that action?

 

Thanks

Userlevel 2
Badge +6

@jaye check my comment here: 

 

Reply