ArcGIS Print Select Layer

422
6
12-04-2023 09:47 PM
Wade
by
New Contributor III

Currently using the print gadget but some layers cannot be printed, so how can I control the layers during printing?

const print = new Print({
      view: view,
      printServiceUrl: ArcGIS_Url.PrintingToolsUrl,
      container: "panelPrintWidget",
});
0 Kudos
6 Replies
Noah-Sager
Esri Regular Contributor

Hi @Wade, thanks for posting your question here. Can you describe a bit more about the issue you are encountering, or what you are trying to accomplish with the Print widget?

0 Kudos
Wade
by
New Contributor III

Hi @Noah-Sager 

I have feature layers and wmts in my map, but when I print the tool I get an error. It seems that wmts cannot be used for printing?

So I would like to ask if I can control the wmts part not to be printed when using print.

0 Kudos
Noah-Sager
Esri Regular Contributor

Hmm, printing WMTS should be fine. I can print them from this sample: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=layers-wmts

Can you share the error message? It would be helpful to see the JSON that is sent to the print service as well. You can send me info in a private message if that's better for you.

0 Kudos
Wade
by
New Contributor III

hi @Noah-Sager , When I use the print tool, an error message returns extendedCode: -2147467259

message: "Unable to complete operation.".

0 Kudos
Noah-Sager
Esri Regular Contributor

@Wade - there should be a more specific message. Can you expand the error and look for "details"?

0 Kudos
Wade
by
New Contributor III

hi @Noah-Sager

When I print again, the layers I use are in different domains, and some require the use of proxy. Is there something wrong with the settings?

Some proxy services require an account and password to log in. There is no problem when connecting layers. However, as long as you use the printing tool, you will get this error.

error message returns extendedCode: -2147467259

message: "Unable to complete operation.".

 

0 Kudos