Showing results for 
Search instead for 
Did you mean: 

Is it possible to compare two PDF files using labview?

Go to solution

I was wondering if it were possible to use LabVIEW to compare two PDF files (which contain images as well as text) to one another. I know that Bluebeam PDF viewer can do it, so i was hoping that there was a way to do this with LabVIEW.

0 Kudos
Message 1 of 6

"Comparsion" can mean many things. What kind of "comparison" are you looking for?

(If you just want to check if they are identical, you could do a binary comparison on the raw file)

LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 2 of 6

Yes, I just want to know how identical they are; meaning I want to check to see if the images contained in the PDF are identical, even though the headers may be slightly different.

0 Kudos
Message 3 of 6

Im not sure how to do a binary comparison of a PDF file. Is there an example code i could look at?

0 Kudos
Message 4 of 6
Accepted by topic author CETGirl

Read each file as a plain string, then compare the two strings for equality.

(You can also do some pre-tests, e.g. just see if the sizes are equal.)

LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 5 of 6

You could always perform an MD5 Hash on both of the files.  If they are the same files the hash will be the same. However, if they are different it won't tell you how different they are from each other.

Quentin "Q" Alldredge

Owner, Q Software Innovations, LLC (QSI) | Director, GCentral | Admin, LabVIEW Wiki
Tech Lead, Hill AFB LabVIEW Center of Excellence | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner

0 Kudos
Message 6 of 6