iTextSharp的IOException异常"未发现拖车" [英] iTextSharp IOException "Trailer not found"

查看:295
本文介绍了iTextSharp的IOException异常"未发现拖车"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用iTextSharp的(.NET 2.0 Vista的)。该iTextSharp的版本是4.1.2.0

am using iTextSharp ( .NET 2.0 Vista ). The iTextSharp Version is 4.1.2.0

PdfReader reader = new PdfReader(pdfFile); 

是图书馆导致抛出一个异常说 预告片没有发现
  该文件存在,可以在Adobe被视为没有问题 任何想法?

is causing the library to thrown an exception saying "Trailer not found"
The file exists and can be viewed in Adobe no problem Any ideas?

推荐答案

该拖车的一部分的PDF文件的结构。如果你得到一个错误说,它不能被发现,那么我想的第一件事是你的文件已损坏。如果能够打开PDF在PDF查看器程序并不一定意味着该PDF未损坏;我明白,如果它是一个线性的PDF文件查看器将不会尝试使用拖车。

The trailer is a part the structure of a PDF file. If you're getting an error saying it can't be found then the first thing I'd think is your file is corrupt. Being able to open the PDF in a PDF viewer program doesn't necessarily mean the PDF isn't corrupt; I understand that if it's a linearized PDF file the viewer won't attempt to use the trailer.

请问您code抛出IOException你尝试读取任何PDF?

Does your code throw an IOException for any PDF you attempt to read?

  • 如果是这样,那么也许使用更近 版本iTextSharp的,将有助于或至少张贴一些code。
  • 如果没有,那么我会工作,重建 PDF文件你想的过程。
  • If so, then maybe using a more recent version of iTextSharp will help or at least post some code.
  • If not, then I'd work on recreating the PDFs you're trying to process.

这篇关于iTextSharp的IOException异常"未发现拖车"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆