Set new font properties

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v12)  /  Re: Set new font properties

DynamicPDF CoreSuite for .NET (v12) Forum

 Oct 12 2024 9:58 AM
I'm trying to set all the text fields font to new values.  The following codes doesn't throw any exceptions or errors, but the properties never change

string pdfFile = @"C:\Projects\Miscellaneous\Console\UnsecurePDF\UnsecurePDF\DA3161_Dec2023.pdf";
byte[] contents = File.ReadAllBytes(pdfFile);
MergeDocument document = new MergeDocument(contents);

for (int i = 0; i < document.Form.Fields.Count; i++)
{
    var formField = document.Form.Fields[i];
    var fieldName = formField.Name;            
    document.Form.Fields[i].Font = ceTe.DynamicPDF.Text.TimesRoman.TimesRoman;
    float fontSize = 8.00f;
    document.Form.Fields[i].FontSize = fontSize;
}
document.Draw(pdfFile);
 Nov 07 2024 7:45 AM
Posted by a ceTe Software moderator
Hi,

Please send over following information to support@dynamicpdf.com so we can look into it further.

1.Source PDF used for merging.
2.Code sample.
3.Output PDF.
4.Exact version and build number of DynamicPDF DLL file used in your application. You can find this information by right clicking on the DynamicPDF Core Suite DLL file>>Properties>>Details tab>>Product version. Take a screenshot of Details tab and send it over to us.

Please include a link for this forum in your Email to support team.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 12:35 PM.