Reg: Legend problem in Print

04-15-2014 08:04 PM
Occasional Contributor
Hello all,
Above is the legend with 3 layers in it. Each of them is a polygon . But as you can see it has not generated the polygon fully . And also sometimes my basemap comes blank in print output but I can see the basemap in the viewer .. Can anyone tell me why this is happening . Thanks a bunch

Below is the attached code

    var PDFTitle = "test";
    var plate = new esri.tasks.PrintTemplate();
    plate.preserveScale = false;
    plate.layout = plate.label = "44x32";
    plate.format = "PDF";
    plate.layoutOptions = {
        "titleText": PDFTitle

    var params = new esri.tasks.PrintParameters(); = map;
    params.template = plate;

    var printTask = new esri.tasks.PrintTask(printservice_url);

    printTask.execute(params, printResult, printError);

function printResult(result) {, "_blank");

function printError(error) {
0 Kudos
2 Replies
New Contributor III

When using the PrintTemplate, be sure to include LegendLayer

As for the custom basemap, is the basemap reference a global variable?  I believe it should be.

I hope this helps.

0 Kudos
New Contributor

Know this is an old post Vikram, did you ever resolve this ? I am running into the same problem.

0 Kudos