Trait/Object

org.overviewproject.pdfocr

PdfOcr

Related Docs: object PdfOcr | package pdfocr

Permalink

trait PdfOcr extends AnyRef

Utility methods for dealing with PDFs.

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

Abstract Value Members

  1. abstract def loadPdfDocument(path: Path)(implicit ec: ExecutionContext): Future[PdfDocument]

    Permalink
    Attributes
    protected
  2. abstract val tesseract: Tesseract

    Permalink
    Attributes
    protected

Concrete 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. final def asInstanceOf[T0]: T0

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. def makeSearchablePdf(in: Path, out: Path, languages: Seq[Locale], progress: (Int, Int) ⇒ Boolean)(implicit ec: ExecutionContext): Future[Unit]

    Permalink

    Runs OCR on each page of the input that has fewer than 100 characters of text, and outputs a valid, searchable PDF.

    Runs OCR on each page of the input that has fewer than 100 characters of text, and outputs a valid, searchable PDF.

    This method can throw some exceptions that are entirely natural:

    * PdfEncryptedException: the input PDF needs a password. * PdfInvalidException: the input PDF contains unrecoverable errors. * TesseractMissingException: Tesseract cannot be run. * TesseractLanguageMissingException: Tesseract needs a language file.

    It may also throw exceptions you should probably never see:

    * FileNotFoundException: the input file or output directory is missing. * SecurityException: you cannot read the input or write the output. * TesseractFailedException: Tesseract did not run properly. * OutOfMemoryException: PDFBox has an evil bug.

    If this method returns a failure, or if progress() returns false, out will not be written.

    in

    Path to input, which must be a valid PDF file.

    out

    Path to output, which will be overwritten or deleted.

    languages

    Languages to use for OCR.

    progress

    Method to call with (nPagesCompleted, nPagesTotal) every page. The first call will be (0, nPagesTotal) and the last call will be (nPagesTotal, nPagesTotal). If the method ever returns false, the future will resolve and out will not be written. (This is how callers can cancel a lengthy OCR Process.)

  13. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  16. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  17. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped