 |
PdfPageMargins Property |
Gets the pdf page margins. Read-only.
Namespace: SelectPdf.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntaxpublic PdfMargins Margins { get; }Public ReadOnly Property Margins As PdfMargins
Get
Property Value
PdfMargins
Remarks
Resolved per document origin:
- New docs, pages created via Add(PdfCustomPageSize, PdfMargins, PdfPageOrientation):
returns the margins passed at Add time, or the document default in effect at
that moment if none were specified.
- HtmlToPdf output: returns the converter-assigned margins from
MarginLeft / MarginTop / MarginRight /
MarginBottom.
- Loaded docs: computed as MediaBox minus CropBox. Returns
zeros when the source PDF did not define a CropBox (it then defaults to MediaBox).
The property is get-only by design — to render content with specific margins on a
new page, pass them to
AddPage.
See Also