TemplateOptions
require(["esri/widgets/Print/TemplateOptions"], function(TemplateOptions) { /* code goes here */ });
esri/widgets/Print/TemplateOptions
Defines the layout template options used by the Print widget to generate the print page.
- See also:
templateOptions = new TemplateOptions({
title: "My Print",
author: "Sam",
copyright: "My Company",
legendEnabled: false
});
Constructors
- new TemplateOptions(properties)
- Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
Boolean | When | more details | TemplateOptions | |
String | The text used for the author if the specified layout contains an author text element. more details | more details | TemplateOptions | |
String | The text used for the copyright if the specified layout contains an copyright text element. more details | more details | TemplateOptions | |
String | The name of the class. more details | more details | Accessor | |
String | Resolution in dots per inch. more details | more details | TemplateOptions | |
Boolean | When true, the feature's attributes are included in feature collection layers even when they are not needed for rendering. more details | more details | TemplateOptions | |
String | The output format for the printed map. more details | more details | TemplateOptions | |
Number | Map height. more details | more details | TemplateOptions | |
String | The layout used for the print output. more details | more details | TemplateOptions | |
Boolean | When | more details | TemplateOptions | |
Boolean | When | more details | TemplateOptions | |
String | The text used for the map title if the specified layout contains a title text element. more details | more details | TemplateOptions | |
Number | Map width. more details | more details | TemplateOptions |
Property Details
- attributionEnabledBoolean
When
false
, the attribution is not displayed on the printout. This only applies when the layout value ismap-only
. Reference our policies on Licensing & Attribution for specific attribution requirements.- Default Value:true
- authorString
The text used for the author if the specified layout contains an author text element.
- copyrightString
The text used for the copyright if the specified layout contains an copyright text element.
- Since: ArcGIS API for JavaScript 4.7
The name of the class. The declared class name is formatted as
esri.folder.className
.
- dpiString
Resolution in dots per inch.
- Default Value:96
- forceFeatureAttributesBooleanSince: ArcGIS API for JavaScript 4.8
When true, the feature's attributes are included in feature collection layers even when they are not needed for rendering. By default they are removed to reduce the request size. Only applicable to custom print services which use the feature attributes, for example to display a table of features and their attributes.
- Default Value:false
- formatString
The output format for the printed map.
Possible Values: pdf | png32 | png8 | jpg | gif | eps | svg | svgz
- Default Value:pdf
- layoutString
The layout used for the print output. When the value is
map-only
or is empty, the output map does not contain any page layout surroundings (for example, title, legend, scale bar and so forth). The print service provides out-of-the-box templates listed in possible values. The server administrator can add additional templates to the print service.Possible values are listed below:
Value Description map-only Map does not contain any layout elements. Only map image is printed. a3-landscape A3 Landscape a3-portrait A3 Portrait a4-landscape A4 Landscape a4-portrait A4 Portrait letter-ansi-a-landscape Letter ANSI A Landscape letter-ansi-a-portrait Letter ANSI A Portrait tabloid-ansi-b-landscape Tabloid ANSI B Landscape tabloid-ansi-b-portrait Tabloid ANSI B Portrait - Default Value:letter-ansi-a-landscape
- legendEnabledBoolean
When
false
, the legend is not displayed on the printout.- Default Value:true
- scaleEnabledBoolean
When
true
, scale is used in the printed map.- Default Value:false
- titleString
The text used for the map title if the specified layout contains a title text element.