Recognize Content with OCR
ComPDFKit Conversion SDK provides OCR functionality when converting PDF documents to Word, Excel, PPT, TXT, HTML, and RTF. Follow the steps below to use OCR in your project.
- Drag ComDocumentAIKit.framework into the folder of your Xcode project, then select Copy items if needed and Create groups options in the pop-up window.
- Add these files into your Xcode project as we did in the step above:libDocumentAI.dylib, libonnxruntime.1.12.0.dylib, libpaddle2onnx.1.0.5.dylib, libopencv_world.4.2.0.dylib, libopencv_world.4.2.dylib, libopencv_world.dylib.
- Add these files into your Xcode project as we did in the step above: CDocumentAIResource.bundle.
- Ensure that the Embed option for the content added in General -> Frameworks, Libraries, and Embedded Content is set to Embed & Sign.
- Ensure that the Signing Certificate option in Signing & Capabilities -> Signing is set to Development.
- Set the parameter @property (nonatomic, assign) BOOL isAllowOCR in the options to YES.
ComPDFKit Conversion SDK OCR supported language details:
Script / Notes | Language | Language (English Name) |
---|---|---|
Latn; American | English | English |
Latn; Canadian | Français canadien | French |
Hans/Hant | 中文简体 | Chinese (Simplified) |
Hans/Hant | 中文繁体 | Chinese (Traditional) |
Jpan | 日本語 | Japanese |
Kore | 한국어 | Korean |
Latn | Deutsch | German |
Latn | Српски (латиница) | Serbian(latin) |
Latn | Occitan, lenga d'òc, provençal | Occitan |
Latn | Dansk | Danish |
Latn | Italiano | Italian |
Latn; European | Español | Spanish |
Latn; European | Português (Portugal) | Portuguese |
Latn | Te reo Māori | Maori |
Latn | Bahasa Melayu | Malay |
Latn | Malti | Maltese |
Latn | Nederlands | Dutch |
Latn; Bokmål | Norsk | Norwegian |
Latn | Polski | Polish |
Latn | Română | Romanian |
Latn | Slovenčina | Slovak |
Latn | Slovenščina | Slovenian |
Latn | shqip | Albanian |
Latn | Svenska | Swedish |
Latn | Swahili | Swahili |
Latn | Wikang Tagalog | Tagalog |
Latn | Türkçe | Turkish |
Latn | oʻzbekcha | Uzbek |
Latn | Tiếng Việt | Vietnamese |
Latn | Afrikaans | Afrikaans |
Latn | Azərbaycan | Azerbaijani |
Latn | Bosanski | Bosnian |
Latn | Čeština | Czech |
Latn | Cymraeg | Welsh |
Latn | Eesti keel | Estonian |
Latn | Gaeilge | Irish |
Latn | Hrvatski | Croatian |
Latn | Magyar | Hungarian |
Latn | Bahasa Indonesia | Indonesian |
Latn | Íslenska | Icelandic |
Latn | Kurdî | Kurdish |
Latn | Lietuvių | Lithuanian |
Latn | Latviešu |