UXMPDFKit icon indicating copy to clipboard operation
UXMPDFKit copied to clipboard

Couple code issues

Open phoney opened this issue 9 years ago • 4 comments

  1. 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

  2. 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.

phoney avatar Nov 15 '16 19:11 phoney

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

pushchris avatar Nov 15 '16 20:11 pushchris

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.

phoney avatar Nov 15 '16 21:11 phoney

Both! If it works for you, then use it, else it's a possible implementation and fix for the radio buttons

pushchris avatar Nov 15 '16 21:11 pushchris

@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.

pushchris avatar Jan 25 '17 20:01 pushchris