We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

I cannot read fields from PDF

Hi Syncfusion team,

I am trying to read the fields from a PDF file which is not flattened (I can select the fields in a PDF reader). However, the "fields" from PdfFormFieldCollection is always empty.

empty fields.JPG

I followed the documentation here but no luck.

When I extract the entire text I can read the whole document but without the fields.

String text = PdfTextExtractor(document).extractText();


In the attached file, how can I read the number "35" (after "Transaction Property Address")?

Capture.JPG

Thank you in advance,



Attachment: I_cannot_read_fields_7f270aef.zip


2 Replies 1 reply marked as answer

IJ Irfana Jaffer Sadhik Syncfusion Team March 30, 2023 11:55 AM UTC

We have checked the reported issue with the provided details on our end. There are no form fields in the provided pdf document. The field values are flattened at different times. So the field values are getting extracted at last when using extract text.


Please find the attached output file below generated with the extracted text with text line collection:

Output: https://www.dropbox.com/s/p48r173neu2nv1q/Result%20-1.txt?dl=0

Follow the below links for more information,

https://help.syncfusion.com/flutter/pdf/working-with-text-extraction#working-with-lines




Marked as answer

TV Thiago Valente Aguiar March 31, 2023 02:52 AM UTC

Thank you!


Loader.
Live Chat Icon For mobile
Up arrow icon