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);
Set new font properties
Re: Set new font properties
Support · Nov 7, 2024Hi,
Please send over following information to [^a|mailto:support@dynamicpdf.com|opennewwindow|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