2

我试图将用户属性写入PDF-A,当将文件保存到磁盘打开时,结果文件不是PDF-A.

Origin File  : PDF/A
Add Custom Property
Destiny File : PDF

我使用此代码添加自定义属性:

 Dim reader As New iTextSharp.text.pdf.PdfReader(fl.FileBytes)
   Using fs As New IO.FileStream(_destinyFile, IO.FileMode.Create, IO.FileAccess.Write, O.FileShare.None)
     Using stamper As New iTextSharp.text.pdf.PdfStamper(reader, fs)
       Dim info As Dictionary(Of String, String) = reader.Info
          info.Add("myKey", "myValue")
          stamper.MoreInfo = info
          stamper.Close()
        End Using
       fs.Close()
    End Using
    reader.Close()

如何将自定义属性添加到 PDF-A 文件?

4

0 回答 0