Ive created a layout using ArcGIS Pro and saved it in a folder as a .pagx file. Additionally, I've generated Printing Server tools, including Export Web Map and Get Layout Template Info. These tools are then shared as a web tool to the server.
Navigate to "ArcGIS Server Manager" > Site > Jobs > Under Service select the GP service and query. This will show you the Job ID generated for the latest run of the tool. Once you open that, it will show you details of the JOB run.
I've observed that while I successfully published the layout as a web tool in Enterprise 10.8 and utilized its Export Web Map URL in Enterprise 11.2 Experience Builder without encountering any issues, problems arise when attempting to do the same within Enterprise 11.2 (publishing the web tool in 11.2 and using that URL in 11.2 print). Despite reaching out to Esri support and demonstrating the issue to them, it appears to be specifically related to the custom print tool facility in 11.2. Unfortunately, no satisfactory solution has been provided thus far. Is there a possibility of resolving this within the Enterprise 11.2 environment?
This leads me to believe that there is something with the script or template you are utilizing. Is it possible for you to share the script and a sample copy of the template you are utilizing, I can test with that on my end.
I'd also check whether the service account (the windows account running ArccGIS Server) has access to the referenced location of the print templates. I imagine you have done this as the print templates are showing up as expected (unless you didn't register the file location with ArcGIS Server).
We have tried a variety of layouts, from including titles and overview maps like in the video, to including nothing but the WEBMAP_MAP_FRAME. It will print the "MAP ONLY" option, but when we try printing any custom layouts it will fail.
I encountered the exact same situation, Levi. Ended up downgrading Pro to 2.9 but if you've saved your layout files via 3.0 you won't be able to open them in the older version. In that case I had to remote into another computer, open them up in 3.0, and then copy/paste them into a 2.9 project on my primary machine. Overwrote the service and it seems to be working again. Yuck!
As you know ArcGIS Pro 3.0 is a major release. Document types such as projects, maps etc. that you create in 3.0 can't be directly opened in 2x. If you must share with older client, then you need share that out as project package, map package etc.
Thanks for the reply! You solved the inconsistency issue we were having. I scaled back and created one and it seems to be "working". Now we're running into issues with printing from webmaps that have secured services in them. It gives us this error:
Oh, shoot. I did indeed struggle with that in the past, but I can't for the life of me remember how I fixed it! It turned out being something really simple in the end. If I remember I'll let you know.
Seems like we struggled with printing secured services years ago when we were creating printing services from ArcMap, but I cannot remember how we solved it back then. Hopefully ESRI get's this sorted out soon.
Just had hazy memory come up, Levi: What are the security settings for the map service you're trying to print secured services with? I see that mine is set to me only, and I vaguely recall that publicly shared print services aren't allowed to print secured items--something about malicious actors being able to gain backdoor access to secured items via the public-facing print tool. Might be misremembering but hopefully it's something...
Just talked with ESRI support and they seem to think it has to do with the fact that we use a self signed certificate on our ArcGIS Server machine. They recommend adding a domain certificate and a trusted root certificate. Will have to work with our IT to implement.
It's unfortunate that this is an issue that users might encounter with Pro print services and the version of enterprise they are on, so thank goodness there is this discussion about this issue where I can understand the root cause of my issue and a workaround that I can utilize.
Some more searching tells me to install and run hp-setup, which launches a GUI that finds both of my printers
using JetsetDirect (yay) and lets me configure them (yay) and then fails, telling me it is unable to connect to
the cups server; I am offered no further information or opportunity to rectify the problem (BOO).
Further background on my setup: the network printers in question are connected by USB to a wifi hub
(Airport Extreme). I have two other linux distros on this same laptop (Ubuntu/Gnome shell) and they both
identify the printers immediately and print test pages without complaint.
After this the printing service should be available. And by the way, the reason the rc.d instructions didn't work is that those instructions are outdated, arch moved to systemd from the old init system relatively recently.
One thing which might matter: I recently opened Startup Applications and accidentally over-deleted some things there and don't know what they were. Maybe something for the printer service was in there?
I am working on a project right now that involves receiving a message from another application, formatting the contents of that message, and sending it to a printer. The technology of choice is C# windows service. The output could be called a report, I suppose, but a reporting engine is not necessary. A simple templating engine, like StringTemplate, or even XSLT outputting HTML would be fine. The problem I'm having is finding a free way to print this kind of output from a service. Since it seems that it will work, I'm working on a prototype using Microsoft's RDLC, populating a local report and then rendering it as an image to a memory stream, which I will then print. Issues with that are:
Has anyone had to do anything remotely like this? Any advice? I already posted a question about printing HTML without user input, and after wasting about 3 days on that, I have come to the conclusion that it cannot be done, at least not with any freely available tool.
Printing from a Windows service is really painful. It seems to work... sometimes... but finally it craches or throws an exception from time to time, without any clear reason. It's really hopeless. Officially, it's even not supported, without any explanation, nor any proposal for an alternate solution.
I've done it. It's a pain in the A*s. The problem is that printing requires that GDI engine to be in place, which normally means that you have to have the desktop, which only loads when you're logged in. If you're attempting to do this from a Service on a Server, then you normally aren't logged in.
So first you can't run as the normal service user, but instead as a real user that has interactive login rights. Then you have to tweak the service registry entries (I forget how at the moment, would have to find the code which I can do tonight if you're really interested). Finally, you have to pray.
Your biggest long term headache will be with print drivers. If you are running as a service without a logged in user, some print drivers like to pop up dialogs from time to time. What happens when your printer is out of toner? Or out of paper? The driver may pop up a dialog that will never be seen, and hold up the printer queue because nobody is logged in!
To answer your first question, this can be fairly straight forward depending on the data. We have a variety of Service-based applications that do exactly what you are asking. Typically, we parse the incoming file and wrap our own Postscript or PCL around it. If you layout is fairly simple, then there are some very basic PCL codes you can wrap it with to provide the font/print layup you want (I'd be more then happy to give you some guidance here offline).
If, however, you are going down the PDF path, the simplest method is to send the PDF output to a printer that supports direct PDF printing (many do now). In this case you just send the PDF to the device and away it prints.
The other option is to launch Ghostscript which should be free for your needs (check the licensing as they have a few different version, some GNU, some GPL etc.) and either use it's built in print function or simply convert to Postscript and send to the device. I've used Ghostscript many times in Service apps but not a huge fan as you will basically be shelling out and executing a command line app to do the conversion. That being said, it's a stable app that does tend to fail gracefully
Printing from a service is a bad idea. Network printers are connected "per-user". You can mark the service to be run as a particular user, but I'd consider that a bad security practice. You might be able to connect to a local printer, but I'd still hesitate before going this route.
The best option is to have the service store the data and have a user-launched application do the printing by asking the service for the data. Or a common location that the data is stored, like a database.
If you need to have the data printed as regular intervals, setup a Task event thru the Task Scheduler. Launching a process from a service will require knowing the user name and password, which again is bad security practice.
For a more detailed (also free) solution, your best bet is probably to manually format the document yourself (using GDI+ to do the layout for you). This is tedious, error prone, time consuming, and wastes a lot of paper during development, but also gives you the most control over what's going to the printer.
We are using DevExpress' XtraReports to print from a service without any problems. Their report model is similar to that of Windows Forms, so you could dynamically insert text elements and then issue the print command.
3a8082e126