Solved! Go to Solution.
var template = esri.tasks.PrintTemplate(); template.preserveScale = false;
var plate = new esri.tasks.PrintTemplate();
plate.format = "pdf";
plate.layout = "MAP_ONLY";
plate.exportOptions = {
width: map.width,
height: map.height,
dpi: 96
};
function printPDF() {
var printUrl = 'http://services.kgs.ku.edu/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task';
var printTask = new esri.tasks.PrintTask(printUrl);
var params = new esri.tasks.PrintParameters();
var template = new esri.tasks.PrintTemplate();
template.layout = layout; // layout set elsewhere
template.format = "PDF";
template.preserveScale = true;
template.showAttribution = false;
template.layoutOptions = {
scaleBarUnit: "Miles",
titleText: title, // title set elsewhere
legendLayers: []
};
params.map = app.map;
params.outSpatialReference = sr; // sr set elsewhere to 102100, also tried setting it to 3857
params.template = template;
printTask.execute(params, printResult, printError);
}
Another option is to set the projection of your print task template map to that of the data if you want to keep the scale bar and have it accurate