扁平化 PDF
using IronPrint;

// Flatten the PDF before printing to preserve form fields and annotations
PrintSettings settings = new PrintSettings();
settings.Flatten = true;

Printer.Print("form-document.pdf", settings);
NuGet下载
PM > Install-Package IronPrint
扁平化 PDF

扁平化 PDF

在PrintSettings对象上将Flatten设置为true会将所有交互式表单字段、注释和分层内容合并到打印输出中。 这有助于确保填入的值和视觉注释按屏幕上的显示渲染。

在打印包含重叠层的已填写表单或文档时,平铺功能尤为实用。 否则,某些打印机可能会跳过交互元素或将其渲染错误。 源PDF文件本身不会被修改。

阅读《打印前压缩 PDF 的完整指南》

准备开始了吗?

NuGet 下载量 52,427版本:2026.11刚刚发布