We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to read PDF form fields

Hello Support Team,
We are unable to read the PDF form fields using below code.
// messageBodyFileName - is the PDF file object or name whatever is needed …
docObj = new com.aspose.pdf.Document( messageBodyFileName);

          if( docObj != null && senderAlias != null && pdfAttrsToDCTMAttrsMapping != null && sdraPVTempRootDocObj != null  )
              println("inside applyDCTMPropsFromPDFAttachmentFields  - 1.."  ) ; 
              fields = docObj.getForm().getFields();
              println("inside applyDCTMPropsFromPDFAttachmentFields  - 1a.."  ) ; 
              for ( ii = 0 ; ii < fields.length; ii++ )
                  pdfFieldADateField = false;
                  field = fields[ii];
                  if( field != null && field.getFullName() != null && field.getValue() != null )
                     // Comments by Vikram - Both the field name and field's value is coming empty or null...



Please find attached sample PDF forms.

Aspose_Report 1.pdf (1.0 MB)
Aspose_Report 2.pdf (1.0 MB)


Thank you for contacting support.

We have worked with the data shared by you and have been able to notice that fields.length equals to zero and when we tried to edit fields with Acrobat Reader, that as well prompted for no presence of any field as in the screenshot. NoFields.JPG

Moreover, we have noticed that the application you are using to generate shared PDF document, is using an outdated version of Aspose.PDF API. Please upgrade to latest available version Aspose.PDF for Java 18.6 in your environment.