GeneratePDFOptions: {
    body: {
        html: string;
    };
    footer?: {
        html: string;
    };
    header?: {
        html: string;
    };
    page?: {
        margins?: {
            bottom?: string;
            left?: string;
            right?: string;
            top?: string;
        };
        orientation?: "Portrait" | "Landscape";
        size?:
            | FormSubmissionPDFPageSize
            | "Legal"
            | "Tabloid"
            | "Ledger"
            | "A0"
            | "A1"
            | "A2"
            | "A3"
            | "A5"
            | "A6";
    };
}

Type declaration

  • body: {
        html: string;
    }

    The HTML to render as a pdf

    • html: string
  • Optionalfooter?: {
        html: string;
    }

    The HTML to render at the bottom of every page

    • html: string
  • Optionalheader?: {
        html: string;
    }

    The HTML to render at the top of every page

    • html: string
  • Optionalpage?: {
        margins?: {
            bottom?: string;
            left?: string;
            right?: string;
            top?: string;
        };
        orientation?: "Portrait" | "Landscape";
        size?:
            | FormSubmissionPDFPageSize
            | "Legal"
            | "Tabloid"
            | "Ledger"
            | "A0"
            | "A1"
            | "A2"
            | "A3"
            | "A5"
            | "A6";
    }
    • Optionalmargins?: {
          bottom?: string;
          left?: string;
          right?: string;
          top?: string;
      }
      • Optionalbottom?: string

        How much space between the right of each page and the content. Supported dimension units are: 'mm', 'cm', 'in', 'px'

      • Optionalleft?: string

        How much space between the left of each page and the content. Supported dimension units are: 'mm', 'cm', 'in', 'px'

      • Optionalright?: string

        How much space between the right of each page and the content. Supported dimension units are: 'mm', 'cm', 'in', 'px'

      • Optionaltop?: string

        How much space between the top of each page and the content. Supported dimension units are: 'mm', 'cm', 'in', 'px'

    • Optionalorientation?: "Portrait" | "Landscape"

      'Portrait' or 'Landscape'. Default is 'Portrait'

    • Optionalsize?:
          | FormSubmissionPDFPageSize
          | "Legal"
          | "Tabloid"
          | "Ledger"
          | "A0"
          | "A1"
          | "A2"
          | "A3"
          | "A5"
          | "A6"

      'Letter', 'Legal', 'Tabloid', 'Ledger', 'A0', 'A1', 'A2', 'A3', 'A4', 'A5' or 'A6'. Default is 'A4'