Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

[iText-questions] Problem with IText!!

Sudhir Sharma

2006-06-15

Replies:

guys,
I am using Itext to generate PDF documents from some existing PDF document.
I am using PdfReader class to generate PDF from an existing PDF. I am getting an error when I try to close Document with Document.Close() method.
Existing PDF has been created using HyperGEAR PDF Convert software for Acrobat 7.
is there any compatibility problem with this software? Itext version is 3.0.1.0
any help is appreciated!!
 
Error is :
 

Exception: System.IO.EndOfStreamException

Message: Attempted to read past the end of the stream.

Source: itextsharp

at iTextSharp.text.pdf.RandomAccessFileOrArray.ReadFully(Byte[] b, Int32 off, Int32 len)

at iTextSharp.text.pdf.PdfReader.GetStreamBytes(PRStream stream, RandomAccessFileOrArray file)

at iTextSharp.text.pdf.PdfReader.GetPageContent(Int32 pageNum, RandomAccessFileOrArray file)

at iTextSharp.text.pdf.PdfReaderInstance.GetFormXObject(Int32 pageNumber)

at iTextSharp.text.pdf.PdfImportedPage.get_FormXObject()

at iTextSharp.text.pdf.PdfReaderInstance.WriteAllPages()

at iTextSharp.text.pdf.PdfWriter.AddSharedObjectsToBody()

at iTextSharp.text.pdf.PdfWriter.Close()

at iTextSharp.text.pdf.PdfDocument.Close()

at iTextSharp.text.Document.Close()

 
 
 
 
 
Sudhir Sharma
Software Developer
AvidXchange Inc.
office : 704-971-8113
fax    : 704-971-8172
cell   : 919-423-2003
 
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
©2008 junlu.com - Jax Systems, LLC, U.S.A.