Compare PDF Documents

I’m trying to compare 2 PDFs and found the Compare PDF Documents activity with the UiPath.Testing.Activities package (version 25.4.0). This works perfectly when I select 2 PDFs and run the process. Because I have more PDFs to compare I want to pass the 2 file locations as string variables. The activity throws an error if I give it a String Variable as it is expecting a type of IResource. I created 2 variables for the input files of type IResource via Ctrl+K (UiPath.Platform.ResourceHandling.IResource), however can’t figure out how to get the original string variable value into these variables.

Any thoughts would be appreciated.

Use
LocalResource.FromPath(<string_your_file_path)

@craig.norton,

Pass it like this

LocalResource.FromPath("your pdf file path")

@adi.mehare and @ashokkarale that works perfectly.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.