I am trying to use a formatted text string to stamp a barcode on the top of a PDF document.
Instead of TimesBold below I need the barcode font:
FormattedText formText = new FormattedText("12345", System.Drawing.Color.Black, FontStyle.TimesBold, EncodingType.Winansi, false, 14);
The list of fonts in Aspose.Facades.PDF.FontStyle does not contain the 3 of 9 barcode font that I need. Is there a way to add the font? Or is there a different way to work with barcodes using another Aspose tool?
I am afraid Aspose.Pdf.Facades does not support the feature to specify the custom font to be used while adding text over PDF file but we have classes present under Aspose.Pdf and Aspose.Pdf.Text namespaces which support the feature to manipulate/edit existing PDF files and also they support the feature to add text using custom font installed over system.
In order to accomplish your requirement, please try using the following code snippet. For your reference, I have also attached the resultant PDF being generated over my end.
I am glad to hear that your requirement can be accomplished with above specified code. Please continue using our products and in the event of any further query, please feel free to contact.