I am trying to edit a pdf in the browser - simply by filling out certain text fields with user inputs. Getting these annotations is simple with pdf.js using getAnnotations(). However, this does not allow me to edit the annotation's fields.
So instead, my idea was to use a base64 encoding of the pdf file, and use atob(base64PdfString) to render the pdf with pdf.js. Then, when a field needs to updated, I can parse the string since I know what the keys are, fill in the text value I want and render the new pdf. However, when I search for the known keys in the result of atob(base64PdfString), I cannot find them.
How should I go about parsing the string to find these annotations?