Details
Description
The getParent method should lookup a parent using both valid parent keys: "P" and "Parent". The method findFieldType of this class already performs it's lookup using both keys.
Additionally method getParent of the class PDField has a return type of PDField. While this is appropriate for nested fields this doesn't work for PDPages. I have an AcroForm I'm working with that sets a Page object to be the parent of an AcroForm Field. It does this specifically by setting the "P" key to the object reference for a particular page (e.g. << /P 102 0 R/FT/Btn >> with "102 0 R" being the aforementioned object reference).
As a result of this design decision there is no way of getting a field's parent page from the getParent method. We are required to get the backing COSDictionary, call getDictionaryObject("P") and create a PDPage Object from scratch. This is workable, but not optimal. We'd prefer to avoid the COS data types wherever possible.
Thanks,
Robert McHugh