pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Högemann <dirk.hoegem...@googlemail.com>
Subject Re: how read a pdf document
Date Thu, 23 Feb 2012 11:39:56 GMT
...
import java.io.File;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.util.PDFTextStripper;
...
    try
        {
            PDDocument pddDocument = PDDocument.load(new
File("C:/spaces.pdf"));
            PDFTextStripper textStripper=new PDFTextStripper();
            pddDocument.close();
            String sStripped = textStripper.getText(pddDocument);

        }
        catch(Exception ex)
        {
            ex.printStackTrace();
        }
Best
Dirk

2012/2/23 Donald Henri AZOKLI-ASSOGBA <henri-donald@hotmail.com>

> Can you explain me how will i do to read in my application any pdf
> document?? thks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message