title: How can i get specific text from pdf using pdfbox api in java
body: <p>I used this code and output was the entire page text and i want the specific 
      text?
      any solutions please?</p>
  
  <pre><code>public class ReadingText {
   public static void main(String args[]) throws IOException {
      File file = new File("C:/PdfBox_Examples/new.pdf");
        PDDocument document = PDDocument.load(file);
        PDFTextStripper pdfStripper = new PDFTextStripper();
        String text = pdfStripper.getText(document);
        System.out.println(text);
        document.close();
      }
  }
  </code></pre>