
package leerpdf;

import java.io.File;
import java.io.IOException;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.text.PDFTextStripper;


public class LeerPDF {

    public static void main(String[] args) throws IOException {       
        PDDocument pDDocument = PDDocument.load(new File("D:\\PDFs_creados\\Prueba.pdf"));
        String textoLeido = new PDFTextStripper().getText(pDDocument);
        System.out.println(textoLeido);
        pDDocument.close();
    } 
}
