|
AddLineAnnot |
Top Previous Next |
|
[This method is new in Gnostice eDocEngine ActiveX/.NET v2.0 Professional Edition]
The AddLineAnnot method is used to add a line annotation to the PDF document. To add a Line Annotation, create an instance of gtPDFLineAnnotX, set its properties and pass it to AddLineAnnot.
Syntax
Note: The annotation items added using this method need not be freed by the user. All the items will be freed at the end when EndDoc is called.
Parameters
Item Specifies the line annotation object to be added.
Example Code
[VC++] CgtPDFLineAnnotX Lineannot1; Lineannot1 = m_Engine.CreateLineAnnot(); Lineannot1.SetBorderStyle(brDashed); Lineannot1.SetBorderPattern("1.2 1.3"); Lineannot1.SetBorderWidth(5); Lineannot1.SetStartStyle(lsRClosedArrow); Lineannot1.SetEndStyle(lsButt); Lineannot1.SetBorderColor(RGB(20, 50, 246)); Lineannot1.SetInteriorColor(RGB(120, 150, 46)); Lineannot1.SetLine(2.5, 2.3, 4, 2.3); Lineannot1.SetTitle("Annotations Demo"); Lineannot1.SetSubject("Line Annotation"); Lineannot1.SetContents("This Demo shows how to create a Line Annotation"); m_Engine.AddLineAnnot(Lineannot1);
[C#] gtPDFLineAnnotX Lineannot1; Lineannot1 = AxgtPDFEngineX1.CreateLineAnnot(); Lineannot1.BorderStyle = eDocEngineX.TxgtBorderStyle.brDashed; Lineannot1.BorderPattern = "1.2 1.3"; Lineannot1.BorderWidth = 5; Lineannot1.StartStyle = eDocEngineX.TxgtLineStyle.lsRClosedArrow; Lineannot1.EndStyle = eDocEngineX.TxgtLineStyle.lsButt; Lineannot1.BorderColor = (uint) ColorTranslator.ToOle(Color.DarkViolet); Lineannot1.InteriorColor = (uint) ColorTranslator.ToOle(Color.Cyan); Lineannot1.SetLine( 2.5, 2.3, 4, 2.3); Lineannot1.Title = "Annotations Demo"; Lineannot1.Subject = "Line Annotation"; Lineannot1.Contents = "This Demo shows how to create a Line Annotation"; AxgtPDFEngineX1.AddLineAnnot(Lineannot1);
[VB] Dim Lineannot1 As gtPDFLineAnnotX Set Lineannot1 = gtEngineX1.CreateLineAnnot With Lineannot1 .BorderStyle = brDashed .BorderPattern = "1.2 1.3" .BorderWidth = 5 .StartStyle = lsRClosedArrow .EndStyle = lsButt .BorderColor = RGB(20, 50, 246) .InteriorColor = RGB(120, 150, 46) .SetLine 2.5, 2.3, 4, 2.3 .Title = "Annotations Demo" .Subject = "Line Annotation" .Contents = "This Demo shows how to create a Line Annotation" End With Call gtEngineX1.AddLineAnnot(Lineannot1)
|