本文介绍了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 problemAny 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 recentversion of iTextSharp will help or at least post some code.
  • If not, then I'd work on recreatingthe PDFs you're trying to process.

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

05-27 03:00
查看更多