Can I have the workflow to protect different PDF(100+ PDF)’s indicated in a folder with different passwords indicated in a Excel file?

I am a beginner of UiPath. I would like to work out a workflow to protect different PDF(100+ PDF)’s indicated in a folder with different passwords indicated in a Excel file.

Can anyone help?

Thanks.

Hi @Happy_lifev2

Install

UiPath.PDF.Activities package

Steps to Create the Workflow

Use Worbook read range activity to read your excel and generate DataTable

for each file in folder activity to go through each pdf (in filter fill with “*.pdf” and create a index variable

Use the Protect PDF Document activity from UiPath.PDF.Activities to apply the password to the PDF file passing you datatable password cell like this

   dt_Passwords.Rows(indexVariable).item(“column_name”).ToString

Hi
Thanks in advance.
Do you know why I can’t install the UiPath.PDF.Activities package? Any website to download it instead? Thanks.

Click in All Packages and type UiPath.PDF and it will appear

Cheers

Hi @Happy_lifev2

Install Pdf packages from manage package

  1. Read Range (to read the data into dtPasswords)
  2. For Each Row in DataTable (dtPasswords)
  • Assign pdfPath = row("PDFPath").ToString (assuming your Excel has a column named “PDFPath” for PDF file locations)
  • Assign pdfPassword = row("Password").ToString (assuming there’s a “Password” column for passwords)
  1. Protect PDF (inside the loop)
  • Input Properties:
    • File Path: pdfPath
    • Password: pdfPassword
  • Output Properties:
    • Optionally, specify an output file path if you don’t want to overwrite the original PDFs.
  1. (Optional) Move PDF (if you want to move the protected PDF to a different folder)

Hope this helps

Hi,

Can I use below one? I cannot find UiPath.pdf

Let me try.

Thanks in advance.

Sure

this is the pdf package
The first one that is selected

Hi @Happy_lifev2

from your image, the studio encountered a error for one feed

Are you connected in a enterprise network or using VPN?

And could you share a screenshot for “Settings” showing Studio feeds

Hi

Can I know what should I input regarding the screencap below?

And for item 2, can I know if the PDFPath can be a folder path instead of a pdf file path? Thanks.

Hi @Happy_lifev2

Here is the sample file

Forum.zip (234.2 KB)

Hope this helps

Hi rikulsilva,

I am connecting to an enterprise network. Maybe that is why I cannot find “UiPath.pdf” using the computer at an organization.
May I know which one is the studio feed that you are talking about?

Thanks.