|
Rank: Newbie Groups: Member
Joined: 12/15/2011 Posts: 1
|
I am trying to utilize the form field fill in capabilities. I have a form that works with other form filling libraries, when I try to use EO.Pdf I always get a Property 'Rect' can not be empty. There are many fields on the form, none are required. Right now I am just trying to fill in a couple fields to test.
PdfDocument doc = new PdfDocument("c:\\testpdf\\PR_long.pdf");
PdfField LegalName = doc.Fields["Legal Name"]; PdfField dba = doc.Fields["dba"];
LegalName.Value = "Test Company"; dba.Value = "Test Company";
doc.Save("c:\\testpdf\\TestCompany.pdf");
I would appreciate any help, thank you.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
We do not know why it happens. It might be a bug on our side that it cannot handle certain things in your PDF file. So if you can send us the file, we will be very happy to look into it and see what we can find. We will PM you as to where to send the test project.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/1/2012 Posts: 1
|
I am evaluating EO for my employer and am getting the same error. Can you tell me what the resolution was for this problem? I have a PDF form where I am trying to fill in a few fields to confirm that EO will do what we want.
If you try to fill in a field that is not present, will it just be ignored, or is that going to throw an exception. Thx.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi danoman, We will need you to create a test project and send that to us in order to know exactly what's wrong. Please include all the necessary files (such as the PDF file that you are trying to fill). We will PM you as to where to send the test project. In order to fill a form field, you have to use something like this:
Code: C#
//Get the PdfField object
PdfField field = doc.Fields["your_field_name_here"];
//Set the field's value
field.Value = "new_value";
This first line will throw out an exception if the field name provided does not exist. You can catch the exception and ignore it. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 7/7/2011 Posts: 1
|
I found that if you have more than one field with the same name in a PDF causes this error. With adobe form file if you have the same name it fills both. But with EO you cannot.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Steve Hanna wrote:I found that if you have more than one field with the same name in a PDF causes this error. With adobe form file if you have the same name it fills both. But with EO you cannot. OK. We will investigate and let you know.
|
|
Rank: Newbie Groups: Member
Joined: 2/26/2014 Posts: 1
|
I'm sorry for reviving a old thread, but was there a resolution to this issue? I'm running into the same problem with a PDF form that has fields with the same name, and I receive the same error. I have tried to iterate through the Children collection of one of these fields and set the value for each child field, but it does not set the field values. It's interesting that the Children property does return the correct number of fields, but does not allow me to set the values. My form has many fields with the same name, so I'm looking for a solution that doesn't involve a long effort to rename all of these fields. Thanks for your help.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi mkji,
Can you send us a test file along with the test code so that we can look further? We will PM you as to where to send the files.
Thanks!
|
|