|
Rank: Newbie Groups: Member
Joined: 2/28/2014 Posts: 5
|
I'm trying to adjust the font size of many fields of an existing PDF document. If I open up the PDF with Adobe Reader, the font sizes in these fields are all the same.
Once I try to modify them via code, several of the fields are coming out with very small font sizes while others look fine. I'm using the EO.Pdf library.
Some parts of my code:
PdfField SignedCity = doc.Fields["Signed City"];
// Attempt #1: no impact on the size SignedCity.Font = new EO.Pdf.Drawing.PdfFont("Arial", 15); SignedCity.Color = System.Drawing.Color.Blue;
// Attempt #2: no impact on the size SignedCity.Font.Name = "Arial"; SignedCity.Font.Size = 12;
// Attempt #3: no impact on size public void SetPDFField(ref PdfField Field, String fontType, int fontSize) { Field.Font = new EO.Pdf.Drawing.PdfFont(fontType, fontSize); Field.Color = System.Drawing.Color.Blue;
}
SetPDFField(ref SignedCity, "Arial", 12);
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
We do not know why that occurs. Can you create a small test project and send the test project to us? We will PM you as to where to send it.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
We have received and looked into the test project. It appears that we are automatically adjusting the font size so that it fits into the textbox area. This is usually necessary so that the text doesn't get cut off. We are looking into it to see if this logic can be skipped in case the font size was explicitly set. We will reply again when we have additional information.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
We have posted a new build that should address this issue. Please see your private message for the download location of the new build.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/28/2014 Posts: 5
|
Hello - Thank you for the quick turnaround with the new build. I have been testing for the past several days and it is working as expected.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Great. Thanks for confirming the fix!
|
|