扁平化后的粘滞便笺可编辑

时间:2016-02-24 12:51:29

标签: c# itextsharp desktop-application

我想要整理带注释的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;
    }
}

一切正常,但我不能弄平便签弹出窗口。我想要压缩弹出窗口或将便笺内容放在同一位置。

0 个答案:

没有答案