Skip to main content

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

Metadata

Release files for pdf-annotations-diff 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdf-annotations-diff 0.0.2
File Size Uploaded
pdf-annotations-diff-0.0.2.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdf-annotations-diff 0.0.2
File Interpreter ABI Platform
pdf_annotations_diff-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.9 kB

Release files / pdf-annotations-diff-0.0.2.tar.gz

Download URL pdf-annotations-diff-0.0.2.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c90fd10d1d59509e2687228ed0cf0724177930a7b43878663299251e3602c730
BLAKE2b-256 checksum
How to use checksums
0518aafc0c7294e09781a884364abe25b9e6ba81a8bbbf4d23b32ac045e99294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / pdf_annotations_diff-0.0.2-py3-none-any.whl

Download URL pdf_annotations_diff-0.0.2-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8237d82be5e05bf447ba4b8bd96cd0d4429a6859561728221b8a2af76626d426
BLAKE2b-256 checksum
How to use checksums
5f6f5eb9ffaac94c1c2b643818730ccd8eb75fa9bf1b489dbb168c836287ee8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page