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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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