Closed Sergiobop closed 11 months ago
What? Oh no! That's unexpected and annoying!
Confused question: How could this bug slip my (and everybody's) attention after such a long a long beta phase?
Hello @stephanrauh
I have been investigating this error. I'll tell you what I've found out:
const formData = await this.pdfService.getFormData();
The "values" of all annotations are empty/undefined even though you passed the formData object with values. (formData is not synced with the annotation values)
It seems that you have to update and synchronize the PDF form values (annotations) with the formData values.
In the DEMO page (https://pdfviewer.net/extended-pdf-viewer/forms)
Print the PDF:
Only Lucías is filled correctly while printing/downloading.
I suspect the problem is somewhere in here: https://github.com/stephanrauh/ngx-extended-pdf-viewer/blob/main/projects/ngx-extended-pdf-viewer/src/lib/ngx-form-support.ts
Maybe the setFieldValueAndUpdateAnnotationStorage method? Idk
Thanks
I'm afraid that sounds like an exhausting debugging session. I just wonder what went wrong?
At the moment, I'm very busy. I've put your ticket on the top of my pile of work, but even so, it might take a while until I manage to investigate and to solve the issue. Stay tuned!
I've managed to reproduce the issue. Funny thing is that checkboxes still work.
This seems to be an old bug. I need to back-port the solution to version 17, too.
I've observed a weird side-effect: when printing, the document is still visible in the background, but the fields are cleared (even after applying my bugfix).
This seems to be an old bug. I need to back-port the solution to version 17, too.
Yeah, that's what i was about to say. The bug appeared sometime in version 17. I tried to downgrade and still appeared. Can't say when it started though.
Thank you for working on this
The bugfix has landed with version 17.4.8 and 18.1.1.
As far as I can see, I've added the bug six months ago with version 17.0.0-alpha.3. It's astonishing that nobody reported it before. Be that as it may, now it works.
Enjoy! Stephan
Thanks a lot @stephanrauh (Npm is on 18.1.0 though)
Will try it when you do a new release.
@Sergiobop Maybe you've run into a caching problem - either on your side, or maybe npm distributes the new version slowly. I've double-checked it, my browser shows the new version. For some reason, it marks version 17.4.8 to be the current version, but that's just a tiny nuisance. :)
Describe the bug I think this is a bug (or i'm doing something wrong?). This worked in previous versions. https://pdfviewer.net/extended-pdf-viewer/forms
Try to download or print the PDF, the form is empty even though is filled previously
1: The form is filled:
2: Print the PDF using the print button:
3: Download the PDF using the download button:
Version info
Demo PDF file Just check the DEMO page, the error is there too