LayoutGrid

Represents a layout grid.

public class LayoutGrid : PageElement, ISerializable
Public Class LayoutGrid
    Inherits PageElement
    Implements ISerializable

Inheritance: ObjectPageElementLayoutGrid

Implements: ISerializable

Licensing Info

This class is a DynamicPDF Core Suite Essentials feature. One of the following is required for non-evaluation usage:

Examples

The following example will place a layout grid on the page and also places a rectangle on the page for reference.
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
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
    public static void CreatePDF(string outputPath)
    {
        // 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 layout grid to the page
        page.Elements.Add(grid);

        // Save the PDF
        document.Draw(outputPath);
    } 
}

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.

Constructors

LayoutGrid()Initializes a new instance of the LayoutGrid class.
LayoutGrid(Boolean)Initializes a new instance of the LayoutGrid class.
LayoutGrid(LayoutGrid.GridType)Initializes a new instance of the LayoutGrid class.
LayoutGrid(LayoutGrid.GridType, Boolean)Initializes a new instance of the LayoutGrid class.

Properties

IDGets or sets the ID of the page element.
(Inherited from PageElement)
IgnoreMarginsGets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property.
(Inherited from PageElement)
RelativeToGets and sets placement of the page element on the page.
(Inherited from PageElement)
ShowTitleGets or sets a value specifying whether or not to display the grids title information.
TypeGets or sets the style of grid.

Methods

Draw(PageWriter)Draws the layout grid to the given PageWriter object.
Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF.PageElements

In this topic