Type Alias PdfOutput

Output to be used to export a single visualization, a sheet, Sense Excel template as pdf. For Sense Excel template (sense-excel-template-1.0) no properties are needed, any property specified has no effect.

type PdfOutput = {
    align?: {
        horizontal?: "left" | "center" | "right";
        vertical?: "top" | "middle" | "bottom";
    };
    imageRenderingDpi?: number;
    orientation?: "P"
    | "L"
    | "A";
    properties?: DocProperties;
    resizeData?: { fit?: string };
    resizeType?: "none" | "autofit" | "fit";
    size?:
        | "A1"
        | "A2"
        | "A3"
        | "A4"
        | "A5"
        | "A6"
        | "Letter"
        | "Legal"
        | "Tabloid";
}
Index

Properties

align?: {
    horizontal?: "left" | "center" | "right";
    vertical?: "top" | "middle" | "bottom";
}

Content alignment.

imageRenderingDpi?: number

This value is used for rendered images only, set to a default of 300 dpi.

orientation?: "P" | "L" | "A"

P for portrait, L for landscape and A for auto-detect. Auto-detect sets the orientation depending on the content width and height proportions: if content width > height the orientation is automatically set to landscape, portrait otherwise.

properties?: DocProperties

Properties of the document. In case of multiple composition, only properties specified in the composition output are taken and the ones specified in each output item are ignored.

resizeData?: { fit?: string }

The area where the object (eg. sheet, chart) is printed. Required in case of "fit" resizeType.

Type declaration

  • Optionalfit?: string

    The size of the area in the following format "{width}{cm|mm}x{height}{cm|mm}" (e.g. "297mmx210mm"). Please remember that PDF page orientation (landscape or portrait) should match the width and height set for this field (eg. A4 landscape is "297mmx210mm", A4 portrait is "210mmx287mm"). Note that the minimum printable area is 1.5cmx1.5cm (corresponding to 0.6x0.6 inches at 96 DPI).

resizeType?: "none" | "autofit" | "fit"

The type of resize to be performed:

  • none is used to export a visualization, sheet or story as is (e.g. normal size), regardless of its size. This may result in cropping.
  • autofit automatically fits the visualization, sheet or story into the output size (i.e. A4, A3 etc.). Any provided resizeData parameter will be ignored for this configuration.
  • fit fits the visualization, sheet or story into the area specified in resizeData. The content will be rescaled to fit in that area.
size?: "A1" | "A2" | "A3" | "A4" | "A5" | "A6" | "Letter" | "Legal" | "Tabloid"

Size of the pdf page.