国产PDF文档开发利器Spire.PDF v7.3.1正式版发布!支持移除表单域

Spire.PDF for .NET更新至v7.3.1,该版本支持了移除表单域,同时也支持从stream流中添加PDF文档到PDF文件包,增强了转换PDF到Word/图片/ PDF/A-3A的功能。此外,该版本还修复了提取和替换文本时出现的问题等,欢迎下载体验。

新功能

  • 支持移除表单域
    string input = @"Field.pdf";PdfDocument doc = new PdfDocument();doc.LoadFromFile(input);PdfFormWidget formWidget = doc.Form as PdfFormWidget;if (formWidget != null){//方法 1//formWidget.FieldsWidget.Clear();for (int i = formWidget.FieldsWidget.List.Count - 1; i >= 0; i--){//方法 2 PdfField field = formWidget.FieldsWidget.List[i] as PdfField; formWidget.FieldsWidget.Remove(field); }}string output = "DeleteFormField.pdf";doc.SaveToFile(output);
  • 支持从stream流中添加PDF文档到PDF文件包
    PdfDocument doc = new PdfDocument();MemoryStream stream = new MemoryStream(File.ReadAllBytes("test.pdf"));doc.Collection.AddFile("file.pdf", stream);doc.SaveToFile("result.pdf");

Bug修复


是E-iceblue官方友好合作伙伴,如果您对spire.PDF感兴趣,可以联系在线客服了解具体授权价格和使用机制。
标签:

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2021年1月12日
下一篇 2021年1月12日

相关推荐

发表回复

登录后才能评论