This example demonstrates how to add and use type1 font.
C# :
using PDFMosaic;
using System.Drawing;
namespace Type1Fonts
{
class Type1Fonts
{
static void Main()
{
PDFDocument document = new PDFDocument();
document.Pages.Add(new PDFPage(PDFPaperFormat.A4));
PDFCanvas canvas = document.Pages[0].Canvas;
PDFBrush brush = new PDFSolidBrush();
PDFFont fontType1 = new PDFFont("AGReverence", 12);
canvas.DrawString("The Type1 font.", fontType1, brush, 10, 60);
document.Save("Type1Fonts.pdf", true);
}
}
}
VB.NET :
Imports PDFMosaic
Imports System.Drawing
Module Type1Fonts
Sub Main()
Dim document As New PDFDocument()
document.Pages.Add(New PDFPage(PDFPaperFormat.A4))
Dim canvas = document.Pages(0).Canvas
Dim brush As New PDFSolidBrush()
Dim fontType1 As New PDFFont("AGReverence", 12)
canvas.DrawString("The Type1 Font.", fontType1, brush, 10, 120)
document.Save("Type1Fonts.pdf", True)
End Sub
End Module