Good afternoon,
Is there some way to auto-generate the browser's Print... dialog, either in place of the Printout hyperlink or as part of it after being clicked? The following code is in place and working:
// print dijit
esriConfig.defaults.io.proxyUrl = "http://gistest1/DotNet/proxy.ashx"; esriConfig.defaults.io.alwaysUseProxy = false;
printer = new Print({ map: map, url: "http://gistest1:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task" }, dom.byId("printButton")); printer.startup();
Source reference:
Print | ArcGIS API for JavaScript 3.22
Thank you,
Greg
Greg,
Because the print output is produced server side and the returned value is just a link this will not be easy. The browsers print preview is for showing a html content print preview of what will be sent to the printer. So in your situation you would have to create a div in the apps main body and add the url of the print widgets result as an image (if you are requesting a pdf then you are out of luck) and then send that div to the browsers print method (this is simple explanation and would involve a lot more detail in truth).
OK, thank you for the reply. G
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.