Skip to content

Files

Latest commit

2ed51f3 · Oct 19, 2024

History

History
13 lines (8 loc) · 967 Bytes

File metadata and controls

13 lines (8 loc) · 967 Bytes

Draw lines and curves in C# and VB.NET

This sample shows how to draw straight lines and cubic Bezier curves on PDF canvas using Docotic.Pdf library.

Description

To draw anything in a PDF document, use the methods and properties of the PdfCanvas class. You can access a canvas using the Canvas property of PdfPage, PdfXObject, or PdfTilingPattern classes.

There are plenty of methods that draw lines, curves and shapes. All these methods have names that start with Draw (e.g. DrawLineTo method). The current pen is used to draw all kinds of lines.

See also