我有一个 PDFTron webviewer,我用它来呈现 pdf 表单。当用户单击外部保存按钮时,我需要从 webviewer 中提取表单 xml。
我试过了
var am = readerControl.docViewer.getAnnotationManager();
var xfdfString = am.exportAnnotations();
$.ajax({
type: 'POST',
url: readerControl.serverUrl + '?did=' + readerControl.docId,
data: xfdfString,
success: function(data) {
// Annotations were successfully uploaded to server
},
error: function(jqXHR, textStatus, errorThrown) {
console.warn("Failed to send annotations to server. " + textStatus);
},
dataType: 'xml'
});
但我无法readerControl
在 PDFTron 之外找到config.js
。请帮忙