PDFPageLayout

public struct PDFPageLayout
extension PDFPageLayout: Equatable

Contains all relevant layout informations of a pdf document

PUBLIC VARS

  • Size of each page

    Declaration

    Swift

    public var size: CGSize
  • Margins of each page.

    header: Top inset of page footer: Bottom inset of page left: Left inset of page right: Right inset of page

    Declaration

    Swift

    public var margin: EdgeInsets
  • Spaces between header, content and footer.

    header: Space between header and content footer: Space between content and footer

    Declaration

    Swift

    public var space: (header: CGFloat, footer: CGFloat)

PUBLIC FUNCTIONS

  • Creates a new layout object using the given parameters.

    Declaration

    Swift

    public init(size: CGSize = .zero, margin: EdgeInsets = .zero, space: (header: CGFloat, footer: CGFloat) = (0, 0))

    Parameters

    size

    Size of the page

    margin

    Edge margin insets

    space

    Vertical spacing between header, footer and content

INTERNAL COMPUTED VARS

  • Returns a CGRect with a origin at zero and the size of the layout.

    Declaration

    Swift

    public var bounds: CGRect { get }
  • Shorthand access to layout width

    Declaration

    Swift

    public var width: CGFloat { get }
  • Shorthand access to layout height

    Declaration

    Swift

    public var height: CGFloat { get }
  • TODO: documentation

    Declaration

    Swift

    public static func == (lhs: PDFPageLayout, rhs: PDFPageLayout) -> Bool