Add or Replace Highlight Annotations in a PDF Document

Introduction

Aspose.PDF Cloud allows you to add or replace Highlight Annotation information in a PDF Document. Aspose.PDF Cloud provide the following API to achieve this

API Information

API Type Description Swagger Link
/pdf/{name}/pages/{pageNumber}/annotations/highlight POST Add document page highlight annotations. PostPageHighlightAnnotations
/pdf/{name}/pages/{pageNumber}/annotations/highlight PUT Replace document highlight annotation PutHighlightAnnotation

cURL Example

Suppose, we have the following Highlight Annotation information which need to be added in a document page.


 {

            "QuadPoints":[

               {

                  "X":10.0,

                  "Y":10.0

               },

               {

                  "X":20.0,

                  "Y":10.0

               },

               {

                  "X":10.0,

                  "Y":20.0

               },

               {

                  "X":10.0,

                  "Y":10.0

               }

            ],

            "CreationDate":"01/01/0001 12:00:00.000 AM",

            "Subject":"Subj Updated",

            "Title":"Title Updated",

            "RichText":"Rich Text Updated",

            "Color":{

               "A":255,

               "R":0,

               "G":0,

               "B":0

            },

            "Contents":"",

            "Modified":"02/02/2018 12:00:00.000 AM",

            "Id":"GI5TOOZRGAYCYMJQGAWDEMBQFQZDAMA",

            "Flags":[

            ],

            "Name":"Test Text Updated",

            "Rect":{

               "LLX":100.0,

               "LLY":100.0,

               "URX":200.0,

               "URY":200.0

            },

            "PageIndex":2,

            "ZIndex":0,

            "HorizontalAlignment":"Center",

            "VerticalAlignment":"Top",

            "Links":[

               {

                  "Href":"http://api.aspose.cloud/v2.0/pdf/PdfWithAnnotations.pdf/pages/2/annotations/GI5TOOZRGAYCYMJQGAWDEMBQFQZDAMA",

                  "Rel":"self",

                  "Type":null,

                  "Title":null

               }

            ]

         }

      ],

      "Links":[

         {

            "Href":"http://api.aspose.cloud/v2.0/pdf/PdfWithAnnotations.pdf/pages/2/annotations/GI5TOOZRGAYCYMJQGAWDEMBQFQZDAMA",

            "Rel":"self",

            "Type":null,

            "Title":null

         }

      ]

   }
   
{
	"Code":200,
   	"Status":"OK"
}

SDK Source

The Aspose.PDF Cloud SDKs can be downloaded from the following page: Available SDKs

SDK Examples

PostPageHighlightAnnotations Examples

PutPageHighlightAnnotations Examples