Class PrintCanvasTask

All Implemented Interfaces:
HasHandlers

public class PrintCanvasTask extends ComponentTask
Print canvas by showing print preview.
See Also:
  • Constructor Details

    • PrintCanvasTask

      public PrintCanvasTask()
    • PrintCanvasTask

      public PrintCanvasTask(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static PrintCanvasTask getOrCreateRef(JavaScriptObject jsObj)
    • create

      public JavaScriptObject create()
      Overrides:
      create in class ComponentTask
    • setExportAsPdf

      public PrintCanvasTask setExportAsPdf(Boolean exportAsPdf) throws IllegalStateException
      Should the canvas contents be exported to a PDF file instead of a print preview?

      An export file name can be specified in exportFilename.

      Parameters:
      exportAsPdf - New exportAsPdf value. Default value is null
      Returns:
      PrintCanvasTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getExportAsPdf

      public Boolean getExportAsPdf()
      Should the canvas contents be exported to a PDF file instead of a print preview?

      An export file name can be specified in exportFilename.

      Returns:
      Current exportAsPdf value. Default value is null
    • setExportFilename

      public PrintCanvasTask setExportFilename(String exportFilename) throws IllegalStateException
      Default name of the exported PDF file.
      Parameters:
      exportFilename - New exportFilename value. Default value is null
      Returns:
      PrintCanvasTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getExportFilename

      public String getExportFilename()
      Default name of the exported PDF file.
      Returns:
      Current exportFilename value. Default value is null
    • setPrintProperties

      public PrintCanvasTask setPrintProperties(PrintProperties printProperties) throws IllegalStateException
      PrintProperties object for customizing the print HTML output.
      Parameters:
      printProperties - New printProperties value. Default value is null
      Returns:
      PrintCanvasTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getPrintProperties

      public PrintProperties getPrintProperties()
      PrintProperties object for customizing the print HTML output.
      Returns:
      Current printProperties value. Default value is null
    • setPrintWindowProperties

      public PrintCanvasTask setPrintWindowProperties(PrintWindow printWindowProperties) throws IllegalStateException
      Properties to apply to the generated print window.
      Parameters:
      printWindowProperties - New printWindowProperties value. Default value is null
      Returns:
      PrintCanvasTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getPrintWindowProperties

      public PrintWindow getPrintWindowProperties()
      Properties to apply to the generated print window.
      Returns:
      Current printWindowProperties value. Default value is null