com.cete.dynamicpdf.pageelements
Class LayoutGrid


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

  import com.cete.dynamicpdf.*;
  import com.cete.dynamicpdf.pageelements.*;
  
  public class MyClass{
       public static void main(String args[]){
       
           // Create a PDF Document
           Document document = new Document();
 
           // Create a Page and add it to the document
           Page page = new Page();
           document.getPages().add(page);
           
           // Create a layout grid
           LayoutGrid grid = new LayoutGrid(); //Default is decimal
       
           // Add a rectangle to the page
           page.getElements().add(new Rectangle(50, 50, 50, 50, 2));
 
           // Add the layoutgrid to the page
           page.getElements().add(grid);    
 
           // Save the PDF
           document.draw("[physicalpath]/MyDocument.pdf"); 
       }
  }