Your pdf is corrupt. Acrobat goes to great lengths to recover a damaged pdf
but iText won't.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Nelson, Sherry [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, October 21, 2002 21:51
> To:   '[EMAIL PROTECTED]'
> Subject:      RE: [iText-questions] "can't read cross-reference section"
> 
> Correction: the error message that I get when trying to read some PDF's is
> "ERROR: xref subsection not found at file pointer"
> 
>  
> 
> Sorry,
> 
> Sherry
> 
>  
> 
> -----Original Message-----
> From: Nelson, Sherry [mailto:sherry.nelson@;isinet.com] 
> Sent: Monday, October 21, 2002 4:41 PM
> To: '[EMAIL PROTECTED]'
> Subject: [iText-questions] "can't read cross-reference section"
> 
>  
> 
> Hello,
> 
> I have to read the titles of a large number of web-based PDF files and am
> passing the bytes to PdfReader. This works for most of the files, but some
> of them are generating an error "Can't read cross-reference section,
> according to trailer."  Any ideas on what the problem is? Note that I am
> able to open the problem files in Acrobat 4 & 5.  
> 
>  
> 
> URL url = new URL( pdfURL );
> 
>             urlcon = (HttpURLConnection) url.openConnection(  );
> 
>             urlcon.setDoInput(true);
> 
>  
> 
> byte[] b = new byte[size + 1];
> 
>             b = getBytesFromStream(urlcon.getInputStream());
> 
>  
> 
>             PdfReader p = new PdfReader(b);
> 
>             HashMap hm = p.getInfo();
> 
>                                                 
> 
>             out.print(hm.get("Title"));
> 
>  
> 
> thanks,
> 
> Sherry
> 


-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future of 
Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) 
program now. http://ad.doubleclick.net/clk;4699841;7576301;v?
http://www.sun.com/javavote
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to