Python Forum
How to compare two PDFs for differences
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to compare two PDFs for differences

I receive two PDFs daily from two different sources. Theoretically they're supposed to have the exact same numbers - but I would like to create an automated report which confirms this and notifies me of any issues.

Unfortunately, certain 'titles' within the reports differ ever so slightly, which makes recognition on this basis difficult.

For example, they may have the same balances, but one might be called "duck USD" while the other just called "duck" (example names).

Bearing in mind I'm relatively new when it comes to Python, what road could I go down in order to create this automation?

To give an example of the style of layout:

Report 1
Dog 50 2,000 5,000
Cat 80 5,000 10,000

Report 2
Dog USD 50 2,000 5,000
Cat EUR 80 5,000 10,000
Can you explain more what you want to do?
This has a pdf to text function:
I would convert to txt and run a system file compare (until I learn to use the python functions for that!)

Better is this:
Which will display the diff in a png image.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calculate the sum of the differences inside tuple PUP280 4 127 Aug-12-2022, 07:20 PM
Last Post: deanhystad
  Sort Differences in 2.7 and 3.10 Explained dgrunwal 2 487 Apr-27-2022, 02:50 AM
Last Post: deanhystad
  download pubmed PDFs using pubmed2pdf in python Wooki 8 2,738 Oct-19-2020, 03:06 PM
Last Post: jefsummers
  Concatenate multiple PDFs using python gmehta1996 0 1,309 Mar-29-2020, 09:48 PM
Last Post: gmehta1996
  Most optimized way to merge figures from multiple PDFs into one PDF page? dmm809 1 1,411 May-22-2019, 10:32 PM
Last Post: micseydel
  Condition check differences and how to organise code? adam2020 4 1,669 May-12-2019, 04:12 PM
Last Post: Yoriz
  Merging pdfs with PyPDF2 Pedroski55 0 2,548 Mar-07-2019, 11:58 PM
Last Post: Pedroski55
Photo How to Extract Specific Words from PDFs with Python danvsv 1 3,764 Jan-17-2019, 11:07 AM
Last Post: Larz60+
  reading pdfs in windows10 - Python 3.6 cobra 1 4,225 May-10-2018, 09:40 PM
Last Post: nilamo
  How to parse pdfs in Python CharType 2 3,124 Jan-09-2017, 11:56 PM
Last Post: Blue Dog

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020