Hello,

I forward this to the mailing-list. It is very difficult
to extract text(structures) from a PDF. The result depends
a great deal on the way the PDF was constructed, so there
could be more than one answer to your question...

Quoting Álvaro Izquierdo <[EMAIL PROTECTED]>:

> Hello Bruno,
> 
> I'm a computer science student  of University of Valladolid from Spain and I
> need to read a PDF file and transform it in text (string, byte array ....).
> 
> I have been able to know the package itext. And I want to use for my
> target.
> 
> So, I have two ideas:
> 
> 1:
>             PdfReader reader = new PdfReader("mydocument.pdf");
>             int n = reader.getNumberOfPages();
>             RandomAccessFileOrArray  caca2 = new RandomAccessFileOrArray
> ("mydocument.pdf");
>             for (int i = 1; i <= n; i++){
>                 byte[] yeah2 =reader.getPageContent(i,caca2);
>                 //write to text file
>             }
> 
> 2:
>             PdfReader reader = new PdfReader("mydocument.pdf");
>             PdfString caca = new PdfString();
>            String yeah = caca.decrypt(reader).toString();
>             //Write to text file
> 
> 
> which is better? another form exists better? Do you recommend to use any
> class to me
> Any response will help me a lot,
> 
> Thanks in advanced, and best regards,
> 
> Álvaro.
> 
> 
> 
> 


-- 
Try this useful extra toolbar for your browser:
http://download.alexa.com/?amzn_id=itisacatalofwebp


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to