Articles in this section
Category / Section

How to embed a predefined font into a PDF document?

1 min read

 

We can embed a Font in PDF document with the help of the PdfTrueTypeFont.

C#

//Adding a font that can be used to draw Text .

Font font = new Font("Microsoft Sans Serif", fontSize, FontStyle.Regular);

PdfTrueTypeFont pdfFont = new PdfTrueTypeFont(font, false);

VB

'Adding a font that can be used to draw Text .

Dim font As Font = New Font("Microsoft Sans Serif", fontSize, FontStyle.Regular)

Dim pdfFont As PdfTrueTypeFont = New PdfTrueTypeFont(font, False)

Please do find the sample from the below specified location,

http://www.syncfusion.com/support/user/uploads/PDF_PredefinedFont_5ed409bf.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment