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
Properties
Constructor Details
Creates a new PrintParameters object.
Sample:
require([
"esri/tasks/PrintParameters", ...
], function(PrintParameters, ... ) {
var params = new PrintParameters();
...
});
Property Details
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)
The map to print.
Sample:
params.map = map;
Specify the output spatial reference for the printout. (Added at v3.0)
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;
...
});