Enum OcrLanguage

  • All Implemented Interfaces:

    
    public enum OcrLanguage
    
                        

    Supported languages for OCR. Values of this enum class should be used together with performOcrOnPages. If you want to learn more about how to use OCR, please visit https://pspdfkit.com/guides/android/current/ocr/getting-started.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CROATIAN

      Croatian language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Croatian documents. When using this value, make sure you have the Croatian OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-croatian dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-croatian:$pspdfkit_version"
      }
      
      CZECH

      Czech language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Czech documents. When using this value, make sure you have the Czech OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-czech dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-czech:$pspdfkit_version"
      }
      
      DANISH

      Danish language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Danish documents. When using this value, make sure you have the Danish OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-danish dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-danish:$pspdfkit_version"
      }
      
      DUTCH

      Dutch language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Dutch documents. When using this value, make sure you have the Dutch OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-dutch dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-dutch:$pspdfkit_version"
      }
      
      ENGLISH

      English language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for English documents. When using this value, make sure you have the English OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-english dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-english:$pspdfkit_version"
      }
      
      FINNISH

      Finnish language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Finnish documents. When using this value, make sure you have the Finnish OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-finnish dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-finnish:$pspdfkit_version"
      }
      
      FRENCH

      French language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for French documents. When using this value, make sure you have the French OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-french dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-french:$pspdfkit_version"
      }
      
      GERMAN

      German language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for German documents. When using this value, make sure you have the German OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-german dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-german:$pspdfkit_version"
      }
      
      INDONESIAN

      Indonesian language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Indonesian documents. When using this value, make sure you have the Indonesian OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-indonesian dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-indonesian:$pspdfkit_version"
      }
      
      ITALIAN

      Italian language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Italian documents. When using this value, make sure you have the Italian OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-italian dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-italian:$pspdfkit_version"
      }
      
      MALAY

      Malay language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Malay documents. When using this value, make sure you have the Malay OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-malay dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-malay:$pspdfkit_version"
      }
      
      NORWEGIAN

      Norwegian language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Norwegian documents. When using this value, make sure you have the Norwegian OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-norwegian dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-norwegian:$pspdfkit_version"
      }
      
      POLISH

      Polish language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Polish documents. When using this value, make sure you have the Polish OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-polish dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-polish:$pspdfkit_version"
      }
      
      PORTUGUESE

      Portuguese language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Portuguese documents. When using this value, make sure you have the Portuguese OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-portuguese dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-portuguese:$pspdfkit_version"
      }
      
      SERBIAN

      Serbian language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Serbian documents. When using this value, make sure you have the Serbian OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-serbian dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-serbian:$pspdfkit_version"
      }
      
      SLOVAK

      Slovak language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Slovak documents. When using this value, make sure you have the Slovak OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-slovak dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-slovak:$pspdfkit_version"
      }
      
      SLOVENIAN

      Slovenian language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Slovenian documents. When using this value, make sure you have the Slovenian OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-slovenian dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-slovenian:$pspdfkit_version"
      }
      
      SPANISH

      Spanish language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Spanish documents. When using this value, make sure you have the Spanish OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-spanish dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-spanish:$pspdfkit_version"
      }
      
      SWEDISH

      Swedish language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Swedish documents. When using this value, make sure you have the Swedish OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-swedish dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-swedish:$pspdfkit_version"
      }
      
      TURKISH

      Turkish language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Turkish documents. When using this value, make sure you have the Turkish OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-turkish dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-turkish:$pspdfkit_version"
      }
      
      WELSH

      Welsh language (en) selector for OCR processing. Use this value with performOcrOnPages when performing text detection for Welsh documents. When using this value, make sure you have the Welsh OCR language pack added to your app, by adding the com.pspdfkit:pspdfkit-ocr-welsh dependency inside your build.gradle file:

      
      final String pspdfkit_version = {@value com.pspdfkit.PSPDFKit#VERSION};
      dependencies {
          implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
          implementation "com.pspdfkit:pspdfkit-ocr-welsh:$pspdfkit_version"
      }
      
    • Method Summary

      Modifier and Type Method Description
      static Array<OcrLanguage> values() Returns an array containing the constants of this enum type, in the order they're declared.
      static OcrLanguage valueOf(String name) Returns the enum constant of this type with the specified name.
      String getTrainedDataFilename() Returns the name of the .traineddata file that is used for the given language.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • values

         static Array<OcrLanguage> values()

        Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

        Returns:

        an array containing the constants of this enum type, in the order they're declared

      • valueOf

         static OcrLanguage valueOf(String name)

        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

        Returns:

        the enum constant with the specified name

      • getTrainedDataFilename

         String getTrainedDataFilename()

        Returns the name of the .traineddata file that is used for the given language.

        Returns:

        Name of the language trained data file, without the extension.