流程
1、使用Document类加载PDF文档。
2、用Document.getPages().get_Item(int).getAnnotations().delete()删除所有注释。
3、用Document.save保存更新的PDF。
实例
// Open source PDF document
Document pdfDocument = new Document("input.pdf");
// Delete all annotation
pdfDocument.getPages().get_Item(1).getAnnotations().delete();
// Save the update document
pdfDocument.save("output.pdf");
以上就是Java在PDF中删除注释的方法,希望对大家有所帮助。