In this example, the javascript code needed to export some widgets to pdf is:
var destinationPdf = new DestinationPDF({ 'URL': 'ServerScripts/DestinationPdf.aspx' }); var titlePDFWidget = new PdfWidget({ 'type': 'HTMLStruct' }); titlePDFWidget.setContent({ 'HTMLString': getHtmlString(document.getElementById('atkImageContainer').innerHTML), 'FullPath': window.location.href }); destinationPdf.addPdfWidget(titlePDFWidget); var picturePDFWidget = new PdfWidget({ 'type': 'HTMLStruct' }); picturePDFWidget.setContent({ 'HTMLString': getHtmlString(document.getElementById('pictureImageContainer').innerHTML), 'FullPath': window.location.href }); destinationPdf.addPdfWidget(picturePDFWidget); var tablePDFWidget = new PdfWidget({ 'type': 'HTMLStruct' }); tablePDFWidget.setContent({ 'HTMLString': getHtmlString(document.getElementById('tableImageContainer').innerHTML), 'FullPath': window.location.href }); destinationPdf.addPdfWidget(tablePDFWidget); var pdfWidget = new PdfWidget({ 'type': 'HTMLText' }); pdfWidget.setContent({ 'value': document.getElementById('textPDF').value }); destinationPdf.addPdfWidget(pdfWidget); destinationPdf.sendData();