Click or drag to resize
Pdftools logo

Margin Structure

The margin defines the space around elements.

The class is based on the respective distances left, bottom, right, and top of type Length.

Inheritance Hierarchy
SystemObject
  SystemValueType
    PdfTools.Geometry.UnitsMargin

Namespace: PdfTools.Geometry.Units
Assembly: PdfTools (in PdfTools.dll) Version: 1.7.0+cfcc11b476b3e1eb4320f0f37269191f64e36bd8
Syntax
C#
public struct Margin

The Margin type exposes the following members.

Properties
 NameDescription
Public propertyBottom

Get the bottom margin as Length object.

Public propertyLeft

Get the left margin as Length object.

Public propertyRight

Get the right margin as Length object.

Public propertyTop

Get the top margin as Length object.

Public propertyStatic memberZero 
Top
Methods
 NameDescription
Public methodStatic membercm Create a Margin object with the unit of the margins in centimetre (symbol cm, equal to 0.01m).
Public methodEquals
(Overrides ValueTypeEquals(Object))
Public methodStatic memberFromLength Create a Margin object with the margins as Length objects.
Public methodStatic memberFromLengths Create a Margin object with the margins as Length objects.
Public methodGetHashCode
(Overrides ValueTypeGetHashCode)
Public methodStatic memberin Create a Margin object with the unit of the margins in inch (symbol in, equal to 25.4mm or 72pt).
Public methodStatic memberkm Create a Margin object with the unit of the margins in kilometre (symbol km, equal to 1000m).
Public methodStatic memberm Create a Margin object with the unit of the margins in metre (symbol m, is the SI unit of length).
Public methodStatic membermm Create a Margin object with the unit of the margins in millimetre (symbol mm, equal to 0.001m).
Public methodStatic memberParse Create a Margin object from a string representation.
Public methodStatic memberpt Create a Margin object with the unit of the margins in point (symbol pt, is the default unit used in PDF documents, equal to 1/72in or 25.4/72mm).
Public methodToString Creates a string representation as left-bottom-right-top-tuple with associated suitable metric units, "m", "cm" or "mm".
(Overrides ValueTypeToString)
Public methodStatic memberum Create a Margin object with the unit of the margins in micrometre (symbol um, equal to 0.000001m).
Top
See Also