mflawton

Printout link gone in print dijit

Discussion created by mflawton on Sep 27, 2013
Latest reply on Sep 27, 2013 by mflawton
This is hopefully an easy question... I've been hacking away at the print dijit and finally have it working in my app. Along the way, I did something that caused me to lose the "Printout" link that gets generated when the printout is ready to be viewed. Instead my print button automatically opens the finished PDF as a popup. This would be fine, except I know most folks are going to have popup blockers in their browsers and I will probably get a thousand phone calls from people who can't see the printout popup because it gets blocked.

How do I get the "Printout" link back?

I've boiled my print dijit startup down to one function. Perhaps I boiled it down too much. I will paste below in case there is something that sticks out.

function startupPrinter() {
 var printDisclaimer = "DISCLAIMER";
 var printCopyright = "Contact Info";
 var printer = new esri.dijit.Print({
  map: map,
  templates: [
   {
     format: "PDF",
     label: "8.5x11",
     layout: "Letter ANSI A Landscape",
     layoutOptions: {
       authorText: printDisclaimer,
       copyrightText: printCopyright
     }
   },
   {
     format: "PDF",
     label: "11x17",
     layout: "Tabloid ANSI B Landscape",
     layoutOptions: {
       authorText: printDisclaimer,
       copyrightText: printCopyright
     }
   }
  ],
  url: "http://" + hostName + "/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
 }, dojo.dom.byId("printButton"));
 printer.startup();
};

Outcomes