Doc AddGrid Function. Adds a visible grid to the current page. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

Adds a visible grid to the current page.

 

   
Syntax  

[C#]
int AddGrid()

[Visual Basic]
Function AddGrid() As Integer

 

   

Params
 
Name Description
return The Object ID of the newly added Grid Object.

 

   

Notes
 

Adds a visible grid to the current page. The grid shows locations on the page and the effect of the current transform. It is designed to help with object positioning during development.

 

   

Example
 

The following code modifies the page transform and then adds a grid to show how the transform has affected the page.

[C#]
Doc theDoc = new Doc();
theDoc.Page = theDoc.AddPage();
theDoc.Transform.Rotate(20, 100, 100);
theDoc.AddGrid();
theDoc.Save(Server.MapPath("docaddgrid.pdf"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.Page = theDoc.AddPage()
theDoc.Transform.Rotate(20, 100, 100)
theDoc.AddGrid()
theDoc.Save(Server.MapPath("docaddgrid.pdf"))
theDoc.Clear()


docaddgrid.pdf