 |
PdfCanvas Class |
Base class for objects that can render pdf page elements.
Inheritance Hierarchy Namespace: SelectPdf.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntaxpublic abstract class PdfCanvas
Public MustInherit Class PdfCanvas
The PdfCanvas type exposes the following members.
Constructors
Properties| | Name | Description |
|---|
 | ClientRectangle |
Gets the drawable area of the canvas. The page margins (and, for a page, the document header
and footer) are excluded.
|
Top
Methods
RemarksPdfCanvas is the base class for
PdfPage and
PdfTemplate.
Use
PdfPage to add elements at a specific position on a single page; use
PdfTemplate to add elements that repeat on more than one page.
ExamplePdfDocument document = new PdfDocument();
PdfCanvas canvas = document.AddPage();
PdfFont font = PdfFont.CreateStandardFont(PdfStandardFont.Helvetica, 12f);
SizeF size = canvas.MeasureString("Hello", font);
RectangleF area = canvas.ClientRectangle;
document.Close();Dim document As New PdfDocument()
Dim canvas As PdfCanvas = document.AddPage()
Dim font As PdfFont = PdfFont.CreateStandardFont(PdfStandardFont.Helvetica, 12.0F)
Dim size As SizeF = canvas.MeasureString("Hello", font)
Dim area As RectangleF = canvas.ClientRectangle
document.Close()
See Also