Programmatically changing status of an annotation

Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default Programmatically changing status of an annotation

    Hi,

    I want to be able to change the status of an annotation from my plug-
    in. Normally when you do it from acrobat itself, for instance when you
    select review->accepted, you see that another annotation is added
    below this annotation in the annotations list. And it is rather a
    special annotation and is listed as Status in bold also a green check
    appears on the pop-up of the annotation. The problem is how to add
    such a status annotation programmatically. Any help would be
    appreciated.

    Thanks,

    Cagri
    cagribal Guest

  2. Similar Questions and Discussions

    1. Programmatically adding reply to a text annotation (to sticky note)
      Hello, I would like to add replies to PDTextAnnotations. I tried as follows: //Get annotation dictionary of this comment CosObj dictThis =...
    2. programmatically changing the constraint layout
      Hi, I have a control that I placed on an MXML form with contraints, so that it automatically resizes when the form resizes. I now need to change...
    3. Programmatically changing Adobe Pdf Print Properties
      Greetings, I have search all over to find an answer to this problem. I am driving MS Powerpoint with VB6 and also with Perl using Win32::OLE ...
    4. CHANGING COPYRIGHT STATUS IN FILE BROWSER?
      CAN ANYBODY TELL ME HOW TO BATCH CHANGE THE COPYRIGHT *STATUS* OF IMAGES IN THE METDATA USING FILE BROWSER. I'D RATHER NOT HAVE TO RUN AN ACTION AND...
    5. #25044 [Opn->Csd]: header("Location:") changing HTTP status
      ID: 25044 Updated by: helly@php.net Reported By: seairth at cox dot net -Status: Open +Status: ...
  3. #2

    Default Re: Programmatically changing status of an annotation

    Update: Here is the implementation (with minor details omitted) I
    tried:

    PDAnnot statusannot;
    ASFixedRect thisRect;
    PDAnnotGetRect(annot, &thisRect); //Annot is the comment whose
    status is changed
    //Create a PDAnnot object
    statusannot = PDPageCreateAnnot (page, ASAtomFromString("Text"),
    &thisRect);
    //Cast the PDAnnot object to a PDTextAnnot object
    statusannot = CastToPDTextAnnot(statusannot);

    //Open the annotation, set the text, and add it to a page
    PDTextAnnotSetOpen (statusannot , true);
    PDTextAnnotSetContents (statusannot , "Accepted set by bcagri",
    strlen("Accepted set by bcagri"));

    //Get the CosDoc
    AVDoc curr_doc = AVAppGetActiveDoc();
    PDDoc myPDDoc = AVDocGetPDDoc(curr_doc);
    CosDoc cd = PDDocGetCosDoc(myPDDoc);

    //Get annotation dictionary
    CosObj statusDict = PDAnnotGetCosObj(statusannot);
    CosObj strObj = CosNewString(cd, false, "bcagri", 6);
    CosDictPut (statusDict , ASAtomFromString ("T"), strObj);

    CosDictPutKeyString(statusDict , "State", CosNewString(cd, false,
    "Accepted", 8));
    CosDictPutKeyString(statusDict , "StateModel", CosNewString(cd,
    false, "Review", 6));
    //statusannot is added as a child to annot and refers to its status,
    described in PDF Reference 1.7, page 620
    CosDictPut (statusDict , ASAtomFromString ("IRT"), PDAnnotGetCosObj
    (annot));
    PDPageAddAnnot(page, -2, statusannot);

    This is the implementation of the description on page 620 of the PDF
    Reference 1.7. But unfortunately it doesn't work.

    Any help is appreciated.

    Thanks

    On Apr 3, 3:17*pm, cagribal <cagri.balke...@gmail.com> wrote:
    > Hi,
    >
    > I want to be able to change the status of an annotation from my plug-
    > in. Normally when you do it from acrobat itself, for instance when you
    > select review->accepted, you see that another annotation is added
    > below this annotation in the annotations list. And it is rather a
    > special annotation and is listed as Status in bold also a green check
    > appears on the pop-up of the annotation. The problem is how to add
    > such a status annotation programmatically. Any help would be
    > appreciated.
    >
    > Thanks,
    >
    > Cagri
    cagribal Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139