Adobe PDF没有将摘要信息作为OLE属性设置到根存储中名为"\005SummaryInformation“的流中。它使用了微软在XP中不再支持的另一种方法。
使用DSOFile,我已经添加了摘要信息。这个works...or至少我认为在关闭和打开文件后,摘要信息是可见的(使用DSOFile查看器,而不是Adobe)!
这是将摘要信息保存到PDF的代码的简化版本。注这并不适用于所有文档,例如Office2007文档。我使用WindowsAPICodePack.dll来处理不起作用的文档!
Dim oDocument As DSOFile.OleDocumentProperties = New DSOFile.OleDocumentProperties
oDocument.Open(FileName, False, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess)
Dim oSummProps As DSOFile.SummaryProperties = oDocument.SummaryProperties
If (NewData <> oSummProps.Title) Then
oSummProps.Title = NewData
End If
oDocument.Save()
oDocument.Close()我的问题是在Windows资源管理器列中看不到PDF摘要信息。我希望看到的信息是System.Keywords (标签)和System.Title。
发布于 2011-06-28 14:55:24
PDF文件不是结构化存储文件,因此它们不能包含\005SummaryInformation流。我不知道上面的代码是如何工作的,但虽然它可能会在PDF文件中插入一个\005SummaryInformation流,但我非常确定它会损坏PDF文件。
https://stackoverflow.com/questions/6501411
复制相似问题