Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: PrintParameters

require(["esri/tasks/PrintParameters"], function(PrintParameters) { /* code goes here */ });

Description

(Added at v2.6)
Input parameters for the PrintTask.

Samples

Search for samples that use this class.

Constructors

NameSummary
new PrintParameters()Creates a new PrintParameters object.

Properties

NameTypeSummary
extraParametersObjectAdditional parameters for the print service.
mapMapThe map to print.
outSpatialReferenceSpatialReferenceSpecify the output spatial reference for the printout.
templatePrintTemplateDefines the layout template used for the printed map.
Constructor Details

new PrintParameters()

Creates a new PrintParameters object.
Sample:
require([
  "esri/tasks/PrintParameters", ... 
], function(PrintParameters, ... ) {
  var params = new PrintParameters();
  ...
});
Property Details

<Object> extraParameters

Additional parameters for the print service. When an arcpy script is published as a custom print service there may be additional parameters associated with the print service. To determine the extra parameters visit the ArcGIS REST Services Directory page for the print service. At version 3.0, this property is supported by the Print Task. (Added at v3.0)

<Map> map

The map to print.
Sample:
params.map = map;

<SpatialReference> outSpatialReference

Specify the output spatial reference for the printout. (Added at v3.0)

<PrintTemplate> template

Defines the layout template used for the printed map.
Sample:
require([
  "esri/map", "esri/tasks/PrintTemplate", "esri/tasks/PrintParameters", ... 
], function(Map, PrintTemplate, PrintParameters, ... ) {
  var map = new Map( ... );

  var template = new PrintTemplate();
  template.exportOptions = {
    width: 500,
    height: 400,
    dpi: 96
  };
  template.format = "PDF";
  template.layout = "MAP_ONLY";
  template.preserveScale = false;
  
  var params = new PrintParameters();
  params.map = map;
  params.template = template;
  ...
});
Show Modal