🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.acrobat.sdk
Article #54

Re: MenuItemExecute and OCR

#54
From: vinothfriends
Date: Fri, 10 Aug 2012 07:55
42 lines
2728 bytes
On Wednesday, July 9, 2008 3:00:07 AM UTC+5:30, (unknown) wrote:
> Figured it out:
> Following code worked perfectly for me for OCRing the first two pages of the PDF (for my purposes I only want the first two pages).
> 
> Send keytstroke combinations to acrobat to manipulate OCR Dialog Box. Finish by sending TAB keystrokes to move to OK button and sending ENTER keystroke to start OCR Text Recognition.
> 
> Dim Acroapp As CAcroApp
> Set Acroapp = CreateObject("AcroExch.App")
> Acroapp.Show
> Dim AVDOC As CAcroAVDoc
> Set AVDOC = CreateObject("AcroExch.AVDoc")
> dd = AVDOC.Open(Path, TempName)
> Dim PDDoc As CAcroPDDoc
> Set PDDoc = CreateObject("AcroExch.PDDoc")
> Set PDDoc = AVDOC.GetPDDoc
> '''''' SEND KEYSTROKES TO ACROBAT TO MANIPULATE OCR DIALOG BOX
> SendKeys ("{DOWN}")
> SendKeys ("{DOWN}")
> SendKeys ("{DOWN}")
> SendKeys ("{DOWN}")
> SendKeys ("{DOWN}")
> SendKeys ("{DOWN}")
> SendKeys ("{DOWN}")
> SendKeys ("{DOWN}")
> SendKeys ("{DOWN}")
> SendKeys ("{DOWN}")
> SendKeys ("{DOWN}")
> SendKeys ("2")
> SendKeys ("{TAB}")
> SendKeys ("{TAB}")
> SendKeys ("{TAB}")
> SendKeys ("{TAB}")
> SendKeys ("{TAB}")
> SendKeys ("{ENTER}")
> Acroapp.MenuItemExecute ("Cpt:CapturePages")
> 
> Let me know what you guys think...
> 
> Also, can you elaborate on the "Acrobat Capture programming interface" Bernd?

Hi,
how to send the keystroks to acrobat.. is there any code for that..
Technical Details
Message-ID: <352dccbd-fe5e-4269-a46a-cb288093feca@googlegroups.com>
Path: arc1-ca.pugleaf.net!c10ni101146pbw.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
References: <3c060909.-1@webcrossing.la2eafNXanI> <3c060909.4@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10177e,c850ced121f06151
X-Google-NewGroupId: yes
X-Google-Attributes: gid2105b4c04d,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.66.72.73 with SMTP id b9mr410295pav.9.1344585813516;
        Fri, 10 Aug 2012 01:03:33 -0700 (PDT)
Path: arc1-ca.pugleaf.net!c10ni101146pbw.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From: vinothfriends@gmail.com
Newsgroups: adobe.acrobat.sdk
Subject: Re: MenuItemExecute and OCR
Date: Fri, 10 Aug 2012 00:55:45 -0700 (PDT)
Organization: http://groups.google.com
Lines: 42
Message-ID: <352dccbd-fe5e-4269-a46a-cb288093feca@googlegroups.com>
References: <3c060909.-1@webcrossing.la2eafNXanI> <3c060909.4@webcrossing.la2eafNXanI>
NNTP-Posting-Host: 122.165.82.185
Mime-Version: 1.0
X-Trace: posting.google.com 1344585813 11163 127.0.0.1 (10 Aug 2012 08:03:33 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 10 Aug 2012 08:03:33 +0000 (UTC)
In-Reply-To: <3c060909.4@webcrossing.la2eafNXanI>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=122.165.82.185;
 posting-account=V8qo5AoAAAC_VDk32j4yePSI2v_9XlNo
User-Agent: G2/1.0
Content-Type: text/plain; charset=ISO-8859-1