Radio button data is not loading correct when importing XFDF into PDF

Product: PDFTron

Product Version: 9.2.0

Brief summary of your issue:
→ After loading pdf file we are loading XFDF annotations to it. and as shown in image both radio button are getting selected. In android it is working fine but for iOS we are getting this issue. How can we fix this?

Steps to reproduce it:

  1. Open PDF in PDFtron.
  2. Load XFDF string from file.

Code for loading XFDF:

let fdf_doc: PTFDFDoc = PTFDFDoc.create(fromXFDF: fileURL.path)
documentController.pdfViewCtrl.getDoc()?.fdfMerge(fdf_doc)
documentController.pdfViewCtrl.update(true)

link to a minimal sample where the issue is reproducible:
FormPDF.pdf (432.8 KB)
XFDF.xml (75.2 KB)

Can you help us to identify why we are getting two radio button selected in iOS?

Thanks.

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi @rankit.agarwal,

Could you try calling FDFUpdate instead of FDFMerge for this action?

let fdf_doc: PTFDFDoc = PTFDFDoc.create(fromXFDF: fileURL.path)
documentController.pdfViewCtrl.getDoc()?.fdfUpdate(fdf_doc)
documentController.pdfViewCtrl.update(true)

Does that work for you?

Cheers,
Jamie

Yes it worked :slight_smile:
Thank you @Jamie_Dassoulas

Hi @rankit.agarwal,

Great, we’re glad to hear the solution works for you!
Please get in touch with any other questions or issues you have and we will try to help in any way we can.

Jamie

1 Like