Hello
When using CustomFont in combination with FontSize the FontSize is ignored and set to standard 12pt
setting the FontSize works just fone when using one of the 14 standart integrated Fonts
Please find below the code used.
It atttempts to copy fields from one file to another.
If the FieldName is BCMobileNo the Custom Font Free 3 of 9 Extended shall be used and the Font Size shall be 28.
Dim pdfForm As New Aspose.Pdf.Facades.Form(inputFiles)
Dim formEditor As New Aspose.Pdf.Facades.FormEditor()
formEditor.BindPdf(outputFile)
Dim lowLeftX As Single
Dim lowLeftY As Single
Dim upRightX As Single
Dim upRightY As Single
For Each Fieldname In pdfForm.FieldNames
Dim fieldFacade As Aspose.Pdf.Facades.FormFieldFacade = pdfForm.GetFieldFacade(Fieldname)
Dim fiedlType As Aspose.Pdf.Facades.FieldType = pdfForm.GetFieldType(Fieldname)
lowLeftX = fieldFacade.Box.Left
lowLeftY = fieldFacade.Box.Bottom
upRightX = fieldFacade.Box.Left + fieldFacade.Box.Width
upRightY = fieldFacade.Box.Top
formEditor.AddField(fiedlType, Fieldname, fieldFacade.PageNumber, lowLeftX, lowLeftY, upRightX, upRightY)
If Fieldname = “BCMobileNo” Then
FormEditor.Facade.FontSize = 24
formEditor.Facade.CustomFont = “Free 3 of 9 Extended”
Else
formEditor.Facade.Font = fieldFacade.Font
formEditor.Facade.FontSize = fieldFacade.FontSize
End If
formEditor.DecorateField(Fieldname)
Next
formEditor.Save(outputFile)