26 January 2010

Quick Test Professional Automation with Adobe PDF Documents - V

Accessing form elements in the document

Set acroFormObj  = CreateObject("AFormAut.App")
Create an object the pdf form API. Pdf form is a normal pdf with embedded form elements. It has a different API declaration than the normal pdf document.

Set objFields = acroFormObj.Fields
Get all the form fields on the pdf form document in the form of a collection

For each field in objFields
Print field.Name & "  " & field.Value
Next
Loop through the collection and retrieve the properties of each field

Print "Number of fields in the Documents = " & objFields.Count
Get the count of all the field present on the pdf document





No comments:

Post a Comment