我已经尝试将用户属性写入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文件添加自定义属性?