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
Adding text annotations to a page #305
Comments
I believe you need |
Thank you so much for your quick response! I've made the change you suggested. My code is now exactly as shown below. I'm running it on mariner_from_word.pdf and the intended comment is not appearing on the first page. Also, if I delete the comment that already exists on the first page (so that there are no annotations on that page to begin with) I get Maybe I need more stuff in my note_dict? I haven't specified an appearance dictionary for example. The other comment on the same page has a pop-up annotation, which I also haven't made.
|
I think you may need |
Adding
avoids the |
You'll have to excuse me, I'm ridiculously busy with regular work and can't dig into issues right now. Maybe have a look at https://pypi.org/project/pikepdf-annots/ (a third party annotations package) to see if there's a coding pattern in there you can follow. |
I had a similar problem where I wanted to add a link annotation which is very similar to the above problem. I made it work so if anyone is interested, the below code adds the text annotation "sticky note" that @nicholasbailey87 wanted (annotation was visible on the first page when I opened the output file in adobe acrobat).
|
Thanks so much for the excellent library. I'd like to add "sticky note" text annotations to a PDF page and have been trying to work out how to do it all day. I've tried a million variations along the theme shown below.
Is there a way to do this with pikepdf at the moment, and if so can you please give me a hint about the basic pattern? Thank you for your help! If I can contribute in any way (writing documentation for the correct approach, making a pull request with some utility functions for accomplishing this, etc.) please let me know.
The text was updated successfully, but these errors were encountered: