setCustomPaperSize

setCustomPaperSize(width:  Integer;
                   height: Integer) updating;

The setCustomPaperSize method of the Printer class dynamically set a custom printer paper size at run time. Specify the values of the width and height parameters in units of a tenth of a millimeter; for example, calling app.printer.setCustomPaperSize(2100, 2970); sets the paper size equivalent to Print_A4. The setCustomPaperSize method sets the Printer class documentType to the Printer category Print_Custom_Paper (256) global constant value and sets the paper size to the specified width and height.

Changing the value of the printer.documentType property resets any customized paper size. Changing printer.documentType to Print_Custom_Paper raises exception 15032 (you must call the setCustomPaperSize method).

Calling the setCustomPaperSize method during printing causes a printer.newPage call before being applied if printing is not currently at the start of a new page.