This sample shows how to draw text on a canvas using Docotic.Pdf library.
The code uses Canvas API that can add text to any PDF document. If you are going to create a new PDF, then consider using Layout API that can make PDF generation easier.
To draw text on a canvas, use the PdfCanvas.DrawString or PdfCanvas.DrawText methods. These methods draw text using the current canvas font.
DrawString
methods draw a single line of text either from the current text position or inscribed in the specified rectangle. The DrawText
method can draw multiple lines of text.