var SahiFrameWork_PDFFields = function(){};
SahiFrameWork_PDFFields.prototype.load = function(fileName) {
_sahi.print("In load");
var input = new java.io.File(fileName); // The PDF file from where you would like to extract
var pd = Packages.org.apache.pdfbox.Loader.loadPDF(input);
var docCatalog = pd.getDocumentCatalog();
var acroForm = docCatalog.getAcroForm();
this.fields = acroForm.getFields();
}
SahiFrameWork_PDFFields.prototype.setKeyAttribute = function($keyAttribute) {
this.keyAttribute = $keyAttribute;
}
SahiFrameWork_PDFFields.prototype.getKeyAttribute = function() {
return this.keyAttribute || "getPartialName";
}
// Prints all the editable fields and it's value that are available in the pdf.
SahiFrameWork_PDFFields.prototype.printAll = function() {
for (var i=0; i');
_log($s);
}
}
SahiFrameWork_PDFFields.prototype.getField = function($name) {
for (var i=0; i