The 0-based index of the required annotation within the current page. It must be a value from 0 to GetAnnotationCount-1.
Output parameter. Array of 8 × n numbers specifying the coordinates of n quadrilaterals in PDF user space.
Example





In This Topic
GdPicture14 Namespace / GdPicturePDF Class / GetAnnotationQuadPoints Method

GetAnnotationQuadPoints Method (GdPicturePDF)

In This Topic
Returns the QuadPoints of annotation specified by its index related to the currently selected page of the loaded PDF document.

You can use the SetMeasurementUnit method to reset the units and the SetOrigin method to reset the origin's location according to your preference.

Syntax
'Declaration
 
Public Function GetAnnotationQuadPoints( _
   ByVal AnnotationIdx As Integer, _
   ByRef QuadPoints() As Single _
) As GdPictureStatus
public GdPictureStatus GetAnnotationQuadPoints( 
   int AnnotationIdx,
   ref float[] QuadPoints
)
public function GetAnnotationQuadPoints( 
    AnnotationIdx: Integer;
   var  QuadPoints: Singlearray of
): GdPictureStatus; 
public function GetAnnotationQuadPoints( 
   AnnotationIdx : int,
   QuadPoints : float[]
) : GdPictureStatus;
public: GdPictureStatus GetAnnotationQuadPoints( 
   int AnnotationIdx,
   ref float[]* QuadPoints
) 
public:
GdPictureStatus GetAnnotationQuadPoints( 
   int AnnotationIdx,
   array<float>^% QuadPoints
) 

Parameters

AnnotationIdx
The 0-based index of the required annotation within the current page. It must be a value from 0 to GetAnnotationCount-1.
QuadPoints
Output parameter. Array of 8 × n numbers specifying the coordinates of n quadrilaterals in PDF user space.

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK. If the annotation does not contain any QuadPoints information the return value is GdPictureStatus.PropertyNotFound.

We strongly recommend always checking this status first.

Remarks
This method is only allowed for use with non-encrypted documents.

Please always ensure that you have selected the correct page using the SelectPage method before applying an annotation index.

Be aware that the values of the coordinates and dimensions are expressed in the current units defined by the SetMeasurementUnit method according to the current coordinate space defined by the SetOrigin method.

This method is applicable only for "Link", "Highlight", "Underline", "Squiggly" and "StrikeOut" annotation types.

Example
How to retrieve the quad points of text markup annotation.
Using pdf = New GdPicturePDF
pdf.LoadFromFile("input.pdf")
    Dim quadpoints = New Single() { }
    pdf.GetAnnotationQuadPoints(0, quadpoints)
    pdf.DrawRectangle(quadpoints(0), quadpoints(1), quadpoints(6) - quadpoints(0), quadpoints(7) - quadpoints(1), False, True)
    pdf.SaveToFile("output.pdf")
End Using
using pdf = new GdPicturePDF();
{
    pdf.LoadFromFile("input.pdf");
    float[] quadpoints = new float[0];
    pdf.GetAnnotationQuadPoints(0, ref quadpoints);
    pdf.DrawRectangle(quadpoints[0], quadpoints[1], quadpoints[6] - quadpoints[0], quadpoints[7] - quadpoints[1], false, true);
    pdf.SaveToFile("output.pdf");
}
See Also