Package com.smartgwt.client.util.workflow

# Class PrintCanvasTask

java.lang.Object
com.smartgwt.client.core.BaseClass
com.smartgwt.client.util.workflow.ProcessElement
com.smartgwt.client.util.workflow.ComponentTask
com.smartgwt.client.util.workflow.PrintCanvasTask

All Implemented Interfaces:
  `HasHandlers`

public class PrintCanvasTask extends ComponentTask
Print canvas by showing print preview.

See Also:
  - `Canvas.showPrintPreview(com.smartgwt.client.widgets.Canvas)`
  - `RPCManager.exportContent(com.smartgwt.client.widgets.Canvas)`

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.core.BaseClass

  `config, configOnly, factoryCreated, factoryProperties, id, scClassName`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PrintCanvasTask()`
  `PrintCanvasTask(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `JavaScriptObject`
  `create()`
  `Boolean`
  `getExportAsPdf()`
  Should the canvas contents be exported to a PDF file instead of a print preview?
  `String`
  `getExportFilename()`
  Default name of the exported PDF file.
  `static PrintCanvasTask`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `PrintProperties`
  `getPrintProperties()`
  PrintProperties object for customizing the print HTML output.
  `PrintWindow`
  `getPrintWindowProperties()`
  Properties to apply to the generated print window.
  `PrintCanvasTask`
  `setExportAsPdf(Boolean exportAsPdf)`
  Should the canvas contents be exported to a PDF file instead of a print preview?
  `PrintCanvasTask`
  `setExportFilename(String exportFilename)`
  Default name of the exported PDF file.
  `PrintCanvasTask`
  `setPrintProperties(PrintProperties printProperties)`
  PrintProperties object for customizing the print HTML output.
  `PrintCanvasTask`
  `setPrintWindowProperties(PrintWindow printWindowProperties)`
  Properties to apply to the generated print window.

  ### Methods inherited from class com.smartgwt.client.util.workflow.ComponentTask

  `getComponentBaseClass, getComponentBaseClassAsStringArray, getComponentId, getComponentRequiresDataSource, getTargetBaseClass, getTargetBaseClassAsStringArray, getTargetComponent, getTargetComponent, getUnsupportedComponentMessage, setComponentBaseClass, setComponentBaseClass, setComponentId, setComponentRequiresDataSource, setTargetBaseClass, setTargetBaseClass, setUnsupportedComponentMessage`

  ### Methods inherited from class com.smartgwt.client.util.workflow.ProcessElement

  `completeElement, convertToJavaScriptArray, executeElement, getBindOutput, getClassDescription, getComponentReferences, getDescription, getDynamicValue, getEditorType, getElementDescription, getForceSingle, getID, getInvalidTaskMessage, getJsObj, getMockMode, getNextElement, getOrCreateJsObj, getPassThruOutput, getProcessElements, getSupportsMultipleInputRecords, getTextFormulaValue, getTypeTitle, getUndefinedComponentMessage, getUnresolvedComponentMessage, getWaitDuration, getWaitFor, getWaitLocator, isCreated, isValid, objectReferencesLastTaskOutput, onInit, reset, setAttribute, setBindOutput, setClassDescription, setDescription, setEditorType, setForceSingle, setID, setJavaScriptObject, setMockMode, setNextElement, setPassThruOutput, setSupportsMultipleInputRecords, setTypeTitle, setUndefinedComponentMessage, setUnresolvedComponentMessage, setWaitDuration, setWaitFor, setWaitLocator, updateGlobalIDInCriteria, updateGlobalIDInTextFormula, updateGlobalIDInValueProperty, updateGlobalIDInValues, updateGlobalIDReferences, updateLastElementBindingReferences, updateLastElementInCriteria, updateLastElementInValueProperty, updateLastElementInValues`

  ### Methods inherited from class com.smartgwt.client.core.BaseClass

  `addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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