 |
PdfMargins Class |
Represents the margins (in points) of a PDF page or element. Used, for example, when adding a
page with
Add(PdfCustomPageSize, PdfMargins) or when configuring
the conversion output.
Inheritance HierarchySystemObject
SelectPdf.UniversalPdfMargins
Namespace: SelectPdf.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
SyntaxThe PdfMargins type exposes the following members.
Constructors
Properties| | Name | Description |
|---|
 | Bottom |
Gets or sets the bottom margin in points.
|
  | Empty |
Gets a PdfMargins with all margins set to zero.
|
 | Left |
Gets or sets the left margin in points.
|
 | Right |
Gets or sets the right margin in points.
|
 | Top |
Gets or sets the top margin in points.
|
Top
Example
PdfDocument document = new PdfDocument();
document.Pages.Add(PdfCustomPageSize.A4, new PdfMargins(40));
document.Pages.Add(PdfCustomPageSize.A4, new PdfMargins(20, 20, 50, 30));
document.Save("margins.pdf");
document.Close();
Dim document As New PdfDocument()
document.Pages.Add(PdfCustomPageSize.A4, New PdfMargins(40))
document.Pages.Add(PdfCustomPageSize.A4, New PdfMargins(20, 20, 50, 30))
document.Save("margins.pdf")
document.Close()
See Also