Couple code issues
-
I noticed that didFinishLaunchingWithOptions is never called in the app delegate in the Example app. The prototype has changed. App Path never appears. This is with Xcode 8.1
-
This line in PDFFormField.swift always fails with the Sample2.pdf file.
if let flagsObj = dict["Ff"] as? UInt {
The type of the "Ff" field is some kind of pointer that doesn't cast to UInt. Consequently radio buttons are never detected.
Yup, looks like it's a pointer to a UInt. I'm not currently keeping track of parents of nodes in the tree/chain which it looks like it requires. That'll be something to look into implementing. You would then iterate until either you get to the end or loop around and return the value at the pointer of Ff. There is another repository in Objective-C that has an Acroform implementation that does this: ILPDFKit
Not sure if you're suggesting I use ILPDFKit or just borrow his code. While that lib is more full-featured than yours he has pull requests that are two years old and various old issues as well.
Both! If it works for you, then use it, else it's a possible implementation and fix for the radio buttons
@phoney I found the source of the Ff flag issue. Form fields are now correctly returning an array containing the different flags. Still have not been able to fully implement choice buttons yet though.