Diff-ing Two PDFs in Linux

I recently had two versions of a PDF file on my Linux laptop and needed to know what had changed between the two. The solution was to convert the PDFs to text and then diff them like this:

pdftotext file-1.pdf
pdftotext file-2.pdf
diff file-1.txt file-2.txt > file-diff.txt

Leave a Reply

Your email address will not be published. Required fields are marked *