Workflow example for Compare PDF file

Hi,

We are trying to compare 2 PDF files using workflow but facing some issue. Is anyone work on comparing pdf and send comparison in email e.g. converting pdf into text and then compare and share result in email.

Hi @dhakatev,

Can you share your workflow and elaborate what is the exact issue you are facing?

This will help us in understanding the issue better and provide the best possible solution to the specific scenario.

In General,

  • You can use “Read PDF” activity to extract data into a string for both PDF’s
  • Use string operation (index, equals, split etc) to compare the values
  • Save the result in a text file using “write text file” activity
  • Use “Send Outlook Mail” to send the result with the attachment of the result file

Regards,
V

Thanks, issue get resolve but now i am facing another issue where i want to keep only “a-z,A-Z,0-9” only in file and remove all special char. Do you know how to do it

Hi @dhakatev ,

You can provide your solution for the Community if you have encountered anything which can help!

For your problem of keeping only a-z,A-Z and 0-9, you can use regex :

Regex.Replace(yourString, "[^A-Za-z0-9\]", "")

or Char class functions like IsControl(), IsDigit() etc. Get a list of these functions here: Char Struct (System) | Microsoft Learn

Hope this helps

Regards,
V

1 Like

Can you please share sample workflow using Regex if you have. That will be great help

Can you try first and let me know if you get any error or any issues while executing it?
If there is any error, please upload the workflow along with the error of the screenshot

Regards,
V

1 Like

@dhakatev

If you are still looking for a sample workflow, I’ve just managed to put one toguether here

Hi @dhakatev ,

Did you find a solution for this, if yes then could you please share the XAML file.

Reg,
Sarthak

Selrac shared a sample workflow in the post above.

I have already checked this one, there is nothing related to PDF comparison.