0

I'm getting a PDF form in base64 format and displaying it in html like this (using VueJS):

<object :data="'data:application/pdf;base64,'+pdfData" type="application/pdf"></object>

It displays the PDF just fine, i can fill out the form no problem. However, the pdfData doesn't change when i fill out the form or rotate PDF.

Is there a way to send the new pdf to the server with the data filled in from JS? Or get the new base64 code of the modified form, then send it as text? (I can decode on the server). Note: I cannot modify the PDF itself (i.e. add a submit button inside the pdf)

ierdna
  • 5,753
  • 7
  • 50
  • 84
  • AFAIK I don't think it's possible to get the edited PDF data using JavaScript external to the PDF itself like what you're trying to do. You might be able to embed JavaScript *inside* the PDF which controls the form submission from within (see [JavaScript for Acrobat](http://www.adobe.com/devnet/acrobat/javascript.html) and [this SO question](https://stackoverflow.com/questions/4346590/submit-pdf-form-fields-to-a-http-post-request)). – Decade Moon Jul 09 '17 at 12:42
  • If I had control over the PDF, I would, but it comes from an external source, so my hands are tied. – ierdna Jul 09 '17 at 12:44

0 Answers0