Class PrintConfigAttributes


  • public final class PrintConfigAttributes
    extends Object
    Configuration attributes that are used to configure printing.
    Since:
    1.5
    • Field Detail

      • FITTING_MODE

        public static final ConfigAttribute<Direction> FITTING_MODE
        Configuration attribute to configure the scaling mode on printing.
        • Direction.NONE - no content related scaling, simple DPI scaling (default)
        • Direction.HORIZONTAL - the content is scaled so that all columns are printed on one page
        • Direction.VERTICAL - the content is scaled so that all rows are printed on one page
        • Direction.BOTH - the content is scaled so that all columns and rows are printed on one page
      • STRETCH

        public static final ConfigAttribute<Boolean> STRETCH
        Configuration attribute to configure a scaling option in case FITTING_MODE is set. By default only downscaling is supported on enabling the fit-to-page scaling. By setting STRETCH to true also upscaling will be performed to make the most out of the available space.

        Note: stretching is only supported for fitting mode Direction.HORIZONTAL.

      • DATE_FORMAT

        public static final ConfigAttribute<String> DATE_FORMAT
        Configuration attribute to configure the date format that is used for rendering the print date in the footer region. If not specified the default value EEE, d MMM yyyy HH:mm a will be used.
      • FOOTER_HEIGHT

        public static final ConfigAttribute<Integer> FOOTER_HEIGHT
        Configuration attribute to configure the height of the footer. Needs to be specified in printer DPI value. If not set the default value 300 will be used.
      • FOOTER_STYLE

        public static final ConfigAttribute<IStyle> FOOTER_STYLE
        Configuration attribute to configure the style that should be used to print the footer. Currently only background color, foreground color and font style attributes are supported.
      • FOOTER_PAGE_PATTERN

        public static final ConfigAttribute<String> FOOTER_PAGE_PATTERN
        Configuration attribute to configure the pattern for rendering the page information in the footer. The pattern can include placeholders for the current page and the total page count, where {0} = current page and {1} = total page count, e.g. Page {0}/{1} to show Page 1/6
      • DEFAULT_PAGE_ORIENTATION

        public static final ConfigAttribute<Integer> DEFAULT_PAGE_ORIENTATION
        Configuration attribute to configure the default orientation of the paper that should be applied to the PrintDialog. Can be either PrinterData#PORTRAIT or PrinterData#LANDSCAPE.
        Since:
        1.6