ImageToPDF not working as intended

Hello,

I am using the “Image to PDF” activity from UIPathTeam.ImagesToPDF.Activities, and it looks to have a bug.

It correctly converts an image to a PDF – but runs into an issue within a loop. I am converting multiple images into a PDF, within a for each loop.

It runs through the first one fine, but then on the second go in the loop it appends the previous document with the new document. Then on the third go, it appends the third documents to the first and second.

Example:

First loop - Page1 – P1 PDF
Second Loop - Page 2 – P1 with P2 appended PDF
Third Loop Page 3 – P1 , P2 with P3 appended PDF

1 Like

Hi @David_Hernandez2

Do you change the value of PDFdir between each loop iteration? If it remains the same, there is a chance that the activity has a default behaviour of appending if a PDF already exists.

1 Like