I am using Ajax functionality to retrieve my content and I need to export PDF on success of jQuery.ajax(). How can I do that?
Add this to your Script:
DocRaptor.createAndDownloadDoc("YOUR_API_KEY_HERE", {
test: false, // test documents are free, but watermarked
type: "pdf",
name: planStatus+"_" +assessmentYear+"_"+employeeId+ ".pdf",
document_content: document.querySelector('#MyDoc').innerHTML, // use this page's HTML
// document_content: "Hello world!
", // or supply HTML directly
// document_url: "http://example.com/your-page", // or use a URL
// javascript: true, // enable JavaScript processing
// prince_options: {
// media: "screen", // use screen styles instead of print styles
// }
})