2/18/2017 - updated download links
This widget is an enhancement of the Esri Print Widget, which was originally written by David Spriggs.
Bug Fixes and Enhancements in Version 1.1.6
Bug Fixes and Enhancements in Version 1.1.5
Bug Fixes in Version 1.1.4
Bug Fixes in Version 1.1.3
Bug Fixes in Version 1.1.2
Enhancements and Changes in Version 1.1.1
Features:
Downloads:
PrintPlus-1.1.6-2015-7-12.zip
CompanionLayoutsWithNoTitleBlocks.zip
PrintPlus-1.1.6-2015-7-12 (download - widget by Larry Stout)
it worked this time.
had to turn off our proxy server. not sure why but all is well
thanks for the note.
I did the step "right click on the "PrintPlus-1.1.2-2015-4-11.zip" link and choose "Save Link As..." and then unzip the contents and copy the PrintPlus folder over to your \client\stemapp\widgets folder", and I created a new app the Print Plus widget, the widget shows up on my application, and I copied the "serviceURL": "http://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%2..." from the config.json to the \client\stemapp\config.jon (Not sure if I am correct), however, there was no the red frame show up and when I click print it says "error, try again", am I doing correct?
I've created a printing service using this tutorial:
ArcGIS Help 10.1 and it has created this service: ExportWebMap (GPServer)
I put that link into my config file, and whenever I try to run the print widget, I get an error: "Timeout exceeded." Am I missing something? I thought it was just a matter of creating a print service in ArcServer, telling the service where your layout templates are and then putting the URL of your new service in the config file.
Ping,
Make sure the contents of the config.json are where they need to be. In the stemapp, they are in the config.json in the PrintPlus folder. In the app you created, they may be in the config.json in the PrintPlus folder, or in a file called config_Print Plus in the server/apps/xxx/configs folder. If you look in the server/apps/xxx/config.json, and there is a property:
"config": "configs/PrintPlus/config_Print Plus.json"
then the widget will look for it in the configs folder. If there is no config property in the main config.json file, the widget will look for it in the widget folder.
Larry
Larry,
Is there anything special I need to do besides creating a print service per this tutorial: http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000005n1000000 and then copying the rest endpoint URL of the service into the print plus config.json? I’ve done this, and it doesn’t seem to work.
Rudie
Rudie,
I don't believe there is anything else to do. Have you verified that the Print Plus Widget is using the config file you think it is? This is fairly easy to do using the Chrome debugging tools. You can filter for config on the Network tab and see all of the config files that were loaded.
Larry
Yes, because when I change the link to my service, the tool times out. I go back and put in the ArcGIS Online URL, and it works again.
Can you share the URL of an app where it isn't working?
If not, can you share the URL to the print task you have made on your server?
I can’t share the app, it’s internal. But here is the print service http://www.oregongeology.org/arcgis/rest/services/ExportWebMap/GPServer
I do find both of the file in the folder your mentioned:
a config.json in the \client\stemapp\widgets\PrintPlus folder
and the property in the apps\2\config.json file
"config": "configs/PrintPlus/config_Print Plus.json"
I tried to change the file name from config.json to config_PrintPlus.json
However, I still get the same error and the frame(red) not showing up.
There is a file named "Configuration Properties for the Print Plus Widget.pdf" in the \client\stemapp\widgets\PrintPlus folder, however, I could not understand "Use this document along with the config.json file in the Widget’s root directory." this sentence, where is the root directory? what means use this document along with?Should I do some change in the config.json file?
Is this the line in your config file:
"serviceURL": "//www.oregongeology.org/arcgis/rest/services/ExportWebMap/GPServer/Export Web Map",
That’s correct. I’ve also tried it without the Export Web Map at the end.
Ping,
If there is no "config" property for a widget in the main config.json file, then the app will look for a file named config.json in the same folder as the widget. If there is a "config" property in the main config.json file, then that is the file the widget will read as its config file.
When building an app in the WAB, the WAB typically puts the config file in the configs/<widget name>/config_<widget label>.json.
The important thing is that you put the configuration data into the same file as the widget is loading.
Using the Chrome debugging tools (or probably other browser debugging tools also). You can filter for config on the Network tab and see all of the config files that were loaded.
The document you referred to will help you understand the meaning and the options for each property in the Print Plus configuration file.
Can you put up a public site that I can view to see the problem?
Larry
Rudie,
I was successful using your print task in my app here, so that's not the problem.
Do you mind sharing your Print Plus config file with me?
Larry
I can copy and paste here. I Don't see where to attach a file.
{
"serviceURL": "http://www.oregongeology.org/arcgis/rest/services/ExportWebMap/GPServer/Export%20Web%20Map",
"defaultTitle": "ArcGIS WebMap",
"defaultAuthor": "ArcGIS WebApp Builder",
"defaultCopyright": "",
"defaultFormat": "PDF",
"defaultLayout": "Letter ANSI A Landscape",
"defaultDpi": 96,
"noTitleBlockPrefix": "No TB ",
"outWkid": 2965,
"showLayout": true,
"showOpacitySlider": true,
"layoutParams": {
"Letter ANSI A Landscape": {
"alias": "Letter Landscape (ANSI A)",
"units": "esriInches",
"params": [{ "x": 11, "y": 8.5 }, { "x": 10, "y": 6.25 }, { "x": 0.5, "y": 1.5 }, { "x": 0.5, "y": 0.5 }]
},
"Letter ANSI A Portrait": {
"alias": "Letter Portrait (ANSI A)",
"units": "esriInches",
"params": [{ "x": 8.5, "y": 11 }, { "x": 7.5, "y": 8 }, { "x": 0.5, "y": 2.25 }, { "x": 0.5, "y": 0.5 }]
},
"Tabloid ANSI B Landscape": {
"alias": "Tabloid Landscape (ANSI B)",
"units": "esriInches",
"params": [{ "x": 17, "y": 11 }, { "x": 16, "y": 7.75 }, { "x": 0.5, "y": 2.5 }, { "x": 0.5, "y": 0.5 }]
},
"Tabloid ANSI B Portrait": {
"alias": "Tabloid Portrait (ANSI B)",
"units": "esriInches",
"params": [{ "x": 11, "y": 17 }, { "x": 10, "y": 11.75 }, { "x": 0.5, "y": 4.5 }, { "x": 0.5, "y": 0.5 }]
},
"A4 Landscape": {
"alias": "A4 Landscape",
"units": "esriCentimeters",
"params": [{ "x": 29.7, "y": 21 }, { "x": 27.7, "y": 15.9 }, { "x": 1, "y": 3.8 }, { "x": 1, "y": 1 }]
},
"A4 Portrait": {
"alias": "A4 Portrait",
"units": "esriCentimeters",
"params": [{ "x": 21, "y": 29.7 }, { "x": 19, "y": 22.3 }, { "x": 1, "y": 5.7 }, { "x": 1, "y": 1 }]
},
"A3 Landscape": {
"alias": "A3 Landscape",
"units": "esriCentimeters",
"params": [{ "x": 42, "y": 29.7 }, { "x": 40, "y": 21.7 }, { "x": 1, "y": 6.3 }, { "x": 1, "y": 1 }]
},
"A3 Portrait": {
"alias": "A3 Portrait",
"units": "esriCentimeters",
"params": [{ "x": 29.7, "y": 42 }, { "x": 27.7, "y": 29 }, { "x": 1, "y": 11 }, { "x": 1, "y": 1 }]
},
"MAP_ONLY": {
"alias": "Just the Map",
"units": "NaN",
"params": [{ "x": 0, "y": 0 }, { "x": 0, "y": 0 }, { "x": 0, "y": 0 }, { "x": 0, "y": 0 }]
}
},
"relativeScale": "(1" = [value]')",
"relativeScaleFactor": 0.08333333,
"scalePrecision": 0,
"mapScales": [
6000000, 4800000, 3600000, 2400000, 1200000, 960000, 720000,
600000, 480000, 360000, 240000, 120000, 96000, 72000,
60000, 48000, 36000, 24000, 12000, 9600, 7200,
6000, 4800, 3600, 2400, 1200, 960, 720,
600, 480, 360, 300
]
}
Larry,
Thank you for this widget!
EDIT: Mine seems to be working now. except that it shows a blank screen after I click print
My console Loge says:
But my map now looks like this:
I am having troubles. When I print the map zooms out way too far. I see that this was talked about above but I cannot seem to resolve the issue. I am using the latest version. Even when I use your demo app it seems to not be working right because the print does not show anything.
Here is a result when I print via your app.
What the print looks like:
What is expected:
Larry,
Were you able to take a look at the code? Or do I need to send you a json file somehow?
Rudie
I looked at it this morning. The problem seems to be on my side, although I haven’t been able to reproduce it yet. I have found some other issues as well. Hopefully I can get everything fixed this weekend.
Larry
Ping,
I have posted a new version of the Print Plus Widget. I fixed several things, and hope it solves your problem. If not, please let me know.
Larry
Rudie,
I have posted a new version of the Print Plus Widget. I fixed several things, and hope it solves your problem. If not, please let me know.
Larry
I have posted a new version of the Print Plus Widget. I fixed several things, and I'm pretty sure it will solve your problem. If not, please let me know.
Larry
Stan,
I have posted a new version of the Print Plus Widget. I fixed several things, and hope it solves your problems. It prints graphics now and leaves than out of the legend. If you see any other problems or have ideas to make it better, please let me know.
Larry
Larry,
Thank you! My issues were fixed.
Hi Larry,
Thanks for the update. I added the Print Plus 1.1.5. I am still unable to use the printing service on my ArcServer.
Rudie
Larry, it’s very odd, the print widget doesn’t work locally on my machine if I am inside web app builder and I “launch” the map. But if I download and deploy, it works deployed with my layout! WOW, thanks so much.
I wonder if the problem is that your machine can’t see the Web Map Print Task service?
Larry
You know, I had been thinking that was the case. We have a few firewall issues we are working on. Again, thank you very much Larry for an amazing widget.
Rudie
just a guess....proxy is probably setup for your web browser, but not your local machine.
Larry,
From what I can tell it seems to be working great! You are truly amazing at figuring these things out. I will let you know how it goes.
-Stan
Just as a point of interest I have this same issue when loading widgets for WAB to github. I have not tested your widget on github but I ran across the same issue when testing another widget. Correct case for file paths matter.
-Stan
Larry,
This widget looks great.
Our customers need to be able to specify a line feature in a web map (either interactively or through a dialog box) and then create a map series that covers that line (data driven page format).
From my research on ESRI's site, it looks like I need to use ConvertWebMapToMapDocument http://resources.arcgis.com/en/help/main/10.1/index.html#//00s30000006n000000 and then additional arpy.mapping python scripting to export the map. http://resources.arcgis.com/en/help/main/10.1/index.html#//01540000056t000000
Is it possible for us to modify your widget to incorporate data driven page templates and functionality, or should I proceed with the ESRI documented process?
Thanks for you help.
John,
You are welcome to the Print Plus Widget, but I suspect Esri's documented process will be more suitable. Creating a map series from a web app is pretty ambitious. I'd love to see it if you can make it work.
Is there any way to modify this widget (not sure where that would need to happen) so that the print includes layers from multiple/separate map services into the legend?
As it is now (and with all of the other print widgets I've found) they only include the first map service, even though the legend has layers from multiple/all map services.
James,
I apologize for my slow response. I've started a new job and it's keeping me pretty busy.
This seems like a bug in the Esri Print Widget, and has carried through to my Print Plus Widget. I'll look into it as soon as possible and get back to you.
Larry
James,
I've solved much of the problem. I'm still not getting a symbol for my parcels layer in the print file legend. (My parcels layer is a feature layer that gets a new renderer when the basemap changes, so it could be specific to that.) Not sure how to solve this problem, so I thought I'd post Version 1.1.6 which includes what I did solve.
Larry
I no longer get the red layout frame when I click the widget and if I go thru with the print, it doesn't recognize the templates we have set in our print serviceURL and I get a popup that says,
You have requested a print with a scale larger than the maximum scale of the map. If you proceed, some of the layers will not be printed
James,
Can you post the configure file you are using for the Print Plus widget?
Larry
{
"serviceURL": "http://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%2...",
"defaultTitle": "ArcGIS WebMap",
"defaultAuthor": "ArcGIS WebApp Builder",
"defaultCopyright": "",
"defaultFormat": "PDF",
"defaultLayout": "Letter ANSI A Landscape",
"defaultDpi": 96,
"noTitleBlockPrefix": "No TB ",
"outWkid": 2965,
"showLayout": true,
"showOpacitySlider": true,
"layoutParams": {
"Letter ANSI A Landscape": {
"alias": "Letter Landscape (ANSI A)",
"units": "esriInches",
"params": [{ "x": 11, "y": 8.5 }, { "x": 10, "y": 6.25 }, { "x": 0.5, "y": 1.5 }, { "x": 0.5, "y": 0.5 }]
},
"Letter ANSI A Portrait": {
"alias": "Letter Portrait (ANSI A)",
"units": "esriInches",
"params": [{ "x": 8.5, "y": 11 }, { "x": 7.5, "y": 8 }, { "x": 0.5, "y": 2.25 }, { "x": 0.5, "y": 0.5 }]
},
"Tabloid ANSI B Landscape": {
"alias": "Tabloid Landscape (ANSI B)",
"units": "esriInches",
"params": [{ "x": 17, "y": 11 }, { "x": 16, "y": 7.75 }, { "x": 0.5, "y": 2.5 }, { "x": 0.5, "y": 0.5 }]
},
"Tabloid ANSI B Portrait": {
"alias": "Tabloid Portrait (ANSI B)",
"units": "esriInches",
"params": [{ "x": 11, "y": 17 }, { "x": 10, "y": 11.75 }, { "x": 0.5, "y": 4.5 }, { "x": 0.5, "y": 0.5 }]
},
"A4 Landscape": {
"alias": "A4 Landscape",
"units": "esriCentimeters",
"params": [{ "x": 29.7, "y": 21 }, { "x": 27.7, "y": 15.9 }, { "x": 1, "y": 3.8 }, { "x": 1, "y": 1 }]
},
"A4 Portrait": {
"alias": "A4 Portrait",
"units": "esriCentimeters",
"params": [{ "x": 21, "y": 29.7 }, { "x": 19, "y": 22.3 }, { "x": 1, "y": 5.7 }, { "x": 1, "y": 1 }]
},
"A3 Landscape": {
"alias": "A3 Landscape",
"units": "esriCentimeters",
"params": [{ "x": 42, "y": 29.7 }, { "x": 40, "y": 21.7 }, { "x": 1, "y": 6.3 }, { "x": 1, "y": 1 }]
},
"A3 Portrait": {
"alias": "A3 Portrait",
"units": "esriCentimeters",
"params": [{ "x": 29.7, "y": 42 }, { "x": 27.7, "y": 29 }, { "x": 1, "y": 11 }, { "x": 1, "y": 1 }]
},
"MAP_ONLY": {
"alias": "Just the Map",
"units": "NaN",
"params": [{ "x": 0, "y": 0 }, { "x": 0, "y": 0 }, { "x": 0, "y": 0 }, { "x": 0, "y": 0 }]
}
},
"relativeScale": "(1" = [value]')",
"relativeScaleFactor": 0.08333333,
"scalePrecision": 0,
"mapScales": [
6000000, 4800000, 3600000, 2400000, 1200000, 960000, 720000,
600000, 480000, 360000, 240000, 120000, 96000, 72000,
60000, 48000, 36000, 24000, 12000, 9600, 7200,
6000, 4800, 3600, 2400, 1200, 960, 720,
600, 480, 360, 300
]
}
Larry,
i am having a problem with the output creation.
when click Print the map zooms into the scale and then back out
but i end up with a red 'error try again' message'
attached is a screen shot
any ideas?
James,
Sorry I haven't answered sooner. One thing I see in your config file is the "outWkid" is set to 2965. That's Indiana East State Plane, NAD83. I doubt if that is the problem, but it should be changed to the wkid of spatial reference you want.
I am also wondering if the "mapScales" property is appropriate for your spatial reference. They are currently set for a spatial reference that uses feet. 300 is 1:300 or 1" = 25'. 60,000,000 is 1:60,000,000 or 1" = 5,000,000 feet. If your spatial reference uses degrees or meters, then they should probably be adjusted. They should also be adjusted to reflect the levels of display for the basemap you are using.
Do you have a public URL I can look at?
Larry
Glenn,
Good to hear from you. I'm pretty sure you can't offer me a public URL to look at this, so the next best thing is for you to show me what you are getting in your browser debug tools. My preferences are Chrome, FireFox, and IE, in that order.
Larry
i sent an email back to you but i dont see the content here so here it is again.
----
I have tried a few things
First—
I cannot use any browser but IE to open the webappbuilder-dev version on my server.
No idea why…
Also
I built the webmap I am using with the PORTAL mapviewer, not AGOL.
If I leave your default print tool in the config file I get these messeages in Fiddler. As the last entry
They make sense in that I am working behind the firewall.
{"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool.: Layer \"layer1\": Unable to connect to map server at https://chldev20.mwra.net/arcgischl21/rest/services/townsbasemap/MapServer.\nLayer \"MassGISBasemapNoLabels1\": Unable to connect to map server at https://chldev20.mwra.net/arcgischl21/rest/services/MassGISBasemapNoLabels1/MapServer.\nLayer \"WS_areasnew\": Unable to connect to map server at https://chldev20.mwra.net/arcgis/rest/services/WS_areasnew/MapServer.\nLayer \"sewernew\": Unable to connect to map server at https://chldev20.mwra.net/arcgis/rest/services/assets/sewernew/MapServer.\nLayer \"waternew\": Unable to connect to map server at https://chldev20.mwra.net/arcgis/rest/services/assets/waternew/MapServer.\nLayer \"points_of_interest\": Unable to connect to map server at https://chldev20.mwra.net/arcgis/rest/services/assets/points_of_interest/MapServer.\nFailed to execute (Export Web Map).\nFailed to execute (Export Web Map Task)."]}}
If I attempt to change the gp tool to the exportmap tool I have build on my server (which works with the out-of-the-box Print tool)
Your printplus doesn’t show all the various templates or the scale slider or the any of the check boxes
The red box doesn’t appear either.
Here is the gp tool url I am created.. it looks different from AGOL one in that there is “TASK” at the end…
https://chldev20.mwra.net/arcgis/rest/services/printing/ExportWebMap/GPServer/Export%20Web%20Map
Hi Larry, this is a great widget!
I would like to use our own ArcGIS Server and templates rather than Online. I changed the widgets\PrintPlus\config.json.
serviceURL to our own GPServer and added custom Layouts Params.
However, the widget still prints using utility.arcgisonline.com. what am I missing?
I receive the same error message, but only when using I.E.9
You receive those errors because DNS lookup fails. mwra.net does not resolve.
this is the same thing i want to do.
namely use our internal gpservice rather than agol.
you mentioned adding custom layout params, can you explain what you did
all i did was change the url of gptool in the config script.
is there more that needs to be done.?
The print layouts were created by creating MXDs with custom titleblocks and textelements. You can then add text boxes to search for textelements to change their values based on user inputs. Text elements are changed via JSON.
The mxds reside on the server where ArcGIS Server is. The easiest way after that was to create a new Geoprocessing tool via ArcToolbox >> Server Tools >> Printing >> Export Web Map
New layouts will appear in the layout template (option). if they are there, they will then be accessible from the widget. Run the service. Then under the results >> click on the exportwebmap >> right click >> share as >> GeoProcessing Service
In the service Editor when publishing to ArcGIS Server >> Parameters .. depending, I would run as Synchronous... under the export webmap >>layout templates .. Input Mode, choice list and the new layouts should be there.
You should then be able to hit the REST service and fill in the JSON manually to verify.
* the folder where the mxds are need to be registered with ArcGIS Server Data Store.
Ive also done similar like extract Data and Email (requires python Send email with Zip file attachment and Extract Data and Email task Models)
Changing the config failed as the server//apps/2/ widgets also had a printPlus...
Removed from there..made sure only on client/stemapp/widgets and now works. but then when the app is launched again with WebAppBulderDE.. the PrintPlus is back under server//apps. Not sure what is going on there...
PrintPlus is under server AND stemapp BOTH configs are changed, yet I run it.. and its the default online.
Wish there was documentation on how exactly wabDE works.
Michael Robb and glenn hazelton:
One thing you may want to check. Look in the main config.json file. If there is a config property for the Print Plus Widget (probably pointing to "configs/PrintPlus/config_Print Plus.json"), then that is the path where the widget will look for its config file. If there is no config property for a widget, it will look in the folder containing the widget. Both config files may exist, but only one will be used.
Larry
Check your settings in AGOL. They may be overriding the widget config. In AGOL you can set the URL for printing, set the default geocoder, etc.
Larry
Larry
this is the path i see in the main config.js file
"config": "configs/PrintPlus/config_Print Plus.json",
which is the one i edited by replacing the url for the gptool.
as far as AGOL settings.. i am using Portal, not AGOL.
or at least i am attempting to do so as that is what i login to when i start up the WAB-dev.
and in Portal i did NOT have the gp printer tool setup so it was using the default. (which might be AGOL, not sure...)
i changed this to the one i build locally.
now what happens is that only see the 2 layout templates that i built and the MAP_Only (not your No TB... ones)
the map only one works.
mine do not as the scales don't seem to be registering ..
fyi
if i use the out-of-the box print widget i see all your templates and i can create prints.
so i think that means the folder with the templates is registered.
any other ideas on to sort this out?
does the projection of the template make a difference..?
mine are in the web-sphere projection..