I am using PDFObject to embed a PDF with form fields in a html page.
I would like to add a button to the page, which will cause acrobat to submit the fields back to the web server. If I was doing this within the PDF, it would look like this
Here is what I have so far, which throws an exception, because pdf
does not contain a property called doc
.
$(document).ready(function () {
var pdf = new PDFObject({ url: "test.pdf" }).embed("pdf");
$("#savebutton").button({ icons: { primary: "ui-icon-disk" }, text: true, label: "Save" });
$("#saveButton").click(function () {
pdf.doc.submitForm("submiturl", false);
});
});
So the crux of the question, how do I get access to the "doc" object within the pdf's DOM, from the page. Is this even possible?