Output as PDF annotations #50
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Atfer posting an issue on the original repo, I went ahead and actually implemented the feature, which proved quite easy. This pull request is the basic functionality. I tested both on a very simple Latex MWE with just a few words, and with a very complex scientific publication which was changed from top to bottom between two revisions, and the output is clean :)
Main change made: a new CLI option -p (or --pdfoutput). If activated, it will output two PDFs in the working directory named output1.pdf and output2.pdf. The output PDFs are a copy of the input ones with changes highlighted as annotations.
Dependency on the pdf-annotate python library is necessary (https://github.com/plangrid/pdf-annotate), which in turn requires Python3.8 (it's a pure python library). As of now the import of the library is done in the beginning, perhaps it could be done only if the -p option is used, so that pdf-diff can still be used with PNG output without requiring the lib.
Tests done on Ubuntu 20.04 with python 3.8