Display and read user entered values not work on some fields

Hi,

I’m having a couple of issues when using the Aspose PDF and would like to get assistance.

  1. Reading user entered value.
  2. Displaying values on fields which are active if certain checkbox is ticked.

Below is the PDF when first opened.
image.png (14.2 KB)

The fields employer’s name and phone number do contain values. In this instance, I have to make value change on question no. 12 (Brief description of the injury or illness) and then focus to any other fields to trigger the values to be shown as per below.
image.png (15.3 KB)

My questions are:

  1. Is there a way to get them shown on opening?
  2. The value of “Employer’s name” cannot be retrieved by these codes below (i.e. Value yielded empty text) but the phone numbers are fine. Why?

foreach (Field formField in pdfDocument.Form.Fields)
{
Console.WriteLine("Field Name : {0} ", formField.FullName);
Console.WriteLine("Value : {0} ", formField.Value);
}

Thank you.

Regards,

@ctaneda

Thank you for contacting support.

We would like to request you to share source PDF file and explicitly mention the fields for which the values are not retrieved. Also name the check boxes you want to check and which values do you want to display, with the help of screenshots so that we may investigate further to help you out.

Hi Farhan,

Please find attached the PDF I’m working on.
MCR Notice of Judgement.pdf (215.0 KB)

As explained in the earlier message, I’m interested in Question no. 13 option “Worker’s Compensation” on page 2 which related values not shown upon opening the file. Below is the screen shot of the mentioned page.
image.png (84.2 KB)

The field’s full name is “1.Inj_EmployersName” and its related check box’s is “1.Inj_CompType”.

Regards,

@ctaneda

Thank you for elaborating it further.

We have modified the field values under Employer's Name and Employer's Phone Number and then saved it with Save As option. We have noticed that Employer's Name is not displayed by using shared code snippet. A screenshot has been attached for your kind reference FieldName.png. However, when the file is opened, these modified values are displayed fine.

Regarding this approach, we have not been able to display values in source PDF file shared by you by following this approach. Source PDF file does not appear to contain any value in Employer Name or Phone fields. So, we have noticed only one issue as of the screenshot with Aspose.PDF for .NET 18.6 in our environment. Please share your kind feedback so that we may proceed further to help you out.

Hi Farhan,

Thanks for confirming one of the two issues.

For the second one though, it works okay if you enter the values directly in the form (as what you have done) however if you fill the values from codes:

  • Set the checkbox field to Workers
  • Set the employer’s name
  • Set the phone number
  • Save, then open the file
    That’s when the populated values do not appear (until you make any changes of the other field).

Regards,

@ctaneda

Would you please share the code snippet that you are using to reproduce second issue so that we may proceed further to help you out.

Hi Farhan,

Please run the following codes to the attached PDF to reproduce the second issue:
AsposeTest.pdf (185.4 KB)

Aspose.Pdf.License lic = new Aspose.Pdf.License();
lic.SetLicense(@“D:\Temp\Aspose.Total.lic”);
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(@“D:\Temp\aspose\AsposeTest.pdf”);

foreach (Field formField in pdfDocument.Form.Fields)
{
if (formField.PartialName == “Inj_CompType”)
{
formField.Value = “Workers”;
}
else if (formField.PartialName == “Inj_EmployersName”)
{
formField.Value = “Emp Name”;
}
else if (formField.PartialName == “Inj_EmployPhonePrefix”)
{
formField.Value = “08”;
}
else if (formField.PartialName == “Inj_EmployPhoneNumber”)
{
formField.Value = “99994444”;
}
}

pdfDocument.Save(@“D:\Temp\aspose\AsposeTestFilled.pdf”);

Regards,

@ctaneda

Thank you for clarifying.

We have been able to reproduce the issue of not displaying the values when PDF file is opened. A ticket with ID PDFNET-45039 has been logged in our issue management system for further investigation and resolution.

Moreover, regarding the issue we had confirmed already, another ticket with ID PDFNET-45040 has been logged for further investigation and resolution. Both ticket IDs have been linked with this thread so that you will receive notifications as soon as the tickets are resolved.

We are sorry for the inconvenience.

I may very well have the same problem as described above and before I start a new topic I’d like to verify if that’s the case. However, I can’t look at the attachments to be sure. It says I don’t have permission: Sorry, this file is private. Only visible to topic owner and staff members.

Where can I look at PDFNET-45039 and PDFNET-45040 to see if they solve my issue?

By the way. I have recently purchased Aspose.PDF and should have a one-year support license but when I log in it says I am not eligible for support.

@Korthouwer

Thank you for contacting support.

We would like to update you that attachments over forums are not accessible to everyone, to ensure data privacy. Sometimes issues may appear same but they are not necessarily identical. Please create a separate topic for each problem, however you can refer to any ticket ID or thread while mentioning the details of your issue. Please also share source and generated files with us, if any. This will enable us to take care of your concerns more efficiently.

Moreover, we are afraid that you may not access the tickets PDFNET-45039 and PDFNET-45040, because they are logged in our internal issue tracking system (JIRA).

Regarding your query about support, we have created a thread over Purchase forum on your behalf. Kindly follow up in respective thread for any purchase or subscription related information.