Welcome Guest Search | Active Topics | Sign In | Register

Changing "PdfField.Name" does not make any difference in the pdf document Options
Martin36
Posted: Tuesday, May 15, 2018 5:53:16 AM
Rank: Newbie
Groups: Member

Joined: 5/15/2018
Posts: 2
I am trying to rename my form fields in a pdf document. The "PdfField" class has a property called "Name" which I have changed but nothing is changing in the rendered pdf. I have tried to change other properties of the PdfField such as Color and Value and that seems to work. But I have no idea why the changing of the name don't work. Here is my code:

doc = new PdfDocument(pdfFileName);

var field1 = doc.Fields["Produkt"];
field1.Color = Color.Blue;
field1.Value = "Hej";
field1.Name = "New Name";
field1.Modified();

var field2 = doc.Fields["ISIN"];
field2.Color = Color.Red;
field2.Value = "Hejdå";

doc.Save(newFilePathName);

Does anyone know why the name is not changing?
eo_support
Posted: Thursday, May 17, 2018 10:28:25 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

We tested this on the latest build and it seems to work fine. So please make sure you are using the latest version first. If you still have problem, you can try to isolate the problem into a test project and then send the test project to us. See here for more details:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.