Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import org.apache.pdfbox.text.PDFTextStripper;
import org.apache.pdfbox.text.TextPosition;
import org.apache.pdfbox.text.TextPositionComparator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* This class extends PDFTextStripper to provide custom text extraction and formatting
Expand All @@ -38,6 +40,8 @@
*/
public class ForkPDFLayoutTextStripper extends PDFTextStripper {

private final static Logger logger = LoggerFactory.getLogger(ForkPDFLayoutTextStripper.class);

public static final boolean DEBUG = false;

public static final int OUTPUT_SPACE_CHARACTER_WIDTH_IN_PT = 4;
Expand Down Expand Up @@ -80,7 +84,7 @@ protected void writePage() throws IOException {
this.sortTextPositionList(textList);
}
catch (java.lang.IllegalArgumentException e) {
System.err.println(e);
logger.error("Error sorting text positions", e);
}
this.iterateThroughTextList(textList.iterator());
}
Expand Down