Represents a layout grid.

For a list of all members of this type, see LayoutGrid Members


System.Object
   ceTe.DynamicPDF.PageElement
public class LayoutGrid : PageElement 

Remarks

This class can be used to place a grid on the entire page. This grid is very helpful with the design and layout of the document.

Example

The following example will place a layout grid on the page and also places a rectangle on the page for reference.

[Visual Basic]
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModule
        
    Sub Main()
        
        ' Create a PDF Document
        Dim MyDocument As Document = New Document 
        
        ' Create a Page and add it to the document
        Dim MyPage As Page = New Page
        MyDocument.Pages.Add(MyPage)

        ' Create a layout grid
        Dim grid As LayoutGrid = New LayoutGrid(LayoutGrid.GridType.Decimal)
 
        ' Add a rectangle to the page
        MyPage.Elements.Add(New Rectangle(50, 50, 50, 50, 2))

        ' Add the layout grid to the page
        MyPage.Elements.Add(grid)

        ' Save the PDF
        MyDocument.Draw("C:\MyDocument.pdf")
        
    End Sub
End Module
[C#]
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

class MyClass
{
    static void Main()
    {
        // Create a PDF Document
        Document document = new Document();

        // Create a Page and add it to the document
        Page page = new Page();
        document.Pages.Add( page );

        // Create a layout grid
        LayoutGrid grid = new LayoutGrid( LayoutGrid.GridType.Decimal );

        // Add a rectangle to the page
        page.Elements.Add( new Rectangle( 50, 50, 50, 50, 2 ) );

        // Add the layoutgrid to the page
        page.Elements.Add( grid );    

        // Save the PDF
        document.Draw( @"C:\MyDocument.pdf" );
    }
} 

Requirements

Namespace: ceTe.DynamicPDF.PageElements Namespace

Assembly: DynamicPDF.Generator.[Edition].dll

See Also

LayoutGrid members | ceTe.DynamicPDF.PageElements Namespace