Skip to main content

A tool to compare PDF annotations

Project description

pdf-annotations-diff

I frequently need to compare my annotations on multiple versions of a PDF file. If you are amongst the three other people who need to do the same, this Python script would be useful to you.

This script compares annotations across two PDF files (which are assumed to be two versions of the same base PDF file). It outputs annotations that are unique to each of the two files.

Installation

pip install pdf-annotations-diff

Usage

To compare annotations in two PDF files, you can use the following command:

pdf-annotations-diff file1.pdf file2.pdf

Dependencies

This script depends on the PyMuPDF library.

License

Licensed under the MIT License. See the LICENSE file for more details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Example

This is an example of how to use pdf-annotations-diff to compare two PDF files:

pdf-annotations-diff Men\ Without\ Women\ -\ Haruki\ Murakami.pdf Men\ Without\ Women\ -\ Haruki\ Murakami.sync-conflict.pdf

And the resulting output would look something like this:

Unique Annotations in Men Without Women - Haruki Murakami.pdf:

Underline at page 207
Text: paperback. Whenever he got tired of reading (at least, Kino guessed that he was tired), he looked up from the page and studied the bottles of liquor lined up on the shelves in front of him, as if examining a series of unusual taxidermied animals from faraway lands.
Info:
  title: NovaPro

Underline at page 248
Text: Teddy Wilson, Vic Dickenson, Buck Clayton— sometimes he longed desperately to listen to their old-time jazz, with its steady, dependable technique and its straightforward chords. He wanted to feel the pure joy they had in performing, their wonderful optimism. That was the kind of music Kino sought,
Info:
  title: NovaPro

Underline at page 180
Text: stapler, his calendar—the most mundane objects became somehow radiant by being his.
Info:
  title: NovaPro

--------------------------------------------------------------------------------

Unique Annotations in Men Without Women - Haruki Murakami.sync-conflict.pdf:

Highlight at page 207
Text: paperback. Whenever he got tired of reading (at least, Kino guessed that he was tired), he looked up from the page and studied the bottles of liquor lined up on the shelves in front of him, as if examining a series of unusual taxidermied animals from faraway lands.
Info:
  title: Sameer A5
  creationDate: D:20230423214101Z00'00
  modDate: D:20230423214101Z00'00

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdf-annotations-diff-0.0.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

pdf_annotations_diff-0.0.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pdf-annotations-diff-0.0.2.tar.gz.

File metadata

  • Download URL: pdf-annotations-diff-0.0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for pdf-annotations-diff-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c90fd10d1d59509e2687228ed0cf0724177930a7b43878663299251e3602c730
MD5 f2aa49f3f1b02a2e9118a050c94fb427
BLAKE2b-256 0518aafc0c7294e09781a884364abe25b9e6ba81a8bbbf4d23b32ac045e99294

See more details on using hashes here.

File details

Details for the file pdf_annotations_diff-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pdf_annotations_diff-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8237d82be5e05bf447ba4b8bd96cd0d4429a6859561728221b8a2af76626d426
MD5 884b01130170e623e3a4ae7a904fe0ea
BLAKE2b-256 5f6f5eb9ffaac94c1c2b643818730ccd8eb75fa9bf1b489dbb168c836287ee8f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page