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

    See size for details

    margin

    See margin for details

    space

    See space for details

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 }
  • nodoc

    Declaration

    Swift

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