Skip to main content
partha56
New Participant
July 9, 2010
Question

Use PaperCapture API in .Net

  • July 9, 2010
  • 10 replies
  • 37514 views

Hai to All,

               I just want to know how to use PaperCapture API in either VB.Net or C#.Net.. kindly pls help me in this scenario.

Rgds,
Parthasarathy.S

This topic has been closed for replies.

10 replies

manimce
New Participant
July 21, 2014

Hi Irosenth,

Shall we use ASCab to retreive the paramters needed and store the parameters needed for the dialog box.

Kindly clear me i'm going in the right path?

Hi Axel Bangert,

Send keys wont work if the active desktop is locked up.

i have used sendmessage instead but i succeded one click event after that i not able to reach the end.

HWND papercapturedialog=FindWindow(NULL, "Recognize Text");

SendMessage(papercapturedialog, BM_CLICK, 0, 0);

after this if i capture Recognize Text - Settings

i am not able to send any window param for combo box.Kindly clear me where i went wrong?

Rgds,

Manikandan P K

DareenTourkey
Participating Frequently
July 28, 2011

i know my problem but i can fix it

the problem is when i execute Command  i get the active document

AVCommandStatus status =AVCommandExecute (cmd);


AVDoc avDoc = AVAppGetActiveDoc();

PDDoc pDDoc = AVDocGetPDDoc(avDoc);

when i minimize the acrobat

the AVAppGetActiveDoc();  --> return null

is there any way to get the returned Document from the command

or avoid this  error

thanks

lrosenth
Adobe Employee
Adobe Employee
July 31, 2011

This is the ADOBE Acrobat SDK support forum.  As such, we ONLY discuss the use/implement/support of the ADOBE Acrobat SDK.   Discussions of 3rd party products take place elsewhere.

DareenTourkey
Participating Frequently
July 21, 2011

lrosenth plz help us to know how we can set it ?

July 21, 2011

Hi,

with the sendKeys we can set ClearScan for example like that:

ACCB1 void ACCB2 MyPluginCommand(void *clientData)
{
    PDDoc pddoc;
    AVDoc avDoc = AVAppGetActiveDoc();
    PDDoc pdDoc = AVDocGetPDDoc (avDoc);
    ASAtom cmdName;
    AVCommand cmd;
    cmdName = ASAtomFromString ("PaperCapture");
    cmd = AVCommandNew (cmdName);
   //SendKeys to set -> clearScan
    keybd_event(VK_TAB ,0x8f ,0 , 0);              //TAB
    keybd_event(VK_TAB ,0x8f , KEYEVENTF_KEYUP, 0);
    keybd_event(VK_DOWN , 0, 0, 0);              //Down
    keybd_event(VK_DOWN , 0, KEYEVENTF_KEYUP, 0);
    keybd_event(VK_DOWN , 0, 0, 0);              //Down -> clearScan
    keybd_event(VK_DOWN , 0, KEYEVENTF_KEYUP, 0);
    keybd_event(VK_TAB, 0x8f, 0 , 0);             //TAB
    keybd_event(VK_TAB ,0x8f , KEYEVENTF_KEYUP, 0);
    keybd_event(VK_TAB, 0x8f, 0 , 0);             //TAB
    keybd_event(VK_TAB ,0x8f , KEYEVENTF_KEYUP, 0);
    keybd_event(0x0D, 0, 0, 0);                       //ENTER
    AVCommandStatus status = AVCommandExecute (cmd);
    keybd_event(0x0D, 0, KEYEVENTF_KEYUP, 0);
    return;
}

But its not good coding, as I mentioned before. And in Adobe 9 and 10 you can see, that

there must be parameters that can be used ( see create pdf -> from scanner -> configure

settings ).

For me the OCR side is not so important, for I'm constructing a V-Scanner - its only for

testing, wheather the velocity of the OCR corresponds to the speed of the scanning process,

or not.The OCR can be done such as the final user likes and as he buys the software .

Best regards

Axel Arnold Bangert - Herzogenrath 2011

DareenTourkey
Participating Frequently
July 24, 2011

ok it's good

but to do Key_event On the Acrobat

it must be On screen (The Active window on The Windows )

and it's very silly with my application .

is ther any way to done it without be the on screen window ?

DareenTourkey
Participating Frequently
July 21, 2011

thaaaaaaaaaaanks too my best friend AxelArnoldBangert

your last post help me too

but as you say we must search at other way

if i fiend any think to send it in the header file i will post it

July 21, 2011

Hi,

ok, I am using the Trial Version of Acrobat Pro Extended 9.4.5.

Axel Arnold Bangert - Herzogenrath 2011

DareenTourkey
Participating Frequently
July 20, 2011

i understand how i can use it in java bit i wanna know i can use it in C++

the VS can't see the System Lib

July 21, 2011

Hi SDK,

normally you only use SendKey from C# or VB or Java but not from C++. But your

idea is not bad to call it directly from the plugin. If you want to use SendKey from

C++ take a look at this explanation here in CodeProject.

What concerns 'Chief Ironside': In the Header Files I found nowhere the parameters

for 'PaperCapture'. Mr. Ironside you first repeated to say that it is documented in the

SDK - please tell us, where 'PaperCapture'  is exactly (?link?) documented in

the Acrobat SDK?

Best regards

Axel Arnold Bangert - Herzogenrath 2011

DareenTourkey
Participating Frequently
July 20, 2011

thanks my friend AxelArnoldBangert 

but i need more help from you i'm Java Developer And

i don have any knlowage about c++

so i can't under stand how i can't use your nice code !!

so plz help me to know  how i can find the System.Windows  pack

and how i can use it because the VS Can't See it

and many thanx to you

July 20, 2011

Hi SDK

in Java that is something like that:

public void keyPressed(KeyEvent e)

{    

     int key = e.getKeyCode();    

     if (key == KeyEvent.VK_ENTER)

     {       

          System.out.println("ENTER pressed");    

     }

}

best regards

Axel Arnold Bangert - Herzogenrath  2011

DareenTourkey
Participating Frequently
July 20, 2011

Acrobat 9

DareenTourkey
Participating Frequently
July 20, 2011

i use the same code that  AxelArnoldBangert put in the last post

something like this

AVDoc avDoc = AVAppGetActiveDoc();

PDDoc pDDoc = AVDocGetPDDoc(avDoc);

ASAtom cmdName;

AVCommand cmd;

cmdName=ASAtomFromString("PaperCapture");

cmd=AVCommandNew(cmdName);

AVCommandStatus status =AVCommandExecute (cmd);

lrosenth
Adobe Employee
Adobe Employee
July 20, 2011

What version of Acrobat are you using?

DareenTourkey
Participating Frequently
July 20, 2011

Hi

i'm working On This API but i have problem

the acrobat ask me every time i try to open pdf to set the Setting of the OCR

can  any one help me to do ocr without open this dialog

i'm using c++

lrosenth
Adobe Employee
Adobe Employee
July 20, 2011

You don't mention HOW you are calling Acrobat, so we can't really help you

lrosenth
Adobe Employee
Adobe Employee
July 9, 2010

PaperCapture.api is the old name for the OCR capabilities in Acrobat implemented via a plugin. There is no access to it from VB/C#.

partha56
partha56Author
New Participant
July 12, 2010

     So there is no way to run OCR programmatically in VB.net or C#.net...?

partha56
partha56Author
New Participant
July 13, 2010

In the Acrobat SDK there is documentation and samples around the AVCommand set of APIs.


Just tell me how to add these API's to me .net code..give some samples..