问题描述
我要阅读PDF文档的XMP元数据。我试图读取PDFsharp数据()。多数时候效果很好,但在某些情况下,我得到这个异常:
I want to read the XMP metadata from PDF documents. I tried to read the data with PDFsharp (http://www.pdfsharp.net/). Most of time it worked well, but in some cases I get this exception:
Unhandled Exception: PdfSharp.Pdf.IO.PdfReaderException: Cannot handle iref streams. The current implementation of PDFsharp cannot handle this PDF feature introduced with Acrobat 6.
介绍了PDF功能
我读的地方,这样做在新版本中不会发生。所以,我下载PdfSharp 1.50.3638-β()。
是的,现在我也不例外。但我的新问题是,函数PdfReader.open不会对一些文档。这意味着程序永远不会离开功能。
And yes, now I have no exception. But my new problem is that the function PdfReader.open does not work on some documents. This means that the program never leaves the function.
在一些论坛上我已阅读,它可以通过与许多图像大型文档所致。于是,我试图读取该文件的唯一信息:
In some forums I have read that it could be caused by large documents with many images. So I tried to read only the information of the document:
PdfDocument pd = PdfReader.Open(s, PdfDocumentOpenMode.InformationOnly);
但它仍然无法正常工作。有些想法如何,我可以读取元数据?
But it still doesn't work. Some ideas how I can read the metadata?
推荐答案
有关IREF支持流是新换PDFsharp 1.50 测试版如果您有无法读取,然后一个文件,请提交审核。
Support for IRef streams is new for PDFsharp 1.50 beta and if you have a file that cannot be read then please submit it for examination.
这篇关于XMP元使用PdfSharp全文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!