Hi,
I have created PdfTextBoxFieldWidget fields in my PDF. I fill these fields using c# code. One of these fields has a different (my own) font. The font is set in the field in MyFileTemplate
When my pdf is generated and saved on the disk, this field with the special font is not displayed. But as soon as I click with a mouse, the correct font is displayed. My application sends the pdfs directly to printer. How can I fix this field. Please see my code below
using (PdfDocument doc = new PdfDocument())
{
doc.LoadFromFile(MyFileTemplate);
PdfFormWidget formWidget = doc.Form as PdfFormWidget;
(formWidget.FieldsWidget["UserID"] as PdfTextBoxFieldWidget).Text = Username;
(formWidget.FieldsWidget["Name"] as PdfTextBoxFieldWidget).Text =Name;
(formWidget.FieldsWidget["Address"] as PdfTextBoxFieldWidget).Text = Address;
// Special field
(formWidget.FieldsWidget["Barcode"] as PdfTextBoxFieldWidget).Text = "3653856";
doc.SaveToFile(MyFilePath);
}