Skip to main content
Participating Frequently
August 24, 2017
Question

ExportAsFDF is not exporting all the annotation if run using IAC

  • August 24, 2017
  • 1 reply
  • 1570 views

Hi Expert,

I am new to IAC development, I have written one c# utility which will take pdf and extract the annotation from it and save it to some local drive.

Below is my code:

______________________________________________________________________________________________________

          String fileName = "D:/test.pdf";

          

            Acrobat.CAcroPDDoc pdDoc;

        

            pdDoc = new AcroPDDoc();

            if(pdDoc == null)

            throw new Exception("Failed to create Acrobat PDDoc object.");

            // Open the source PDF document

            bool rc = pdDoc.Open(fileName);

           

            object jsObj = pdDoc.GetJSObject();

            Type T = jsObj.GetType();

            object[] arg = { "false","false","null","false","/D/mytesting.fdf","true"};

            T.InvokeMember("exportAsFDF", BindingFlags.InvokeMethod | BindingFlags.Public |BindingFlags.Instance,null, jsObj, arg);

          

_______________________________________________________________________________________________________________

What happening is it is generating the fdf file but it is not having any content in it.

can you please guide me what I am doing wrong, also what is the approach to export annotation using c#.

Any help would be appreciated.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
August 24, 2017

You posted this question under the Reader forum, but I moved it here, to the Acrobat SDK forum.

However, are you trying to run this code using Reader?

Participating Frequently
August 24, 2017

No I am using in Adobe Acrobat only..