我对 Ubuntu 17.10 上的 C++ 中的 PoDoFo lib 版本 0.9.5 有疑问。我尝试通过扫描仪加载 PDF 扫描文档(使用非扫描文档,它可以正常工作),但加载文档时出现问题。
pdf::Document::Document(const std::string &fname) {
try {
memDocument.Load(fname.c_str());
LTRACE << "created pdf::Document from file";
} catch (const PoDoFo::PdfError &error) {
LERROR << "Error while loading PDF document(" << fname << "): " << PoDoFo::PdfError::ErrorMessage(error.GetError());
}
}
memDocument
是PoDoFo::PdfMemDocument
,但我发现了这个警告,并且根本没有加载文档(仍然是 null ref of memDocument
):
WARNING: There are more objects (15) in this XRef table than specified in the size key of the trailer directory (8)!
<</ID[<DC15F9B0B1D5684CB68315FC2D09425E<DC15F9B0B1D5684CB68315FC2D09425E>]/Info 7 0 R/Root 9 0 R/Size 8>>
有人有同样的问题吗?或者有什么想法?