ApplyOCRTextLayerA
OCR, tekst, documentbewerking
Beschrijving
ANSI-variant van ApplyOCRTextLayer
Accepteert stringparameters als ANSI-tekst en gedraagt zich verder identiek aan het wide-string-entrypoint
Syntaxis
Delphi
Function TPDFlib.ApplyOCRTextLayer(Page: Integer; Const ResultJSON,
FontName: WideString; MinConfidence: Double): Integer;ActiveX
Function PDFlib::ApplyOCRTextLayer(Page As Long, ResultJSON As String, FontName As String, MinConfidence As Double) As LongDLL
int DLApplyOCRTextLayer(int InstanceID, int Page, const wchar_t* ResultJSON,
const wchar_t* FontName, double MinConfidence);
int DLApplyOCRTextLayerA(int InstanceID, int Page, const char* ResultJSON,
const char* FontName, double MinConfidence);Retourwaarden
| 1 | De tekstlaag is toegevoegd, of geen woord haalde de drempelwaarde |
|---|---|
| 0 | Validatie of schrijven is mislukt |
Opmerkingen
De volledige JSON-structuur en elke woordgrens worden gevalideerd voordat pagina-inhoud wordt weggeschreven
Elk woord wordt op boxhoogte gemeten en horizontaal passend gemaakt met textschaal, terwijl een geïsoleerde graphics state voorkomt dat OCR-opmaak intocht in latere tekenoperaties
LastErrorCode is 110 bij ongeldige OCR-JSON en 307 bij een schrijffout voor pagina, font of tekstlaag
LastOCRError geeft de gedetailleerde reden