ComPDF Objective-C SDK
API Reference Documentation for ComPDF Objective-C SDK
Loading...
Searching...
No Matches
CPDFDocumentAI Class Reference

High-level APIs for Document AI tasks. More...

#include <document_ai.h>

Inheritance diagram for CPDFDocumentAI:

Class Methods

(ErrorCode) + LayoutAnalysis:andResults:
 Perform page layout analysis.
(ErrorCode) + StampDetection:andResults:
 Detect stamps/seals on the page.
(ErrorCode) + Ocr:andResult:
 Run OCR on the page/image.
(ErrorCode) + MagicColor:andOutputImage:
 Apply MagicColor enhancement to the input image.
(ErrorCode) + Dewarp:andOutputImage:
 Dewarp the input image (deskew/flatten).
(ErrorCode) + TableRec:andResult:
 Recognize tables from the page/image.

Detailed Description

High-level APIs for Document AI tasks.

Definition at line 207 of file document_ai.h.

Method Documentation

◆ Dewarp:andOutputImage:

+ (ErrorCode) Dewarp: (id) input
andOutputImage: (CDEWARPResult *) outputImage 

Dewarp the input image (deskew/flatten).

Parameters
inputInput source (NSString file path or NSImage).
outputImageInput: optional points to guide dewarp; Output: points + image.
Note
Two-phase usage supported: first call may return only points; call again with those points to get the corrected image.
Returns
Error code, 0 for success.

◆ LayoutAnalysis:andResults:

+ (ErrorCode) LayoutAnalysis: (id) input
andResults: (NSMutableArray< LayoutAnalysisResult * > *) LayoutResult 

Perform page layout analysis.

Parameters
inputInput source (NSString file path or NSImage).
LayoutResultOutput array filled with layout elements.
Returns
Error code, 0 for success.

◆ MagicColor:andOutputImage:

+ (ErrorCode) MagicColor: (id) input
andOutputImage: (CMAGICCOLORResult *) outputImage 

Apply MagicColor enhancement to the input image.

Parameters
inputInput source (NSString file path or NSImage).
outputImageOutput enhanced image container.
Returns
Error code, 0 for success.

◆ Ocr:andResult:

+ (ErrorCode) Ocr: (id) input
andResult: (NSMutableArray< COCRResult * > *) ocrResult 

Run OCR on the page/image.

Parameters
inputInput source (NSString file path or NSImage).
ocrResultOutput array filled with OCR results.
Returns
Error code, 0 for success.

◆ StampDetection:andResults:

+ (ErrorCode) StampDetection: (id) input
andResults: (NSMutableArray< StampDetectionResult * > *) StampResult 

Detect stamps/seals on the page.

Parameters
inputInput source (NSString file path or NSImage).
StampResultOutput array filled with stamp results.
Returns
Error code, 0 for success.

◆ TableRec:andResult:

+ (ErrorCode) TableRec: (id) input
andResult: (NSMutableArray< CTABResult * > *) tabResult 

Recognize tables from the page/image.

Parameters
inputInput source (NSString file path or NSImage).
tabResultOutput array filled with table results.
Returns
Error code, 0 for success.

The documentation for this class was generated from the following file: