DEV Community

Cover image for Compare PDF Files Using The Terminal
Ryan Bevin
Ryan Bevin

Posted on • Updated on

Compare PDF Files Using The Terminal

You may need to install poppler-utils. Try this first:
apt-get install poppler-utils

If you are still having trouble, try installing the dependancies as well:
sudo apt-get install libnss3-dev libgpgmepp-dev qtbase5-dev libcairo2-dev libboost-dev

This one is short and sweet. Here are the steps:

  1. Convert the first PDF to a text file
    pdftotext example_pdf_one.pdf

  2. Convert the second PDF to a text file
    pdftotext example_pdf_two.pdf

  3. Check the differences between the text files.
    diff example_pdf_one.txt example_pdf_two.txt

And that's all there is to it!

I also have a video demo on how this works:

Top comments (4)

mteheran profile image
Miguel Teheran

and what are the steps to install pdftotext ? and also a screenshot could be helpful.
This article is very useful pls add more details because many people will be interested.

rbevin777 profile image
Ryan Bevin

Thanks for the feedback. I used this on ubuntu so it was pre-installed for me. I did some googling and there is a package that you may need to install. I've updated the article and added a link to my video demo to show how it works. Hope this helps!

mteheran profile image
Miguel Teheran

Amazing thanks!

monkawww1 profile image

Make sure to try playing this interesting lottery that can be played thanks to your phone! download - as for me, this is one of the best lotteries I have participated in. I have never seen an interactive lottery like wowlotto anywhere else! And thanks to the short registration, you can start playing almost immediately.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.