laptop and a wrench

漏洞

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
漏洞 ID 编号 BUG-000167134
已提交April 30, 2024
上次修改时间June 27, 2025
适用范围ArcGIS Pro SDK for .NET
找到的版本3.2
操作系统Windows OS
操作系统版本10.0 64 Bit
状态As Designed

附加信息

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

解决办法

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

重现步骤

漏洞 ID: BUG-000167134

软件:

  • ArcGIS Pro SDK for .NET

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项