Install comparepdf by entering the following commands in the terminal:
sudo apt update sudo apt install comparepdf
command line tool for comparing two PDF files
comparepdf is a command line tool for comparing two PDF files. . By default it compares their texts but it can also compare them visually (e.g., to detect changes in diagrams, images, fonts, and layout). . It should prove useful for automated testing.