Class/Object

org.overviewproject.pdfocr.pdf

PdfPage

Related Docs: object PdfPage | package pdf

Permalink

class PdfPage extends AnyRef

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 close method has not been called.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PdfPage
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PdfPage(pdfDocument: PdfDocument, pdPage: PDPage, pageNumber: Int)

    Permalink

    pdfDocument

    A PdfDocument

    pdPage

    A PDPage (PDFBox internal representation)

    pageNumber

    0-based page index

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addHocr(hocr: Array[Byte]): Unit

    Permalink

    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.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. def isFromOcr: Boolean

    Permalink

    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.

  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. val pageNumber: Int

    Permalink

    0-based page index

  18. val pdPage: PDPage

    Permalink

    A PDPage (PDFBox internal representation)

  19. val pdfDocument: PdfDocument

    Permalink

    A PdfDocument

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toImage: BufferedImage

    Permalink

    Renders the page to an image.

    Renders the page to an image.

    Annotations
    @throws( classOf[PdfInvalidException] )
  22. def toImageWithoutText: BufferedImage

    Permalink

    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.

    Annotations
    @throws( classOf[PdfInvalidException] )
  23. def toPdf: Array[Byte]

    Permalink

    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.)

  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. def toText: String

    Permalink

    Returns all the text we can read from the document.

    Returns all the text we can read from the document.

    Annotations
    @throws( classOf[PdfInvalidException] )
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped