laptop and a wrench

Error

The MapView.Print() method returns the "System.NullReferenceException: 'Object reference not set to an instance of an object.'" and "System.Exception: 'Print service failure: Object reference not set to an instance of an object.'" exceptions when called normally.

ArcGIS Pro SDK for .NET
Número de ID del error BUG-000167134
EnviadoApril 30, 2024
Última modificaciónJune 27, 2025
Relacionado conArcGIS Pro SDK for .NET
Versión encontrada3.2
Sistema operativoWindows OS
Versión de sistema operativo10.0 64 Bit
EstadoAs Designed

Información adicional

The older SDK MapView.Print(printerSettings) function was marked obsolete and was replaced by a new MapView.Print(printerSettingInfo) or Layout.Print(printerSettingInfo, MapSeriesOptions) function. Here are some snippets: PrinterSettingsInfo info = new PrinterSettingsInfo(); var printerSettings = info.PrinterSettings; printerSettings.PrinterName = "some printer name"; printerSettings.DefaultPageSettings.Landscape = false; printerSettings.Copies = 1; info.DoShowSelectionSymbology = false; info.LayoutOrMapName = layout.Name; layout.Print(info);

Solución alternativa

Use the new Pro 3.5 MapView.Print(printerSettingInfo) or Layout.Print(printerSettingInfo, MapSeriesOptions) functions.

Pasos para reproducir

ID del error: BUG-000167134

Software:

  • ArcGIS Pro SDK for .NET

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga