Adds a line to the current page.

 

   

Syntax
 

GraphicID = Doc.AddLine(X1, Y1, X2, Y2)

 

   

Params
 
Name Type Description
X1 Double The horizontal coordinate of the start point.
X2 Double The horizontal coordinate of the end point.
Y1 Double The vertical coordinate of the start point.
Y2 Double The vertical coordinate of the end point.
GraphicID Long The Object ID of the newly added Graphic object.

 

   

Notes
 

Adds a line to the current page. The line is drawn in the current color at the current width and with the current options.

The AddLine method returns the Object ID of the newly added Graphic object.

 

   

Example
 

The following code adds two horizontal lines to a document. The first is blue, and the second is green.

Set theDoc = Server.CreateObject("ABCpdf12.Doc")
theDoc.Width = 24
theDoc.Color = "0 0 255"
theDoc.AddLine -50, 100, 999, 100
theDoc.Color = "0 255 0"
theDoc.AddLine -50, 400, 999, 400
theDoc.Save "c:\mypdfs\docaddline.pdf"


docaddline.pdf