laptop and a wrench

Bug

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
Bug-ID-Nummer BUG-000167134
EingereichtApril 30, 2024
Zuletzt geändertJune 27, 2025
Gilt fürArcGIS Pro SDK for .NET
Gefunden in Version3.2
BetriebssystemWindows OS
Betriebssystemversion10.0 64 Bit
StatusAs Designed

Zusätzliche Informationen

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);

Workaround

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

Schritte zur Reproduzierung

Bug-ID: BUG-000167134

Software:

  • ArcGIS Pro SDK for .NET

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln