open-nav
    Preparing search index...

    Function toMargins

    • Expand a CSS margin shorthand into PDF's [left, top, right, bottom].

      CSS orders shorthand clockwise from the top; pdfmake starts at the left. Getting that wrong swaps the margins on a non-square page, which is exactly the kind of error nobody notices until something prints.

      Parameters

      • value: string
      • fallback: number

      Returns [number, number, number, number]