Open sandeep2244 opened 1 year ago
any updates here?
@sandeep2244 I don't think this is possible (but haven't tried it yet): the iframe has no bi-directional binding: meaning you can add the PDF to it, but you will not be able to access the filled pdf done by the user.
when you use a library like: https://www.npmjs.com/package/ngx-extended-pdf-viewer it will load the pdf in a custom viewer where you have a bidirectional binding.
@cre8 , Ohk got it. I checked above mention lib, is it compatible with angular12 ? Do we have any vanila JavaScript , it would be helpful to use with any JS framework or library.
@sandeep2244 I think it should. If you google you will find some libraries for pdf viewer. A standalone lib to get a PDF is pdf.js, pdf-lib is good for creation and manipulating pdfs. But they do not have some kind of visual editor.
@sandeep2244 , i solved the same problem by using the PDF Embed API from Adobe. Please check this Guide where you can register a SAVE_API
callback that will handle the edited PDF Blob and you can define your own 'autoSaveFrequency' when the callback gets called (if there is any change in the PDF).
Hope this helps.
I am facing the same issue. Any updates?
What were you trying to do?
Is it possible with this library to allow the user to edit form fields in a PDF, then instead of downloading the modified file, export it as a blob so that it can be uploaded to a server. ?
How did you attempt to do it?
I have render PDF as Blob url into Iframe.
I filled test input of pdf with some value.
Now i want to capture whole updated pdf as a byte array or bas64 to sent it to server.
What actually happened?
I checked Blob on submit pdf to server, Its unchangeable.
Here is code.
` const submitPdf = async () => { debugger;
`
What did you expect to happen?
Should capture pdf form updated value.
How can we reproduce the issue?
Version
latest
What environment are you running pdf-lib in?
Browser, Node
Checklist
Additional Notes
No response