plangrid / pdf-annotate

Pure-python library for adding annotations to PDFs
MIT License
195 stars 45 forks source link

Lock annotations in place #56

Closed vajdule closed 4 years ago

vajdule commented 4 years ago

Hi, I was wondering if there is a way to lock the annotations, so that they cannot be moved. In Adobe Acrobat this can be found as a property under Appearance called "locked". Is there a way to get the same result using your library? I need to fix my annots in place. Thank you so much for your help.

ssheldonpg commented 4 years ago

Hi,

add_annotation takes metadata which you can pass flags in.

metadata_flags |= Flags.Locked | Flags.LockedContents | Flags.ReadOnly

vajdule commented 4 years ago

Hi @ssheldonpg , thank you for the response. I've tried those, but I was hoping there is more I could do. Unfortunately Preview on OS X and Adobe Acrobat Reader on iOS both on ipad and iphone do not care for these. The user can simply remove these annotations and I need to be sure they stay where they are. Have you come across this problem?