Replies: 5 comments 29 replies
-
The storage is just used to add the new properties which will be used when the pdf is printed/saved. |
Beta Was this translation helpful? Give feedback.
-
Yeah you need to handle that yourself. I'm just iterating through all inputs, textareas etc. and updating the value that way, so that it's the same as in the annotationstorage. |
Beta Was this translation helpful? Give feedback.
-
@calixteman I am trying to store annotations into localStorage so that I can keep them between site reloads, how would I do that? |
Beta Was this translation helpful? Give feedback.
-
Not really a javascript guy. I'm trying to be able to reload annotations in a maui web view that loads the pdfjs official viewer. I can save and restore annotationstorage from the database (JSON.stringify/JSON.parse). I know I need to re-populate the inputs. I don't need to check the user. I allready know it is the correct user. I have tried to use your code but haven't figured out what I should use for character and fields. I have a loaded a pdf and the restored data in the annotationstorage. |
Beta Was this translation helpful? Give feedback.
-
@Excubitor Update: Found a way to programmatically add fields/editors/annotations (however you want to call them): TODO for motivated people: make add function support drawings and images. Tested on: PDF 110dd61fd57444010b1ab5ff38782f0f [1.4 pdfeTeX-1.21a / TeX] (PDF.js: 4.1.378 [a208d6b]) |
Beta Was this translation helpful? Give feedback.
-
is there currently a way to make annotations manually added to the annotationstorage visible in the pdfjs viewer?
I can’t quite grasp how to reinitialize the page so that annotation in the storage gets rendered on screen.
Beta Was this translation helpful? Give feedback.
All reactions