Reading Line Annotation Information from a PDF Document

Introduction

Aspose.PDF Cloud allows you to read Text Annotation information from a PDF Doucment. Aspose.PDF Cloud provide the following API to achieve this

API Information

API Type Description Swagger Link
/pdf/{name}/annotations/line GET Read Document Text Annotations GetDocumentLineAnnotations
/pdf/{name}/pages/{pageNumber}/annotations/line GET Read Document Annotations from a Page in PDF Document GetPageLineAnnotations
/pdf/{name}/annotations/line/{annotationId} GET Read Annotation by ID GetLineAnnotation

cURL Example

We have used PdfWithAnnotations.pdf for the example below. In this example we are demonstration /pdf/{name}/annotations/line/{annotationId} resource to read Annotation Information by ID. You can use /pdf/{name}/annotations/line or /pdf/{name}/annotations/line to get the desired annotation identifier. The above resources return the following Line Annotation information for the document


{

   "Annotations":{

      "List":[

         {

            "Starting":{

               "X":162.663,

               "Y":654.5

            },

            "StartingStyle":"Circle",

            "Ending":{

               "X":230.845,

               "Y":654.5

            },

            "EndingStyle":"OpenArrow",

            "InteriorColor":{

               "A":255,

               "R":220,

               "G":220,

               "B":220

            },

            "LeaderLine":10.0,

            "LeaderLineExtension":5.0,

            "LeaderLineOffset":2.5,

            "ShowCaption":true,

            "CaptionOffset":{

               "X":7.0,

               "Y":8.0

            },

            "CaptionPosition":"Top",

            "Intent":"LineArrow",

            "CreationDate":"02/25/2011 01:02:43.000 PM",

            "Subject":"Line",

            "Title":"Maxim",

            "RichText":"<?xml version=\"1.0\"?><body xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\" xfa:APIVersion=\"Acrobat:7.0.0\" xfa:spec=\"2.0.2\" ><p><span style=\"text-decoration:;font-size:10.0pt\">Contents</span></p></body>",

            "Color":{

               "A":255,

               "R":70,

               "G":162,

               "B":185

            },

            "Contents":"Contents",

            "Modified":"02/25/2011 01:07:16.000 PM",

            "Id":"GI5TIOZRGUYCYNRTHEWDEMZVFQ3DOMA",

            "Flags":[

               "Print"

            ],

            "Name":"9d2aed9f-8f76-4ff8-b93b-d879fba27f70",

            "Rect":{

               "LLX":150.663,

               "LLY":639.5,

               "URX":234.845,

               "URY":669.5

            },

            "PageIndex":2,

            "ZIndex":0,

            "HorizontalAlignment":"Left",

            "VerticalAlignment":"Top",

            "Links":[

               {

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

                  "Rel":"self",

                  "Type":null,

                  "Title":null

               }

            ]

         }

      ],

      "Links":[

         {

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

            "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

GetDocumentLineAnnotations

GetPageLineAnnotation