Struct PageMargins
- Namespace
- NetPdf
- Assembly
- NetPdf.dll
Default page margins applied unless overridden by @page CSS.
All values are in CSS pixels (1 in = 96 px at default DPI).
public readonly record struct PageMargins : IEquatable<PageMargins>
- Implements
- Inherited Members
Constructors
PageMargins(double, double, double, double)
Default page margins applied unless overridden by @page CSS.
All values are in CSS pixels (1 in = 96 px at default DPI).
public PageMargins(double TopPx, double RightPx, double BottomPx, double LeftPx)
Parameters
Properties
BottomPx
public double BottomPx { get; init; }
Property Value
Default
1-inch margin on every side. Equivalent to @page { margin: 1in; }.
public static PageMargins Default { get; }
Property Value
LeftPx
public double LeftPx { get; init; }
Property Value
None
Zero margin (edge-to-edge).
public static PageMargins None { get; }
Property Value
RightPx
public double RightPx { get; init; }
Property Value
TopPx
public double TopPx { get; init; }
Property Value
Methods
Symmetric(double, double)
Vertical / horizontal pair.
public static PageMargins Symmetric(double verticalPx, double horizontalPx)
Parameters
Returns
Uniform(double)
Uniform margin on all four sides.
public static PageMargins Uniform(double px)
Parameters
pxdouble