Community

ProcessImage: Result file txt error Answered

Hello I want to applicate OCR ABBY Cloud on my photo (it contains a word ARABIC) , to extract file txt , this is my code:

        String sourceFilePath = @"C:\CINPROCESSING\Prenom.jpg";
        string language = "Arabic";
        ProcessingSettings settings = new ProcessingSettings();
       settings.SetLanguage("Arabic");
        OcrSdkTask task = restClient.ProcessImage(sourceFilePath, settings);

        String outputFileBase = @"C:\CINPROCESSING\test00.txt";

        task = waitForTask(task, restClient);

        restClient.DownloadResult(task, outputFileBase);

But the result is file txt :

{\rtf1\ansi\ansicpg1252\uc1\deflang1025\adeflang1025\deflangfe1025\deff2\stshfloch2\stshfhich2\stshfbi2\stshfdbch2 {\fonttbl {\f0\fswiss\fcharset0 Arial;} {\f1\fswiss\fcharset178 Arial;} {\f2\fnil\fcharset0 Times New Roman;} {\f3\fnil\fcharset178 Times New Roman;} } {\colortbl ; \red0\green0\blue0 ; \red0\green0\blue255 ; \red0\green255\blue255 ; \red0\green255\blue0 ; \red255\green0\blue255 ; \red255\green0\blue0 ; \red255\green255\blue0 ; \red255\green255\blue255 ; \red0\green0\blue128 ; \red0\green128\blue128 ; \red0\green128\blue0 ; \red128\green0\blue128 ; \red128\green0\blue0 ; \red128\green128\blue0 ; \red128\green128\blue128 ; \red192\green192\blue192 ; } {*\defchp\fs24\afs24\loch\af2\hich\af2\dbch\af2} {*\defpap\aspalpha\aspnum\faauto\adjustright\cgrid\li0\ri0\ltrpar\ql\fi0\sb0\sa0\sl240\slmult1} {\stylesheet {\aspalpha\aspnum\faauto\adjustright\cgrid\li0\ri0\ltrpar\ql\fi0\sb0\sa0\sl240\slmult1\lang1025\langfe1025\f3\fs24\afs24\charscalex100\expndtw0 \cf1\dn0 Normal;} {*\cs10\additive Default Paragraph Font;} {*\cs15\additive\f1\b0\i0\ul0\strike0\scaps0\fs52\afs52\sbasedon10\slink16 Body text (2)_;} {\s16\aspalpha\aspnum\faauto\adjustright\cgrid\cbpat8\rtlpar\qr\sl-580\slmult0\f1\b0\i0\ul0\strike0\scaps0\fs52\afs52\sbasedon0\slink15 Body text (2);} } {\info {\title} {\subject} {\author} {\keywords} } \paperw4941\paperh585\margl3505\margr26\margt20\margb20\gutter0\viewkind1\viewzk1\fet2\splytwnine\ftnlytwnine\htmautsp\useltbaln\alntblind \lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct\asianbrkrule\newtblstyruls\nogrowautofit\usenormstyforlist \noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notvatxbx\krnprsnet\cachedcolbal\noxlattoyen \noultrlspc\dntblnsbdb\nospaceforul\nolnhtadjtbl\notbrkcnstfrctbl\dgmargin\dghspace181\dgvspace181\dghshow1\dgvshow1\sectd\rtlsect\lndscpsxn \headery0\footery3\colsx720\sectlinegrid360\sftnbj\sftnrstcont \pard\plain\rtlpar\qr\sl-580\slmult0\wrapdefault\s16\aspalpha\aspnum\faauto\adjustright\cgrid\f0\b0\i0\ul0\strike0\scaps0\fs52\afs52 {\cs15\lang1025\langfe1025\f1\b0\i0\ul0\strike0\scaps0\fs52\afs52\charscalex100\expndtw0\cf1\dn0 \'C7\'CF\'D1\'ED\'D3} \par }

I don't understand ? what i modify in my code?

Thanks,

Was this article helpful?

0 out of 0 found this helpful

Comments

2 comments

  • Avatar
    Oksana Serdyuk

    You have not specified the correct export format:

    exportFormat=txt
    

    The exportFormat parameter of the processImage method has the rtf value by default.

    0
  • Avatar
    thabet idris

    Genial!!!! Very very thanks My problem is resolved

    0

Please sign in to leave a comment.