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

Free Support Forum - aspose.com

Aspose form class unable to read the custom textbox Field

Using Adobe form I have created a complex form with almost 50 tags. All the Fields are editable and can be filled in PDF file

While reading form using this snippet only able to read 5 to 6 fields which is strange. I have tried to read the data by providing custom field name which also didn’t work please recommend.

We are evaluating the Aspose PDF licence.

####code - 1( read all forms in the field) which I only get 5 to 6 fields which are in random order

    Document pdfDocument = new Document("Form.pdf");
		Form forms = pdfDocument.getForm();
//TextBoxField textBoxField = (TextBoxField) pdfDocument.getForm().get_Item("CustomTextBox");
TextBoxField textBoxField = (TextBoxField) pdfDocument.getForm().get("CustomTextBox");
		// Get the field name
		System.out.printf("PartialName :-" + textBoxField.getPartialName());
		System.out.println("\n");
		// Get the field value
		System.out.printf("Value :-" + textBoxField.getValue());*/

#####code-2(read by providing custom field)

Field[] fields = pdfDocument.getForm().getFields();
		for (int i = 0; i < fields.length; i++) {
			System.out.println("Form field: " + fields[i].getFullName());
			System.out.println("Form field: " + fields[i].getValue());
			}

@crashrik

Thanks for contacting support.

Please make sure, you set license properly before using any functionality of the API. In case you do not have any valid license, please consider applying for 30-days temporary license. If issue still persists, please share your sample PDF document with us. We will test the scenario in our environment and address it accordingly.