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:
    com.google.gwt.event.shared.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 and Description
    `PrintCanvasTask()`
    `PrintCanvasTask(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.gwt.core.client.JavaScriptObject` | `create()`
    `java.lang.Boolean` | `getExportAsPdf()` Should the canvas contents be exported to a PDF file instead of a print preview?
    `java.lang.String` | `getExportFilename()` Default name of the exported PDF file.
    `static PrintCanvasTask` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `PrintProperties` | `getPrintProperties()` PrintProperties object for customizing the print HTML output.
    `PrintWindow` | `getPrintWindowProperties()` Properties to apply to the generated print window.
    `PrintCanvasTask` | `setExportAsPdf(java.lang.Boolean exportAsPdf)` Should the canvas contents be exported to a PDF file instead of a print preview?
    `PrintCanvasTask` | `setExportFilename(java.lang.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 Detail

    - #### PrintCanvasTask

          public PrintCanvasTask()

    - #### PrintCanvasTask

          public PrintCanvasTask(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static PrintCanvasTask getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### create

          public com.google.gwt.core.client.JavaScriptObject create()

      Overrides:
        `create` in class `ComponentTask`

    - #### setExportAsPdf

          public PrintCanvasTask setExportAsPdf(java.lang.Boolean exportAsPdf)
                                         throws java.lang.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:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getExportAsPdf

          public java.lang.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(java.lang.String exportFilename)
                                            throws java.lang.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:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getExportFilename

          public java.lang.String getExportFilename()

      Default name of the exported PDF file.
      Returns:
        Current exportFilename value. Default value is null

    - #### setPrintProperties

          public PrintCanvasTask setPrintProperties(PrintProperties printProperties)
                                             throws java.lang.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:
        `java.lang.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 java.lang.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:
        `java.lang.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