RadFixedDocument.AcroForm.FormFields is empty on valid PDF?

1 Answer 108 Views
PdfProcessing
Mike
Top achievements
Rank 1
Mike asked on 28 May 2024, 09:51 PM | edited on 28 May 2024, 09:57 PM

Here's a trivial example that demonstrates this and the file as well, confused because it works on your "InteractiveForms.pdf" file. The file can be found on the Canadian government site, see link below.

PdfFormatProvider provider = new PdfFormatProvider();
RadFixedDocument document = provider.Import(File.OpenRead("t661-fill-20e.pdf"));

Note that the RadFixedDocument.AcroForm.FormFields will be count of 0 even though there are tons of editable fields ...

The PDF file can be found on the Canadian government website:  See Fillable PDF (t661-fill-20e.pdf) at ...

Site to grab the PDF

Hoping for a miracle ... ;)
Mike
Top achievements
Rank 1
commented on 29 May 2024, 01:56 PM | edited

These are the permissions on the PDF, maybe that's playing a role here? We're evaluating Telerik for this feature

See the attached image on this comment
Mike
Top achievements
Rank 1
commented on 29 May 2024, 08:07 PM

Okay, so I found the issue, the issue is the PDF not the code. The PDF's on the Canadian site are created with AEM.

The AEM Forms Designer doesn’t make ‘regular’ PDF’. The designer makes XFA-based PDF’s and only Acrobat/Reader can open them. So, AEM Forms Designer cannot produce PDF 2.0.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-designer-6-5-and-pdf-2-0-iso-32000-2/td-p/370821

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 31 May 2024, 12:43 PM

Hi, Mike,

I have downloaded the mentioned PDF document and indeed, if the document is imported and then exported with the PdfProcessing library, the document content is lost:

Original document:

Exported document:

After investigating deeper the internal content for the provided pdf documents, I would like to note that the PdfProcessing library offers support for interactive forms also knows as AcroForm in the PDF format. However, the library currently supports interactive forms whose data is defined directly in the document and it doesn't provide support for interactive forms based on the Adobe XML Forms Architecture (XFA).

We already have a similar feature logged in our feedback portal. You can track its progress, subscribe for status changes, and add your comments on the following link:

PdfProcessing: Add support for XFA fields

As to the permissions, I believe that the UserAccessPermissions which the PdfExportSettings class offers may be appropriate for the scenario you need to cover. The ChangingPermissionType allows you to specify who is eligible for making changes to the document.

I hope you find this information helpful. Please, let me know if there is anything else I can assist you with.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
PdfProcessing
Asked by
Mike
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or