How do I add Annotations in the existing PDF through C#?
Hi,
I m trying to add the rectangle annotation to the existing PDF but not able to achieve that.Please help to solve this. I m using Adobe Acrobat 9 pro. I tried with the below C# code,
string inputfilepath="C:\\RedLine.pdf"
//Object for Adobe application and Document
AcroApp gApp;
AcroAVDoc acroAVDoc;
//Initialize Acrobat Application
gApp = new AcroApp();
//Open PDf Document
acroAVDoc = new AcroAVDoc();
acroAVDoc.Open(inputfilepath, "output");
//To show the Application
gApp.Show();
CAcroPDDoc acroPDDoc = (CAcroPDDoc)acroAVDoc.GetPDDoc();
//Rectangle bounds
AcroRect acroRect = new AcroRect();
acroRect.Left = 906;
acroRect.right = 815;
acroRect.Top = 377;
acroRect.bottom = 142;
CAcroPDAnnot acroPDAnnot = acroPDPage.AddNewAnnot(2, "Rectangle", acroRect);
acroPDAnnot.SetContents("Testing the Acrobat Redline");
Thanks in advance,
SASIKUMAR
