op.document.OCRPages

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

op.document.OCRPages

Post by jusWest »

Hello!

We are running the following code to ocr treat multiple pages.

This shows a progressbar dialog with a cancel button.

When this cancel button is clicked, is there a way to detect how many
pages was proccessed or even detect that cancel was clicked?

Code: Select all

            try
            {
                int nID = _Inst.Str2ID("op.document.OCRPages", false);
                IOperation Op = _Inst.CreateOp(nID);
                ICabNode input = Op.Params.Root["Input"];
                input.v = _Doc;
                ICabNode options = Op.Params.Root["Options"];
                options["PagesRange.Type"].v = "Exactly";
                options["PagesRange.Text"].v = targetpages;
                options["ExtParams.Language"].v = "nor";
                options["ExtParams.Accuracy"].v = 300;
                options["ExtParams.AutoDeskew"].v = false;
                options["OutputType"].v = 0;
                options["OutputDPI"].v = 300;
                _Inst.AsyncDoAndWaitForFinish(Op);
            }
            catch (Exception ex)
            {
            }
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: op.document.OCRPages

Post by jusWest »

or even detect that cancel was clicked
This one I have covered, but
is there a way to detect how many pages was proccessed
this I need to know
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: op.document.OCRPages

Post by Sasha - Tracker Dev Team »

Hello jusWest,

There is no way of obtaining that via the SDK.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ