Class OcrOptions


  • public class OcrOptions
    extends NativeObject

    The options for OCR processing

    This class aggregates all OCR processing options including resolution settings, image processing, text processing and page processing.
    • Constructor Summary

      Constructors 
      Constructor Description
      OcrOptions()  
    • Constructor Detail

      • OcrOptions

        public OcrOptions()
    • Method Detail

      • getDpi

        public double getDpi()

        The default resolution in DPI used for OCR (Getter)

        Each page's optimal OCR resolution is determined automatically, such that all images and text can be recognized. The default resolution is chosen if it is within the range of optimal resolutions.

        The range should be within the resolutions supported by the OCR engine. Most OCR engines are optimized for resolutions around 300 DPI.

        Default value: 300.0

      • setDpi

        public void setDpi​(double value)

        The default resolution in DPI used for OCR (Setter)

        Each page's optimal OCR resolution is determined automatically, such that all images and text can be recognized. The default resolution is chosen if it is within the range of optimal resolutions.

        The range should be within the resolutions supported by the OCR engine. Most OCR engines are optimized for resolutions around 300 DPI.

        Default value: 300.0

        Throws:
        java.lang.IllegalArgumentException - The DPI value is invalid.
      • getMinDpi

        public double getMinDpi()

        The minimum resolution in DPI used for OCR (Getter)

        Default value: 200.0
      • setMinDpi

        public void setMinDpi​(double value)

        The minimum resolution in DPI used for OCR (Setter)

        Default value: 200.0
        Throws:
        java.lang.IllegalArgumentException - The minimum DPI value is invalid.
      • getMaxDpi

        public double getMaxDpi()

        The maximum resolution in DPI used for OCR (Getter)

        Default value: 400.0
      • setMaxDpi

        public void setMaxDpi​(double value)

        The maximum resolution in DPI used for OCR (Setter)

        Default value: 400.0
        Throws:
        java.lang.IllegalArgumentException - The maximum DPI value is invalid.
      • getProcessEmbeddedFiles

        public boolean getProcessEmbeddedFiles()

        Whether to process embedded files recursively (Getter)

        If enabled, embedded PDF files are also processed with OCR. The default is to copy all embedded files as-is.

        Default value: false

      • setProcessEmbeddedFiles

        public void setProcessEmbeddedFiles​(boolean value)

        Whether to process embedded files recursively (Setter)

        If enabled, embedded PDF files are also processed with OCR. The default is to copy all embedded files as-is.

        Default value: false

      • getImageOptions

        public ImageOptions getImageOptions()

        The options for image processing (Getter)

        Options controlling how images in the PDF are processed during OCR.
      • getTextOptions

        public TextOptions getTextOptions()

        The options for text processing (Getter)

        Options controlling how existing text is processed during OCR.
      • getPageOptions

        public PageOptions getPageOptions()

        The options for page processing (Getter)

        Options controlling page-level OCR processing and tagging.