See Also

Group Members  | ceTe.DynamicPDF.PageElements Namespace

Requirements

Namespace: ceTe.DynamicPDF.PageElements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

Language

Visual Basic

C#

Show All

Represents a group of page elements.

For a list of all members of this type, see Group members.

Object Model

Inheritance Hierarchy

System.Object
   ceTe.DynamicPDF.PageElement
      ceTe.DynamicPDF.PageElements.Group
         ceTe.DynamicPDF.PageElements.TransparencyGroup
         ceTe.DynamicPDF.PageElements.TransformationGroup
         ceTe.DynamicPDF.PageElements.AreaGroup
         ceTe.DynamicPDF.PageElements.AnchorGroup

Syntax

[Visual Basic]
Public Class Group    Inherits PageElement    Implements IPageElementContainer 
[C#]
public class Group : PageElement, IPageElementContainer 

Remarks

This class can be used to collect many page elements together and add them to the page all at once. Every page element that you add to the group will be added to the page when the group is added to the page.

Example

The following example will place a rectangle and several lines into a group object and then add that group to the page.

[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 group
        Dim MyGroup As Group = New Group

        ' Add page elements to the group
        MyGroup.Add(New Rectangle(0, 0, 200, 200, 3))
        MyGroup.Add(New Line(0, 100, 100, 0, 3))
        MyGroup.Add(New Line(100, 0, 200, 100, 3))
        MyGroup.Add(New Line(200, 100, 100, 200, 3))
        MyGroup.Add(New Line(100, 200, 0, 100, 3))

        ' Add the group to the page
        MyPage.Elements.Add(MyGroup)

        ' 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 group 
        Group group = new Group(); 
 
        // Add page elements to the group 
        group.Add( new Rectangle( 0, 0, 200, 200, 3 ) ); 
        group.Add( new Line( 0, 100, 100, 0, 3 ) ); 
        group.Add( new Line( 100, 0, 200, 100, 3 ) ); 
        group.Add( new Line( 200, 100, 100, 200, 3 ) ); 
        group.Add( new Line( 100, 200, 0, 100, 3 ) ); 
     
        // Add the group to the page 
        page.Elements.Add( group );     
 
        // Save the PDF 
        document.Draw( @"C:\MyDocument.pdf" ); 
    } 
}

Licensing

This class is a DynamicPDF Generator Community Edition feature.

Requirements

Namespace: ceTe.DynamicPDF.PageElements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

See Also

Group Members  | ceTe.DynamicPDF.PageElements Namespace

 

 


© Copyright 2006, ceTe Software