Welcome Guest Search | Active Topics | Sign In | Register

Setting the font size on fillable field isn't working Options
PBG Admin
Posted: Monday, April 14, 2014 11:56:12 AM
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);
eo_support
Posted: Monday, April 14, 2014 1:31:20 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
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!
eo_support
Posted: Tuesday, April 15, 2014 10:04:02 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
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!
eo_support
Posted: Thursday, April 17, 2014 2:27:20 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
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!
PBG Admin
Posted: Saturday, April 19, 2014 7:43:47 PM
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!
eo_support
Posted: Monday, April 21, 2014 2:54:34 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Great. Thanks for confirming the fix!


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.