大网数据广告活动
Web服务器与PHP

Printing a Range of Pages Fails When You Use a WPF Application

· 52CE 我爱测

This article discusses a problem in which the process of printing pages fails when you use a Windows Presentation Foundation (WPF) application.

This article discusses a problem in which you can't successfully print large documents when you use a Windows Presentation Foundation (WPF) application.

Symptoms

Consider the following scenario:

  1. You use a WPF application in Windows 10 or later versions to print a range of pages.
  2. You run the XpsDocument object to process the print job by using VisualsToXpsDocument, DocumentPaginator, or another method.

In this scenario, the print process fails after you print some pages.

Cause

When you print pages by using a WPF application in Windows 10 or later, the font information is allocated on a page-by-page basis. If you're using this method to print a range of pages in a runtime, the process may increase memory usage by the operating system.

For example, if you're printing more than 8,000 pages, the process may stop because of a temporary increase in memory usage. This error indicates that an IOException occurred because of failed access to the font file.

After all the pages finish printing, memory can be freed for allocation.

Solution

To resolve this issue apply the January 2025 Cumulative Update Preview or a later update for .NET Framework.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 07/08/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。