一連の PDF ファイルでメタ データの一括更新を行っていますが、何らかの理由で件名が常にキーワード メタデータの末尾に追加されています。「キーワード」の更新を削除しても、データを更新すると更新されたままになります。
これは期待されていますか?他の誰かがこれを見たことがありますか?
private void ProcessWithITextSharp(string sourceFile, string destFile) {
iTextSharp.text.pdf.PdfReader reader = new iTextSharp.text.pdf.PdfReader( sourceFile );
FileStream fs = new FileStream( destFile, FileMode.Create, FileAccess.Write, FileShare.None );
PdfStamper stamper = new PdfStamper( reader, fs );
Dictionary<string, string> info = reader.Info;
// title
UpdateValueInInfoDictionary( info, "Title", "My Ridiculous Title" );
UpdateValueInInfoDictionary( info, "Subject", "A Ridiculous Story" );
UpdateValueInInfoDictionary( info, "Author", "Mr. Ridiculous " );
UpdateValueInInfoDictionary( info, "Keywords", "A ridiculous story with a ridiculous title." );
stamper.MoreInfo = info;
stamper.Close();
fs.Close();
}