i am having 3 controls.
Button
AxAcroPDF1
Richtextbox
I select text from pdf file present in AxAcroPDF1 from mouse click, what ever i select immidiately it show be shown on the text on the Richtextbox
i just got 1 site in which i found the below code.... But i dnt know how to make it work... so many things r strange i am not getting them how to do... Ur help will be appriciated
The link is http://forums.adobe.com/thread/567307
Button
AxAcroPDF1
Richtextbox
I select text from pdf file present in AxAcroPDF1 from mouse click, what ever i select immidiately it show be shown on the text on the Richtextbox
i just got 1 site in which i found the below code.... But i dnt know how to make it work... so many things r strange i am not getting them how to do... Ur help will be appriciated
The link is http://forums.adobe.com/thread/567307
Code:
CAcroAVDoc avDoc;
CAcroPDDoc pdDoc;
CAcroRect acroRect = new AcroRectClass();
CAcroPDTextSelect pdTextSelect;
int startpage;
bool bSelectSet = false;
bool bShowSelect = false;
string szPdfConst = openDialog.FileName;
acroRect.bottom = 225;
acroRect.Left = 140;
acroRect.Top = 230;
acroRect.right = 145;
//Create a new Acrobat App Object
mApp = new AcroAppClass();
mApp.Show();
avDoc = new AcroAVDocClass();
//Lets open the PDF now
if (avDoc.Open(szPdfConst, ""))
{
fileStatus.Text = "Adobe Acrobat document loaded succesfully.";
pdDoc = (CAcroPDDoc)avDoc.GetPDDoc();
startpage = 0;
pdTextSelect = (CAcroPDTextSelect)pdDoc.CreateTextSelect(startpage, acroRect);
bSelectSet = avDoc.SetTextSelection(pdTextSelect);
//If the set was successful
if (bSelectSet)
{
bShowSelect = avDoc.ShowTextSelect();
}
}
else
{
fileStatus.Text = "Adobe Acrobat document could not be loaded.";
}
}