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
#1
Hello,

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
Reply
#2
Can you explain more what you want to do?
Reply
#3
This has a pdf to text function:
https://pypi.org/project/pdf/
I would convert to txt and run a system file compare (until I learn to use the python functions for that!)

Better is this:
https://pypi.org/project/pdf-diff3/
Which will display the diff in a png image.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  download pubmed PDFs using pubmed2pdf in python Wooki 8 1,864 Oct-19-2020, 03:06 PM
Last Post: jefsummers
  Concatenate multiple PDFs using python gmehta1996 0 993 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,129 May-22-2019, 10:32 PM
Last Post: micseydel
  Condition check differences and how to organise code? adam2020 4 1,318 May-12-2019, 04:12 PM
Last Post: Yoriz
  Merging pdfs with PyPDF2 Pedroski55 0 2,202 Mar-07-2019, 11:58 PM
Last Post: Pedroski55
Photo How to Extract Specific Words from PDFs with Python danvsv 1 3,388 Jan-17-2019, 11:07 AM
Last Post: Larz60+
  reading pdfs in windows10 - Python 3.6 cobra 1 3,733 May-10-2018, 09:40 PM
Last Post: nilamo
  How to parse pdfs in Python CharType 2 2,760 Jan-09-2017, 11:56 PM
Last Post: Blue Dog

Forum Jump:

User Panel Messages

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