cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
martinav
Community Champion
Community Champion

How to check if two PDF files are internally identical

I have a need to check two PDF files to know if they are internally identical, to confirm that a function has completed successfully.  Any way to do this?

 

Thanks.

4 REPLIES 4
Sumen
Frequent Visitor

Hi,

Never tried this before. Maybe you can get file content for both pdf in base64 and match its values using condition. 😁

Amanthaper
Responsive Resident
Responsive Resident

Hi @martinav  I'm fairly certain you an do this with an AI Builder Form processor model. Take a look at the AI Builder component and in the AI Builder forum.

 

Cheers,

Aman

------------------------------------------------------------------------------------------------------
If my post helps you with your problem or answers your question, please mark it Solved or Answered. This helps anyone with similar challenges. If you like my response, please give it a Thumbs Up.
------------------------------------------------------------------------------------------------------

martinav
Community Champion
Community Champion

@Sumen ,

 

This is a good idea.  However, I was unsure how to set an equality for these very long strings of data.  I did try it using a Condition action, but I was uncertain it was truly comparing the two properly.  I believe I was getting both false positives and false negatives.  I bailed on it then.  This was a couple of years ago.

Sumen
Frequent Visitor

Hi @martinav ,

 

Yeah, the strings are terribly long. I dont know that, you have already done this or not. Just a suggestion, you can pass both of the file content into 2 separate string e.g passing file content to a string field like this - body('Get_file_content')?['body']?['$content'] and compare those 2 super long text in any online text compare tools (https://text-compare.com/). If the results is identical, maybe you can compare those string variables back inside a condition. Another thing,  you can also pass

decodeBase64(body('Get_file_content')?['body']?['$content']) to the string variable then match the whole content again with a condition. Hope to see how this turns out! 😁

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,380)