getObject Method |
Gets an object on this page of the currently loaded document.
function getObject(index);
index
Type: Integer The zero-based index of an object in this PdfPage Class.Type: PdfObject Class
A new PdfObject Class instance if operation completed successfully; otherwise, null.The index provided must be greater than or equal to 0 and less than getObjectCount Method.
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance //get this page var page = myApi.getPageViewed(); //get the number of objects on this page var objCount = page.getObjectCount(); //iterate through all objects on this page for(var i = 0; i < objCount; i++) { //get this object var obj = page.getObject(i); //if it is a form field, display its name to the user if(obj.isFormField()) { window.alert("Found a form field with the name: " + obj.getProperties()["name"]); } }