A PdfDocument
A PDPage (PDFBox internal representation)
0-based page index
Uses hOCR data to add invisible text to the page.
Uses hOCR data to add invisible text to the page.
This will only work with Tesseract 3.03's hOCR output. It assumes the
hOCR output uses the same resolution as returned by bestDpi -- that is,
the resolution of the toImage output.
Returns true iff some of this text has a "pdfocr-ocr-text" font.
Returns true iff some of this text has a "pdfocr-ocr-text" font.
Does not throw an exception on an invalid PDF.
0-based page index
A PDPage (PDFBox internal representation)
A PdfDocument
Renders the page to an image.
Renders the page to an image.
Renders the page to an image, omitting all text.
Renders the page to an image, omitting all text.
In other words, if a PDF has a stream with a rectangle, some text and an image, this method will return an imaage with a rectangle and an image.
Returns a one-page PDF, as a byte array.
Returns a one-page PDF, as a byte array.
Even if the original pdDocument is a single page, this method will
return a whole new page. (That's so we can avoid blocking re-reading the
original input file.)
The purpose of this output PDF is *display*. (Another image format would be more ideal; we output PDF because we always have, not because we should.)
Returns all the text we can read from the document.
Returns all the text we can read from the document.
A page of a PDF document.
A PDF document can throw a PdfInvalidException at any time during reading.
A PdfPage will only be valid so long as its parent PdfDocument's
closemethod has not been called.