onPageLayoutReady_(pageLayout, hasCustomPageSizeStyle) {
      // NOTE: A request ID is not specified, so assuming its for the current
      // in-flight request.

      const origin = new print_preview.Coordinate2d(
          pageLayout.printableAreaX, pageLayout.printableAreaY);
      const size = new print_preview.Size(
          pageLayout.printableAreaWidth, pageLayout.printableAreaHeight);

      const margins = new print_preview.Margins(
          Math.round(pageLayout.marginTop), Math.round(pageLayout.marginRight),
          Math.round(pageLayout.marginBottom),
          Math.round(pageLayout.marginLeft));

      const o = print_preview.ticket_items.CustomMarginsOrientation;
      const pageSize = new print_preview.Size(
          pageLayout.contentWidth + margins.get(o.LEFT) + margins.get(o.RIGHT),
          pageLayout.contentHeight + margins.get(o.TOP) +
              margins.get(o.BOTTOM));

      this.documentInfo_.updatePageInfo(
          new print_preview.PrintableArea(origin, size), pageSize,
          hasCustomPageSizeStyle, margins);
    }
/**
     * Called when the page layout of the document is ready. Always occurs
     * as a result of a preview request.
     * @param {{marginTop: number,
     *          marginLeft: number,
     *          marginBottom: number,
     *          marginRight: number,
     *          contentWidth: number,
     *          contentHeight: number,
     *          printableAreaX: number,
     *          printableAreaY: number,
     *          printableAreaWidth: number,
     *          printableAreaHeight: number,
     *        }} pageLayout Layout information about the document.
     * @param {boolean} hasCustomPageSizeStyle Whether this document has a
     *     custom page size or style to use.
     * @private
     */
Called when the page layout of the document is ready. Always occurs
as a result of a preview request.
Called when the page layout of the document is ready . Always occurs as a result of a preview request .
onPageLayoutReady_(pageLayout, hasCustomPageSizeStyle) {
      const origin = new print_preview.Coordinate2d(
          pageLayout.printableAreaX, pageLayout.printableAreaY);
      const size = new print_preview.Size(
          pageLayout.printableAreaWidth, pageLayout.printableAreaHeight);
      const margins = new print_preview.Margins(
          Math.round(pageLayout.marginTop), Math.round(pageLayout.marginRight),
          Math.round(pageLayout.marginBottom),
          Math.round(pageLayout.marginLeft));
      const o = print_preview.ticket_items.CustomMarginsOrientation;
      const pageSize = new print_preview.Size(
          pageLayout.contentWidth + margins.get(o.LEFT) + margins.get(o.RIGHT),
          pageLayout.contentHeight + margins.get(o.TOP) +
              margins.get(o.BOTTOM));
      this.documentInfo_.updatePageInfo(
          new print_preview.PrintableArea(origin, size), pageSize,
          hasCustomPageSizeStyle, margins);
    }
onPageLayoutReady_ ( pageLayout , hasCustomPageSizeStyle ) { const origin = new print_preview . Coordinate2d ( pageLayout . printableAreaX , pageLayout . printableAreaY ) ; const size = new print_preview . Size ( pageLayout . printableAreaWidth , pageLayout . printableAreaHeight ) ; const margins = new print_preview . Margins ( Math . round ( pageLayout . marginTop ) , Math . round ( pageLayout . marginRight ) , Math . round ( pageLayout . marginBottom ) , Math . round ( pageLayout . marginLeft ) ) ; const o = print_preview . ticket_items . CustomMarginsOrientation ; const pageSize = new print_preview . Size ( pageLayout . contentWidth + margins . get ( o . LEFT ) + margins . get ( o . RIGHT ) , pageLayout . contentHeight + margins . get ( o . TOP ) + margins . get ( o . BOTTOM ) ) ; this . documentInfo_ . updatePageInfo ( new print_preview . PrintableArea ( origin , size ) , pageSize , hasCustomPageSizeStyle , margins ) ; }
Called when the page layout of the document is ready.
Called when the page layout of the document is ready .
// NOTE: A request ID is not specified, so assuming its for the current // in-flight request.