-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Ink Annotation Support #1959
Comments
Any updates on this? |
Feel free to give it a try yourself and submit a corresponding PR. |
I was having problems adding Ink annotations back to a PDF using Any ideas why? |
duplicate of #2332 |
@AndrewADev Are you still interested in adding a corresponding PR? |
Hey @stefan6419846 , sorry, I thought from your earlier comment maybe the other commenter was interested. If someone is interested in picking this up right this moment, I think they could do so. If there aren't any interested parties, I may try to take a look over the next week or so. |
No worries - I just went through the backlog of old issues today to check whether they are still relevant. The other comments are older than a year now, thus I do not think that something will happen about this. This being said: If you want, you are of course invited to propose a corresponding PR, but I will not (and cannot) force anyone to work on this ;) |
Explanation
I was recently using
pypdf
to process some documents, when I noticed that it will extract and output information on the "Ink" annotation type (used by Adobe when 'highlighting' scanned documents), but does not yet directly support it. (The active development going on for Annotations looks to involve only refactoring at the moment)So, would it be possible to support the Ink annotation type directly? (See below for my attempt at a hand-rolled version)
Thanks for keeping a handy tool like this open source and alive!
Code Example
Usage would be analogous to the other Annotations.
For the new API, probably something like this:
For the soon to be deprecated AnnotationBuilder, it would probably be along the lines of:
Other things tried
Note that the following snippet seems to get an annotation on the page where I expect it to be, but I am unable to keep it from appearing too small and faint (analogous to #1904, though the solution using
"/Border"
causes inconsistent opacity/visibility of the underlying document), so there seems to be something missing - possibly one of the other annotation properties from my example file (nothing seems obvious) or something is slightly malformed:Unfortunately for my current use case, I don't know which viewer will be used to open the documents, so that doesn't quite work for me. Perhaps the example is helpful for others and/or for a future implementation, though.
The text was updated successfully, but these errors were encountered: