我想要整理带注释的PDF文档。
using (FileStream fs = new FileStream(dtnFilePath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read))
{
try
{
iTextSharp.text.pdf.PdfStamper stamper = new iTextSharp.text.pdf.PdfStamper(reader, fs, iTextSharp.text.pdf.PdfWriter.VERSION_1_5);
stamper.FormFlattening = true;
stamper.AnnotationFlattening = true;
stamper.FreeTextFlattening = true;
stamper.Writer.CloseStream = false;
stamper.Close();
reader.Close();
isFlattened = true;
}
catch (Exception ex)
{
isFlattened = false;
}
}
一切正常,但我不能弄平便签弹出窗口。我想要压缩弹出窗口或将便笺内容放在同一位置。