Example usage for org.apache.pdfbox.text PDFTextStripper setEndPage

List of usage examples for org.apache.pdfbox.text PDFTextStripper setEndPage

Introduction

In this page you can find the example usage for org.apache.pdfbox.text PDFTextStripper setEndPage.

Prototype

public void setEndPage(int endPageValue) 

Source Link

Document

This will set the last page to be extracted by this class.

Usage

From source file:uk.org.openeyes.PDFFunctions.java

/**
 *
 * @param PDFDoc/*from  w w  w.  j a v a2s.com*/
 * @throws IOException
 */
public void dumpPDFStructure(PDDocument PDFDoc) throws IOException {
    PDFTextStripper stripper = new PDFFunctions();
    stripper.setSortByPosition(true);
    stripper.setStartPage(0);
    stripper.setEndPage(PDFDoc.getNumberOfPages());
    Writer dummy = new OutputStreamWriter(new ByteArrayOutputStream());
    stripper.writeText(PDFDoc, dummy);

}