PdfOCRCreateFromMultipageTIFF hangs

Discussions about machine vision support in GdPicture.
Post Reply
daninden
Posts: 3
Joined: Fri Nov 27, 2009 1:20 pm

PdfOCRCreateFromMultipageTIFF hangs

Post by daninden » Fri Nov 27, 2009 1:55 pm

I'm using the function PdfOCRCreateFromMultipageTIFF to create a searchable PDF/A from a MTIFF file.
With some documents this works as expected, other documents hang (take extremely long) on this function (and never return to perform the next line of code).

Code: Select all

                    oGdPictureImaging.OCRTesseractReinit();
                    oGdPictureImaging.OCRTesseractSetPassCount(1);
                    oGdPictureImaging.PdfOCRCreateFromMultipageTIFF(id, TesseractDictionary.TesseractDictionaryDutch, this.apppath + "\\OCR\\", "", path + "pdf", true, "", "Doclogic", "", "", "Doclogic Barcode Processor");
                    oGdPictureImaging.OCRTesseractClear();
maybe someone can help me with this problem.

daninden
Posts: 3
Joined: Fri Nov 27, 2009 1:20 pm

Re: PdfOCRCreateFromMultipageTIFF hangs

Post by daninden » Fri Nov 27, 2009 2:10 pm

I tried a different approach to see which page is creating the problem:

Code: Select all

                    int PdfID = oGdPictureImaging.PdfOCRStart(path + "pdf", true, "", "", "", "", "");
                    for (int x = 1; x <= oGdPictureImaging.TiffGetPageCount(id); x++ )
                    {
                        oGdPictureImaging.TiffSelectPage(id, x);
                        oGdPictureImaging.PdfAddGdPictureImageToPdfOCR(PdfID, id, TesseractDictionary.TesseractDictionaryDutch, this.apppath + "\\OCR\\", "");
                    }
                    oGdPictureImaging.PdfOCRStop(PdfID);
when debugging it seems all pages get added properly, but it hangs again on the PdfOCRStop function.

daninden
Posts: 3
Joined: Fri Nov 27, 2009 1:20 pm

Re: PdfOCRCreateFromMultipageTIFF hangs

Post by daninden » Fri Nov 27, 2009 2:52 pm

Nevermind,

it works now.
I changed the gd init functions to be set on the current thread, and removed the SetLicenseNumberOCRTesseract.
Either of those fixed the problem (i guess the latter).

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: PdfOCRCreateFromMultipageTIFF hangs

Post by Loïc » Fri Nov 27, 2009 2:55 pm

Hi,

Are you using the latest edition available ?
If yes and if your problem persists, please send me your PDF hanging the app to esupport (at) gdpicture (dot) com.

Kind regards,

Loïc

anvasi
Posts: 33
Joined: Fri Dec 12, 2008 1:16 pm

Re: PdfOCRCreateFromMultipageTIFF hangs

Post by anvasi » Mon Jan 11, 2010 3:23 pm

hi Loic,

I have the same problem as danindem.

On some images i want to create pdf files with OCR using PdfOCRCreateFromMultipageTIFF but The process stop without notifying any mistake.

I send you my code and the image Where the mistake is produced on esupport (at) gdpicture (dot) com.

Thanks a lot,

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: PdfOCRCreateFromMultipageTIFF hangs

Post by Loïc » Wed Jan 27, 2010 7:39 pm

Hi there,

For information this bug has been identified & fixed in latest release available.

With best regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests