bookmark

PDFBox - Reading Text - Tutorialspoint


Description

File file = new File("C:/PdfBox_Examples/new.pdf");
  PDDocument document = PDDocument.load(file);

  //Instantiate PDFTextStripper class
  PDFTextStripper pdfStripper = new PDFTextStripper();

  //Retrieving text from PDF document
  String text = pdfStripper.getText(document);

Preview

Tags

Users

  • @jil

Comments and Reviews