有没有办法在iText7/Java中扁平化批注?我认为以前的版本有一个PdfStamper类来做这件事,但我在iText7中找不到它。PdfDocument似乎在很大程度上取代了PdfStamper,但没有扁平化功能?
谢谢,托马斯
发布于 2017-03-14 21:21:27
下面的代码片段用于在给定源文档路径和输出文件路径的情况下,在iText7中展平表单域:
PdfDocument pdfDoc = new PdfDocument(new PdfReader(SRC), new PdfWriter(DEST));
PdfAcroForm form = PdfAcroForm.getAcroForm(pdfDoc, true);
form.flattenFields();
pdfDoc.close();等同于.Net的是form.FlattenFields();
https://stackoverflow.com/questions/42716194
复制相似问题