Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.Cryptography
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 AES 128 bit security object
Dim security As Aes128Security = New Aes128Security("owner", "user")
' Set these properties to make form fields read only
security.AllowFormFilling = False
security.AllowEdit = False
security.AllowUpdateAnnotsAndFields = False
' Add the security object to the document
MyDocument.Security = security
' Create and display a label as a reference
Dim text As String = "This document has been encrypted with AES 128 bit encryption."
MyPage.Elements.Add(New Label(text, 50, 50, 400, 100, Font.Helvetica, 18))
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.Cryptography;
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 AES 128 bit security object
Aes128Security security = new Aes128Security( "owner", "user" );
// Set these properties to make form fields read only
security.AllowFormFilling = false;
security.AllowEdit = false;
security.AllowUpdateAnnotsAndFields = false;
// Add the security object to the document
document.Security = security;
// Create and display a label as a reference
string text = "This document has been encrypted with AES 128 bit encryption.";
page.Elements.Add( new Label( text, 50, 50, 400, 100, Font.Helvetica, 18 ) );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.Cryptography
Imports ceTe.DynamicPDF.Xmp
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 AES 128 bit security object
Dim security As Aes128Security = New Aes128Security("owner", "user")
' Set DocumentComponents property to AllExceptMetadata
security.DocumentComponents = EncryptDocumentComponents.AllExceptMetadata
' Add the security object to the document
MyDocument.Security = security
' Create and display a label as a reference
Dim text As String = "This document has been encrypted with AES 128 bit encryption."
MyPage.Elements.Add(New Label(text, 50, 50, 400, 100, Font.Helvetica, 18))
' Create an Xmp Metadata
Dim MyXmp As XmpMetadata = New XmpMetadata
' Dublin Core Schema.
Dim Mydc As DublinCoreSchema = MyXmp.DublinCore
Mydc.Contributors.Add( "Abc" )
Mydc.Contributors.Add( "Xyz" )
Mydc.Contributors.Add( "Pqrs" )
Mydc.Coverage = "To test all the attributes of schema's provided"
Mydc.Creators.Add( "MyProduct" )
Mydc.Creators.Add( "MyCompany" )
Mydc.Date.Add( DateTime.Now )
Mydc.Description.AddLang( "en-us", "XMP Schema's test" )
Mydc.Identifier = "First XMP pdf"
Mydc.Publisher.Add( "mydomain.com" )
Mydc.Publisher.Add( "My Company" )
Mydc.Relation.Add( "test pdf with xmp" )
Mydc.Rights.DefaultText = "US English"
Mydc.Rights.AddLang( "en-us", "All rights reserved 2012, MyCompany." )
Mydc.Source = "XMP Project"
Mydc.Subject.Add( "eXtensible Metadata Platform" )
Mydc.Title.AddLang( "en-us", "XMP" )
Mydc.Title.AddLang( "it-it", "XMP - Piattaforma Estendible di Metadata" )
Mydc.Title.AddLang( "du-du", "De hallo Wereld" )
Mydc.Title.AddLang( "fr-fr", "XMP - Une Platforme Extensible pour les Métédonnées" )
Mydc.Title.AddLang( "DE-DE", "ÄËßÜ Hallo Welt" )
Mydc.Type.Add( "Pdf file containing xmp metadata" )
' Basic Schema.
Dim Mybs As BasicSchema = MyXmp.BasicSchema
Mybs.Advisory.Add( "Date" )
Mybs.Advisory.Add( "Contributors" )
Mybs.Nickname = "xyz"
' Rights Management Schema.
Dim Myrm As RightsManagementSchema = New RightsManagementSchema
Myrm.Marked2 = CopyrightStatus.PublicDomain
Myrm.Owner.Add( "MyCompany" )
Myrm.UsageTerms.AddLang( "en-us", "Contact MyCompany" )
MyXmp.AddSchema(Myrm)
' Basic Job Ticket Schema.
Dim MyJob As BasicJobTicketSchema = New BasicJobTicketSchema
MyJob.JobRef.Add( "MyCompany", "Xmp Test", new Uri( "http://www.mydomain.com/" ) )
MyJob.JobRef.Add( "MyCompany", "XMP Metadata", new Uri( "http://www.mydomain.com/" ) )
MyXmp.AddSchema(MyJob)
' Paged-Text Schema.
Dim Mypt As PagedTextSchema = New PagedTextSchema
MyXmp.AddSchema(Mypt)
' Add the Xmp Metadata to the document
MyDocument.XmpMetadata = MyXmp
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.Cryptography;
using ceTe.DynamicPDF.Xmp;
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 AES 128 bit security object
Aes128Security security = new Aes128Security( "owner", "user" );
// Set DocumentComponents property to AllExceptMetadata
security.DocumentComponents = EncryptDocumentComponents.AllExceptMetadata;
// Add the security object to the document
document.Security = security;
// Create and display a label as a reference
string text = "This document has been encrypted with AES 128 bit encryption.";
page.Elements.Add( new Label( text, 50, 50, 400, 100, Font.Helvetica, 18 ) );
// Create an Xmp Metadata
XmpMetadata xmp = new XmpMetadata();
// Dublin Core Schema.
DublinCoreSchema dc = xmp.DublinCore;
dc.Contributors.Add( "Abc" );
dc.Contributors.Add( "Xyz" );
dc.Contributors.Add( "Pqrs" );
dc.Coverage = "To test all the attributes of schema's provided";
dc.Creators.Add( "MyProduct" );
dc.Creators.Add( "MyCompany" );
dc.Date.Add( DateTime.Now );
dc.Description.AddLang( "en-us", "XMP Schema's test" );
dc.Identifier = "First XMP pdf";
dc.Publisher.Add( "mydomain.com" );
dc.Publisher.Add( "MyCompany" );
dc.Relation.Add( "test pdf with xmp" );
dc.Rights.DefaultText = "US English";
dc.Rights.AddLang( "en-us", "All rights reserved 2012, MyCompany." );
dc.Source = "XMP Project";
dc.Subject.Add( "eXtensible Metadata Platform" );
dc.Title.AddLang( "en-us", "XMP" );
dc.Title.AddLang( "it-it", "XMP - Piattaforma Estendible di Metadata" );
dc.Title.AddLang( "du-du", "De hallo Wereld" );
dc.Title.AddLang( "fr-fr", "XMP - Une Platforme Extensible pour les Métédonnées" );
dc.Title.AddLang( "DE-DE", "ÄËßÜ Hallo Welt" );
dc.Type.Add( "Pdf file containing xmp metadata" );
// Basic Schema.
BasicSchema bs = xmp.BasicSchema;
bs.Advisory.Add( "Date" );
bs.Advisory.Add( "Contributors" );
bs.Nickname = "xyz";
// Rights Management Schema.
RightsManagementSchema rm = new RightsManagementSchema();
rm.Marked2 = CopyrightStatus.PublicDomain;
rm.Owner.Add( "MyCompany" );
rm.UsageTerms.AddLang( "en-us", "Contact MyCompany" );
xmp.AddSchema( rm );
// Basic Job Ticket Schema.
BasicJobTicketSchema job = new BasicJobTicketSchema();
job.JobRef.Add( "MyCompany", "Xmp Test", new Uri( "http://www.mydomain.com/" ) );
job.JobRef.Add( "MyCompany", "XMP Metadata", new Uri( "http://www.mydomain.com/" ) );
xmp.AddSchema( job );
// Paged-Text Schema.
PagedTextSchema pt = new PagedTextSchema();
xmp.AddSchema(pt);
// Add the Xmp Metadata to the document
document.XmpMetadata = xmp;
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.Cryptography
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 AES 256 bit security object
Dim security As Aes256Security = New Aes256Security("owner", "user")
' Add the security object to the document
MyDocument.Security = security
' Create and display a label as a reference
Dim text As String = "This document has been encrypted with AES 256 bit encryption."
MyPage.Elements.Add(New Label(text, 50, 50, 400, 100, Font.Helvetica, 18))
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.Cryptography;
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 AES 256 bit security object
Aes256Security security = new Aes256Security( "owner", "user" );
// Add the security object to the document
document.Security = security;
// Create and display a label as a reference
string text = "This document has been encrypted with AES 256 bit encryption.";
page.Elements.Add( new Label( text, 50, 50, 400, 100, Font.Helvetica, 18 ) );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.Cryptography
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 AES 256 bit security object
Dim security As Aes256Security = New Aes256Security("password")
' Set DocumentComponents property to OnlyFileAttachments
security.DocumentComponents = EncryptDocumentComponents.OnlyFileAttachments
' Add the security object to the document
MyDocument.Security = security
' Create and display a label as a reference
Dim text As String = "This document has been encrypted with AES 256 bit encryption."
MyPage.Elements.Add(New Label(text, 50, 50, 400, 100, Font.Helvetica, 18))
' Create an instances of EmbeddedFile
Dim embeddedFile As EmbeddedFile = New EmbeddedFile("C:\Document.pdf")
' Add embeddedFile to the EmbeddedFileList of the document class
MyDocument.EmbeddedFiles.Add( embeddedFile )
' Set the PageMode to the ShowAttachments
MyDocument.InitialPageMode = PageMode.ShowAttachments
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.Cryptography;
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 AES 256 bit security object
Aes256Security security = new Aes256Security( "password" );
// Set DocumentComponents property to OnlyFileAttachments
security.DocumentComponents = EncryptDocumentComponents.OnlyFileAttachments;
// Add the security object to the document
document.Security = security;
// Create and display a label as a reference
string text = "This document has been encrypted with AES 256 bit encryption.";
page.Elements.Add( new Label( text, 50, 50, 400, 100, Font.Helvetica, 18 ) );
// Create an instance of EmbeddedFile
EmbeddedFile embeddedFile = new EmbeddedFile(@"C:\Document.pdf");
// Add the embeddedFile to the EmbeddedFileList of the document class
document.EmbeddedFiles.Add( embeddedFile );
// Set the PageMode to the ShowAttachments
document.InitialPageMode = PageMode.ShowAttachments;
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.Cryptography
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 RC4 128 bit security object
Dim security As RC4128Security = New RC4128Security("owner", "user")
' Set these properties to make form fields read only
security.AllowFormFilling = False
security.AllowEdit = False
security.AllowUpdateAnnotsAndFields = False
' Add the security object to the document
MyDocument.Security = security
' Create and display a label as a reference
Dim text As String = "This document has been encrypted with RC4 128 bit encryption."
MyPage.Elements.Add(New Label(text, 50, 50, 400, 100, Font.Helvetica, 18))
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.Cryptography;
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 RC4 128 bit security object
RC4128Security security = new RC4128Security( "owner", "user" );
// Set these properties to make form fields read only
security.AllowFormFilling = false;
security.AllowEdit = false;
security.AllowUpdateAnnotsAndFields = false;
// Add the security object to the document
document.Security = security;
// Create and display a label as a reference
string text = "This document has been encrypted with RC4 128 bit encryption.";
page.Elements.Add( new Label( text, 50, 50, 400, 100, Font.Helvetica, 18 ) );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.Cryptography
Imports ceTe.DynamicPDF.Xmp
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 RC4 128 bit security object
Dim security As RC4128Security = New RC4128Security("owner", "user")
'Set UseCryptFilter property to true
security.UseCryptFilter = True
' Set EncryptMetadata property to false
security.EncryptMetadata = False
' Add the security object to the document
MyDocument.Security = security
' Create and display a label as a reference
Dim text As String = "This document has been encrypted with RC4 128 bit encryption."
MyPage.Elements.Add(New Label(text, 50, 50, 400, 100, Font.Helvetica, 18))
' Create an Xmp Metadata
Dim MyXmp As XmpMetadata = New XmpMetadata
' Dublin Core Schema.
Dim Mydc As DublinCoreSchema = MyXmp.DublinCore
Mydc.Contributors.Add( "Abc" )
Mydc.Contributors.Add( "Xyz" )
Mydc.Contributors.Add( "Pqrs" )
Mydc.Coverage = "To test all the attributes of schema's provided"
Mydc.Creators.Add( "MyProduct" )
Mydc.Creators.Add( "MyCompany" )
Mydc.Date.Add( DateTime.Now )
Mydc.Description.AddLang( "en-us", "XMP Schema's test" )
Mydc.Identifier = "First XMP pdf"
Mydc.Publisher.Add( "mydomain.com" )
Mydc.Publisher.Add( "My Company" )
Mydc.Relation.Add( "test pdf with xmp" )
Mydc.Rights.DefaultText = "US English"
Mydc.Rights.AddLang( "en-us", "All rights reserved 2012, MyCompany." )
Mydc.Source = "XMP Project"
Mydc.Subject.Add( "eXtensible Metadata Platform" )
Mydc.Title.AddLang( "en-us", "XMP" )
Mydc.Title.AddLang( "it-it", "XMP - Piattaforma Estendible di Metadata" )
Mydc.Title.AddLang( "du-du", "De hallo Wereld" )
Mydc.Title.AddLang( "fr-fr", "XMP - Une Platforme Extensible pour les Métédonnées" )
Mydc.Title.AddLang( "DE-DE", "ÄËßÜ Hallo Welt" )
Mydc.Type.Add( "Pdf file containing xmp metadata" )
' Basic Schema.
Dim Mybs As BasicSchema = MyXmp.BasicSchema
Mybs.Advisory.Add( "Date" )
Mybs.Advisory.Add( "Contributors" )
Mybs.Nickname = "xyz"
' Rights Management Schema.
Dim Myrm As RightsManagementSchema = New RightsManagementSchema
Myrm.Marked2 = CopyrightStatus.PublicDomain
Myrm.Owner.Add( "MyCompany" )
Myrm.UsageTerms.AddLang( "en-us", "Contact MyCompany" )
MyXmp.AddSchema(Myrm)
' Basic Job Ticket Schema.
Dim MyJob As BasicJobTicketSchema = New BasicJobTicketSchema
MyJob.JobRef.Add( "MyCompany", "Xmp Test", new Uri( "http://www.mydomain.com/" ) )
MyJob.JobRef.Add( "MyCompany", "XMP Metadata", new Uri( "http://www.mydomain.com/" ) )
MyXmp.AddSchema(MyJob)
' Paged-Text Schema.
Dim Mypt As PagedTextSchema = New PagedTextSchema
MyXmp.AddSchema(Mypt)
' Add the Xmp Metadata to the document
MyDocument.XmpMetadata = MyXmp
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.Cryptography;
using ceTe.DynamicPDF.Xmp;
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 RC4 128 bit security object
RC4128Security security = new RC4128Security( "owner", "user" );
// Set UseCryptFilter property to true
security.UseCryptFilter = true;
// Set EncryptMetadata property to false
security.EncryptMetadata = false;
// Add the security object to the document
document.Security = security;
// Create and display a label as a reference
string text = "This document has been encrypted with RC4 128 bit encryption.";
page.Elements.Add( new Label( text, 50, 50, 400, 100, Font.Helvetica, 18 ) );
// Create an Xmp Metadata
XmpMetadata xmp = new XmpMetadata();
// Dublin Core Schema.
DublinCoreSchema dc = xmp.DublinCore;
dc.Contributors.Add( "Abc" );
dc.Contributors.Add( "Xyz" );
dc.Contributors.Add( "Pqrs" );
dc.Coverage = "To test all the attributes of schema's provided";
dc.Creators.Add( "MyProduct" );
dc.Creators.Add( "MyCompany" );
dc.Date.Add( DateTime.Now );
dc.Description.AddLang( "en-us", "XMP Schema's test" );
dc.Identifier = "First XMP pdf";
dc.Publisher.Add( "mydomain.com" );
dc.Publisher.Add( "MyCompany" );
dc.Relation.Add( "test pdf with xmp" );
dc.Rights.DefaultText = "US English";
dc.Rights.AddLang( "en-us", "All rights reserved 2012, MyCompany." );
dc.Source = "XMP Project";
dc.Subject.Add( "eXtensible Metadata Platform" );
dc.Title.AddLang( "en-us", "XMP" );
dc.Title.AddLang( "it-it", "XMP - Piattaforma Estendible di Metadata" );
dc.Title.AddLang( "du-du", "De hallo Wereld" );
dc.Title.AddLang( "fr-fr", "XMP - Une Platforme Extensible pour les Métédonnées" );
dc.Title.AddLang( "DE-DE", "ÄËßÜ Hallo Welt" );
dc.Type.Add( "Pdf file containing xmp metadata" );
// Basic Schema.
BasicSchema bs = xmp.BasicSchema;
bs.Advisory.Add( "Date" );
bs.Advisory.Add( "Contributors" );
bs.Nickname = "xyz";
// Rights Management Schema.
RightsManagementSchema rm = new RightsManagementSchema();
rm.Marked2 = CopyrightStatus.PublicDomain;
rm.Owner.Add( "MyCompany" );
rm.UsageTerms.AddLang( "en-us", "Contact MyCompany" );
xmp.AddSchema( rm );
// Basic Job Ticket Schema.
BasicJobTicketSchema job = new BasicJobTicketSchema();
job.JobRef.Add( "MyCompany", "Xmp Test", new Uri( "http://www.mydomain.com/" ) );
job.JobRef.Add( "MyCompany", "XMP Metadata", new Uri( "http://www.mydomain.com/" ) );
xmp.AddSchema( job );
// Paged-Text Schema.
PagedTextSchema pt = new PagedTextSchema();
xmp.AddSchema(pt);
// Add the Xmp Metadata to the document
document.XmpMetadata = xmp;
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.Cryptography
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 RC4 40 bit security object
Dim security As RC440Security = New RC440Security("owner", "user")
' Set the permissions on that security object
security.AllowPrint = False
security.AllowCopy = False
security.AllowEdit = False
' Add the security object to the document
MyDocument.Security = security
' Create and display a label as a reference
Dim text As String = "This document has been encrypted with RC4 40 bit encryption."
MyPage.Elements.Add(New Label(text, 50, 50, 400, 100, Font.Helvetica, 18))
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.Cryptography;
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 RC4 40 bit security object
RC440Security security = new RC440Security( "owner", "user" );
// Set the permissions on that security object
security.AllowPrint = false;
security.AllowCopy = false;
security.AllowEdit = false;
// Add the security object to the document
document.Security = security;
// Create and display a label as a reference
string text = "This document has been encrypted with RC4 40 bit encryption.";
page.Elements.Add( new Label( text, 50, 50, 400, 100, Font.Helvetica, 18 ) );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
1. For handling TIFF files, always use TiffFile object class.
2. When using TiffFile object, always call the Close() method after draw method because internally the image stream will not be closed.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Imaging
Module MyModule
Sub Main()
' Create a TiffFile object from the TIFF image
Dim myTiffFile As TiffFile = New TiffFile("C:\MyMultipageTiff.tif")
' Create a document object from the file
Dim MyDocument As Document = myTiffFile.GetDocument()
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
' Close the image stream object
myTiffFile.Close()
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Imaging;
class MyClass
{
static void Main()
{
// Create a TiffFile object from the TIFF image
TiffFile tiffFile = new TiffFile( @"C:\MyMultipageTiff.tif" );
// Create a document object from the file
Document document = tiffFile.GetDocument();
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
// Close the image stream object
tiffFile.Close();
}
}
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 dimensions object and set the margins
Dim dimensions As PageDimensions = New PageDimensions(PageSize.Letter, PageOrientation.Portrait)
dimensions.BottomMargin = 50
dimensions.TopMargin = 50
dimensions.LeftMargin = 35
dimensions.RightMargin = 35
' Create a page using a page dimensions object and add it to the document
Dim MyPage As Page = New Page(dimensions)
MyDocument.Pages.Add(MyPage)
' Add a label to the page
MyPage.Elements.Add(New Label("this page was rotated 90 degrees.", 0, 0, 300, 20, Font.Helvetica, 18))
' Rotate the page 90 degrees
MyPage.Rotate = 90
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 dimensions object and set the margins
PageDimensions dimensions = new PageDimensions( PageSize.Letter, PageOrientation.Portrait );
dimensions.BottomMargin = 50;
dimensions.TopMargin = 50;
dimensions.LeftMargin = 35;
dimensions.RightMargin = 35;
// Create a page using a page dimensions object and add it to the document
Page page = new Page( dimensions );
document.Pages.Add( page );
// Add a label to the page
page.Elements.Add( new Label( "This page was rotated 90 degrees.", 0, 0, 300, 20, Font.Helvetica, 18 ) );
// Rotate the page 90 degrees
page.Rotate = 90;
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger
Module MyModule
Sub Main()
' Create a merge document containing the form fields
Dim document As MergeDocument = New MergeDocument("C:\AllFormFields.pdf")
'Set FormFlattening property of the document
document.FormFlattening = FormFlatteningOptions.Default
' Save the document
document.Draw("C:\AllFormFields_Flattened_VB.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;
class MyClass
{
static void Main()
{
// Create a merge document containing the form fields
MergeDocument document = new MergeDocument(@"C:\AllFormFields.pdf");
//Set FormFlattening property of the document
document.FormFlattening = FormFlatteningOptions.Default;
// Save the document
document.Draw(@"C:\AllFormFields_Flattened.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add three blank pages
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Add a top level outline and set properties
Dim MyOutline1 As Outline = MyDocument.Outlines.Add("Outline1")
MyOutline1.Style = TextStyle.Bold
MyOutline1.Color = New RgbColor(1.0F, 0.0F, 0.0F)
' Add child outlines
Dim MyOutline1A As Outline = MyOutline1.ChildOutlines.Add("Outline1A", New ZoomDestination(2, PageZoom.FitPage))
MyOutline1A.Expanded = False
Dim MyOutline1A1 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A1", New XYDestination(2, 0, 0))
Dim MyOutline1A2 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A2", New ZoomDestination(2, PageZoom.FitHeight))
Dim MyOutline1B As Outline = MyOutline1.ChildOutlines.Add("Outline1B", New ZoomDestination(2, PageZoom.FitWidth))
' Add a second top level outline
Dim MyOutline2 As Outline = MyDocument.Outlines.Add("Outline2", New XYDestination(3, 0, 300))
' Add a child outline
Dim MyOutline2A As Outline = MyOutline2.ChildOutlines.Add("Outline2A")
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add three blank pages
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Add a top level outline and set properties
Outline outline1 = document.Outlines.Add( "Outline1" );
outline1.Style = TextStyle.Bold;
outline1.Color = new RgbColor( 1.0f, 0.0f, 0.0f );
// Add child outlines
Outline outline1A = outline1.ChildOutlines.Add( "Outline1A", new ZoomDestination( 2, PageZoom.FitPage ) );
outline1A.Expanded = false;
Outline outline1A1 = outline1A.ChildOutlines.Add( "Outline1A1", new XYDestination( 2, 0, 0 ) );
Outline outline1A2 = outline1A.ChildOutlines.Add( "Outline1A2", new ZoomDestination( 2, PageZoom.FitHeight ) );
Outline outline1B = outline1.ChildOutlines.Add( "Outline1B", new ZoomDestination( 2, PageZoom.FitWidth ) );
// Add a second top level outline
Outline outline2 = document.Outlines.Add( "Outline2", new XYDestination( 3, 0, 300 ) );
// Add a child outline
Outline outline2A = outline2.ChildOutlines.Add( "Outline2A" );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document()
' Create an ImportedPage and add it to the document
Dim MyPage As ImportedPage = New ImportedPage("C:\ImportPDF.pdf", 2, 50)
MyDocument.Pages.Add( MyPage )
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create an ImportedPage and add it to the document
ImportedPage page = new ImportedPage( @"C:\ImportPDF.pdf", 2, 50 );
document.Pages.Add( page );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger
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 an ImportedPageContents object
Dim MyContents As ImportedPageContents = New ImportedPageContents( "C:\ImportPDF.pdf", 2 )
' Create an ImportedPage and add it to the document
Dim MyData As ImportedPageData = New ImportedPageData(MyContents, -200, -100, 0.24F )
MyPage.Elements.Add(MyData)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;
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 an ImportedPageContents object
ImportedPageContents contents = new ImportedPageContents( @"C:\ImportPDF.pdf", 2 );
// Create an ImportedPageData and add it to the page
ImportedPageData data = new ImportedPageData(contents, -200, -100, 0.24f );
page.Elements.Add( data );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger
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 an ImportedPage and add it to the document
Dim MyData As ImportedPageData = New ImportedPageData("C:\ImportPDF.pdf", 2, -200, -100, 0.24F )
MyPage.Elements.Add(MyData)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;
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 an ImportedPageData and add it to the page
ImportedPageData data = new ImportedPageData(@"C:\ImportPDF.pdf", 2, -200, -100, 0.24f );
page.Elements.Add( data );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger
Module MyModule
Sub Main()
' Create two PDF document objects
Dim MyPdfA As PdfDocument = New PdfDocument("C:\ImportPDFA.pdf")
Dim MyPdfB As PdfDocument = New PdfDocument("C:\ImportPDFB.pdf")
' Merge the two documents
Dim MyDocument As MergeDocument = MergeDocument.Merge(MyPdfA, MyPdfB)
' Append an additional document
Dim MyPdfC As PdfDocument = New PdfDocument("C:\MyDocumentC.pdf")
MyDocument.Append(MyPdfC, 2, 1)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;
class MyClass
{
static void Main()
{
// Create two PDF document objects
PdfDocument pdfA = new PdfDocument( @"C:\ImportPDFA.pdf" );
PdfDocument pdfB = new PdfDocument( @"C:\ImportPDFB.pdf" );
// Merge the two documents
MergeDocument document = MergeDocument.Merge( pdfA, pdfB );
// Append an additional document
PdfDocument pdfC = new PdfDocument( @"C:\MyDocumentC.pdf" );
document.Append( pdfC, 2, 1);
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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)
' Add a label to the page
MyPage.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 );
// Add a label to the page
page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
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)
' Add a label to the page
MyPage.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
' Save the PDF document to a byte array
Dim MyPdfData As Byte() = MyDocument.Draw()
End Sub
End Module
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 );
// Add a label to the page
page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) );
// Save the PDF document to a byte array
byte[] pdfData = document.Draw();
}
}
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)
' Add a label to the page
MyPage.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 );
// Add a label to the page
page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports System.IO
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)
' Add a label to the page
MyPage.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
' Create a memory stream object to save to
Dim outputStream As MemoryStream = New MemoryStream
' Output the PDF to the MemoryStream
MyDocument.Draw(outputStream)
End Sub
End Module
using System;
using System.IO;
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 );
// Add a label to the page
page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) );
// Create a memory stream object to save to
MemoryStream outputStream = new MemoryStream();
// Output the PDF to the MemoryStream
document.Draw( outputStream );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Public Class MyClass
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' 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)
' Add a label to the page
MyPage.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
' Save the PDF document
MyDocument.DrawToWeb()
End Sub
End Class
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
public class MyClass : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
// 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 );
// Add a label to the page
page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) );
// Save the PDF document
document.DrawToWeb();
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Public Class MyClass
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' 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)
' Add a label to the page
MyPage.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
' Save the PDF document
MyDocument.DrawToWeb("MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
public class MyClass : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
// 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 );
// Add a label to the page
page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) );
// Save the PDF document
document.DrawToWeb( "MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Public Class MyClass
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' 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)
' Add a label to the page
MyPage.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
' Save the PDF document
MyDocument.DrawToWeb("MyDocument.pdf", True)
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
public class MyClass : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
// 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 );
// Add a label to the page
page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) );
// Save the PDF document
document.DrawToWeb( "MyDocument.pdf", true );
}
}
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Create a Certificate using the system default store
Dim MyCertificate As Certificate = New Certificate("CertificateSubject")
' Add an Invisible Signature (Signing the document)
MyDocument.Sign("NewFieldName", MyCertificate)
' Save the document
MyDocument.Draw("C:\MySignedDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main(string[] args)
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page();
// Add the page to the document
document.Pages.Add(page);
// Create a Certificate using the system default store
Certificate certificate = new Certificate("CertificateSubject");
// Sign the document - Invisible
document.Sign("NewFieldName", certificate);
// Save the document
document.Draw(@"C:\MySignedDocument.pdf");
}
}
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Create a Certificate using the system default store
Dim MyCertificate As Certificate = New Certificate("CertificateSubject")
' Create a TimestampServer by passing the Url of the server.
Dim MyTimestampServer As TimestampServer = New TimestampServer("Url to the TimestampServer");
' Add an Invisible Signature (Signing the document)
MyDocument.Sign("NewFieldName", MyCertificate)
' Save the document
MyDocument.Draw("C:\MyTimestampedDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main(string[] args)
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page();
// Add the page to the document
document.Pages.Add(page);
// Create a Certificate using the system default store
Certificate certificate = new Certificate("CertificateSubject");
// Create a TimestampServer by passing the Url of the server.
TimestampServer timestampServer = new TimestampServer("http://ServerURL");
// Sign and timestamp the document - Invisible
document.Sign("NewFieldName", certificate, timestampServer);
// Save the document
document.Draw(@"C:\MyTimestampedDocument.pdf");
}
}
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Create a Certificate using the system default store
Dim MyCertificate As Certificate = New Certificate("CertificateSubject")
' Add an Invisible Signature (Signing the document) and mention to Timestamp the signature.
MyDocument.Sign("NewFieldName", MyCertificate, true)
' Save the document
MyDocument.Draw("C:\MyTimestampedDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main(string[] args)
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page();
// Add the page to the document
document.Pages.Add(page);
// Create a Certificate using the system default store
Certificate certificate = new Certificate("CertificateSubject");
// Sign the document - Invisible and mention to Timestamp the signature
document.Sign("NewFieldName", certificate, true);
// Save the document
document.Draw(@"C:\MyTimestampedDocument.pdf");
}
}
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Create a Certificate using the system default store
Dim MyCertificate As Certificate = New Certificate("Certificate Subject")
' Certifies with an Invisible Signature (Signing the document)
MyDocument.Certify("NewFieldName", MyCertificate, CertifyingPermission.AllowFormFilling)
' Save the document
MyDocument.Draw("C:\MyCertifiedDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main(string[] args)
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page();
// Add the page to the document
document.Pages.Add(page);
// Create a Certificate using the system default store
Certificate certificate = new Certificate("Certificate Subject");
// Certify the document - Invisible
document.Certify("NewFieldName", certificate, CertifyingPermission.AllowFormFilling);
// Save the document
document.Draw(@"C:\MyCertifiedDocument.pdf");
}
}
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Create a Certificate using the system default store
Dim MyCertificate As Certificate = New Certificate("CertificateSubject")
' Create a TimestampServer by passing the Url of the server.
Dim MyTimestampServer As TimestampServer = New TimestampServer("http://TimestampServerURL");
' Certifies with an Invisible Signature (Signing the document)
MyDocument.Certify("NewFieldName", MyCertificate, CertifyingPermission.AllowFormFilling)
' Save the document
MyDocument.Draw("C:\MyCertifiedDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main(string[] args)
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page();
// Add the page to the document
document.Pages.Add(page);
// Create a Certificate using the system default store
Certificate certificate = new Certificate("CertificateSubject");
// Create a TimestampServer by passing the Url of the server.
TimestampServer timestampServer = new TimestampServer("http://TimestampServerURL");
// Certify and timestamp the document - Invisible
document.Certify("NewFieldName", certificate, timestampServer, CertifyingPermission.AllowFormFilling);
// Save the document
document.Draw(@"C:\MyCertifiedDocument.pdf");
}
}
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Create a Certificate using the system default store
Dim MyCertificate As Certificate = New Certificate("CertificateSubject")
' Certify with an Invisible Signature (Signing the document) and mention to Timestamp the signature.
MyDocument.Certify("NewFieldName", MyCertificate, true, CertifyingPermission.AllowFormFilling)
' Save the document
MyDocument.Draw("C:\MyCertifiedDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main(string[] args)
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page();
// Add the page to the document
document.Pages.Add(page);
// Create a Certificate using the system default store
Certificate certificate = new Certificate("CertificateSubject");
// Certify the document - Invisible and mention to Timestamp the signature
document.Certify("NewFieldName", certificate, true, CertifyingPermission.AllowFormFilling);
// Save the document
document.Draw(@"C:\MyCertifiedDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a Page and add it to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Set the viewer preferences
MyDocument.ViewerPreferences.CenterWindow = True
MyDocument.ViewerPreferences.DisplayDocTitle = False
MyDocument.ViewerPreferences.HideMenubar = True
MyDocument.ViewerPreferences.HideToolbar = True
MyDocument.ViewerPreferences.HideWindowUI = True
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a page and add it to the document
document.Pages.Add( new Page( PageSize.Letter ) );
// Set the viewer preferences
document.ViewerPreferences.CenterWindow = true;
document.ViewerPreferences.DisplayDocTitle = false;
document.ViewerPreferences.HideMenubar = true;
document.ViewerPreferences.HideToolbar = true;
document.ViewerPreferences.HideWindowUI = true;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add 5 blank pages to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Create an even odd template and add elements to it
Dim MyTemplate As EvenOddTemplate = New EvenOddTemplate
MyTemplate.EvenElements.Add(New Label("Even Header", 0, 0, 200, 12))
MyTemplate.OddElements.Add(New Label("Odd Header", 0, 0, 200, 12))
MyTemplate.Elements.Add(New Label("Footer", 0, 680, 200, 12))
' Add the template to the document
MyDocument.Template = MyTemplate
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add 5 blank pages to the document
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Create an even odd template and add elements to it
EvenOddTemplate template = new EvenOddTemplate();
template.EvenElements.Add( new Label( "Even Header", 0, 0, 200, 12 ) );
template.OddElements.Add( new Label( "Odd Header", 0, 0, 200, 12 ) );
template.Elements.Add( new Label( "Footer", 0, 680, 200, 12 ) );
// Add the template to the document
document.Template = template;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
'Create a template object and add a page numbering label
Dim MyTemplate As Template = New Template
MyTemplate.Elements.Add(New PageNumberingLabel("%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica, 12, TextAlign.Center))
'Add the template to the document
MyDocument.Template = MyTemplate
'Begin the first section
MyDocument.Sections.Begin(NumberingStyle.RomanLowerCase)
'Add two pages
MyDocument.Pages.Add(New Page) 'Page 1
MyDocument.Pages.Add(New Page) 'Page 2
'Begin the second section
MyDocument.Sections.Begin(NumberingStyle.Numeric, MyTemplate)
'Add three pages
MyDocument.Pages.Add(New Page) 'Page 3
MyDocument.Pages.Add(New Page) 'page 4
MyDocument.Pages.Add(New Page) 'page 5
'Begin the third section specifying a section prefix
MyDocument.Sections.Begin(NumberingStyle.RomanLowerCase, "Appendix A - ")
'Add two pages
MyDocument.Pages.Add(New Page) 'page 6
MyDocument.Pages.Add(New Page) 'page 7
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
//Create a template object and add a page numbering label
Template template = new Template();
template.Elements.Add( new PageNumberingLabel( "%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica, 12, TextAlign.Center ) );
document.Template = template;
//Begin the first section
document.Sections.Begin( NumberingStyle.RomanLowerCase );
//Add two pages
document.Pages.Add( new Page() ); //Page 1
document.Pages.Add( new Page() ); //Page 2
//Begin the second section
document.Sections.Begin( NumberingStyle.Numeric, template );
//Add three pages
document.Pages.Add( new Page() ); //Page 3
document.Pages.Add( new Page() ); //page 4
document.Pages.Add( new Page() ); //page 5
//Begin the third section specifying a section prefix
document.Sections.Begin( NumberingStyle.RomanLowerCase, "Appendix A - " );
//Add two pages
document.Pages.Add( new Page() ); //page 6
document.Pages.Add( new Page() ); //page 7
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add three blank pages
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Add a top level outline and set properties
Dim MyOutline1 As Outline = MyDocument.Outlines.Add("Outline1")
MyOutline1.Style = TextStyle.Bold
MyOutline1.Color = New RgbColor(1.0F, 0.0F, 0.0F)
' Add child outlines
Dim MyOutline1A As Outline = MyOutline1.ChildOutlines.Add("Outline1A", New ZoomDestination(2, PageZoom.FitPage))
MyOutline1A.Expanded = False
Dim MyOutline1A1 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A1", New XYDestination(2, 0, 0))
Dim MyOutline1A2 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A2", New ZoomDestination(2, PageZoom.FitHeight))
Dim MyOutline1B As Outline = MyOutline1.ChildOutlines.Add("Outline1B", New ZoomDestination(2, PageZoom.FitWidth))
' Add a second top level outline
Dim MyOutline2 As Outline = MyDocument.Outlines.Add("Outline2", New XYDestination(3, 0, 300))
' Add a child outline
Dim MyOutline2A As Outline = MyOutline2.ChildOutlines.Add("Outline2A")
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add three blank pages
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Add a top level outline and set properties
Outline outline1 = document.Outlines.Add( "Outline1" );
outline1.Style = TextStyle.Bold;
outline1.Color = new RgbColor( 1.0f, 0.0f, 0.0f );
// Add child outlines
Outline outline1A = outline1.ChildOutlines.Add( "Outline1A", new ZoomDestination( 2, PageZoom.FitPage ) );
outline1A.Expanded = false;
Outline outline1A1 = outline1A.ChildOutlines.Add( "Outline1A1", new XYDestination( 2, 0, 0 ) );
Outline outline1A2 = outline1A.ChildOutlines.Add( "Outline1A2", new ZoomDestination( 2, PageZoom.FitHeight ) );
Outline outline1B = outline1.ChildOutlines.Add( "Outline1B", new ZoomDestination( 2, PageZoom.FitWidth ) );
// Add a second top level outline
Outline outline2 = document.Outlines.Add( "Outline2", new XYDestination( 3, 0, 300 ) );
// Add a child outline
Outline outline2A = outline2.ChildOutlines.Add( "Outline2A" );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
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)
Dim MyLabel As Label = New Label("Document custom properties", 0, 0, 400, 100)
MyPage.Elements.Add(MyLabel)
' Add custom properties to the document
Dim list As CustomPropertyList = MyDocument.CustomProperties
list.Add("name1", "value1")
list.Add("name2", "value2")
list.Add("name3", "value3")
list.Add("name4", "value4")
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
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);
page.Elements.Add(new Label("Document custom properties", 0, 0, 400, 100));
// Add custom properties to the document
CustomPropertyList list = document.CustomProperties;
list.Add("name1", "value1");
list.Add("name2", "value2");
list.Add("name3", "value3");
list.Add("name4", "value4");
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.Cryptography
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 RC4 128 bit security object
Dim security As RC4128Security = New RC4128Security("owner", "user")
' Set the permissions on that security object
security.AllowAccessibility = False
security.AllowDocumentAssembly = False
security.AllowHighResolutionPrinting = False
' Add the security object to the document
MyDocument.Security = security
' Create and display a label as a reference
Dim text As String = "This document has been encrypted with RC4 128 bit encryption."
MyPage.Elements.Add(New Label(text, 50, 50, 400, 100, Font.Helvetica, 18))
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.Cryptography;
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 RC4 128 bit security object
RC4128Security security = new RC4128Security( "owner", "user" );
// Set the permissions on that security object
security.AllowAccessibility = false;
security.AllowDocumentAssembly = false;
security.AllowUpdateAnnotsAndFields = false;
// Add the security object to the document
document.Security = security;
// Create and display a label as a reference
string text = "This document has been encrypted with RC4 128 bit encryption.";
page.Elements.Add( new Label( text, 50, 50, 400, 100, Font.Helvetica, 18 ) );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Xmp
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add blank pages to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Create an Xmp Metadata
Dim MyXmp As XmpMetadata = New XmpMetadata
' Add the Xmp Metadata to the document
MyDocument.XmpMetadata = MyXmp
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Xmp;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add blank pages to the document
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Create an Xmp Metadata
XmpMetadata xmp = new XmpMetadata();
// Add the Xmp Metadata to the document
document.XmpMetadata = xmp;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Forms
Imports ceTe.DynamicPDF.Merger
Module MyModule
Sub Main()
' Create a MergeOptions object to import the AcroForm
Dim options As MergeOptions = New MergeOptions(True)
' Create a merge document with your PDF containing form fields
Dim MyDocument As MergeDocument = New MergeDocument("C:\ImportPDF.pdf", options)
' Set the value of the text field equal to the string you want to appear
Dim text As TextField = MyDocument.Form.Fields("Text3")
text.Value = "This is my text field"
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Forms;
using ceTe.DynamicPDF.Merger;
class MyClass
{
static void Main()
{
// Create a MergeOptions object to import the AcroForm
MergeOptions options = new MergeOptions( true );
// Create a merge document with your PDF containing form fields
MergeDocument document = new MergeDocument( @"C:\ImportPDF.pdf", options );
// Set the value of the text field equal to the string you want to appear
TextField text = (TextField)document.Form.Fields["Text3"];
text.Value = "This is my text field";
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Specify document as a tagged PDF
MyDocument.Tag = New TagOptions()
' Create a page and add it to the document
Dim MyPage As Page = New Page()
MyDocument.Pages.Add(MyPage)
' Create an image
Dim MyImage As Image = New Image("C:\MyImage.gif", 100, 100)
MyImage.Height = 100
MyImage.Width = 100
' Create a structure element
Dim MyStructureElement As StructureElement = New StructureElement(TagType.Figure, True)
MyStructureElement.AlternateText = "My Image"
' Tag the image with the structure element
MyImage.Tag = MyStructureElement
' Add the image to the page
MyPage.Elements.Add(MyImage)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Specify document as a tagged PDF
document.Tag = new TagOptions();
// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);
// Create an image
Image image = new Image(@"C:\MyImage.gif", 100, 100);
image.Height = 100;
image.Width = 100;
// Create a structure element
StructureElement structureElement = new StructureElement(TagType.Figure, true);
structureElement.AlternateText = "My Image";
// Tag the image with the structure element
image.Tag = structureElement;
// Add the image to the page
page.Elements.Add(image);
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger
Module MyModule
Sub Main()
' Create two PDF document objects
Dim pdfA As PdfDocument = New PdfDocument("C:\ImportPDF.pdf")
' The owner's password is required to merge encrypted PDFs
Dim pdfB As PdfDocument = New PdfDocument("C:\EncryptedPDF.pdf", "owner")
' Merge the two documents
Dim MyDocument As MergeDocument = MergeDocument.Merge(pdfA, pdfB)
' Append an additional document
Dim pdfC As PdfDocument = New PdfDocument("C:\MyDocumentC.pdf")
MyDocument.Append(pdfC, 2, 1)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;
class MyClass
{
static void Main()
{
// Create two PDF document objects
PdfDocument pdfA = new PdfDocument( @"C:\ImportPDF.pdf" );
// The owner's password is required to merge encrypted PDFs
PdfDocument pdfB = new PdfDocument( @"C:\EncryptedPDF.pdf", "owner" );
// Merge the two documents
MergeDocument document = MergeDocument.Merge( pdfA, pdfB );
// Append an additional document
PdfDocument pdfC = new PdfDocument( @"C:\MyDocumentC.pdf" );
document.Append( pdfC, 2, 1);
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger
Module MyModule
Sub Main()
' Create PDF document object
Dim pdfA As PdfDocument = New PdfDocument( "C:\TimeMachine.pdf")
' Call GetText method from PDF document object to get the text from the document
Dim extractedText As String = pdfA.GetText()
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;
class MyClass
{
static void Main()
{
// Create PDF document object
PdfDocument pdfA = new PdfDocument( @"C:\TimeMachine.pdf");
// Call GetText method from PDF document object to get the text from the document
string extractedText = pdfA.GetText();
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger
Module MyModule
Sub Main()
' Create PDF document object
Dim pdfA As PdfDocument = New PdfDocument( "C:\Invoice.pdf")
' Call GetText method from PDF document object to get the text from the document
Dim extractedText As String = pdfA.Pages.Item(1).GetText()
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;
class MyClass
{
static void Main()
{
// Create PDF document object
PdfDocument pdfA = new PdfDocument( @"C:\Invoice.pdf");
// Call GetText method from PDF document object to get the text from the document
string extractedText = pdfA.Pages[1].GetText();
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Codabar = New Codabar("A1234B", 50, 50, 48)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Codabar barCode = new Codabar("A1234B", 50, 0, 48);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Code128 = New Code128("Code 128 Barcode.", 50, 50, 48, 0.75F)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Code128 barCode = new Code128("Code 128 Barcode.", 50, 50, 48, 0.75F);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Code25 = New Code25("1234567890", 50, 50, 48)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Code25 barCode = new Code25("1234567890", 50, 100, 48);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Code39 = New Code39("CODE 39", 50, 50, 48)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Code39 barCode = new Code39("CODE 39", 50, 150, 48);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 data matrix barcode
Dim dataMatrixBarcode As DataMatrixBarcode = New DataMatrixBarcode("DataMatrix Barcode", 100, 100)
' Add the data matrix barcode to the page
MyPage.Elements.Add(dataMatrixBarcode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 data matrix barcode
DataMatrixBarcode dataMatrixBarcode = new DataMatrixBarcode("DataMatrix barcode", 100, 100);
// Add the data matrix barcode to the page
page.Elements.Add(dataMatrixBarcode);
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Ean13 = New Ean13("123456789012", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Ean13 barCode = new Ean13("123456789012", 50, 300);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Ean13Sup2 = New Ean13Sup2("12345678901212", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Ean13Sup2 barCode = new Ean13Sup2("12345678901212", 50, 400);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Ean13Sup5 = New Ean13Sup5("12345678901212345", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Ean13Sup5 barCode = new Ean13Sup5("12345678901212345", 50, 500);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Ean8 = New Ean8("12345670", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Ean8 barCode = new Ean8("12345670", 50, 50);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Ean8Sup2 = New Ean8Sup2("1234567012", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Ean8Sup2 barCode = new Ean8Sup2("1234567012", 50, 50);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Ean8Sup5 = New Ean8Sup5("1234567012345", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Ean8Sup5 barCode = new Ean8Sup5("1234567012345", 50, 50);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 intelligent mail barcode
Dim intelligentMailBarCode As IntelligentMailBarCode = New IntelligentMailBarCode("0123456709498765432101234567891",50, 150)
' Add the intelligent mail barcode to the page
MyPage.Elements.Add(intelligentMailBarCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 intelligent mail barcode
IntelligentMailBarCode intelligentMailBarCode = new IntelligentMailBarCode("0123456709498765432101234567891",50, 150);
// Add the intelligent mail barcode to the page
page.Elements.Add( intelligentMailBarCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Interleaved25 = New Interleaved25("1234567890", 50, 50, 48)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Interleaved25 barCode = new Interleaved25("1234567890", 50, 200, 48);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 MacroPdf417 barcode
Dim macroPdf417 As MacroPdf417 = New MacroPdf417("MacroPdf417 barcode", _
10.0f, 10.0f, 3, 2.0f)
' Add the MacroPdf417 barcode to the page
MyPage.Elements.Add(macroPdf417)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 MacroPdf417 barcode
MacroPdf417 macroPdf417 = new MacroPdf417( "MacroPdf417 barcode",
10.0f, 10.0f, 3, 2.0f );
// Add the MacroPdf417 barcode to the page
page.Elements.Add( macroPdf417 );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 Pdf417 barcode
Dim pdf417 As Pdf417 = New Pdf417("Pdf417 barcode", _
10.0f, 10.0f, 2, 2.0f)
' Add the Pdf417 barcode to the page
MyPage.Elements.Add(pdf417)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 Pdf417 barcode
Pdf417 pdf417 = new Pdf417( "Pdf417 barcode", 10.0f, 10.0f, 2, 2.0f );
// Add the Pdf417 barcode to the page
page.Elements.Add( pdf417 );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports System.IO;
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim bytArry(100) As Byte
Try
Dim fs As FileStream = New FileStream("C:/Textdata.txt", FileMode.Open)
Dim avail As Integer = CType(fi.Length,Integer)
ReDim bytArry(avial)
fs.Read(bytArry, 0, avial)
fs.Close()
Catch e As System.Exception
Console.WriteLine("EXCEPTION")
End Try
Dim x As Single
x = 10
Dim y As Single
y = 10
' Create a MacroPdf417 barcode
Dim macroPdf417 As MacroPdf417 = New MacroPdf417(bytArry, x, y, 14, 0.5F)
macroPdf417.FileName = "Textdata.txt"
macroPdf417.Sender = "Your Name"
macroPdf417.Address = "Your Address"
macroPdf417.IncludeFileSize = True
macroPdf417.IncludeCheckSum = True
macroPdf417.IncludeTimeStamp = True
macroPdf417.SetFileID(22222222)
Do
' Create a Page
Dim MyPage As Page = New Page
' Add the MacroPdf417 barcode to the page
MyPage.Elements.Add( macroPdf417 )
' Add Page to the document
MyDocument.Pages.Add(MyPage)
' if there is no overflow MacroPdf417 set to null
macroPdf417 = macroPdf417.GetOverflowMacroPdf417()
Loop While Not macroPdf417 Is Nothing
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using System.IO;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
byte[] bytArry = null;
try
{
FileStream fs = new FileStream( @"C:/Textdata.txt", FileMode.Open );
bytArry = new byte[fs.Length];
fs.Read( bytArry, 0, (int)fs.Length );
fs.Close();
}
catch( Exception e )
{
Console.WriteLine( "EXCEPTION "+e.Message );
}
float x = 10.0f;
float y = 10.0f;;
// Create a MacroPdf417 barcode
MacroPdf417 macroPdf417 = new MacroPdf417( bytArry, x, y, 14, 0.5f );
macroPdf417.FileName = "Textdata.txt";
macroPdf417.Sender = "Your Name";
macroPdf417.Address = "Your Address";
macroPdf417.IncludeFileSize = true;
macroPdf417.IncludeCheckSum = true;
macroPdf417.IncludeTimeStamp = true;
macroPdf417.SetFileID(22222222);
do
{
// Create a Page
Page page = new Page();
// Add the MacroPdf417 barcode to the page
page.Elements.Add( macroPdf417 );
// Add it to the document
document.Pages.Add( page );
macroPdf417 = macroPdf417.GetOverflowMacroPdf417();
} while( macroPdf417 != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports System.IO;
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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)
Dim bytArry(100) As Byte
Try
Dim fs As FileStream = New FileStream("C:/Textdata.txt", FileMode.Open)
Dim avail As Integer = CType(fi.Length,Integer)
ReDim bytArry(avail)
fs.Read(bytArry, 0, avail)
fs.Close()
Catch e As System.Exception
Console.WriteLine("EXCEPTION")
End Try
Dim x As Single
x = 10
Dim y As Single
y = 10
' Create a MacroPdf417 barcode
Dim macroPdf417 As MacroPdf417 = New MacroPdf417(bytArry, x, y, 14, 0.5F)
macroPdf417.FileName = "Textdata.txt"
macroPdf417.Sender = "Your Name"
macroPdf417.Address = "Your Address"
macroPdf417.IncludeFileSize = True
macroPdf417.IncludeCheckSum = True
macroPdf417.IncludeTimeStamp = True
macroPdf417.SetFileID(22222222)
' Add the MacroPdf417 barcode to the page
MyPage.Elements.Add( macroPdf417 )
y = y + macroPdf417.GetSymbolHeight() + 20
Dim objMacroPdf417 As MacroPdf417
Do
objMacroPdf417 = macroPdf417.GetOverflowMacroPdf417(x, y)
If Not (objMacroPdf417 Is Nothing) then
Mypage.Elements.Add(objMacroPdf417)
y = y + objMacroPdf417.GetSymbolHeight() + 20
End If
Loop Until Not (objMacroPdf417 Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using System.IO;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 );
byte[] bytArry = null;
try
{
FileStream fs = new FileStream( @"C:/Textdata.txt", FileMode.Open );
bytArry = new byte[fs.Length];
fs.Read( bytArry, 0, (int)fs.Length );
fs.Close();
}
catch( Exception e )
{
Console.WriteLine( "EXCEPTION "+e.Message );
}
float x = 10.0f;
float y = 10.0f;
// Create a MacroPdf417 barcode
MacroPdf417 macroPdf417 = new MacroPdf417( bytArry, x, y, 14, 0.5f );
macroPdf417.FileName = "Textdata.txt";
macroPdf417.Sender = "Your Name";
macroPdf417.Address = "Your Address";
macroPdf417.IncludeFileSize = true;
macroPdf417.IncludeCheckSum = true;
macroPdf417.IncludeTimeStamp = true;
macroPdf417.SetFileID(22222222);
// Add the MacroPdf417 barcode to the page
page.Elements.Add( macroPdf417 );
y += macroPdf417.GetSymbolHeight() + 20.0f;
MacroPdf417 objMacroPdf417 = null;
do
{
objMacroPdf417 = macroPdf417.GetOverflowMacroPdf417( x, y );
if( objMacroPdf417 != null )
{
page.Elements.Add( objMacroPdf417 );
y += objMacroPdf417.GetSymbolHeight() + 20.0f;
}
} while( objMacroPdf417 != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As MsiBarcode = New MsiBarcode("1234567890", 50, 50, 48)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
MsiBarcode barCode = new MsiBarcode("1234567890", 50, 100, 48);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Postnet = New Postnet("20815470412", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Postnet barCode = new Postnet("20815470412", 50, 250);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 QR Code
Dim qrCode As QrCode = New QrCode("QR code sample.", 100, 100)
' Add the QR code to the page
MyPage.Elements.Add(qrCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 QR code
QrCode qrCode = new QrCode("QR code sample.", 100, 100);
// Add the QR code to the page
page.Elements.Add(qrCode);
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As Rm4scc = New Rm4scc("20815470412", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
Rm4scc barCode = new Rm4scc("20815470412", 50, 250);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As UpcVersionA = New UpcVersionA("12345678901", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
UpcVersionA barCode = new UpcVersionA("12345678901", 50, 600);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As UpcVersionASup2 = New UpcVersionASup2("1234567890112", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
UpcVersionASup2 barCode = new UpcVersionASup2("1234567890112", 50, 50);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As UpcVersionASup5 = New UpcVersionASup5("1234567890112345", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
UpcVersionASup5 barCode = new UpcVersionASup5("1234567890112345", 50, 50);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As UpcVersionE = New UpcVersionE("0123456", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
UpcVersionE barCode = new UpcVersionE("0123456", 50, 50);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As UpcVersionESup2 = New UpcVersionESup2("012345612", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
UpcVersionESup2 barCode = new UpcVersionESup2("012345612", 50, 50);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
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 barcode
Dim barCode As UpcVersionESup5 = New UpcVersionESup5("012345612345", 50, 50)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
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 barcode
UpcVersionESup5 barCode = new UpcVersionESup5("012345612345", 50, 50);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create date time xAxis
Dim xAxis As DateTimeXAxis = New DateTimeXAxis()
' Create percentage yAxis
Dim yAxis As PercentageYAxis = New PercentageYAxis()
' Create a date time 100 percent stacked line series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked line series and add date time 100 percent stacked line series elements to it
Dim MyStackedLineSeries1 As DateTime100PercentStackedLineSeries = New DateTime100PercentStackedLineSeries(xAxis, yAxis)
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked line series to the plot area
MyPlotArea.Series.Add(MyStackedLineSeries1)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create date time xAxis
DateTimeXAxis xAxis = new DateTimeXAxis();
// Create percentage yAxis
PercentageYAxis yAxis = new PercentageYAxis();
// Create a date time 100 percent stacked line series element and add values to it
DateTime100PercentStackedLineSeriesElement seriesElement1 = new DateTime100PercentStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedLineSeriesElement seriesElement2 = new DateTime100PercentStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedLineSeriesElement seriesElement3 = new DateTime100PercentStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked line series and add date time 100 percent stacked line series elements to it
DateTime100PercentStackedLineSeries stackedLineSeries1 = new DateTime100PercentStackedLineSeries(xAxis, yAxis);
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add date time 100 percent stacked line series to the plot area
plotArea.Series.Add(stackedLineSeries1);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:/MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create date time xAxis
Dim xAxis As DateTimeXAxis = New DateTimeXAxis()
' Create percentage yAxis
Dim yAxis As PercentageYAxis = New PercentageYAxis()
' Create date time x axis label and add values to it
xAxis.Labels.Add(New DateTimeXAxisLabel("Jan", New DateTime(2007, 1, 1)))
xAxis.Labels.Add(New DateTimeXAxisLabel("Feb", New DateTime(2007, 2, 1)))
xAxis.Labels.Add(New DateTimeXAxisLabel("Mar", New DateTime(2007, 3, 1)))
xAxis.Labels.Add(New DateTimeXAxisLabel("Apr", New DateTime(2007, 4, 1)))
' Create a date time 100 percent stacked line series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked line series and add date time 100 percent stacked line series elements to it
Dim MyStackedLineSeries1 As DateTime100PercentStackedLineSeries = New DateTime100PercentStackedLineSeries(xAxis, yAxis)
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked line series to the plot area
MyPlotArea.Series.Add(MyStackedLineSeries1)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create date time xAxis
DateTimeXAxis xAxis = new DateTimeXAxis();
// Create percentage yAxis
PercentageYAxis yAxis = new PercentageYAxis();
// Create date time x axis label and add values to it
xAxis.Labels.Add(new DateTimeXAxisLabel("Jan", new DateTime(2007, 1, 1)));
xAxis.Labels.Add(new DateTimeXAxisLabel("Feb", new DateTime(2007, 2, 1)));
xAxis.Labels.Add(new DateTimeXAxisLabel("Mar", new DateTime(2007, 3, 1)));
xAxis.Labels.Add(new DateTimeXAxisLabel("Apr", new DateTime(2007, 4, 1)));
// Create a date time 100 percent stacked line series element and add values to it
DateTime100PercentStackedLineSeriesElement seriesElement1 = new DateTime100PercentStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedLineSeriesElement seriesElement2 = new DateTime100PercentStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedLineSeriesElement seriesElement3 = new DateTime100PercentStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked line series and add date time 100 percent stacked line series elements to it
DateTime100PercentStackedLineSeries stackedLineSeries1 = new DateTime100PercentStackedLineSeries(xAxis, yAxis);
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add date time 100 percent stacked line series to the plot area
plotArea.Series.Add(stackedLineSeries1);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:/MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create percentage xAxis
Dim xAxis As PercentageXAxis = New PercentageXAxis()
' Create date time yAxis
Dim yAxis As DateTimeYAxis = New DateTimeYAxis()
' Create a date time 100 percent stacked bar series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked bar series and add date time 100 percent stacked bar series elements to it
Dim MyStackedBarSeries1 As DateTime100PercentStackedBarSeries = New DateTime100PercentStackedBarSeries(xAxis, yAxis)
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Create a title and add it to the x axis
Dim MyTitle3 As Title = New Title("Viewers")
MyStackedBarSeries1.XAxis.Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create percentage xAxis
PercentageXAxis xAxis = new PercentageXAxis();
// Create date time yAxis
DateTimeYAxis yAxis = new DateTimeYAxis();
// Create a date time 100 percent stacked bar series element and add values to it
DateTime100PercentStackedBarSeriesElement seriesElement1 = new DateTime100PercentStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement seriesElement2 = new DateTime100PercentStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement seriesElement3 = new DateTime100PercentStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked bar series and add date time 100 percent stacked bar series elements to it
DateTime100PercentStackedBarSeries stackedBarSeries1 = new DateTime100PercentStackedBarSeries(xAxis, yAxis);
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add date time 100 percent stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Create a title and add it to the x axis
Title title3 = new Title("Viewers");
stackedBarSeries1.XAxis.Titles.Add(title3);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:/MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create percentage xAxis
Dim xAxis As PercentageXAxis = New PercentageXAxis()
' Create date time yAxis
Dim yAxis As DateTimeYAxis = New DateTimeYAxis()
' Create yAxisLabels and add values to it
yAxis.Labels.Add(New DateTimeYAxisLabel("Jan", New DateTime(2007, 1, 1)))
yAxis.Labels.Add(New DateTimeYAxisLabel("Feb", New DateTime(2007, 2, 1)))
yAxis.Labels.Add(New DateTimeYAxisLabel("Mar", New DateTime(2007, 3, 1)))
yAxis.Labels.Add(New DateTimeYAxisLabel("Apr", New DateTime(2007, 4, 1)))
' Create a date time 100 percent stacked bar series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked bar series and add date time 100 percent stacked bar series elements to it
Dim MyStackedBarSeries1 As DateTime100PercentStackedBarSeries = New DateTime100PercentStackedBarSeries(xAxis, yAxis)
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Create a title and add it to the x axis
Dim MyTitle3 As Title = New Title("Viewers")
MyStackedBarSeries1.XAxis.Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create percentage xAxis
PercentageXAxis xAxis = new PercentageXAxis();
// Create date time yAxis
DateTimeYAxis yAxis = new DateTimeYAxis();
// Create yAxisLabels and add values to it
yAxis.Labels.Add(new DateTimeYAxisLabel("Jan", new DateTime(2007, 1, 1)));
yAxis.Labels.Add(new DateTimeYAxisLabel("Feb", new DateTime(2007, 2, 1)));
yAxis.Labels.Add(new DateTimeYAxisLabel("Mar", new DateTime(2007, 3, 1)));
yAxis.Labels.Add(new DateTimeYAxisLabel("Apr", new DateTime(2007, 4, 1)));
// Create a date time 100 percent stacked bar series element and add values to it
DateTime100PercentStackedBarSeriesElement seriesElement1 = new DateTime100PercentStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement seriesElement2 = new DateTime100PercentStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement seriesElement3 = new DateTime100PercentStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked bar series and add date time 100 percent stacked bar series elements to it
DateTime100PercentStackedBarSeries stackedBarSeries1 = new DateTime100PercentStackedBarSeries(xAxis, yAxis);
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add date time 100 percent stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Create a title and add it to the x axis
Title title3 = new Title("Viewers");
stackedBarSeries1.XAxis.Titles.Add(title3);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:/MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed xAxis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Create indexed axis labels and add those to indexed xAxis
xAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
xAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
xAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
xAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Create a numeric yAxis
Dim yAxis As NumericYAxis = New NumericYAxis()
' Create a title and add it to the YAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
yAxis.Titles.Add(MyTitle3)
' Create a indexed area series and add values to it
Dim MyAreaSeries1 As IndexedAreaSeries = New IndexedAreaSeries("Website A", xAxis, yAxis)
MyAreaSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyAreaSeries2 As IndexedAreaSeries = New IndexedAreaSeries("Website B", xAxis, yAxis)
MyAreaSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyAreaSeries3 As IndexedAreaSeries = New IndexedAreaSeries("Website C", xAxis, yAxis)
MyAreaSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed area series to the plot area
MyPlotArea.Series.Add(MyAreaSeries1)
MyPlotArea.Series.Add(MyAreaSeries2)
MyPlotArea.Series.Add(MyAreaSeries3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed xAxis
IndexedXAxis xAxis = new IndexedXAxis();
// Create indexed axis labels and add those to indexed xAxis
xAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
xAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
xAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
xAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Create a numeric yAxis
NumericYAxis yAxis = new NumericYAxis();
// Create a title and add it to the YAxis
Title lTitle = new Title("Visitors (in millions)");
yAxis.Titles.Add(lTitle);
// Create a indexed area series and add values to it
IndexedAreaSeries areaSeries1 = new IndexedAreaSeries("Website A", xAxis, yAxis);
areaSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedAreaSeries areaSeries2 = new IndexedAreaSeries("Website B", xAxis, yAxis);
areaSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedAreaSeries areaSeries3 = new IndexedAreaSeries("Website C", xAxis, yAxis);
areaSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed area series to the plot area
plotArea.Series.Add(areaSeries1);
plotArea.Series.Add(areaSeries2);
plotArea.Series.Add(areaSeries3);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:/MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed xAxis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Create indexed axis labels and add those to indexed xAxis
xAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
xAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
xAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
xAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Create a numeric yAxis
Dim yAxis As NumericYAxis = New NumericYAxis()
' Create a title and add it to the YAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
yAxis.Titles.Add(MyTitle3)
' Create a indexed area series and add values to it
Dim MyAreaSeries1 As IndexedAreaSeries = New IndexedAreaSeries("Website A", xAxis, yAxis)
MyAreaSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyAreaSeries2 As IndexedAreaSeries = New IndexedAreaSeries("Website B", xAxis, yAxis)
MyAreaSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyAreaSeries3 As IndexedAreaSeries = New IndexedAreaSeries("Website C", xAxis, yAxis)
MyAreaSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed area series to the plot area
MyPlotArea.Series.Add(MyAreaSeries1)
MyPlotArea.Series.Add(MyAreaSeries2)
MyPlotArea.Series.Add(MyAreaSeries3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed xAxis
IndexedXAxis xAxis = new IndexedXAxis();
// Create indexed axis labels and add those to indexed xAxis
xAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
xAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
xAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
xAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Create a numeric yAxis
NumericYAxis yAxis = new NumericYAxis();
// Create a title and add it to the YAxis
Title lTitle = new Title("Visitors (in millions)");
yAxis.Titles.Add(lTitle);
// Create a indexed area series and add values to it
IndexedAreaSeries areaSeries1 = new IndexedAreaSeries("Website A", xAxis, yAxis);
areaSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedAreaSeries areaSeries2 = new IndexedAreaSeries("Website B", xAxis, yAxis);
areaSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedAreaSeries areaSeries3 = new IndexedAreaSeries("Website C", xAxis, yAxis);
areaSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed area series to the plot area
plotArea.Series.Add(areaSeries1);
plotArea.Series.Add(areaSeries2);
plotArea.Series.Add(areaSeries3);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed yAxis
Dim yAxis As IndexedYAxis = New IndexedYAxis()
' Create indexed Y axis labels and add those to indexed Y Axis
yAxis.Labels.Add(New IndexedYAxisLabel("Q1", 0))
yAxis.Labels.Add(New IndexedYAxisLabel("Q2", 1))
yAxis.Labels.Add(New IndexedYAxisLabel("Q3", 2))
yAxis.Labels.Add(New IndexedYAxisLabel("Q4", 3))
' Create a numeric xAxis
Dim xAxis As NumericXAxis = New NumericXAxis()
' Create a title and add it to the XAxis
Dim MyTitle As Title = New Title("Visitors (in millions)")
xAxis.Titles.Add(MyTitle)
' Create a indexed bar series and add values to it
Dim MyBarSeries1 As IndexedBarSeries = New IndexedBarSeries("Website A", xAxis, yAxis)
MyBarSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyBarSeries2 As IndexedBarSeries = New IndexedBarSeries("Website B", xAxis, yAxis)
MyBarSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyBarSeries3 As IndexedBarSeries = New IndexedBarSeries("Website C", xAxis, yAxis)
MyBarSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed bar series to the plot area
MyPlotArea.Series.Add(MyBarSeries1)
MyPlotArea.Series.Add(MyBarSeries2)
MyPlotArea.Series.Add(MyBarSeries3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed yAxis
IndexedYAxis yAxis = new IndexedYAxis();
// Create indexed y axis labels and add those to indexed y Axis
yAxis.Labels.Add(new IndexedYAxisLabel("Q1", 0));
yAxis.Labels.Add(new IndexedYAxisLabel("Q2", 1));
yAxis.Labels.Add(new IndexedYAxisLabel("Q3", 2));
yAxis.Labels.Add(new IndexedYAxisLabel("Q4", 3));
// Create a numeric xAxis
NumericXAxis xAxis = new NumericXAxis();
// Create a title and add it to the XAxis
Title lTitle = new Title("Visitors (in millions)");
xAxis.Titles.Add(lTitle);
// Create a indexed bar series and add values to it
IndexedBarSeries barSeries1 = new IndexedBarSeries("Website A", xAxis, yAxis);
barSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedBarSeries barSeries2 = new IndexedBarSeries("Website B", xAxis, yAxis);
barSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedBarSeries barSeries3 = new IndexedBarSeries("Website C", xAxis, yAxis);
barSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed bar series to the plot area
plotArea.Series.Add(barSeries1);
plotArea.Series.Add(barSeries2);
plotArea.Series.Add(barSeries3);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed yAxis
Dim yAxis As IndexedYAxis = New IndexedYAxis()
' Create indexed Y axis labels and add those to indexed yAxis
yAxis.Labels.Add(New IndexedYAxisLabel("Q1", 0))
yAxis.Labels.Add(New IndexedYAxisLabel("Q2", 1))
yAxis.Labels.Add(New IndexedYAxisLabel("Q3", 2))
yAxis.Labels.Add(New IndexedYAxisLabel("Q4", 3))
' Create a numeric xAxis
Dim xAxis As NumericXAxis = New NumericXAxis()
' Create a title and add it to the XAxis
Dim MyTitle As Title = New Title("Visitors (in millions)")
xAxis.Titles.Add(MyTitle)
' Create a indexed bar series and add values to it
Dim MyBarSeries1 As IndexedBarSeries = New IndexedBarSeries("Website A", xAxis, yAxis)
MyBarSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyBarSeries2 As IndexedBarSeries = New IndexedBarSeries("Website B", xAxis, yAxis)
MyBarSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyBarSeries3 As IndexedBarSeries = New IndexedBarSeries("Website C", xAxis, yAxis)
MyBarSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed bar series to the plot area
MyPlotArea.Series.Add(MyBarSeries1)
MyPlotArea.Series.Add(MyBarSeries2)
MyPlotArea.Series.Add(MyBarSeries3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed yAxis
IndexedYAxis yAxis = new IndexedYAxis();
// Create indexed Y axis labels and add those to indexed yAxis
yAxis.Labels.Add(new IndexedYAxisLabel("Q1", 0));
yAxis.Labels.Add(new IndexedYAxisLabel("Q2", 1));
yAxis.Labels.Add(new IndexedYAxisLabel("Q3", 2));
yAxis.Labels.Add(new IndexedYAxisLabel("Q4", 3));
// Create a numeric xAxis
NumericXAxis xAxis = new NumericXAxis();
// Create a title and add it to the XAxis
Title lTitle = new Title("Visitors (in millions)");
xAxis.Titles.Add(lTitle);
// Create a indexed bar series and add values to it
IndexedBarSeries barSeries1 = new IndexedBarSeries("Website A", xAxis, yAxis);
barSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedBarSeries barSeries2 = new IndexedBarSeries("Website B", xAxis, yAxis);
barSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedBarSeries barSeries3 = new IndexedBarSeries("Website C", xAxis, yAxis);
barSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed bar series to the plot area
plotArea.Series.Add(barSeries1);
plotArea.Series.Add(barSeries2);
plotArea.Series.Add(barSeries3);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
'Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create date time yAxis
Dim yAxis As DateTimeYAxis = New DateTimeYAxis()
' Create a numeric xAxis
Dim xAxis As NumericXAxis = New NumericXAxis()
' Create a date time bar series and add values to it
Dim MyBarSeries1 As DateTimeBarSeries = New DateTimeBarSeries("Website A", xAxis, yAxis)
MyBarSeries1.Values.Add(5, New DateTime(2007, 1, 1))
MyBarSeries1.Values.Add(7, New DateTime(2007, 2, 1))
MyBarSeries1.Values.Add(9, New DateTime(2007, 3, 1))
MyBarSeries1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyBarSeries2 As DateTimeBarSeries = New DateTimeBarSeries("Website B", xAxis, yAxis)
MyBarSeries2.Values.Add(4, New DateTime(2007, 1, 1))
MyBarSeries2.Values.Add(2, New DateTime(2007, 2, 1))
MyBarSeries2.Values.Add(5, New DateTime(2007, 3, 1))
MyBarSeries2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyBarSeries3 As DateTimeBarSeries = New DateTimeBarSeries("Website C", xAxis, yAxis)
MyBarSeries3.Values.Add(2, New DateTime(2007, 1, 1))
MyBarSeries3.Values.Add(4, New DateTime(2007, 2, 1))
MyBarSeries3.Values.Add(6, New DateTime(2007, 3, 1))
MyBarSeries3.Values.Add(9, New DateTime(2007, 4, 1))
' Add date time bar series to the plot area
MyPlotArea.Series.Add(MyBarSeries1)
MyPlotArea.Series.Add(MyBarSeries2)
MyPlotArea.Series.Add(MyBarSeries3)
' Create a title and add it to the XAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
xAxis.Titles.Add(MyTitle3)
' Set label list format for the axis labels
MyBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time yAxis
DateTimeYAxis yAxis = new DateTimeYAxis();
// Create a numeric xAxis
NumericXAxis xAxis = new NumericXAxis();
// Create a date time bar series and add values to it
DateTimeBarSeries barSeries1 = new DateTimeBarSeries("Website A", xAxis, yAxis);
barSeries1.Values.Add(5, new DateTime(2007, 1, 1));
barSeries1.Values.Add(7, new DateTime(2007, 2, 1));
barSeries1.Values.Add(9, new DateTime(2007, 3, 1));
barSeries1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeBarSeries barSeries2 = new DateTimeBarSeries("Website B", xAxis, yAxis);
barSeries2.Values.Add(4, new DateTime(2007, 1, 1));
barSeries2.Values.Add(2, new DateTime(2007, 2, 1));
barSeries2.Values.Add(5, new DateTime(2007, 3, 1));
barSeries2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeBarSeries barSeries3 = new DateTimeBarSeries("Website C", xAxis, yAxis);
barSeries3.Values.Add(2, new DateTime(2007, 1, 1));
barSeries3.Values.Add(4, new DateTime(2007, 2, 1));
barSeries3.Values.Add(6, new DateTime(2007, 3, 1));
barSeries3.Values.Add(9, new DateTime(2007, 4, 1));
// Add date time bar series to the plot area
plotArea.Series.Add(barSeries1);
plotArea.Series.Add(barSeries2);
plotArea.Series.Add(barSeries3);
// Create a title and add it to the xAxis
Title title3 = new Title("Viewers (in millions)");
xAxis.Titles.Add(title3);
// Set label format for the axis labels
barSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
'Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create date time yAxis
Dim yAxis As DateTimeYAxis = New DateTimeYAxis()
' Create a numeric xAxis and add labels to it
Dim xAxis As NumericXAxis = New NumericXAxis()
xAxis.Labels.Add(New NumericXAxisLabel("0", 0))
xAxis.Labels.Add(New NumericXAxisLabel("1", 1))
xAxis.Labels.Add(New NumericXAxisLabel("2", 2))
xAxis.Labels.Add(New NumericXAxisLabel("3", 3))
xAxis.Labels.Add(New NumericXAxisLabel("4", 4))
xAxis.Labels.Add(New NumericXAxisLabel("5", 5))
xAxis.Labels.Add(New NumericXAxisLabel("6", 6))
xAxis.Labels.Add(New NumericXAxisLabel("7", 7))
xAxis.Labels.Add(New NumericXAxisLabel("8", 8))
xAxis.Labels.Add(New NumericXAxisLabel("9", 9))
' Create a date time bar series and add values to it
Dim MyBarSeries1 As DateTimeBarSeries = New DateTimeBarSeries("Website A", xAxis, yAxis)
MyBarSeries1.Values.Add(5, New DateTime(2007, 1, 1))
MyBarSeries1.Values.Add(7, New DateTime(2007, 2, 1))
MyBarSeries1.Values.Add(9, New DateTime(2007, 3, 1))
MyBarSeries1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyBarSeries2 As DateTimeBarSeries = New DateTimeBarSeries("Website B", xAxis, yAxis)
MyBarSeries2.Values.Add(4, New DateTime(2007, 1, 1))
MyBarSeries2.Values.Add(2, New DateTime(2007, 2, 1))
MyBarSeries2.Values.Add(5, New DateTime(2007, 3, 1))
MyBarSeries2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyBarSeries3 As DateTimeBarSeries = New DateTimeBarSeries("Website C", xAxis, yAxis)
MyBarSeries3.Values.Add(2, New DateTime(2007, 1, 1))
MyBarSeries3.Values.Add(4, New DateTime(2007, 2, 1))
MyBarSeries3.Values.Add(6, New DateTime(2007, 3, 1))
MyBarSeries3.Values.Add(9, New DateTime(2007, 4, 1))
' Add date time bar series to the plot area
MyPlotArea.Series.Add(MyBarSeries1)
MyPlotArea.Series.Add(MyBarSeries2)
MyPlotArea.Series.Add(MyBarSeries3)
' Create a title and add it to the XAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
xAxis.Titles.Add(MyTitle3)
' Set label list format for the axis labels
MyBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create date time yAxis
DateTimeYAxis yAxis = new DateTimeYAxis();
// Create a numeric xAxis and add labels to it
NumericXAxis xAxis = new NumericXAxis();
xAxis.Labels.Add(new NumericXAxisLabel("0", 0));
xAxis.Labels.Add(new NumericXAxisLabel("1", 1));
xAxis.Labels.Add(new NumericXAxisLabel("2", 2));
xAxis.Labels.Add(new NumericXAxisLabel("3", 3));
xAxis.Labels.Add(new NumericXAxisLabel("4", 4));
xAxis.Labels.Add(new NumericXAxisLabel("5", 5));
xAxis.Labels.Add(new NumericXAxisLabel("6", 6));
xAxis.Labels.Add(new NumericXAxisLabel("7", 7));
xAxis.Labels.Add(new NumericXAxisLabel("8", 8));
xAxis.Labels.Add(new NumericXAxisLabel("9", 9));
// Create a date time bar series and add values to it
DateTimeBarSeries barSeries1 = new DateTimeBarSeries("Website A", xAxis, yAxis);
barSeries1.Values.Add(5, new DateTime(2007, 1, 1));
barSeries1.Values.Add(7, new DateTime(2007, 2, 1));
barSeries1.Values.Add(9, new DateTime(2007, 3, 1));
barSeries1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeBarSeries barSeries2 = new DateTimeBarSeries("Website B", xAxis, yAxis);
barSeries2.Values.Add(4, new DateTime(2007, 1, 1));
barSeries2.Values.Add(2, new DateTime(2007, 2, 1));
barSeries2.Values.Add(5, new DateTime(2007, 3, 1));
barSeries2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeBarSeries barSeries3 = new DateTimeBarSeries("Website C", xAxis, yAxis);
barSeries3.Values.Add(2, new DateTime(2007, 1, 1));
barSeries3.Values.Add(4, new DateTime(2007, 2, 1));
barSeries3.Values.Add(6, new DateTime(2007, 3, 1));
barSeries3.Values.Add(9, new DateTime(2007, 4, 1));
// Add date time bar series to the plot area
plotArea.Series.Add(barSeries1);
plotArea.Series.Add(barSeries2);
plotArea.Series.Add(barSeries3);
// Create a title and add it to the XAxis
Title title3 = new Title("Viewers (in millions)");
xAxis.Titles.Add(title3);
// Set label format for the axis labels
barSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
'Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create date time xAxis
Dim xAxis As DateTimeXAxis = New DateTimeXAxis()
' Create a numeric yAxis
Dim yAxis As NumericYAxis = New NumericYAxis()
' Create a date time area series and add values to it
Dim MyAreaSeries1 As DateTimeAreaSeries = New DateTimeAreaSeries("Website A", xAxis, yAxis)
MyAreaSeries1.Values.Add(5, New DateTime(2007, 1, 1))
MyAreaSeries1.Values.Add(7, New DateTime(2007, 2, 1))
MyAreaSeries1.Values.Add(9, New DateTime(2007, 3, 1))
MyAreaSeries1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyAreaSeries2 As DateTimeAreaSeries = New DateTimeAreaSeries("Website B", xAxis, yAxis)
MyAreaSeries2.Values.Add(4, New DateTime(2007, 1, 1))
MyAreaSeries2.Values.Add(2, New DateTime(2007, 2, 1))
MyAreaSeries2.Values.Add(5, New DateTime(2007, 3, 1))
MyAreaSeries2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyAreaSeries3 As DateTimeAreaSeries = New DateTimeAreaSeries("Website C", xAxis, yAxis)
MyAreaSeries3.Values.Add(2, New DateTime(2007, 1, 1))
MyAreaSeries3.Values.Add(4, New DateTime(2007, 2, 1))
MyAreaSeries3.Values.Add(6, New DateTime(2007, 3, 1))
MyAreaSeries3.Values.Add(9, New DateTime(2007, 4, 1))
' Add date time area series to the plot area
MyPlotArea.Series.Add(MyAreaSeries1)
MyPlotArea.Series.Add(MyAreaSeries2)
MyPlotArea.Series.Add(MyAreaSeries3)
' Create a title and add it to the YAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
yAxis.Titles.Add(MyTitle3)
' Set label format for the axis labels
MyAreaSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create date time xAxis
DateTimeXAxis xAxis = new DateTimeXAxis();
// Create a numeric yAxis
NumericYAxis yAxis = new NumericYAxis();
// Create a date time area series and add values to it
DateTimeAreaSeries areaSeries1 = new DateTimeAreaSeries("Website A", xAxis, yAxis);
areaSeries1.Values.Add(5, new DateTime(2007, 1, 1));
areaSeries1.Values.Add(7, new DateTime(2007, 2, 1));
areaSeries1.Values.Add(9, new DateTime(2007, 3, 1));
areaSeries1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeAreaSeries areaSeries2 = new DateTimeAreaSeries("Website B", xAxis, yAxis);
areaSeries2.Values.Add(4, new DateTime(2007, 1, 1));
areaSeries2.Values.Add(2, new DateTime(2007, 2, 1));
areaSeries2.Values.Add(5, new DateTime(2007, 3, 1));
areaSeries2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeAreaSeries areaSeries3 = new DateTimeAreaSeries("Website C", xAxis, yAxis);
areaSeries3.Values.Add(2, new DateTime(2007, 1, 1));
areaSeries3.Values.Add(4, new DateTime(2007, 2, 1));
areaSeries3.Values.Add(6, new DateTime(2007, 3, 1));
areaSeries3.Values.Add(9, new DateTime(2007, 4, 1));
// Add date time area series to the plot area
plotArea.Series.Add(areaSeries1);
plotArea.Series.Add(areaSeries2);
plotArea.Series.Add(areaSeries3);
// Create a title and add it to the YAxis
Title title3 = new Title("Viewers (in millions)");
yAxis.Titles.Add(title3);
// Set label format for the axis labels
areaSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
'Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create date time xAxis
Dim xAxis As DateTimeXAxis = New DateTimeXAxis()
' Create a numeric yAxis and add labels to it
Dim yAxis As NumericYAxis = New NumericYAxis()
yAxis.Labels.Add(New NumericYAxisLabel("0", 0))
yAxis.Labels.Add(New NumericYAxisLabel("1", 1))
yAxis.Labels.Add(New NumericYAxisLabel("2", 2))
yAxis.Labels.Add(New NumericYAxisLabel("3", 3))
yAxis.Labels.Add(New NumericYAxisLabel("4", 4))
yAxis.Labels.Add(New NumericYAxisLabel("5", 5))
yAxis.Labels.Add(New NumericYAxisLabel("6", 6))
yAxis.Labels.Add(New NumericYAxisLabel("7", 7))
yAxis.Labels.Add(New NumericYAxisLabel("8", 8))
yAxis.Labels.Add(New NumericYAxisLabel("9", 9))
' Create a date time area series and add values to it
Dim MyAreaSeries1 As DateTimeAreaSeries = New DateTimeAreaSeries("Website A", xAxis, yAxis)
MyAreaSeries1.Values.Add(5, New DateTime(2007, 1, 1))
MyAreaSeries1.Values.Add(7, New DateTime(2007, 2, 1))
MyAreaSeries1.Values.Add(9, New DateTime(2007, 3, 1))
MyAreaSeries1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyAreaSeries2 As DateTimeAreaSeries = New DateTimeAreaSeries("Website B", xAxis, yAxis)
MyAreaSeries2.Values.Add(4, New DateTime(2007, 1, 1))
MyAreaSeries2.Values.Add(2, New DateTime(2007, 2, 1))
MyAreaSeries2.Values.Add(5, New DateTime(2007, 3, 1))
MyAreaSeries2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyAreaSeries3 As DateTimeAreaSeries = New DateTimeAreaSeries("Website C", xAxis, yAxis)
MyAreaSeries3.Values.Add(2, New DateTime(2007, 1, 1))
MyAreaSeries3.Values.Add(4, New DateTime(2007, 2, 1))
MyAreaSeries3.Values.Add(6, New DateTime(2007, 3, 1))
MyAreaSeries3.Values.Add(9, New DateTime(2007, 4, 1))
' Add date time area series to the plot area
MyPlotArea.Series.Add(MyAreaSeries1)
MyPlotArea.Series.Add(MyAreaSeries2)
MyPlotArea.Series.Add(MyAreaSeries3)
' Create a title and add it to the YAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
yAxis.Titles.Add(MyTitle3)
' Set label list format for the axis labels
MyAreaSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create date time xAxis
DateTimeXAxis xAxis = new DateTimeXAxis();
// Create a numeric yAxis and add labels to it
NumericYAxis yAxis = new NumericYAxis();
yAxis.Labels.Add(new NumericYAxisLabel("0", 0));
yAxis.Labels.Add(new NumericYAxisLabel("1", 1));
yAxis.Labels.Add(new NumericYAxisLabel("2", 2));
yAxis.Labels.Add(new NumericYAxisLabel("3", 3));
yAxis.Labels.Add(new NumericYAxisLabel("4", 4));
yAxis.Labels.Add(new NumericYAxisLabel("5", 5));
yAxis.Labels.Add(new NumericYAxisLabel("6", 6));
yAxis.Labels.Add(new NumericYAxisLabel("7", 7));
yAxis.Labels.Add(new NumericYAxisLabel("8", 8));
yAxis.Labels.Add(new NumericYAxisLabel("9", 9));
// Create a date time area series and add values to it
DateTimeAreaSeries areaSeries1 = new DateTimeAreaSeries("Website A", xAxis, yAxis);
areaSeries1.Values.Add(5, new DateTime(2007, 1, 1));
areaSeries1.Values.Add(7, new DateTime(2007, 2, 1));
areaSeries1.Values.Add(9, new DateTime(2007, 3, 1));
areaSeries1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeAreaSeries areaSeries2 = new DateTimeAreaSeries("Website B", xAxis, yAxis);
areaSeries2.Values.Add(4, new DateTime(2007, 1, 1));
areaSeries2.Values.Add(2, new DateTime(2007, 2, 1));
areaSeries2.Values.Add(5, new DateTime(2007, 3, 1));
areaSeries2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeAreaSeries areaSeries3 = new DateTimeAreaSeries("Website C", xAxis, yAxis);
areaSeries3.Values.Add(2, new DateTime(2007, 1, 1));
areaSeries3.Values.Add(4, new DateTime(2007, 2, 1));
areaSeries3.Values.Add(6, new DateTime(2007, 3, 1));
areaSeries3.Values.Add(9, new DateTime(2007, 4, 1));
// Add date time area series to the plot area
plotArea.Series.Add(areaSeries1);
plotArea.Series.Add(areaSeries2);
plotArea.Series.Add(areaSeries3);
// Create a title and add it to the YAxis
Title title3 = new Title("Viewers (in millions)");
yAxis.Titles.Add(title3);
// Set label format for the axislabels
areaSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
'Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create percentage xAxis
Dim xAxis As PercentageXAxis = New PercentageXAxis()
' Create a date time yAxis
Dim yAxis As DateTimeYAxis = New DateTimeYAxis()
' Create a date time 100percent stacked bar series element and add values to it
Dim MyBarSeriesElement1 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website A")
MyBarSeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MyBarSeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MyBarSeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MyBarSeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyBarSeriesElement2 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website B")
MyBarSeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MyBarSeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MyBarSeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MyBarSeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyBarSeriesElement3 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website C")
MyBarSeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MyBarSeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MyBarSeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MyBarSeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked bar series and add date time 100 percent stacked bar series elements to it
Dim MyStackedBarSeries1 As DateTime100PercentStackedBarSeries = New DateTime100PercentStackedBarSeries(xAxis, yAxis)
MyStackedBarSeries1.Add(MyBarSeriesElement1)
MyStackedBarSeries1.Add(MyBarSeriesElement2)
MyStackedBarSeries1.Add(MyBarSeriesElement3)
' Add date time 100 percent stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Set label list for the axis labels
MyStackedBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create percentage xAxis
PercentageXAxis xAxis = new PercentageXAxis();
// Create a date time yAxis
DateTimeYAxis yAxis = new DateTimeYAxis();
// Create a date time 100percent stacked bar series element and add values to it
DateTime100PercentStackedBarSeriesElement barSeriesElement1 = new DateTime100PercentStackedBarSeriesElement("Website A");
barSeriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
barSeriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
barSeriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
barSeriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement barSeriesElement2 = new DateTime100PercentStackedBarSeriesElement("Website B");
barSeriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
barSeriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
barSeriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
barSeriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement barSeriesElement3 = new DateTime100PercentStackedBarSeriesElement("Website C");
barSeriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
barSeriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
barSeriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
barSeriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100percent stacked bar series and add date time 100percent stacked bar series elements to it
DateTime100PercentStackedBarSeries stackedBarSeries1 = new DateTime100PercentStackedBarSeries(xAxis, yAxis);
stackedBarSeries1.Add(barSeriesElement1);
stackedBarSeries1.Add(barSeriesElement2);
stackedBarSeries1.Add(barSeriesElement3);
// Add date time 100percent stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Set label format for the axislabels
stackedBarSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create percentage xAxis and add labels to it
Dim xAxis As PercentageXAxis = New PercentageXAxis()
xAxis.Labels.Add(New PercentageXAxisLabel("0", 0))
xAxis.Labels.Add(New PercentageXAxisLabel("20%", 20))
xAxis.Labels.Add(New PercentageXAxisLabel("40%", 40))
xAxis.Labels.Add(New PercentageXAxisLabel("60%", 60))
xAxis.Labels.Add(New PercentageXAxisLabel("80%", 80))
xAxis.Labels.Add(New PercentageXAxisLabel("100%", 100))
' Create a date time yAxis
Dim yAxis As DateTimeYAxis = New DateTimeYAxis()
' Create a date time 100percent stacked bar series element and add values to it
Dim MyBarSeriesElement1 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website A")
MyBarSeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MyBarSeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MyBarSeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MyBarSeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyBarSeriesElement2 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website B")
MyBarSeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MyBarSeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MyBarSeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MyBarSeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyBarSeriesElement3 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website C")
MyBarSeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MyBarSeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MyBarSeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MyBarSeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked bar series and add date time 100 percent stacked bar series elements to it
Dim MyStackedBarSeries1 As DateTime100PercentStackedBarSeries = New DateTime100PercentStackedBarSeries(xAxis, yAxis)
MyStackedBarSeries1.Add(MyBarSeriesElement1)
MyStackedBarSeries1.Add(MyBarSeriesElement2)
MyStackedBarSeries1.Add(MyBarSeriesElement3)
' Add date time 100 percent stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Set label format for the axis labels
MyStackedBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create percentage xAxis and add labels to it
PercentageXAxis xAxis = new PercentageXAxis();
xAxis.Labels.Add(new PercentageXAxisLabel("0", 0));
xAxis.Labels.Add(new PercentageXAxisLabel("20%", 20));
xAxis.Labels.Add(new PercentageXAxisLabel("40%", 40));
xAxis.Labels.Add(new PercentageXAxisLabel("60%", 60));
xAxis.Labels.Add(new PercentageXAxisLabel("80%", 80));
xAxis.Labels.Add(new PercentageXAxisLabel("100%", 100));
// Create a date time yAxis
DateTimeYAxis yAxis = new DateTimeYAxis();
// Create a date time 100percent stacked bar series element and add values to it
DateTime100PercentStackedBarSeriesElement barSeriesElement1 = new DateTime100PercentStackedBarSeriesElement("Website A");
barSeriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
barSeriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
barSeriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
barSeriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement barSeriesElement2 = new DateTime100PercentStackedBarSeriesElement("Website B");
barSeriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
barSeriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
barSeriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
barSeriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement barSeriesElement3 = new DateTime100PercentStackedBarSeriesElement("Website C");
barSeriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
barSeriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
barSeriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
barSeriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100percent stacked bar series and add date time stacked bar series elements to it
DateTime100PercentStackedBarSeries stackedBarSeries1 = new DateTime100PercentStackedBarSeries(xAxis, yAxis);
stackedBarSeries1.Add(barSeriesElement1);
stackedBarSeries1.Add(barSeriesElement2);
stackedBarSeries1.Add(barSeriesElement3);
// Add date time 100percent stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Set label format for the axis labels
stackedBarSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create percentage yAxis and add labels to it
Dim yAxis As PercentageYAxis = New PercentageYAxis()
' Create a date time xAxis
Dim xAxis As DateTimeXAxis = New DateTimeXAxis()
' Create a date time 100percent stacked area series element and add values to it
Dim MyAreaSeriesElement1 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website A")
MyAreaSeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MyAreaSeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MyAreaSeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MyAreaSeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyAreaSeriesElement2 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website B")
MyAreaSeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MyAreaSeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MyAreaSeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MyAreaSeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyAreaSeriesElement3 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website C")
MyAreaSeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MyAreaSeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MyAreaSeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MyAreaSeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked area series and add date time 100 percent stacked area series elements to it
Dim MyStackedAreaSeries1 As DateTime100PercentStackedAreaSeries = New DateTime100PercentStackedAreaSeries(xAxis, yAxis)
MyStackedAreaSeries1.Add(MyAreaSeriesElement1)
MyStackedAreaSeries1.Add(MyAreaSeriesElement2)
MyStackedAreaSeries1.Add(MyAreaSeriesElement3)
' Add date time 100 percent stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' Set label list format for the axis labels
MyStackedAreaSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create percentage yAxis and add labels to it
PercentageYAxis yAxis = new PercentageYAxis();
// Create a date time xAxis
DateTimeXAxis xAxis = new DateTimeXAxis();
// Create a date time 100percent stacked area series element and add values to it
DateTime100PercentStackedAreaSeriesElement areaSeriesElement1 = new DateTime100PercentStackedAreaSeriesElement("Website A");
areaSeriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
areaSeriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
areaSeriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
areaSeriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedAreaSeriesElement areaSeriesElement2 = new DateTime100PercentStackedAreaSeriesElement("Website B");
areaSeriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
areaSeriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
areaSeriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
areaSeriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedAreaSeriesElement areaSeriesElement3 = new DateTime100PercentStackedAreaSeriesElement("Website C");
areaSeriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
areaSeriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
areaSeriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
areaSeriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked area series and add date time 100 percent stacked area series elements to it
DateTime100PercentStackedAreaSeries stackedAreaSeries1 = new DateTime100PercentStackedAreaSeries(xAxis, yAxis);
stackedAreaSeries1.Add(areaSeriesElement1);
stackedAreaSeries1.Add(areaSeriesElement2);
stackedAreaSeries1.Add(areaSeriesElement3);
// Add date time 100 percent stacked bar series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// Set label list format for the axis labels
stackedAreaSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create percentage yAxis and add labels to it
Dim yAxis As PercentageYAxis = New PercentageYAxis()
yAxis.Labels.Add(New PercentageYAxisLabel("0", 0))
yAxis.Labels.Add(New PercentageYAxisLabel("20%", 20))
yAxis.Labels.Add(New PercentageYAxisLabel("40%", 40))
yAxis.Labels.Add(New PercentageYAxisLabel("60%", 60))
yAxis.Labels.Add(New PercentageYAxisLabel("80%", 80))
yAxis.Labels.Add(New PercentageYAxisLabel("100%", 100))
' Create a date time xAxis
Dim xAxis As DateTimeXAxis = New DateTimeXAxis()
' Create a date time 100percent stacked area series element and add values to it
Dim MyAreaSeriesElement1 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website A")
MyAreaSeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MyAreaSeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MyAreaSeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MyAreaSeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyAreaSeriesElement2 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website B")
MyAreaSeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MyAreaSeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MyAreaSeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MyAreaSeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyAreaSeriesElement3 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website C")
MyAreaSeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MyAreaSeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MyAreaSeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MyAreaSeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked area series and add date time 100 percent stacked area series elements to it
Dim MyStackedAreaSeries1 As DateTime100PercentStackedAreaSeries = New DateTime100PercentStackedAreaSeries(xAxis, yAxis)
MyStackedAreaSeries1.Add(MyAreaSeriesElement1)
MyStackedAreaSeries1.Add(MyAreaSeriesElement2)
MyStackedAreaSeries1.Add(MyAreaSeriesElement3)
' Add date time 100 percent stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' Set label format for the axis labels
MyStackedAreaSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create percentage yAxis and add labels to it
PercentageYAxis yAxis = new PercentageYAxis();
yAxis.Labels.Add(new PercentageYAxisLabel("0", 0));
yAxis.Labels.Add(new PercentageYAxisLabel("20%", 20));
yAxis.Labels.Add(new PercentageYAxisLabel("40%", 40));
yAxis.Labels.Add(new PercentageYAxisLabel("60%", 60));
yAxis.Labels.Add(new PercentageYAxisLabel("80%", 80));
yAxis.Labels.Add(new PercentageYAxisLabel("100%", 100));
// Create a date time xAxis
DateTimeXAxis xAxis = new DateTimeXAxis();
// Create a date time 100percent stacked area series element and add values to it
DateTime100PercentStackedAreaSeriesElement areaSeriesElement1 = new DateTime100PercentStackedAreaSeriesElement("Website A");
areaSeriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
areaSeriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
areaSeriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
areaSeriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedAreaSeriesElement areaSeriesElement2 = new DateTime100PercentStackedAreaSeriesElement("Website B");
areaSeriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
areaSeriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
areaSeriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
areaSeriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedAreaSeriesElement areaSeriesElement3 = new DateTime100PercentStackedAreaSeriesElement("Website C");
areaSeriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
areaSeriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
areaSeriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
areaSeriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100percent stacked area series and add date time 100percent stacked area series elements to it
DateTime100PercentStackedAreaSeries stackedAreaSeries1 = new DateTime100PercentStackedAreaSeries(xAxis, yAxis);
stackedAreaSeries1.Add(areaSeriesElement1);
stackedAreaSeries1.Add(areaSeriesElement2);
stackedAreaSeries1.Add(areaSeriesElement3);
// Add date time 100percent stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// Set label format for the axis labels
stackedAreaSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed y axis
Dim yAxis As IndexedYAxis = New IndexedYAxis()
' Create a numeric x axis and XAxis gridlines
Dim xAxis As NumericXAxis = New NumericXAxis()
Dim xGrid As XAxisGridLines = New XAxisGridLines()
xAxis.Interval = 2
xAxis.MajorGridLines = xGrid
' set XAxis gridlines color property to black
xGrid.Color = RgbColor.Black
' Create a indexed bar series and add values to it
Dim MyBarSeries1 As IndexedBarSeries = New IndexedBarSeries("Website A", xAxis, yAxis)
MyBarSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyBarSeries2 As IndexedBarSeries = New IndexedBarSeries("Website B", xAxis, yAxis)
MyBarSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyBarSeries3 As IndexedBarSeries = New IndexedBarSeries("Website C", xAxis, yAxis)
MyBarSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed bar series to the plot area
MyPlotArea.Series.Add(MyBarSeries1)
MyPlotArea.Series.Add(MyBarSeries2)
MyPlotArea.Series.Add(MyBarSeries3)
' Create a footer title and add it to the chart
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyChart.FooterTitles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed y axis
IndexedYAxis yAxis = new IndexedYAxis();
// Create a numeric x axis and XAxis gridlines
NumericXAxis xAxis = new NumericXAxis();
XAxisGridLines xGrid = new XAxisGridLines();
xAxis.Interval = 2;
xAxis.MajorGridLines = xGrid;
// set XAxis gridlines color property to black
xGrid.Color = RgbColor.Black;
// Create a indexed bar series and add values to it
IndexedBarSeries barSeries1 = new IndexedBarSeries("Website A", xAxis, yAxis);
barSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedBarSeries barSeries2 = new IndexedBarSeries("Website B", xAxis, yAxis);
barSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedBarSeries barSeries3 = new IndexedBarSeries("Website C", xAxis, yAxis);
barSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed bar series to the plot area
plotArea.Series.Add(barSeries1);
plotArea.Series.Add(barSeries2);
plotArea.Series.Add(barSeries3);
// Create a footer title and add it to the chart
Title title3 = new Title("Visitors (in millions)");
chart.FooterTitles.Add(title3);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed y axis
Dim yAxis As IndexedYAxis = New IndexedYAxis()
' Create a numeric x axis and add tick marks
Dim xAxis As NumericXAxis = New NumericXAxis()
Dim xTicks As XAxisTickMarks = New XAxisTickMarks()
xAxis.MajorTickMarks = xTicks
' Create a indexed bar series and add values to it
Dim MyBarSeries1 As IndexedBarSeries = New IndexedBarSeries("Website A", xAxis, yAxis)
MyBarSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyBarSeries2 As IndexedBarSeries = New IndexedBarSeries("Website B", xAxis, yAxis)
MyBarSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyBarSeries3 As IndexedBarSeries = New IndexedBarSeries("Website C", xAxis, yAxis)
MyBarSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed bar series to the plot area
MyPlotArea.Series.Add(MyBarSeries1)
MyPlotArea.Series.Add(MyBarSeries2)
MyPlotArea.Series.Add(MyBarSeries3)
' Create a footer title and add it to the chart
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyChart.FooterTitles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed y axis
IndexedYAxis yAxis = new IndexedYAxis();
// Create a numeric x axis and add tick marks
NumericXAxis xAxis = new NumericXAxis();
XAxisTickMarks xTicks = new XAxisTickMarks();
xAxis.MajorTickMarks = xTicks;
// Create a indexed bar series and add values to it
IndexedBarSeries barSeries1 = new IndexedBarSeries("Website A", xAxis, yAxis);
barSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedBarSeries barSeries2 = new IndexedBarSeries("Website B", xAxis, yAxis);
barSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedBarSeries barSeries3 = new IndexedBarSeries("Website C", xAxis, yAxis);
barSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed bar series to the plot area
plotArea.Series.Add(barSeries1);
plotArea.Series.Add(barSeries2);
plotArea.Series.Add(barSeries3);
// Create a footer title and add it to the chart
Title title3 = new Title("Visitors (in millions)");
chart.FooterTitles.Add(title3);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed x axis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Create a numeric y axis and YAxis gridlines
Dim yAxis As NumericYAxis = New NumericYAxis()
Dim yGrid As YAxisGridLines = New YAxisGridLines()
yAxis.Interval = 2
yAxis.MajorGridLines = yGrid
' set YAxis gridlines color property to black
yGrid.Color = RgbColor.Black
' Create a indexed column series and add values to it
Dim MyColumnSeries1 As IndexedColumnSeries = New IndexedColumnSeries("Website A", xAxis, yAxis)
MyColumnSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyColumnSeries2 As IndexedColumnSeries = New IndexedColumnSeries("Website B", xAxis, yAxis)
MyColumnSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyColumnSeries3 As IndexedColumnSeries = New IndexedColumnSeries("Website C", xAxis, yAxis)
MyColumnSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed column series to the plot area
MyPlotArea.Series.Add(MyColumnSeries1)
MyPlotArea.Series.Add(MyColumnSeries2)
MyPlotArea.Series.Add(MyColumnSeries3)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyColumnSeries1.YAxis.Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed x axis
IndexedXAxis xAxis = new IndexedXAxis();
// Create a numeric y axis and YAxis gridlines
NumericYAxis yAxis = new NumericYAxis();
YAxisGridLines yGrid = new YAxisGridLines();
yAxis.Interval = 2;
yAxis.MajorGridLines = yGrid;
// set XAxis gridlines color property to black
yGrid.Color = RgbColor.Black;
// Create a indexed column series and add values to it
IndexedColumnSeries columnSeries1 = new IndexedColumnSeries("Website A", xAxis, yAxis);
columnSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedColumnSeries columnSeries2 = new IndexedColumnSeries("Website B", xAxis, yAxis);
columnSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedColumnSeries columnSeries3 = new IndexedColumnSeries("Website C", xAxis, yAxis);
columnSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed column series to the plot area
plotArea.Series.Add(columnSeries1);
plotArea.Series.Add(columnSeries2);
plotArea.Series.Add(columnSeries3);
// Create a title and add it to the yAxis
Title lTitle = new Title("Visitors (in millions)");
columnSeries1.YAxis.Titles.Add(lTitle);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed x axis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Create a numeric y axis and add tick marks
Dim yAxis As NumericYAxis = New NumericYAxis()
Dim yTicks As YAxisTickMarks = New YAxisTickMarks()
yAxis.MajorTickMarks = yTicks
' Create a indexed column series and add values to it
Dim MyColumnSeries1 As IndexedColumnSeries = New IndexedColumnSeries("Website A", xAxis, yAxis)
MyColumnSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyColumnSeries2 As IndexedColumnSeries = New IndexedColumnSeries("Website B", xAxis, yAxis)
MyColumnSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyColumnSeries3 As IndexedColumnSeries = New IndexedColumnSeries("Website C", xAxis, yAxis)
MyColumnSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed column series to the plot area
MyPlotArea.Series.Add(MyColumnSeries1)
MyPlotArea.Series.Add(MyColumnSeries2)
MyPlotArea.Series.Add(MyColumnSeries3)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyColumnSeries1.YAxis.Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed x axis
IndexedXAxis xAxis = new IndexedXAxis();
// Create a numeric y axis and add tick marks
NumericYAxis yAxis = new NumericYAxis();
YAxisTickMarks yTicks = new YAxisTickMarks();
yAxis.MajorTickMarks = yTicks;
// Create a indexed column series and add values to it
IndexedColumnSeries columnSeries1 = new IndexedColumnSeries("Website A", xAxis, yAxis);
columnSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedColumnSeries columnSeries2 = new IndexedColumnSeries("Website B", xAxis, yAxis);
columnSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedColumnSeries columnSeries3 = new IndexedColumnSeries("Website C", xAxis, yAxis);
columnSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed column series to the plot area
plotArea.Series.Add(columnSeries1);
plotArea.Series.Add(columnSeries2);
plotArea.Series.Add(columnSeries3);
// Create a title and add it to the yAxis
Title lTitle = new Title("Visitors (in millions)");
columnSeries1.YAxis.Titles.Add(lTitle);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:/MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time 100 percent stacked area series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked area series and add date time 100 percent stacked area series elements to it
Dim MyStackedAreaSeries1 As DateTime100PercentStackedAreaSeries = New DateTime100PercentStackedAreaSeries()
MyStackedAreaSeries1.Add(MySeriesElement1)
MyStackedAreaSeries1.Add(MySeriesElement2)
MyStackedAreaSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' set label format for the axis labels
MyStackedAreaSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time 100 percent stacked area series element and add values to it
DateTime100PercentStackedAreaSeriesElement seriesElement1 = new DateTime100PercentStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedAreaSeriesElement seriesElement2 = new DateTime100PercentStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedAreaSeriesElement seriesElement3 = new DateTime100PercentStackedAreaSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked area series and add date time 100 percent stacked area series elements to it
DateTime100PercentStackedAreaSeries stackedAreaSeries1 = new DateTime100PercentStackedAreaSeries();
stackedAreaSeries1.Add(seriesElement1);
stackedAreaSeries1.Add(seriesElement2);
stackedAreaSeries1.Add(seriesElement3);
// Add date time 100 percent stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// set label format for the axis labels
stackedAreaSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time 100 percent stacked area series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked area series and add date time 100 percent stacked area series elements to it
Dim MyStackedAreaSeries1 As DateTime100PercentStackedAreaSeries = New DateTime100PercentStackedAreaSeries()
MyStackedAreaSeries1.Add(MySeriesElement1)
MyStackedAreaSeries1.Add(MySeriesElement2)
MyStackedAreaSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' set label format for the axis labels
MyStackedAreaSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time 100 percent stacked area series element and add values to it
DateTime100PercentStackedAreaSeriesElement seriesElement1 = new DateTime100PercentStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedAreaSeriesElement seriesElement2 = new DateTime100PercentStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedAreaSeriesElement seriesElement3 = new DateTime100PercentStackedAreaSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked area series and add date time 100 percent stacked area series elements to it
DateTime100PercentStackedAreaSeries stackedAreaSeries1 = new DateTime100PercentStackedAreaSeries();
stackedAreaSeries1.Add(seriesElement1);
stackedAreaSeries1.Add(seriesElement2);
stackedAreaSeries1.Add(seriesElement3);
// Add date time 100 percent stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// set label format for the axis labels
stackedAreaSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:/MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time 100 percent stacked bar series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked bar series and add date time 100 percent stacked bar series elements to it
Dim MyStackedBarSeries1 As DateTime100PercentStackedBarSeries = New DateTime100PercentStackedBarSeries()
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Create a title and add it to the XAxis
Dim MyTitle3 As Title = New Title("Viewers")
MyStackedBarSeries1.XAxis.Titles.Add(MyTitle3)
' Set label format to the axis labels
MyStackedBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time 100 percent stacked bar series element and add values to it
DateTime100PercentStackedBarSeriesElement seriesElement1 = new DateTime100PercentStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement seriesElement2 = new DateTime100PercentStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement seriesElement3 = new DateTime100PercentStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked bar series and add date time 100 percent stacked bar series elements to it
DateTime100PercentStackedBarSeries stackedBarSeries1 = new DateTime100PercentStackedBarSeries();
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add date time stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Create a title and add it to the XAxis
Title title3 = new Title("Viewers");
stackedBarSeries1.XAxis.Titles.Add(title3);
// Set label format to the axis labels
stackedBarSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time 100 percent stacked bar series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked bar series and add date time 100 percent stacked bar series elements to it
Dim MyStackedBarSeries1 As DateTime100PercentStackedBarSeries = New DateTime100PercentStackedBarSeries()
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Create a title and add it to the XAxis
Dim MyTitle3 As Title = New Title("Viewers")
MyStackedBarSeries1.XAxis.Titles.Add(MyTitle3)
' Set label format to the axis labels
MyStackedBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time 100 percent stacked bar series element and add values to it
DateTime100PercentStackedBarSeriesElement seriesElement1 = new DateTime100PercentStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement seriesElement2 = new DateTime100PercentStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement seriesElement3 = new DateTime100PercentStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked bar series and add date time 100 percent stacked bar series elements to it
DateTime100PercentStackedBarSeries stackedBarSeries1 = new DateTime100PercentStackedBarSeries();
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add date time 100 percent stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Create a title and add it to the XAxis
Title title3 = new Title("Viewers");
stackedBarSeries1.XAxis.Titles.Add(title3);
// Set label format to the axis labels
stackedBarSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
'Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time 100 percent stacked column series elements and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedColumnSeriesElement = New DateTime100PercentStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(4, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(3, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedColumnSeriesElement = New DateTime100PercentStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedColumnSeriesElement = New DateTime100PercentStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked column series and add date time 100 percent stacked column series elements to it
Dim MyStackedColumnSeries1 As DateTime100PercentStackedColumnSeries = New DateTime100PercentStackedColumnSeries()
MyStackedColumnSeries1.Add(MySeriesElement1)
MyStackedColumnSeries1.Add(MySeriesElement2)
MyStackedColumnSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked column series to plot area
MyPlotArea.Series.Add(MyStackedColumnSeries1)
' set label format for the axis labels
MyStackedColumnSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time 100 percent stacked column series elements and add values to it
DateTime100PercentStackedColumnSeriesElement seriesElement1 = new DateTime100PercentStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(4, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(3, new DateTime(2007, 4, 1));
DateTime100PercentStackedColumnSeriesElement seriesElement2 = new DateTime100PercentStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedColumnSeriesElement seriesElement3 = new DateTime100PercentStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked column series and add date time 100 percent stacked column series elements to it
DateTime100PercentStackedColumnSeries stackedColumnSeries1 = new DateTime100PercentStackedColumnSeries();
stackedColumnSeries1.Add(seriesElement1);
stackedColumnSeries1.Add(seriesElement2);
stackedColumnSeries1.Add(seriesElement3);
// Add date time 100 percent stacked column series to plot area
plotArea.Series.Add(stackedColumnSeries1);
// set label format for the axis labels
stackedColumnSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time 100 percent stacked column series elements and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedColumnSeriesElement = New DateTime100PercentStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(4, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(3, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedColumnSeriesElement = New DateTime100PercentStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedColumnSeriesElement = New DateTime100PercentStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked column series and add date time 100 percent stacked column series elements to it
Dim MyStackedColumnSeries1 As DateTime100PercentStackedColumnSeries = New DateTime100PercentStackedColumnSeries()
MyStackedColumnSeries1.Add(MySeriesElement1)
MyStackedColumnSeries1.Add(MySeriesElement2)
MyStackedColumnSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked column series to plot area
MyPlotArea.Series.Add(MyStackedColumnSeries1)
' set label format for the axislabels
MyStackedColumnSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time 100 percent stacked column series elements and add values to it
DateTime100PercentStackedColumnSeriesElement seriesElement1 = new DateTime100PercentStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(4, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(3, new DateTime(2007, 4, 1));
DateTime100PercentStackedColumnSeriesElement seriesElement2 = new DateTime100PercentStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedColumnSeriesElement seriesElement3 = new DateTime100PercentStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked column series and add date time 100 percent stacked column series elements to it
DateTime100PercentStackedColumnSeries stackedColumnSeries1 = new DateTime100PercentStackedColumnSeries();
stackedColumnSeries1.Add(seriesElement1);
stackedColumnSeries1.Add(seriesElement2);
stackedColumnSeries1.Add(seriesElement3);
// Add date time 100 percent stacked column series to plot area
plotArea.Series.Add(stackedColumnSeries1);
// set label list format for the axis labels
stackedColumnSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Add a plot area to the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time 100 percent stacked line series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked line series and add date time 100 percent stacked line series elements to it
Dim MyStackedLineSeries1 As DateTime100PercentStackedLineSeries = New DateTime100PercentStackedLineSeries()
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked line series to plot area
MyPlotArea.Series.Add(MyStackedLineSeries1)
' set label format for the axislabels
MyStackedLineSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Add a plot area to the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time 100 percent stacked line series element and add values to it
DateTime100PercentStackedLineSeriesElement seriesElement1 = new DateTime100PercentStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedLineSeriesElement seriesElement2 = new DateTime100PercentStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedLineSeriesElement seriesElement3 = new DateTime100PercentStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked line series and add date time 100 percent stacked line series elements to it
DateTime100PercentStackedLineSeries stackedLineSeries1 = new DateTime100PercentStackedLineSeries();
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add date time 100 percent stacked line series to plot area
plotArea.Series.Add(stackedLineSeries1);
// set label format for the axis labels
stackedLineSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Add a plot area to the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time 100 percent stacked line series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100 percent stacked line series and add date time 100 percent stacked line series elements to it
Dim MyStackedLineSeries1 As DateTime100PercentStackedLineSeries = New DateTime100PercentStackedLineSeries()
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add date time 100 percent stacked line series to plot area
MyPlotArea.Series.Add(MyStackedLineSeries1)
' set label format for the axis labels
MyStackedLineSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Add a plot area to the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time 100 percent stacked line series element and add values to it
DateTime100PercentStackedLineSeriesElement seriesElement1 = new DateTime100PercentStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedLineSeriesElement seriesElement2 = new DateTime100PercentStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedLineSeriesElement seriesElement3 = new DateTime100PercentStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100 percent stacked line series and add date time 100 percent stacked line series elements to it
DateTime100PercentStackedLineSeries stackedLineSeries1 = new DateTime100PercentStackedLineSeries();
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add date time 100 percent stacked line series to plot area
plotArea.Series.Add(stackedLineSeries1);
// set label format for the axis labels
stackedLineSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create positions
Dim p0 As DateTime = New DateTime(2007, 1, 1)
Dim p1 As DateTime = New DateTime(2007, 2, 1)
Dim p2 As DateTime = New DateTime(2007, 3, 1)
Dim p3 As DateTime = New DateTime(2007, 4, 1)
' Create date time area series and add values to it
Dim MyAreaSeries1 As DateTimeAreaSeries = New DateTimeAreaSeries("Website A")
MyAreaSeries1.Values.Add(5, p0)
MyAreaSeries1.Values.Add(7, p1)
MyAreaSeries1.Values.Add(9, p2)
MyAreaSeries1.Values.Add(6, p3)
Dim MyAreaSeries2 As DateTimeAreaSeries = New DateTimeAreaSeries("Website B")
MyAreaSeries2.Values.Add(4, p0)
MyAreaSeries2.Values.Add(2, p1)
MyAreaSeries2.Values.Add(5, p2)
MyAreaSeries2.Values.Add(8, p3)
Dim MyAreaSeries3 As DateTimeAreaSeries = New DateTimeAreaSeries("Website C")
MyAreaSeries3.Values.Add(2, p0)
MyAreaSeries3.Values.Add(4, p1)
MyAreaSeries3.Values.Add(6, p2)
MyAreaSeries3.Values.Add(9, p3)
'Add date time area series to the plot area
MyPlotArea.Series.Add(MyAreaSeries1)
MyPlotArea.Series.Add(MyAreaSeries2)
MyPlotArea.Series.Add(MyAreaSeries3)
' Create a title and add it to yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyAreaSeries1.YAxis.Titles.Add(MyTitle3)
' Set label format for the axis labels
MyAreaSeries1.XAxis.LabelFormat = "MMM"
'Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create positions
DateTime p0 = new DateTime(2007, 1, 1);
DateTime p1 = new DateTime(2007, 2, 1);
DateTime p2 = new DateTime(2007, 3, 1);
DateTime p3 = new DateTime(2007, 4, 1);
// Create date time area series and add values to it
DateTimeAreaSeries areaSeries1 = new DateTimeAreaSeries("Website A");
areaSeries1.Values.Add(5, p0);
areaSeries1.Values.Add(7, p1);
areaSeries1.Values.Add(9, p2);
areaSeries1.Values.Add(6, p3);
DateTimeAreaSeries areaSeries2 = new DateTimeAreaSeries("Website B");
areaSeries2.Values.Add(4, p0);
areaSeries2.Values.Add(2, p1);
areaSeries2.Values.Add(5, p2);
areaSeries2.Values.Add(8, p3);
DateTimeAreaSeries areaSeries3 = new DateTimeAreaSeries("Website C");
areaSeries3.Values.Add(2, p0);
areaSeries3.Values.Add(4, p1);
areaSeries3.Values.Add(6, p2);
areaSeries3.Values.Add(9, p3);
//Add date time area series to the plot area
plotArea.Series.Add(areaSeries1);
plotArea.Series.Add(areaSeries2);
plotArea.Series.Add(areaSeries3);
// Create a title and add it to yAxis
Title title3 = new Title("Viewers (in millions)");
areaSeries1.YAxis.Titles.Add(title3);
// Set label format for the axis labels
areaSeries1.XAxis.LabelFormat = "MMM";
//Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
'Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time bar series and add values to it
Dim MyBarSeries1 As DateTimeBarSeries = New DateTimeBarSeries("Website A")
MyBarSeries1.Values.Add(5, New DateTime(2007, 1, 1))
MyBarSeries1.Values.Add(7, New DateTime(2007, 2, 1))
MyBarSeries1.Values.Add(9, New DateTime(2007, 3, 1))
MyBarSeries1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyBarSeries2 As DateTimeBarSeries = New DateTimeBarSeries("Website B")
MyBarSeries2.Values.Add(4, New DateTime(2007, 1, 1))
MyBarSeries2.Values.Add(2, New DateTime(2007, 2, 1))
MyBarSeries2.Values.Add(5, New DateTime(2007, 3, 1))
MyBarSeries2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyBarSeries3 As DateTimeBarSeries = New DateTimeBarSeries("Website C")
MyBarSeries3.Values.Add(2, New DateTime(2007, 1, 1))
MyBarSeries3.Values.Add(4, New DateTime(2007, 2, 1))
MyBarSeries3.Values.Add(6, New DateTime(2007, 3, 1))
MyBarSeries3.Values.Add(9, New DateTime(2007, 4, 1))
' Add date time bar series to the plot area
MyPlotArea.Series.Add(MyBarSeries1)
MyPlotArea.Series.Add(MyBarSeries2)
MyPlotArea.Series.Add(MyBarSeries3)
' Create a title and add it to the XAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyBarSeries1.XAxis.Titles.Add(MyTitle3)
' set label format for the axis labels
MyBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time bar series and add values to it
DateTimeBarSeries barSeries1 = new DateTimeBarSeries("Website A");
barSeries1.Values.Add(5, new DateTime(2007, 1, 1));
barSeries1.Values.Add(7, new DateTime(2007, 2, 1));
barSeries1.Values.Add(9, new DateTime(2007, 3, 1));
barSeries1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeBarSeries barSeries2 = new DateTimeBarSeries("Website B");
barSeries2.Values.Add(4, new DateTime(2007, 1, 1));
barSeries2.Values.Add(2, new DateTime(2007, 2, 1));
barSeries2.Values.Add(5, new DateTime(2007, 3, 1));
barSeries2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeBarSeries barSeries3 = new DateTimeBarSeries("Website C");
barSeries3.Values.Add(2, new DateTime(2007, 1, 1));
barSeries3.Values.Add(4, new DateTime(2007, 2, 1));
barSeries3.Values.Add(6, new DateTime(2007, 3, 1));
barSeries3.Values.Add(9, new DateTime(2007, 4, 1));
// Add date time bar series to the plot area
plotArea.Series.Add(barSeries1);
plotArea.Series.Add(barSeries2);
plotArea.Series.Add(barSeries3);
// Create a title and add it to the XAxis
Title title3 = new Title("Viewers (in millions)");
barSeries1.XAxis.Titles.Add(title3);
// set label format for the axis labels
barSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time column series and add values to it
Dim MyColumnSeries1 As DateTimeColumnSeries = New DateTimeColumnSeries("Website A")
MyColumnSeries1.Values.Add(5, New DateTime(2007, 1, 1))
MyColumnSeries1.Values.Add(7, New DateTime(2007, 2, 1))
MyColumnSeries1.Values.Add(4, New DateTime(2007, 3, 1))
MyColumnSeries1.Values.Add(3, New DateTime(2007, 4, 1))
Dim MyColumnSeries2 As DateTimeColumnSeries = New DateTimeColumnSeries("Website B")
MyColumnSeries2.Values.Add(4, New DateTime(2007, 1, 1))
MyColumnSeries2.Values.Add(2, New DateTime(2007, 2, 1))
MyColumnSeries2.Values.Add(5, New DateTime(2007, 3, 1))
MyColumnSeries2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyColumnSeries3 As DateTimeColumnSeries = New DateTimeColumnSeries("Website C")
MyColumnSeries3.Values.Add(2, New DateTime(2007, 1, 1))
MyColumnSeries3.Values.Add(4, New DateTime(2007, 2, 1))
MyColumnSeries3.Values.Add(6, New DateTime(2007, 3, 1))
MyColumnSeries3.Values.Add(9, New DateTime(2007, 4, 1))
' Add date time column series to the plot area
MyPlotArea.Series.Add(MyColumnSeries1)
MyPlotArea.Series.Add(MyColumnSeries2)
MyPlotArea.Series.Add(MyColumnSeries3)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyColumnSeries1.YAxis.Titles.Add(MyTitle3)
' set label format for the axis labels
MyColumnSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time column series element and add values to it
DateTimeColumnSeries seriesElement1 = new DateTimeColumnSeries("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeColumnSeries seriesElement2 = new DateTimeColumnSeries("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeColumnSeries seriesElement3 = new DateTimeColumnSeries("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Add date time column series to plot area
plotArea.Series.Add(seriesElement1);
plotArea.Series.Add(seriesElement2);
plotArea.Series.Add(seriesElement3);
// Create a title and add it to the yAxis
Title title3 = new Title("Viewers (in millions)");
seriesElement1.YAxis.Titles.Add(title3);
// set label format for the axis labels
seriesElement1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create positions
Dim p0 As DateTime = New DateTime(2007, 1, 1)
Dim p1 As DateTime = New DateTime(2007, 2, 1)
Dim p2 As DateTime = New DateTime(2007, 3, 1)
Dim p3 As DateTime = New DateTime(2007, 4, 1)
' Create a date time line series and add values to it
Dim MyLineSeries1 As DateTimeLineSeries = New DateTimeLineSeries("Website A")
MyLineSeries1.Values.Add(5, p0)
MyLineSeries1.Values.Add(7, p1)
MyLineSeries1.Values.Add(9, p2)
MyLineSeries1.Values.Add(6, p3)
Dim MyLineSeries2 As DateTimeLineSeries = New DateTimeLineSeries("Website B")
MyLineSeries2.Values.Add(4, p0)
MyLineSeries2.Values.Add(2, p1)
MyLineSeries2.Values.Add(5, p2)
MyLineSeries2.Values.Add(8, p3)
Dim MyLineSeries3 As DateTimeLineSeries = New DateTimeLineSeries("Website C")
MyLineSeries3.Values.Add(2, p0)
MyLineSeries3.Values.Add(4, p1)
MyLineSeries3.Values.Add(6, p2)
MyLineSeries3.Values.Add(9, p3)
' Add date time line series to the plot area
MyPlotArea.Series.Add(MyLineSeries1)
MyPlotArea.Series.Add(MyLineSeries2)
MyPlotArea.Series.Add(MyLineSeries3)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyLineSeries1.YAxis.Titles.Add(MyTitle3)
' set label format for the axis labels
MyLineSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create positions
DateTime p0 = new DateTime(2007, 1, 1);
DateTime p1 = new DateTime(2007, 2, 1);
DateTime p2 = new DateTime(2007, 3, 1);
DateTime p3 = new DateTime(2007, 4, 1);
// Create a date time line series and add values to it
DateTimeLineSeries lineSeries1 = new DateTimeLineSeries("Website A");
lineSeries1.Values.Add(5, p0);
lineSeries1.Values.Add(7, p1);
lineSeries1.Values.Add(9, p2);
lineSeries1.Values.Add(6, p3);
DateTimeLineSeries lineSeries2 = new DateTimeLineSeries("Website B");
lineSeries2.Values.Add(4, p0);
lineSeries2.Values.Add(2, p1);
lineSeries2.Values.Add(5, p2);
lineSeries2.Values.Add(8, p3);
DateTimeLineSeries lineSeries3 = new DateTimeLineSeries("Website C");
lineSeries3.Values.Add(2, p0);
lineSeries3.Values.Add(4, p1);
lineSeries3.Values.Add(6, p2);
lineSeries3.Values.Add(9, p3);
// Add date time line series to the plot area
plotArea.Series.Add(lineSeries1);
plotArea.Series.Add(lineSeries2);
plotArea.Series.Add(lineSeries3);
// Create a title and add it to the yAxis
Title title3 = new Title("Viewers (in millions)");
lineSeries1.YAxis.Titles.Add(title3);
// set label format for the axis labels
lineSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
'Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time stacked area series element and add values to it
Dim MySeriesElement1 As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time stacked area series and add date time stacked area series elements to it
Dim MyStackedAreaSeries1 As DateTimeStackedAreaSeries = New DateTimeStackedAreaSeries()
MyStackedAreaSeries1.Add(MySeriesElement1)
MyStackedAreaSeries1.Add(MySeriesElement2)
MyStackedAreaSeries1.Add(MySeriesElement3)
' Add date time stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyStackedAreaSeries1.YAxis.Titles.Add(MyTitle3)
' set label format for the axis labels
MyStackedAreaSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time stacked area series element and add values to it
DateTimeStackedAreaSeriesElement seriesElement1 = new DateTimeStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeStackedAreaSeriesElement seriesElement2 = new DateTimeStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeStackedAreaSeriesElement seriesElement3 = new DateTimeStackedAreaSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time stacked area series and add date time stacked area series elements to it
DateTimeStackedAreaSeries stackedAreaSeries1 = new DateTimeStackedAreaSeries();
stackedAreaSeries1.Add(seriesElement1);
stackedAreaSeries1.Add(seriesElement2);
stackedAreaSeries1.Add(seriesElement3);
// Add date time stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// Create a title and add it to the yAxis
Title title3 = new Title("Viewers (in millions)");
stackedAreaSeries1.YAxis.Titles.Add(title3);
// set label list format for the axis labels
stackedAreaSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
'Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time stacked area series element and add values to it
Dim MySeriesElement1 As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time stacked area series and add date time stacked area series elements to it
Dim MyStackedAreaSeries1 As DateTimeStackedAreaSeries = New DateTimeStackedAreaSeries()
MyStackedAreaSeries1.Add(MySeriesElement1)
MyStackedAreaSeries1.Add(MySeriesElement2)
MyStackedAreaSeries1.Add(MySeriesElement3)
' Add date time stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' Create a title and add it to the yaxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyStackedAreaSeries1.YAxis.Titles.Add(MyTitle3)
' set label format for the axislabels
MyStackedAreaSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time stacked area series element and add values to it
DateTimeStackedAreaSeriesElement seriesElement1 = new DateTimeStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeStackedAreaSeriesElement seriesElement2 = new DateTimeStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeStackedAreaSeriesElement seriesElement3 = new DateTimeStackedAreaSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time stacked area series and add date time stacked area series elements to it
DateTimeStackedAreaSeries stackedAreaSeries1 = new DateTimeStackedAreaSeries();
stackedAreaSeries1.Add(seriesElement1);
stackedAreaSeries1.Add(seriesElement2);
stackedAreaSeries1.Add(seriesElement3);
// Add date time stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// Create a title and add it to the yAxis
Title title3 = new Title("Viewers (in millions)");
stackedAreaSeries1.YAxis.Titles.Add(title3);
// set label format for the axis labels
stackedAreaSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time stacked bar series element and add values to it
Dim MySeriesElement1 As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time stacked bar series and add date time stacked bar series elements to it
Dim MyStackedBarSeries1 As DateTimeStackedBarSeries = New DateTimeStackedBarSeries()
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add date time stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Create a title and add it to the XAxis
Dim MyTitle3 As Title = New Title("Viewers")
MyStackedBarSeries1.XAxis.Titles.Add(MyTitle3)
' Set label format for axis labels
MyStackedBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time stacked bar series element and add values to it
DateTimeStackedBarSeriesElement seriesElement1 = new DateTimeStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeStackedBarSeriesElement seriesElement2 = new DateTimeStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeStackedBarSeriesElement seriesElement3 = new DateTimeStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time stacked bar series and add date time stacked bar series elements to it
DateTimeStackedBarSeries stackedBarSeries1 = new DateTimeStackedBarSeries();
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add date time stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Create a title and add it to the XAxis
Title title3 = new Title("Viewers");
stackedBarSeries1.XAxis.Titles.Add(title3);
// Set label format for axis labels
stackedBarSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time stacked bar series element and add values to it
Dim MySeriesElement1 As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time stacked bar series and add date time stacked bar series elements to it
Dim MyStackedBarSeries1 As DateTimeStackedBarSeries = New DateTimeStackedBarSeries()
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add date time stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Create a title and add it to the Xaxis
Dim MyTitle3 As Title = New Title("Viewers")
MyStackedBarSeries1.XAxis.Titles.Add(MyTitle3)
' Set label format for axis labels
MyStackedBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time stacked bar series element and add values to it
DateTimeStackedBarSeriesElement seriesElement1 = new DateTimeStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeStackedBarSeriesElement seriesElement2 = new DateTimeStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeStackedBarSeriesElement seriesElement3 = new DateTimeStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time stacked bar series and add date time stacked bar series elements to it
DateTimeStackedBarSeries stackedBarSeries1 = new DateTimeStackedBarSeries();
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add date time stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Create a title and add it to the Xaxis
Title title3 = new Title("Viewers");
stackedBarSeries1.XAxis.Titles.Add(title3);
// Set label format for axis labels
stackedBarSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time stacked column series element and add values to it
Dim MySeriesElement1 As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time stacked column series and add date time stacked column series elements to it
Dim MyStackedColumnSeries1 As DateTimeStackedColumnSeries = New DateTimeStackedColumnSeries()
MyStackedColumnSeries1.Add(MySeriesElement1)
MyStackedColumnSeries1.Add(MySeriesElement2)
MyStackedColumnSeries1.Add(MySeriesElement3)
' Add date time stacked column series to plot area
MyPlotArea.Series.Add(MyStackedColumnSeries1)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyStackedColumnSeries1.YAxis.Titles.Add(MyTitle3)
' set label format for the axis labels
MyStackedColumnSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time stacked column series element and add values to it
DateTimeStackedColumnSeriesElement seriesElement1 = new DateTimeStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeStackedColumnSeriesElement seriesElement2 = new DateTimeStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeStackedColumnSeriesElement seriesElement3 = new DateTimeStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time stacked column series and add date time stacked column series elements to it
DateTimeStackedColumnSeries stackedColumnSeries1 = new DateTimeStackedColumnSeries();
stackedColumnSeries1.Add(seriesElement1);
stackedColumnSeries1.Add(seriesElement2);
stackedColumnSeries1.Add(seriesElement3);
// Add date time stacked column series to plot area
plotArea.Series.Add(stackedColumnSeries1);
// Create a title and add it to the yAxis
Title title3 = new Title("Viewers (in millions)");
stackedColumnSeries1.YAxis.Titles.Add(title3);
// set label format for the axis labels
stackedColumnSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time stacked column series element and add values to it
Dim MySeriesElement1 As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time stacked column series and add date time stacked column series elements to it
Dim MyStackedColumnSeries1 As DateTimeStackedColumnSeries = New DateTimeStackedColumnSeries()
MyStackedColumnSeries1.Add(MySeriesElement1)
MyStackedColumnSeries1.Add(MySeriesElement2)
MyStackedColumnSeries1.Add(MySeriesElement3)
' Add date time stacked column series to plot area
MyPlotArea.Series.Add(MyStackedColumnSeries1)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyStackedColumnSeries1.YAxis.Titles.Add(MyTitle3)
' set label format for the axis labels
MyStackedColumnSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time stacked column series element and add values to it
DateTimeStackedColumnSeriesElement seriesElement1 = new DateTimeStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeStackedColumnSeriesElement seriesElement2 = new DateTimeStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeStackedColumnSeriesElement seriesElement3 = new DateTimeStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time stacked column series and add date time stacked column series elements to it
DateTimeStackedColumnSeries stackedColumnSeries1 = new DateTimeStackedColumnSeries();
stackedColumnSeries1.Add(seriesElement1);
stackedColumnSeries1.Add(seriesElement2);
stackedColumnSeries1.Add(seriesElement3);
// Add date time stacked column series to plot area
plotArea.Series.Add(stackedColumnSeries1);
// Create a title and add it to the yAxis
Title title3 = new Title("Viewers (in millions)");
stackedColumnSeries1.YAxis.Titles.Add(title3);
// set label format for the axis labels
stackedColumnSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time stacked line series element and add values to it
Dim MySeriesElement1 As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time stacked line series and add date time stacked line series elements to it
Dim MyStackedLineSeries1 As DateTimeStackedLineSeries = New DateTimeStackedLineSeries()
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add date time stacked line series to plot area
MyPlotArea.Series.Add(MyStackedLineSeries1)
' set label format for the axis labels
MyStackedLineSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time stacked line series element and add values to it
DateTimeStackedLineSeriesElement seriesElement1 = new DateTimeStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeStackedLineSeriesElement seriesElement2 = new DateTimeStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeStackedLineSeriesElement seriesElement3 = new DateTimeStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time stacked line series and add date time stacked line series elements to it
DateTimeStackedLineSeries stackedLineSeries1 = new DateTimeStackedLineSeries();
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add date time stacked line series to plot area
plotArea.Series.Add(stackedLineSeries1);
// set label format for the axis labels
stackedLineSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time stacked line series element and add values to it
Dim MySeriesElement1 As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MySeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MySeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MySeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MySeriesElement2 As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MySeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MySeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MySeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MySeriesElement3 As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MySeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MySeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MySeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time stacked line series and add date time stacked line series elements to it
Dim MyStackedLineSeries1 As DateTimeStackedLineSeries = New DateTimeStackedLineSeries()
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add date time stacked line series to plot area
MyPlotArea.Series.Add(MyStackedLineSeries1)
' set label format for the axis labels
MyStackedLineSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time stacked line series element and add values to it
DateTimeStackedLineSeriesElement seriesElement1 = new DateTimeStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
seriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
seriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
seriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeStackedLineSeriesElement seriesElement2 = new DateTimeStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
seriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
seriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
seriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeStackedLineSeriesElement seriesElement3 = new DateTimeStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
seriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
seriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
seriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time stacked line series and add date time stacked line series elements to it
DateTimeStackedLineSeries stackedLineSeries1 = new DateTimeStackedLineSeries();
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add date time stacked line series to plot area
plotArea.Series.Add(stackedLineSeries1);
// set label format for the axis labels
stackedLineSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed x axis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Create a percentage y axis
Dim yAxis As PercentageYAxis = New PercentageYAxis()
' Create a indexed 100 percent stacked area series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedAreaSeriesElement = New Indexed100PercentStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As Indexed100PercentStackedAreaSeriesElement = New Indexed100PercentStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As Indexed100PercentStackedAreaSeriesElement = New Indexed100PercentStackedAreaSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed 100 percent stacked area series and add 100 percent indexed stacked area series elements to it
Dim MyStackedAreaSeries1 As Indexed100PercentStackedAreaSeries = New Indexed100PercentStackedAreaSeries(xAxis, yAxis)
MyStackedAreaSeries1.Add(MySeriesElement1)
MyStackedAreaSeries1.Add(MySeriesElement2)
MyStackedAreaSeries1.Add(MySeriesElement3)
' Add indexed 100 percent stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' Adding Indexed X AxisLabels to the XAxis
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed x axis
IndexedXAxis xAxis = new IndexedXAxis();
// Create a percentage y axis
PercentageYAxis yAxis = new PercentageYAxis();
// Create a indexed 100 percent stacked area series element and add values to it
Indexed100PercentStackedAreaSeriesElement seriesElement1 = new Indexed100PercentStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
Indexed100PercentStackedAreaSeriesElement seriesElement2 = new Indexed100PercentStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
Indexed100PercentStackedAreaSeriesElement seriesElement3 = new Indexed100PercentStackedAreaSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed 100 percent stacked area series and add 100 percent indexed stacked area series elements to it
Indexed100PercentStackedAreaSeries stackedAreaSeries1 = new Indexed100PercentStackedAreaSeries(xAxis, yAxis);
stackedAreaSeries1.Add(seriesElement1);
stackedAreaSeries1.Add(seriesElement2);
stackedAreaSeries1.Add(seriesElement3);
// Add indexed 100 percent stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// Adding Indexed X AxisLabels to the XAxis
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:/MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed x axis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Create a percentage y axis
Dim yAxis As PercentageYAxis = New PercentageYAxis()
' Create a indexed 100 percent stacked area series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedAreaSeriesElement = New Indexed100PercentStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As Indexed100PercentStackedAreaSeriesElement = New Indexed100PercentStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As Indexed100PercentStackedAreaSeriesElement = New Indexed100PercentStackedAreaSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed 100 percent stacked area series and add 100 percent indexed stacked area series elements to it
Dim MyStackedAreaSeries1 As Indexed100PercentStackedAreaSeries = New Indexed100PercentStackedAreaSeries(xAxis, yAxis)
MyStackedAreaSeries1.Add(MySeriesElement1)
MyStackedAreaSeries1.Add(MySeriesElement2)
MyStackedAreaSeries1.Add(MySeriesElement3)
' Add indexed 100 percent stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' Adding indexed X AxisLabels to the XAxis
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed x axis
IndexedXAxis xAxis = new IndexedXAxis();
// Create a percentage y axis
PercentageYAxis yAxis = new PercentageYAxis();
// Create a indexed 100 percent stacked area series element and add values to it
Indexed100PercentStackedAreaSeriesElement seriesElement1 = new Indexed100PercentStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
Indexed100PercentStackedAreaSeriesElement seriesElement2 = new Indexed100PercentStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
Indexed100PercentStackedAreaSeriesElement seriesElement3 = new Indexed100PercentStackedAreaSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed 100 percent stacked area series and add 100 percent indexed stacked area series elements to it
Indexed100PercentStackedAreaSeries stackedAreaSeries1 = new Indexed100PercentStackedAreaSeries(xAxis, yAxis);
stackedAreaSeries1.Add(seriesElement1);
stackedAreaSeries1.Add(seriesElement2);
stackedAreaSeries1.Add(seriesElement3);
// Add indexed 100 percent stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// Adding indexed x AxisLabels to the XAxis
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed 100 percent stacked bar series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedBarSeriesElement = New Indexed100PercentStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As Indexed100PercentStackedBarSeriesElement = New Indexed100PercentStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As Indexed100PercentStackedBarSeriesElement = New Indexed100PercentStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed 100 percent stacked bar series and add indexed 100 percent stacked bar series elements to it
Dim MyStackedBarSeries1 As Indexed100PercentStackedBarSeries = New Indexed100PercentStackedBarSeries()
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add indexed 100 percent stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Adding indexed Y AxisLabels to the YAxis
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q1", 0))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q2", 1))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q3", 2))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed 100 percent stacked bar series element and add values to it
Indexed100PercentStackedBarSeriesElement seriesElement1 = new Indexed100PercentStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
Indexed100PercentStackedBarSeriesElement seriesElement2 = new Indexed100PercentStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
Indexed100PercentStackedBarSeriesElement seriesElement3 = new Indexed100PercentStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed 100 percent stacked bar series and add indexed 100 percent stacked bar series elements to it
Indexed100PercentStackedBarSeries stackedBarSeries1 = new Indexed100PercentStackedBarSeries();
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add indexed 100 percent stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Adding Indexed Y AxisLabels to the YAxis
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q1", 0));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q2", 1));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q3", 2));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed 100 percent stacked bar series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedBarSeriesElement = New Indexed100PercentStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As Indexed100PercentStackedBarSeriesElement = New Indexed100PercentStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As Indexed100PercentStackedBarSeriesElement = New Indexed100PercentStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed 100 percent stacked bar series and add indexed 100 percent stacked bar series elements to it
Dim MyStackedBarSeries1 As Indexed100PercentStackedBarSeries = New Indexed100PercentStackedBarSeries()
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add indexed 100 percent stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Adding Indexed Y AxisLabels to the YAxis
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q1", 0))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q2", 1))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q3", 2))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed 100 percent stacked bar series element and add values to it
Indexed100PercentStackedBarSeriesElement seriesElement1 = new Indexed100PercentStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
Indexed100PercentStackedBarSeriesElement seriesElement2 = new Indexed100PercentStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
Indexed100PercentStackedBarSeriesElement seriesElement3 = new Indexed100PercentStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed 100 percent stacked bar series and add indexed 100 percent stacked bar series elements to it
Indexed100PercentStackedBarSeries stackedBarSeries1 = new Indexed100PercentStackedBarSeries();
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add indexed 100 percent stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Add Indexed Y AxisLabels to the YAxis
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q1", 0));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q2", 1));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q3", 2));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed 100 percent stacked column series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedColumnSeriesElement = New Indexed100PercentStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As Indexed100PercentStackedColumnSeriesElement = New Indexed100PercentStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As Indexed100PercentStackedColumnSeriesElement = New Indexed100PercentStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed 100 percent stacked column series and add indexed 100 percent stacked column series elements to it
Dim MyStackedColumnSeries1 As Indexed100PercentStackedColumnSeries = New Indexed100PercentStackedColumnSeries()
MyStackedColumnSeries1.Add(MySeriesElement1)
MyStackedColumnSeries1.Add(MySeriesElement2)
MyStackedColumnSeries1.Add(MySeriesElement3)
' Add indexed 100 percent stacked column series to the plot area
MyPlotArea.Series.Add(MyStackedColumnSeries1)
' Add Indexed X AxisLabels to the XAxis
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed 100 percent stacked column series element and add values to it
Indexed100PercentStackedColumnSeriesElement seriesElement1 = new Indexed100PercentStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
Indexed100PercentStackedColumnSeriesElement seriesElement2 = new Indexed100PercentStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
Indexed100PercentStackedColumnSeriesElement seriesElement3 = new Indexed100PercentStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed 100 percent stacked column series and add indexed 100 percent stacked column series elements to it
Indexed100PercentStackedColumnSeries stackedColumnSeries1 = new Indexed100PercentStackedColumnSeries();
stackedColumnSeries1.Add(seriesElement1);
stackedColumnSeries1.Add(seriesElement2);
stackedColumnSeries1.Add(seriesElement3);
// Add indexed 100 percent stacked column series to the plot area
plotArea.Series.Add(stackedColumnSeries1);
// Add Indexed X AxisLabels to the XAxis
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed 100 percent stacked column series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedColumnSeriesElement = New Indexed100PercentStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As Indexed100PercentStackedColumnSeriesElement = New Indexed100PercentStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As Indexed100PercentStackedColumnSeriesElement = New Indexed100PercentStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed 100 percent stacked column series and add indexed 100 percent stacked column series elements to it
Dim MyStackedColumnSeries1 As Indexed100PercentStackedColumnSeries = New Indexed100PercentStackedColumnSeries()
MyStackedColumnSeries1.Add(MySeriesElement1)
MyStackedColumnSeries1.Add(MySeriesElement2)
MyStackedColumnSeries1.Add(MySeriesElement3)
' Add indexed 100 percent stacked column series to the plot area
MyPlotArea.Series.Add(MyStackedColumnSeries1)
' Add Indexed X AxisLabels to the XAxis
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed 100 percent stacked column series element and add values to it
Indexed100PercentStackedColumnSeriesElement seriesElement1 = new Indexed100PercentStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
Indexed100PercentStackedColumnSeriesElement seriesElement2 = new Indexed100PercentStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
Indexed100PercentStackedColumnSeriesElement seriesElement3 = new Indexed100PercentStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed 100 percent stacked column series and add indexed 100 percent stacked column series elements to it
Indexed100PercentStackedColumnSeries stackedColumnSeries1 = new Indexed100PercentStackedColumnSeries();
stackedColumnSeries1.Add(seriesElement1);
stackedColumnSeries1.Add(seriesElement2);
stackedColumnSeries1.Add(seriesElement3);
// Add indexed 100 percent stacked column series to the plot area
plotArea.Series.Add(stackedColumnSeries1);
// Add Indexed X AxisLabels to the XAxis
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed 100 percent stacked line series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedLineSeriesElement = New Indexed100PercentStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As Indexed100PercentStackedLineSeriesElement = New Indexed100PercentStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As Indexed100PercentStackedLineSeriesElement = New Indexed100PercentStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed 100 percent stacked line series and add indexed 100 percent stacked line series elements to it
Dim MyStackedLineSeries1 As Indexed100PercentStackedLineSeries = New Indexed100PercentStackedLineSeries()
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add indexed 100 percent stacked line series to the plot line
MyPlotArea.Series.Add(MyStackedLineSeries1)
' Add Indexed X AxisLabels to the XAxis
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed 100 percent stacked line series element and add values to it
Indexed100PercentStackedLineSeriesElement seriesElement1 = new Indexed100PercentStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
Indexed100PercentStackedLineSeriesElement seriesElement2 = new Indexed100PercentStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
Indexed100PercentStackedLineSeriesElement seriesElement3 = new Indexed100PercentStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed 100 percent stacked line series and add indexed 100 percent stacked line series elements to it
Indexed100PercentStackedLineSeries stackedLineSeries1 = new Indexed100PercentStackedLineSeries();
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add indexed 100 percent stacked line series to the plot line
plotArea.Series.Add(stackedLineSeries1);
// Add indexed X AxisLabels to the XAxis
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed 100 percent stacked line series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedLineSeriesElement = New Indexed100PercentStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As Indexed100PercentStackedLineSeriesElement = New Indexed100PercentStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As Indexed100PercentStackedLineSeriesElement = New Indexed100PercentStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed 100 percent stacked line series and add indexed 100 percent stacked line series elements to it
Dim MyStackedLineSeries1 As Indexed100PercentStackedLineSeries = New Indexed100PercentStackedLineSeries()
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add indexed 100 percent stacked line series to the plot line
MyPlotArea.Series.Add(MyStackedLineSeries1)
' Add indexed X AxisLabels to the XAxis
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed 100 percent stacked line series element and add values to it
Indexed100PercentStackedLineSeriesElement seriesElement1 = new Indexed100PercentStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
Indexed100PercentStackedLineSeriesElement seriesElement2 = new Indexed100PercentStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
Indexed100PercentStackedLineSeriesElement seriesElement3 = new Indexed100PercentStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed 100 percent stacked line series and add indexed 100 percent stacked line series elements to it
Indexed100PercentStackedLineSeries stackedLineSeries1 = new Indexed100PercentStackedLineSeries();
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add indexed 100 percent stacked line series to the plot line
plotArea.Series.Add(stackedLineSeries1);
// Add indexed X AxisLabels to the XAxis
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed area series and add values to it
Dim MyAreaSeries1 As IndexedAreaSeries = New IndexedAreaSeries("Website A")
MyAreaSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyAreaSeries2 As IndexedAreaSeries = New IndexedAreaSeries("Website B")
MyAreaSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyAreaSeries3 As IndexedAreaSeries = New IndexedAreaSeries("Website C")
MyAreaSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed area series to the plot area
MyPlotArea.Series.Add(MyAreaSeries1)
MyPlotArea.Series.Add(MyAreaSeries2)
MyPlotArea.Series.Add(MyAreaSeries3)
' Create indexed x axis labels and add those to indexed xAxis
MyAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Jan", 0))
MyAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Feb", 1))
MyAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Mar", 2))
MyAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Apr", 3))
' Create a title and add it to the Y axis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyAreaSeries1.YAxis.Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed area series and add values to it
IndexedAreaSeries areaSeries1 = new IndexedAreaSeries("Website A");
areaSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedAreaSeries areaSeries2 = new IndexedAreaSeries("Website B");
areaSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedAreaSeries areaSeries3 = new IndexedAreaSeries("Website C");
areaSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed area series to the plot area
plotArea.Series.Add(areaSeries1);
plotArea.Series.Add(areaSeries2);
plotArea.Series.Add(areaSeries3);
// Create a title and add it to the yAxis
Title title3 = new Title("Visitors (in millions)");
areaSeries1.YAxis.Titles.Add(title3);
// Add indexed x AxisLabels to the XAxis
areaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
areaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
areaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
areaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed bar series and add values to it
Dim MyBarSeries1 As IndexedBarSeries = New IndexedBarSeries("Website A")
MyBarSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyBarSeries2 As IndexedBarSeries = New IndexedBarSeries("Website B")
MyBarSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyBarSeries3 As IndexedBarSeries = New IndexedBarSeries("Website C")
MyBarSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed bar series to the plot area
MyPlotArea.Series.Add(MyBarSeries1)
MyPlotArea.Series.Add(MyBarSeries2)
MyPlotArea.Series.Add(MyBarSeries3)
' Create a title and add it to the XAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyBarSeries1.XAxis.Titles.Add(MyTitle3)
' Add indexed y AxisLabels to the YAxis
MyBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q1", 0))
MyBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q2", 1))
MyBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q3", 2))
MyBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed bar series and add values to it
IndexedBarSeries barSeries1 = new IndexedBarSeries("Website A");
barSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedBarSeries barSeries2 = new IndexedBarSeries("Website B");
barSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedBarSeries barSeries3 = new IndexedBarSeries("Website C");
barSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed bar series to the plot area
plotArea.Series.Add(barSeries1);
plotArea.Series.Add(barSeries2);
plotArea.Series.Add(barSeries3);
// Create a title and add it to the XAxis
Title lTitle = new Title("Visitors (in millions)");
barSeries1.XAxis.Titles.Add(lTitle);
// Add indexed y AxisLabels to the YAxis
barSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q1", 0));
barSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q2", 1));
barSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q3", 2));
barSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed column series and add values to it
Dim MyColumnSeries1 As IndexedColumnSeries = New IndexedColumnSeries("Website A")
MyColumnSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyColumnSeries2 As IndexedColumnSeries = New IndexedColumnSeries("Website B")
MyColumnSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyColumnSeries3 As IndexedColumnSeries = New IndexedColumnSeries("Website C")
MyColumnSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed column series to the plot area
MyPlotArea.Series.Add(MyColumnSeries1)
MyPlotArea.Series.Add(MyColumnSeries2)
MyPlotArea.Series.Add(MyColumnSeries3)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyColumnSeries1.YAxis.Titles.Add(MyTitle3)
' Add indexed X AxisLabels to the XAxis
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed column series and add values to it
IndexedColumnSeries columnSeries1 = new IndexedColumnSeries("Website A");
columnSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedColumnSeries columnSeries2 = new IndexedColumnSeries("Website B");
columnSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedColumnSeries columnSeries3 = new IndexedColumnSeries("Website C");
columnSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed column series to the plot area
plotArea.Series.Add(columnSeries1);
plotArea.Series.Add(columnSeries2);
plotArea.Series.Add(columnSeries3);
// Create a title and add it to the yAxis
Title lTitle = new Title("Visitors (in millions)");
columnSeries1.YAxis.Titles.Add(lTitle);
// Add indexed X AxisLabels to the XAxis
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed line series and add values to it
Dim MyLineSeries1 As IndexedLineSeries = New IndexedLineSeries("Website A")
MyLineSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyLineSeries2 As IndexedLineSeries = New IndexedLineSeries("Website B")
MyLineSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyLineSeries3 As IndexedLineSeries = New IndexedLineSeries("Website C")
MyLineSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Add indexed line series to the plotArea
MyPlotArea.Series.Add(MyLineSeries1)
MyPlotArea.Series.Add(MyLineSeries2)
MyPlotArea.Series.Add(MyLineSeries3)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyLineSeries1.YAxis.Titles.Add(MyTitle3)
' Add indexed x AxisLabels to the XAxis
MyLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed line series and add values to it
IndexedLineSeries lineSeries1 = new IndexedLineSeries("Website A");
lineSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedLineSeries lineSeries2 = new IndexedLineSeries("Website B");
lineSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedLineSeries lineSeries3 = new IndexedLineSeries("Website C");
lineSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Add indexed line series to the plotArea
plotArea.Series.Add(lineSeries1);
plotArea.Series.Add(lineSeries2);
plotArea.Series.Add(lineSeries3);
// Create a title and add it to the yAxis
Title lTitle = new Title("Visitors (in millions)");
lineSeries1.YAxis.Titles.Add(lTitle);
// Add indexed X AxisLabels to the XAxis
lineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
lineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
lineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
lineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed x axis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Add indexed x AxisLabels to the XAxis
xAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
xAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
xAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
xAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Create a numeric y axis
Dim yAxis As NumericYAxis = New NumericYAxis()
' Create a indexed stacked area series element and add values to it
Dim MySeriesElement1 As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed stacked area series and add indexed stacked area series elements to it
Dim MyStackedAreaSeries1 As IndexedStackedAreaSeries = New IndexedStackedAreaSeries(xAxis, yAxis)
MyStackedAreaSeries1.Add(MySeriesElement1)
MyStackedAreaSeries1.Add(MySeriesElement2)
MyStackedAreaSeries1.Add(MySeriesElement3)
' Add indexed stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyStackedAreaSeries1.YAxis.Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed x axis
IndexedXAxis xAxis = new IndexedXAxis();
// Add indexed x AxisLabels to the XAxis
xAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
xAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
xAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
xAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Create a numeric y axis
NumericYAxis yAxis = new NumericYAxis();
// Create a indexed stacked area series element and add values to it
IndexedStackedAreaSeriesElement seriesElement1 = new IndexedStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedAreaSeriesElement seriesElement2 = new IndexedStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedStackedAreaSeriesElement seriesElement3 = new IndexedStackedAreaSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed stacked area series and add indexed stacked area series elements to it
IndexedStackedAreaSeries stackedAreaSeries1 = new IndexedStackedAreaSeries(xAxis, yAxis);
stackedAreaSeries1.Add(seriesElement1);
stackedAreaSeries1.Add(seriesElement2);
stackedAreaSeries1.Add(seriesElement3);
// Add indexed stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// Create a title and add it to the yAxis
Title lTitle = new Title("Visitors (in millions)");
stackedAreaSeries1.YAxis.Titles.Add(lTitle);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed x axis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Add indexed x AxisLabels to the XAxis
xAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
xAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
xAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
xAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Create a numeric y axis
Dim yAxis As NumericYAxis = New NumericYAxis()
' Create a indexed stacked area series element and add values to it
Dim MySeriesElement1 As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed stacked area series and add indexed stacked area series elements to it
Dim MyStackedAreaSeries1 As IndexedStackedAreaSeries = New IndexedStackedAreaSeries(xAxis, yAxis)
MyStackedAreaSeries1.Add(MySeriesElement1)
MyStackedAreaSeries1.Add(MySeriesElement2)
MyStackedAreaSeries1.Add(MySeriesElement3)
' Add indexed stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyStackedAreaSeries1.YAxis.Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed x axis
IndexedXAxis xAxis = new IndexedXAxis();
// Add indexed x AxisLabels to the XAxis
xAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
xAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
xAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
xAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Create a numeric y axis
NumericYAxis yAxis = new NumericYAxis();
// Create a indexed stacked area series element and add values to it
IndexedStackedAreaSeriesElement seriesElement1 = new IndexedStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedAreaSeriesElement seriesElement2 = new IndexedStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedStackedAreaSeriesElement seriesElement3 = new IndexedStackedAreaSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed stacked area series and add indexed stacked area series elements to it
IndexedStackedAreaSeries stackedAreaSeries1 = new IndexedStackedAreaSeries(xAxis, yAxis);
stackedAreaSeries1.Add(seriesElement1);
stackedAreaSeries1.Add(seriesElement2);
stackedAreaSeries1.Add(seriesElement3);
// Add indexed stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// Create a title and add it to the yAxis
Title lTitle = new Title("Visitors (in millions)");
stackedAreaSeries1.YAxis.Titles.Add(lTitle);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed stacked bar series elements and add values to it
Dim MySeriesElement1 As IndexedStackedBarSeriesElement = New IndexedStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedBarSeriesElement = New IndexedStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As IndexedStackedBarSeriesElement = New IndexedStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed stacked bar series and add indexed stacked bar series elements to it
Dim MyStackedBarSeries1 As IndexedStackedBarSeries = New IndexedStackedBarSeries()
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add indexed stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Create a footer title and add it to the chart
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyChart.FooterTitles.Add(MyTitle3)
' Add indexed y AxisLabels to the YAxis
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q1", 0))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q2", 1))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q3", 2))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed stacked bar series element and add values to it
IndexedStackedBarSeriesElement seriesElement1 = new IndexedStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedBarSeriesElement seriesElement2 = new IndexedStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedStackedBarSeriesElement seriesElement3 = new IndexedStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed stacked bar series and add indexed stacked bar series elements to it
IndexedStackedBarSeries stackedBarSeries1 = new IndexedStackedBarSeries();
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add indexed stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Create a footer title and add it to the chart
Title title3 = new Title("Visitors (in millions)");
chart.FooterTitles.Add(title3);
// Add indexed y AxisLabels to the YAxis
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q1", 0));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q2", 1));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q3", 2));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed stacked bar series element and add values to it
Dim MySeriesElement1 As IndexedStackedBarSeriesElement = New IndexedStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedBarSeriesElement = New IndexedStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As IndexedStackedBarSeriesElement = New IndexedStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed stacked bar series and add indexed stacked bar series elements to it
Dim MyStackedBarSeries1 As IndexedStackedBarSeries = New IndexedStackedBarSeries()
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add indexed stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Create a footer title and add it to the chart
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyChart.FooterTitles.Add(MyTitle3)
' Add indexed y AxisLabels to the YAxis
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q1", 0))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q2", 1))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q3", 2))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed stacked bar series and add values to it
IndexedStackedBarSeriesElement seriesElement1 = new IndexedStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedBarSeriesElement seriesElement2 = new IndexedStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedStackedBarSeriesElement seriesElement3 = new IndexedStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed stacked bar series and add indexed stacked bar series elements to it
IndexedStackedBarSeries stackedBarSeries1 = new IndexedStackedBarSeries();
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add indexed stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Create a footer title and add it to the chart
Title title3 = new Title("Visitors (in millions)");
chart.FooterTitles.Add(title3);
// Add indexed Y AxisLabels to the YAxis
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q1", 0));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q2", 1));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q3", 2));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed stacked column series element and add values to it
Dim MySeriesElement1 As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed stacked column series and add indexed stacked column series elements to it
Dim MyStackedColumnSeries1 As IndexedStackedColumnSeries = New IndexedStackedColumnSeries()
MyStackedColumnSeries1.Add(MySeriesElement1)
MyStackedColumnSeries1.Add(MySeriesElement2)
MyStackedColumnSeries1.Add(MySeriesElement3)
' Add indexed stacked column series to the plot area
MyPlotArea.Series.Add(MyStackedColumnSeries1)
' Add indexed X AxisLabels to the XAxis
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed stacked column series element and add values to it
IndexedStackedColumnSeriesElement seriesElement1 = new IndexedStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedColumnSeriesElement seriesElement2 = new IndexedStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedStackedColumnSeriesElement seriesElement3 = new IndexedStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed stacked column series and add indexed stacked column series elements to it
IndexedStackedColumnSeries stackedColumnSeries1 = new IndexedStackedColumnSeries();
stackedColumnSeries1.Add(seriesElement1);
stackedColumnSeries1.Add(seriesElement2);
stackedColumnSeries1.Add(seriesElement3);
// Add indexed stacked column series to the plot area
plotArea.Series.Add(stackedColumnSeries1);
// Add indexed X AxisLabels to the XAxis
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed stacked column series element and add values to it
Dim MySeriesElement1 As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed stacked column series and add indexed stacked column series elements to it
Dim MyStackedColumnSeries1 As IndexedStackedColumnSeries = New IndexedStackedColumnSeries()
MyStackedColumnSeries1.Add(MySeriesElement1)
MyStackedColumnSeries1.Add(MySeriesElement2)
MyStackedColumnSeries1.Add(MySeriesElement3)
' Add indexed stacked column series to the plot area
MyPlotArea.Series.Add(MyStackedColumnSeries1)
' Add indexed X AxisLabels to the XAxis
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Axes
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed stacked column series element and add values to it
IndexedStackedColumnSeriesElement seriesElement1 = new IndexedStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedColumnSeriesElement seriesElement2 = new IndexedStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedStackedColumnSeriesElement seriesElement3 = new IndexedStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed stacked column series and add indexed stacked column series elements to it
IndexedStackedColumnSeries stackedColumnSeries1 = new IndexedStackedColumnSeries();
stackedColumnSeries1.Add(seriesElement1);
stackedColumnSeries1.Add(seriesElement2);
stackedColumnSeries1.Add(seriesElement3);
// Add indexed stacked column series to the plot area
plotArea.Series.Add(stackedColumnSeries1);
// Add indexed x AxisLabels to the XAxis
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed x axis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Create a numeric y axis
Dim yAxis As NumericYAxis = New NumericYAxis()
' Create indexed x axis labels and add those to indexed xAxis
xAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
xAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
xAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
xAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Create a indexed stacked line series element and add values to it
Dim MySeriesElement1 As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed stacked line series and add indexed stacked line series elements to it
Dim MyStackedLineSeries1 As IndexedStackedLineSeries = New IndexedStackedLineSeries(xAxis, yAxis)
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add indexed stacked line series to the plot line
MyPlotArea.Series.Add(MyStackedLineSeries1)
' Create a title and add it to the YAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyPlotArea.YAxes(0).Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed x axis
IndexedXAxis xAxis = new IndexedXAxis();
// Create a numeric y axis
NumericYAxis yAxis = new NumericYAxis();
// Create indexed x axis labels and add those to indexed xAxis
xAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
xAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
xAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
xAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Create a indexed stacked line series element and add values to it
IndexedStackedLineSeriesElement seriesElement1 = new IndexedStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedLineSeriesElement seriesElement2 = new IndexedStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedStackedLineSeriesElement seriesElement3 = new IndexedStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed stacked line series and add indexed stacked line series elements to it
IndexedStackedLineSeries stackedLineSeries1 = new IndexedStackedLineSeries(xAxis, yAxis);
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add indexed stacked line series to the plot line
plotArea.Series.Add(stackedLineSeries1);
// Create a title and add it to the YAxis
Title bTitle = new Title("Visitors (in millions)");
plotArea.YAxes[0].Titles.Add(bTitle);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed x axis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Create a numeric y axis
Dim yAxis As NumericYAxis = New NumericYAxis()
' Create indexed x axis labels and add those to indexed xAxis
xAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
xAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
xAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
xAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Create a indexed stacked line series element and add values to it
Dim MySeriesElement1 As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
Dim MySeriesElement3 As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(New Single() {2, 4, 6, 9})
' Create a indexed stacked line series and add indexed stacked line series elements to it
Dim MyStackedLineSeries1 As IndexedStackedLineSeries = New IndexedStackedLineSeries(xAxis, yAxis)
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add indexed stacked line series to the plot line
MyPlotArea.Series.Add(MyStackedLineSeries1)
' Create a title and add it to the YAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyPlotArea.YAxes(0).Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed x axis
IndexedXAxis xAxis = new IndexedXAxis();
// Create a numeric y axis
NumericYAxis yAxis = new NumericYAxis();
// Create indexed x axis labels and add those to indexed xAxis
xAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
xAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
xAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
xAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Create a indexed stacked line series element and add values to it
IndexedStackedLineSeriesElement seriesElement1 = new IndexedStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedLineSeriesElement seriesElement2 = new IndexedStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedStackedLineSeriesElement seriesElement3 = new IndexedStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a indexed stacked line series and add indexed stacked line series elements to it
IndexedStackedLineSeries stackedLineSeries1 = new IndexedStackedLineSeries(xAxis, yAxis);
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add indexed stacked line series to the plot line
plotArea.Series.Add(stackedLineSeries1);
// Create a title and add it to the YAxis
Title bTitle = new Title("Visitors (in millions)");
plotArea.YAxes[0].Titles.Add(bTitle);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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(PageSize.A4, PageOrientation.Landscape)
MyDocument.Pages.Add(MyPage)
' Create a chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a data label
Dim da As ScalarDataLabel = New ScalarDataLabel(True, False, False)
' Create a pie series and set data label to the pie series
Dim MyPieSeries As PieSeries = New PieSeries()
MyPieSeries.DataLabel = da
' Add the elements to the plot area
MyPlotArea.Series.Add(MyPieSeries)
MyPieSeries.Elements.Add(27, "Website A")
MyPieSeries.Elements.Add(19, "Website B")
MyPieSeries.Elements.Add(21, "Website C")
' Add the chart to page and add the page to document
MyPage.Elements.Add(MyChart)
' Draw the document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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(PageSize.A4, PageOrientation.Landscape);
document.Pages.Add(page);
// Create a chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a data label
ScalarDataLabel da = new ScalarDataLabel(true, false, false);
// Create a pie series and set data label to the pie series
PieSeries pieSeries = new PieSeries();
pieSeries.DataLabel = da;
// Add the elements to the plot area
plotArea.Series.Add(pieSeries);
pieSeries.Elements.Add(27, "Website A");
pieSeries.Elements.Add(19, "Website B");
pieSeries.Elements.Add(21, "Website C");
// Add the chart to page and add the page to document
page.Elements.Add(chart);
// Draw the document
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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(PageSize.A4, PageOrientation.Landscape)
MyDocument.Pages.Add(MyPage)
' Create a chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a data label
Dim da As ScalarDataLabel = New ScalarDataLabel(True, False, False)
' Create a pie series element and add values to it
Dim MySeriesElement1 As PieSeriesElement = New PieSeriesElement(27, "Website A")
Dim MySeriesElement2 As PieSeriesElement = New PieSeriesElement(19, "Website B")
Dim MySeriesElement3 As PieSeriesElement = New PieSeriesElement(21, "Website C")
' Create a pie series and add pie series elements to it
Dim MyPieSeries As PieSeries = New PieSeries()
MyPieSeries.Elements.Add(MySeriesElement1)
MyPieSeries.Elements.Add(MySeriesElement2)
MyPieSeries.Elements.Add(MySeriesElement3)
' Add the data label to the pie series
MyPieSeries.DataLabel = da
' Add the pie series to the plot area
MyPlotArea.Series.Add(MyPieSeries)
' Add the chart to page and add the page to document
MyPage.Elements.Add(MyChart)
' Draw the document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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(PageSize.A4, PageOrientation.Landscape);
document.Pages.Add(page);
// Create a chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a data label
ScalarDataLabel da = new ScalarDataLabel(true, false, false);
// Create a pie series element and add values to it
PieSeriesElement seriesElement1 = new PieSeriesElement(27, "Website A");
PieSeriesElement seriesElement2 = new PieSeriesElement(19, "Website B");
PieSeriesElement seriesElement3 = new PieSeriesElement(21, "Website C");
// Create a pie series and add pie series elements to it
PieSeries pieSeries = new PieSeries();
pieSeries.Elements.Add(seriesElement1);
pieSeries.Elements.Add(seriesElement2);
pieSeries.Elements.Add(seriesElement3);
// Add the data label to the pie series
pieSeries.DataLabel = da;
// Add the pie series to the plot area
plotArea.Series.Add(pieSeries);
// Add the chart to page and add the page to document
page.Elements.Add(chart);
// Draw the document
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 450, 230)
' Get the default plot Area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create a Header title and add it to the chart
Dim MyTitle1 As Title = New Title("Player Height and Weight")
MyChart.HeaderTitles.Add(MyTitle1)
' Create xyScatter series and add values to it
Dim MyXyScatterSeries1 As XYScatterSeries = New XYScatterSeries("Team A")
MyXyScatterSeries1.Values.Add(112, 55)
MyXyScatterSeries1.Values.Add(125, 60)
MyXyScatterSeries1.Values.Add(138, 68)
MyXyScatterSeries1.Values.Add(150, 73)
MyXyScatterSeries1.Values.Add(172, 82)
Dim MyXyScatterSeries2 As XYScatterSeries = New XYScatterSeries("Team B")
MyXyScatterSeries2.Values.Add(110, 54)
MyXyScatterSeries2.Values.Add(128, 62)
MyXyScatterSeries2.Values.Add(140, 70)
MyXyScatterSeries2.Values.Add(155, 75)
MyXyScatterSeries2.Values.Add(170, 80)
' Create XYScatter data label
Dim MyDataLabel As XYScatterDataLabel = New XYScatterDataLabel(True)
MyXyScatterSeries1.DataLabel = MyDataLabel
MyDataLabel.Color = RgbColor.Red
' Add xyScatter series to the plot Area
MyPlotArea.Series.Add(MyXyScatterSeries1)
MyPlotArea.Series.Add(MyXyScatterSeries2)
' Create axis titles and add it to the axis
Dim MyTitle2 As Title = New Title("Height (Inches)")
Dim MyTitle3 As Title = New Title("Weight (Pounds)")
MyXyScatterSeries1.YAxis.Titles.Add(MyTitle2)
MyXyScatterSeries1.XAxis.Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 450, 230);
// Get the default plot Area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create a Header title and add it to the chart
Title tTitle = new Title("Player Height and Weight");
chart.HeaderTitles.Add(tTitle);
// Create xyScatter series and add values to it
XYScatterSeries xyScatterSeries1 = new XYScatterSeries("Team A");
xyScatterSeries1.Values.Add(112, 55);
xyScatterSeries1.Values.Add(125, 60);
xyScatterSeries1.Values.Add(138, 68);
xyScatterSeries1.Values.Add(150, 73);
xyScatterSeries1.Values.Add(172, 82);
XYScatterSeries xyScatterSeries2 = new XYScatterSeries("Team B");
xyScatterSeries2.Values.Add(110, 54);
xyScatterSeries2.Values.Add(128, 62);
xyScatterSeries2.Values.Add(140, 70);
xyScatterSeries2.Values.Add(155, 75);
xyScatterSeries2.Values.Add(170, 80);
// Create XYScatter data label
XYScatterDataLabel dataLabel = new XYScatterDataLabel(true);
xyScatterSeries1.DataLabel = dataLabel;
dataLabel.Color = RgbColor.Red;
// Add xyScatter series to the plot Area
plotArea.Series.Add(xyScatterSeries1);
plotArea.Series.Add(xyScatterSeries2);
// Create axis titles and add it to the axis
Title title1 = new Title("Height (Inches)");
Title title2 = new Title("Weight (Pounds)");
xyScatterSeries1.YAxis.Titles.Add(title1);
xyScatterSeries1.XAxis.Titles.Add(title2);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create date time 100Percent stacked area series element and add values to it
Dim MyAreaSeries1 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website A")
MyAreaSeries1.Values.Add(New DateTime100PercentStackedAreaValue(5, New DateTime(2007, 1, 1)))
MyAreaSeries1.Values.Add(New DateTime100PercentStackedAreaValue(7, New DateTime(2007, 2, 1)))
MyAreaSeries1.Values.Add(New DateTime100PercentStackedAreaValue(9, New DateTime(2007, 3, 1)))
MyAreaSeries1.Values.Add(New DateTime100PercentStackedAreaValue(6, New DateTime(2007, 4, 1)))
Dim MyAreaSeries2 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website B")
MyAreaSeries2.Values.Add(New DateTime100PercentStackedAreaValue(4, New DateTime(2007, 1, 1)))
MyAreaSeries2.Values.Add(New DateTime100PercentStackedAreaValue(2, New DateTime(2007, 2, 1)))
MyAreaSeries2.Values.Add(New DateTime100PercentStackedAreaValue(5, New DateTime(2007, 3, 1)))
MyAreaSeries2.Values.Add(New DateTime100PercentStackedAreaValue(8, New DateTime(2007, 4, 1)))
Dim MyAreaSeries3 As DateTime100PercentStackedAreaSeriesElement = New DateTime100PercentStackedAreaSeriesElement("Website C")
MyAreaSeries3.Values.Add(New DateTime100PercentStackedAreaValue(2, New DateTime(2007, 1, 1)))
MyAreaSeries3.Values.Add(New DateTime100PercentStackedAreaValue(4, New DateTime(2007, 2, 1)))
MyAreaSeries3.Values.Add(New DateTime100PercentStackedAreaValue(6, New DateTime(2007, 3, 1)))
MyAreaSeries3.Values.Add(New DateTime100PercentStackedAreaValue(9, New DateTime(2007, 4, 1)))
' Create a date time 100Percent stacked area series and add date time 100Percent stacked area series elements to it
Dim MyStackedAreaSeries1 As DateTime100PercentStackedAreaSeries = New DateTime100PercentStackedAreaSeries()
MyStackedAreaSeries1.Add(MyAreaSeries1)
MyStackedAreaSeries1.Add(MyAreaSeries2)
MyStackedAreaSeries1.Add(MyAreaSeries3)
' Add date time 100Percent stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' set label format for the axis labels
MyStackedAreaSeries1.XAxis.LabelFormat = "MMM"
'Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create date time 100Percent stacked area series element and add values to it
DateTime100PercentStackedAreaSeriesElement areaSeries1 = new DateTime100PercentStackedAreaSeriesElement("Website A");
areaSeries1.Values.Add(new DateTime100PercentStackedAreaValue(5, new DateTime(2007, 1, 1)));
areaSeries1.Values.Add(new DateTime100PercentStackedAreaValue(7, new DateTime(2007, 2, 1)));
areaSeries1.Values.Add(new DateTime100PercentStackedAreaValue(9, new DateTime(2007, 3, 1)));
areaSeries1.Values.Add(new DateTime100PercentStackedAreaValue(6, new DateTime(2007, 4, 1)));
DateTime100PercentStackedAreaSeriesElement areaSeries2 = new DateTime100PercentStackedAreaSeriesElement("Website B");
areaSeries2.Values.Add(new DateTime100PercentStackedAreaValue(4, new DateTime(2007, 1, 1)));
areaSeries2.Values.Add(new DateTime100PercentStackedAreaValue(2, new DateTime(2007, 2, 1)));
areaSeries2.Values.Add(new DateTime100PercentStackedAreaValue(5, new DateTime(2007, 3, 1)));
areaSeries2.Values.Add(new DateTime100PercentStackedAreaValue(8, new DateTime(2007, 4, 1)));
DateTime100PercentStackedAreaSeriesElement areaSeries3 = new DateTime100PercentStackedAreaSeriesElement("Website C");
areaSeries3.Values.Add(new DateTime100PercentStackedAreaValue(2, new DateTime(2007, 1, 1)));
areaSeries3.Values.Add(new DateTime100PercentStackedAreaValue(4, new DateTime(2007, 2, 1)));
areaSeries3.Values.Add(new DateTime100PercentStackedAreaValue(6, new DateTime(2007, 3, 1)));
areaSeries3.Values.Add(new DateTime100PercentStackedAreaValue(9, new DateTime(2007, 4, 1)));
// Create a date time 100Percent stacked area series and add date time 100Percent stacked area series elements to it
DateTime100PercentStackedAreaSeries stackedAreaSeries1 = new DateTime100PercentStackedAreaSeries();
stackedAreaSeries1.Add(areaSeries1);
stackedAreaSeries1.Add(areaSeries2);
stackedAreaSeries1.Add(areaSeries3);
// Add date time 100Percent stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// set label format for the axis labels
stackedAreaSeries1.XAxis.LabelFormat = "MMM";
//Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create percentage xAxis
Dim xAxis As PercentageXAxis = New PercentageXAxis()
' Create date time yAxis
Dim yAxis As DateTimeYAxis = New DateTimeYAxis()
' Create a date time 100Percent stacked bar series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(New DateTime100PercentStackedBarValue(5, New DateTime(2006, 1, 1)))
MySeriesElement1.Values.Add(New DateTime100PercentStackedBarValue(7, New DateTime(2006, 2, 1)))
MySeriesElement1.Values.Add(New DateTime100PercentStackedBarValue(9, New DateTime(2006, 3, 1)))
MySeriesElement1.Values.Add(New DateTime100PercentStackedBarValue(6, New DateTime(2006, 4, 1)))
Dim MySeriesElement2 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(New DateTime100PercentStackedBarValue(4, New DateTime(2006, 1, 1)))
MySeriesElement2.Values.Add(New DateTime100PercentStackedBarValue(2, New DateTime(2006, 2, 1)))
MySeriesElement2.Values.Add(New DateTime100PercentStackedBarValue(5, New DateTime(2006, 3, 1)))
MySeriesElement2.Values.Add(New DateTime100PercentStackedBarValue(8, New DateTime(2006, 4, 1)))
Dim MySeriesElement3 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(New DateTime100PercentStackedBarValue(2, New DateTime(2006, 1, 1)))
MySeriesElement3.Values.Add(New DateTime100PercentStackedBarValue(4, New DateTime(2006, 2, 1)))
MySeriesElement3.Values.Add(New DateTime100PercentStackedBarValue(6, New DateTime(2006, 3, 1)))
MySeriesElement3.Values.Add(New DateTime100PercentStackedBarValue(9, New DateTime(2006, 4, 1)))
' Create a date time 100Percent stacked bar series and add date time 100Percent stacked bar series elements to it
Dim MyStackedBarSeries1 As DateTime100PercentStackedBarSeries = New DateTime100PercentStackedBarSeries(xAxis, yAxis)
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add date time 100Percent stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' set label format for the axis labels
MyStackedBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create percentage xAxis
PercentageXAxis xAxis = new PercentageXAxis();
// Create date time yAxis
DateTimeYAxis yAxis = new DateTimeYAxis();
// Create a date time 100Percent stacked bar series element and add values to it
DateTime100PercentStackedBarSeriesElement seriesElement1 = new DateTime100PercentStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(new DateTime100PercentStackedBarValue(5, new DateTime(2007, 1, 1)));
seriesElement1.Values.Add(new DateTime100PercentStackedBarValue(7, new DateTime(2007, 2, 1)));
seriesElement1.Values.Add(new DateTime100PercentStackedBarValue(9, new DateTime(2007, 3, 1)));
seriesElement1.Values.Add(new DateTime100PercentStackedBarValue(6, new DateTime(2007, 4, 1)));
DateTime100PercentStackedBarSeriesElement seriesElement2 = new DateTime100PercentStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(new DateTime100PercentStackedBarValue(4, new DateTime(2007, 1, 1)));
seriesElement2.Values.Add(new DateTime100PercentStackedBarValue(2, new DateTime(2007, 2, 1)));
seriesElement2.Values.Add(new DateTime100PercentStackedBarValue(5, new DateTime(2007, 3, 1)));
seriesElement2.Values.Add(new DateTime100PercentStackedBarValue(8, new DateTime(2007, 4, 1)));
DateTime100PercentStackedBarSeriesElement seriesElement3 = new DateTime100PercentStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(new DateTime100PercentStackedBarValue(2, new DateTime(2007, 1, 1)));
seriesElement3.Values.Add(new DateTime100PercentStackedBarValue(4, new DateTime(2007, 2, 1)));
seriesElement3.Values.Add(new DateTime100PercentStackedBarValue(6, new DateTime(2007, 3, 1)));
seriesElement3.Values.Add(new DateTime100PercentStackedBarValue(9, new DateTime(2007, 4, 1)));
// Create a date time 100Percent stacked bar series and add date time stacked bar series elements to it
DateTime100PercentStackedBarSeries stackedBarSeries1 = new DateTime100PercentStackedBarSeries(xAxis, yAxis);
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add date time 100Percent stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// set label format for the axis labels
stackedBarSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time 100Percent stacked column series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedColumnSeriesElement = New DateTime100PercentStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(New DateTime100PercentStackedColumnValue(5, New DateTime(2007, 1, 1)))
MySeriesElement1.Values.Add(New DateTime100PercentStackedColumnValue(7, New DateTime(2007, 2, 1)))
MySeriesElement1.Values.Add(New DateTime100PercentStackedColumnValue(4, New DateTime(2007, 3, 1)))
MySeriesElement1.Values.Add(New DateTime100PercentStackedColumnValue(3, New DateTime(2007, 4, 1)))
Dim MySeriesElement2 As DateTime100PercentStackedColumnSeriesElement = New DateTime100PercentStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(New DateTime100PercentStackedColumnValue(4, New DateTime(2007, 1, 1)))
MySeriesElement2.Values.Add(New DateTime100PercentStackedColumnValue(2, New DateTime(2007, 2, 1)))
MySeriesElement2.Values.Add(New DateTime100PercentStackedColumnValue(5, New DateTime(2007, 3, 1)))
MySeriesElement2.Values.Add(New DateTime100PercentStackedColumnValue(8, New DateTime(2007, 4, 1)))
Dim MySeriesElement3 As DateTime100PercentStackedColumnSeriesElement = New DateTime100PercentStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(New DateTime100PercentStackedColumnValue(2, New DateTime(2007, 1, 1)))
MySeriesElement3.Values.Add(New DateTime100PercentStackedColumnValue(4, New DateTime(2007, 2, 1)))
MySeriesElement3.Values.Add(New DateTime100PercentStackedColumnValue(6, New DateTime(2007, 3, 1)))
MySeriesElement3.Values.Add(New DateTime100PercentStackedColumnValue(9, New DateTime(2007, 4, 1)))
' Create a date time 100Percent stacked column series and add date time 100Percent stacked column series elements to it
Dim MyColumnSeries1 As DateTime100PercentStackedColumnSeries = New DateTime100PercentStackedColumnSeries()
MyColumnSeries1.Add(MySeriesElement1)
MyColumnSeries1.Add(MySeriesElement2)
MyColumnSeries1.Add(MySeriesElement3)
' Add date time 100Percent stacked column series to the plot area
MyPlotArea.Series.Add(MyColumnSeries1)
' set label format for the axis labels
MyColumnSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time 100Percent stacked column series element and add values to it
DateTime100PercentStackedColumnSeriesElement seriesElement1 = new DateTime100PercentStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(new DateTime100PercentStackedColumnValue(5, new DateTime(2007, 1, 1)));
seriesElement1.Values.Add(new DateTime100PercentStackedColumnValue(7, new DateTime(2007, 2, 1)));
seriesElement1.Values.Add(new DateTime100PercentStackedColumnValue(4, new DateTime(2007, 3, 1)));
seriesElement1.Values.Add(new DateTime100PercentStackedColumnValue(3, new DateTime(2007, 4, 1)));
DateTime100PercentStackedColumnSeriesElement seriesElement2 = new DateTime100PercentStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(new DateTime100PercentStackedColumnValue(4, new DateTime(2007, 1, 1)));
seriesElement2.Values.Add(new DateTime100PercentStackedColumnValue(2, new DateTime(2007, 2, 1)));
seriesElement2.Values.Add(new DateTime100PercentStackedColumnValue(5, new DateTime(2007, 3, 1)));
seriesElement2.Values.Add(new DateTime100PercentStackedColumnValue(8, new DateTime(2007, 4, 1)));
DateTime100PercentStackedColumnSeriesElement seriesElement3 = new DateTime100PercentStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(new DateTime100PercentStackedColumnValue(2, new DateTime(2007, 1, 1)));
seriesElement3.Values.Add(new DateTime100PercentStackedColumnValue(4, new DateTime(2007, 2, 1)));
seriesElement3.Values.Add(new DateTime100PercentStackedColumnValue(6, new DateTime(2007, 3, 1)));
seriesElement3.Values.Add(new DateTime100PercentStackedColumnValue(9, new DateTime(2007, 4, 1)));
// Create a date time 100Percent stacked column series and add date time 100Percent stacked column series elements to it
DateTime100PercentStackedColumnSeries columnSeries1 = new DateTime100PercentStackedColumnSeries();
columnSeries1.Add(seriesElement1);
columnSeries1.Add(seriesElement2);
columnSeries1.Add(seriesElement3);
// Add date time 100Percent stacked column series to the plot area
plotArea.Series.Add(columnSeries1);
// set label format for the axis labels
columnSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time x axis
Dim xAxis As DateTimeXAxis = New DateTimeXAxis()
' Create a percentage y axis
Dim yAxis As PercentageYAxis = New PercentageYAxis()
' Create a date time 100Percent stacked line series element and add values to it
Dim MySeriesElement1 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(New DateTime100PercentStackedLineValue(5, New DateTime(2007, 1, 1)))
MySeriesElement1.Values.Add(New DateTime100PercentStackedLineValue(7, New DateTime(2007, 2, 1)))
MySeriesElement1.Values.Add(New DateTime100PercentStackedLineValue(9, New DateTime(2007, 3, 1)))
MySeriesElement1.Values.Add(New DateTime100PercentStackedLineValue(6, New DateTime(2007, 4, 1)))
Dim MySeriesElement2 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(New DateTime100PercentStackedLineValue(4, New DateTime(2007, 1, 1)))
MySeriesElement2.Values.Add(New DateTime100PercentStackedLineValue(2, New DateTime(2007, 2, 1)))
MySeriesElement2.Values.Add(New DateTime100PercentStackedLineValue(5, New DateTime(2007, 3, 1)))
MySeriesElement2.Values.Add(New DateTime100PercentStackedLineValue(8, New DateTime(2007, 4, 1)))
Dim MySeriesElement3 As DateTime100PercentStackedLineSeriesElement = New DateTime100PercentStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(New DateTime100PercentStackedLineValue(2, New DateTime(2007, 1, 1)))
MySeriesElement3.Values.Add(New DateTime100PercentStackedLineValue(4, New DateTime(2007, 2, 1)))
MySeriesElement3.Values.Add(New DateTime100PercentStackedLineValue(6, New DateTime(2007, 3, 1)))
MySeriesElement3.Values.Add(New DateTime100PercentStackedLineValue(9, New DateTime(2007, 4, 1)))
' Create a date time 100Percent stacked line series and add date time 100Percent stacked line series elements to it
Dim MyStackedLineSeries1 As DateTime100PercentStackedLineSeries = New DateTime100PercentStackedLineSeries(xAxis, yAxis)
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add date time 100Percent line series to the plot area
MyPlotArea.Series.Add(MyStackedLineSeries1)
' set label format for the axis labels
MyStackedLineSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time x axis
DateTimeXAxis xAxis = new DateTimeXAxis();
// Create a percentage y axis
PercentageYAxis yAxis = new PercentageYAxis();
// Create a date time 100Percent stacked line series element and add values to it
DateTime100PercentStackedLineSeriesElement seriesElement1 = new DateTime100PercentStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(new DateTime100PercentStackedLineValue(5, new DateTime(2007, 1, 1)));
seriesElement1.Values.Add(new DateTime100PercentStackedLineValue(7, new DateTime(2007, 2, 1)));
seriesElement1.Values.Add(new DateTime100PercentStackedLineValue(9, new DateTime(2007, 3, 1)));
seriesElement1.Values.Add(new DateTime100PercentStackedLineValue(6, new DateTime(2007, 4, 1)));
DateTime100PercentStackedLineSeriesElement seriesElement2 = new DateTime100PercentStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(new DateTime100PercentStackedLineValue(4, new DateTime(2007, 1, 1)));
seriesElement2.Values.Add(new DateTime100PercentStackedLineValue(2, new DateTime(2007, 2, 1)));
seriesElement2.Values.Add(new DateTime100PercentStackedLineValue(5, new DateTime(2007, 3, 1)));
seriesElement2.Values.Add(new DateTime100PercentStackedLineValue(8, new DateTime(2007, 4, 1)));
DateTime100PercentStackedLineSeriesElement seriesElement3 = new DateTime100PercentStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(new DateTime100PercentStackedLineValue(2, new DateTime(2007, 1, 1)));
seriesElement3.Values.Add(new DateTime100PercentStackedLineValue(4, new DateTime(2007, 2, 1)));
seriesElement3.Values.Add(new DateTime100PercentStackedLineValue(6, new DateTime(2007, 3, 1)));
seriesElement3.Values.Add(new DateTime100PercentStackedLineValue(9, new DateTime(2007, 4, 1)));
// Create a date time 100Percent stacked line series and add date time 100Percent stacked line series elements to it
DateTime100PercentStackedLineSeries stackedLineSeries1 = new DateTime100PercentStackedLineSeries(xAxis, yAxis);
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add date time 100Percent line series to the plot area
plotArea.Series.Add(stackedLineSeries1);
// set label format for the axis labels
stackedLineSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document()
' Create a Page and add it to the document
Dim page As Page = New Page()
MyDocument.Pages.Add(page)
' Create a chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim plotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time area series and a list of values to it
Dim areaSeries1 As DateTimeAreaSeries = New DateTimeAreaSeries("Website A")
areaSeries1.Values.Add(New DateTimeAreaValue(5, New DateTime(2007, 1, 1)))
areaSeries1.Values.Add(New DateTimeAreaValue(7, New DateTime(2007, 2, 1)))
areaSeries1.Values.Add(New DateTimeAreaValue(9, New DateTime(2007, 3, 1)))
areaSeries1.Values.Add(New DateTimeAreaValue(6, New DateTime(2007, 4, 1)))
Dim areaSeries2 As DateTimeAreaSeries = New DateTimeAreaSeries("Website B")
areaSeries2.Values.Add(New DateTimeAreaValue(4, New DateTime(2007, 1, 1)))
areaSeries2.Values.Add(New DateTimeAreaValue(2, New DateTime(2007, 2, 1)))
areaSeries2.Values.Add(New DateTimeAreaValue(5, New DateTime(2007, 3, 1)))
areaSeries2.Values.Add(New DateTimeAreaValue(8, New DateTime(2007, 4, 1)))
Dim areaSeries3 As DateTimeAreaSeries = New DateTimeAreaSeries("Website C")
areaSeries3.Values.Add(New DateTimeAreaValue(2, New DateTime(2007, 1, 1)))
areaSeries3.Values.Add(New DateTimeAreaValue(4, New DateTime(2007, 2, 1)))
areaSeries3.Values.Add(New DateTimeAreaValue(6, New DateTime(2007, 3, 1)))
areaSeries3.Values.Add(New DateTimeAreaValue(9, New DateTime(2007, 4, 1)))
' Add date time area series to the plot area
plotArea.Series.Add(areaSeries1)
plotArea.Series.Add(areaSeries2)
plotArea.Series.Add(areaSeries3)
' Create a title and add it to y axis
Dim title3 As Title = New Title("Viewers (in millions)")
areaSeries1.YAxis.Titles.Add(title3)
' set label format for the axis labels
areaSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
page.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time area series and a list of values to it
DateTimeAreaSeries areaSeries1 = new DateTimeAreaSeries("Website A");
areaSeries1.Values.Add(new DateTimeAreaValue(5, new DateTime(2007, 1, 1)));
areaSeries1.Values.Add(new DateTimeAreaValue(7, new DateTime(2007, 2, 1)));
areaSeries1.Values.Add(new DateTimeAreaValue(6, new DateTime(2007, 3, 1)));
areaSeries1.Values.Add(new DateTimeAreaValue(9, new DateTime(2007, 4, 1)));
DateTimeAreaSeries areaSeries2 = new DateTimeAreaSeries("Website B");
areaSeries2.Values.Add(new DateTimeAreaValue(4, new DateTime(2007, 1, 1)));
areaSeries2.Values.Add(new DateTimeAreaValue(2, new DateTime(2007, 2, 1)));
areaSeries2.Values.Add(new DateTimeAreaValue(5, new DateTime(2007, 3, 1)));
areaSeries2.Values.Add(new DateTimeAreaValue(8, new DateTime(2007, 4, 1)));
DateTimeAreaSeries areaSeries3 = new DateTimeAreaSeries("Website C");
areaSeries3.Values.Add(new DateTimeAreaValue(2, new DateTime(2007, 1, 1)));
areaSeries3.Values.Add(new DateTimeAreaValue(4, new DateTime(2007, 2, 1)));
areaSeries3.Values.Add(new DateTimeAreaValue(6, new DateTime(2007, 3, 1)));
areaSeries3.Values.Add(new DateTimeAreaValue(9, new DateTime(2007, 4, 1)));
// Add date time area series to the plot area
plotArea.Series.Add(areaSeries1);
plotArea.Series.Add(areaSeries2);
plotArea.Series.Add(areaSeries3);
// Create a title and add it to the yAxis
Title title3 = new Title("Viewers (in millions)");
areaSeries1.YAxis.Titles.Add(title3);
// Set label format for the axis labels
areaSeries1.XAxis.LabelFormat = "MMM";
//Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time bar series and add values to it
Dim MyBarSeries1 As DateTimeBarSeries = New DateTimeBarSeries("Website A")
MyBarSeries1.Values.Add(New DateTimeBarValue(5, New DateTime(2007, 1, 1)))
MyBarSeries1.Values.Add(New DateTimeBarValue(7, New DateTime(2007, 2, 1)))
MyBarSeries1.Values.Add(New DateTimeBarValue(9, New DateTime(2007, 3, 1)))
MyBarSeries1.Values.Add(New DateTimeBarValue(6, New DateTime(2007, 4, 1)))
Dim MyBarSeries2 As DateTimeBarSeries = New DateTimeBarSeries("Website B")
MyBarSeries2.Values.Add(New DateTimeBarValue(4, New DateTime(2007, 1, 1)))
MyBarSeries2.Values.Add(New DateTimeBarValue(2, New DateTime(2007, 2, 1)))
MyBarSeries2.Values.Add(New DateTimeBarValue(5, New DateTime(2007, 3, 1)))
MyBarSeries2.Values.Add(New DateTimeBarValue(8, New DateTime(2007, 4, 1)))
Dim MyBarSeries3 As DateTimeBarSeries = New DateTimeBarSeries("Website C")
MyBarSeries3.Values.Add(New DateTimeBarValue(2, New DateTime(2007, 1, 1)))
MyBarSeries3.Values.Add(New DateTimeBarValue(4, New DateTime(2007, 2, 1)))
MyBarSeries3.Values.Add(New DateTimeBarValue(6, New DateTime(2007, 3, 1)))
MyBarSeries3.Values.Add(New DateTimeBarValue(9, New DateTime(2007, 4, 1)))
' Add date time bar series to the plot area
MyPlotArea.Series.Add(MyBarSeries1)
MyPlotArea.Series.Add(MyBarSeries2)
MyPlotArea.Series.Add(MyBarSeries3)
' Create a title and add it to the xAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyBarSeries1.XAxis.Titles.Add(MyTitle3)
' set label format for the axis labels
MyBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time bar series and add values to it
DateTimeBarSeries barSeries1 = new DateTimeBarSeries("Website A");
barSeries1.Values.Add(new DateTimeBarValue(5, new DateTime(2007, 1, 1)));
barSeries1.Values.Add(new DateTimeBarValue(7, new DateTime(2007, 2, 1)));
barSeries1.Values.Add(new DateTimeBarValue(9, new DateTime(2007, 3, 1)));
barSeries1.Values.Add(new DateTimeBarValue(6, new DateTime(2007, 4, 1)));
DateTimeBarSeries barSeries2 = new DateTimeBarSeries("Website B");
barSeries2.Values.Add(new DateTimeBarValue(4, new DateTime(2007, 1, 1)));
barSeries2.Values.Add(new DateTimeBarValue(2, new DateTime(2007, 2, 1)));
barSeries2.Values.Add(new DateTimeBarValue(5, new DateTime(2007, 3, 1)));
barSeries2.Values.Add(new DateTimeBarValue(8, new DateTime(2007, 4, 1)));
DateTimeBarSeries barSeries3 = new DateTimeBarSeries("Website C");
barSeries3.Values.Add(new DateTimeBarValue(2, new DateTime(2007, 1, 1)));
barSeries3.Values.Add(new DateTimeBarValue(4, new DateTime(2007, 2, 1)));
barSeries3.Values.Add(new DateTimeBarValue(6, new DateTime(2007, 3, 1)));
barSeries3.Values.Add(new DateTimeBarValue(9, new DateTime(2007, 4, 1)));
// Add date time bar series to the plot area
plotArea.Series.Add(barSeries1);
plotArea.Series.Add(barSeries2);
plotArea.Series.Add(barSeries3);
// Create a title and add it to the xAxis
Title title3 = new Title("Viewers (in millions)");
barSeries1.XAxis.Titles.Add(title3);
// set label format for the axis labels
barSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time column series and add values to it
Dim MyColumnSeries1 As DateTimeColumnSeries = New DateTimeColumnSeries("Website A")
MyColumnSeries1.Values.Add(New DateTimeColumnValue(5, New DateTime(2007, 1, 1)))
MyColumnSeries1.Values.Add(New DateTimeColumnValue(7, New DateTime(2007, 2, 1)))
MyColumnSeries1.Values.Add(New DateTimeColumnValue(4, New DateTime(2007, 3, 1)))
MyColumnSeries1.Values.Add(New DateTimeColumnValue(3, New DateTime(2007, 4, 1)))
Dim MyColumnSeries2 As DateTimeColumnSeries = New DateTimeColumnSeries("Website B")
MyColumnSeries2.Values.Add(New DateTimeColumnValue(4, New DateTime(2007, 1, 1)))
MyColumnSeries2.Values.Add(New DateTimeColumnValue(2, New DateTime(2007, 2, 1)))
MyColumnSeries2.Values.Add(New DateTimeColumnValue(5, New DateTime(2007, 3, 1)))
MyColumnSeries2.Values.Add(New DateTimeColumnValue(8, New DateTime(2007, 4, 1)))
Dim MyColumnSeries3 As DateTimeColumnSeries = New DateTimeColumnSeries("Website C")
MyColumnSeries3.Values.Add(New DateTimeColumnValue(2, New DateTime(2007, 1, 1)))
MyColumnSeries3.Values.Add(New DateTimeColumnValue(4, New DateTime(2007, 2, 1)))
MyColumnSeries3.Values.Add(New DateTimeColumnValue(6, New DateTime(2007, 3, 1)))
MyColumnSeries3.Values.Add(New DateTimeColumnValue(9, New DateTime(2007, 4, 1)))
' Add date time column series to the plot area
MyPlotArea.Series.Add(MyColumnSeries1)
MyPlotArea.Series.Add(MyColumnSeries2)
MyPlotArea.Series.Add(MyColumnSeries3)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyColumnSeries1.YAxis.Titles.Add(MyTitle3)
' set label format for the axis labels
MyColumnSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time column series and add values to it
DateTimeColumnSeries columnSeries1 = new DateTimeColumnSeries("Website A");
columnSeries1.Values.Add(new DateTimeColumnValue(5, new DateTime(2007, 1, 1)));
columnSeries1.Values.Add(new DateTimeColumnValue(7, new DateTime(2007, 2, 1)));
columnSeries1.Values.Add(new DateTimeColumnValue(4, new DateTime(2007, 3, 1)));
columnSeries1.Values.Add(new DateTimeColumnValue(3, new DateTime(2007, 4, 1)));
DateTimeColumnSeries columnSeries2 = new DateTimeColumnSeries("Website B");
columnSeries2.Values.Add(new DateTimeColumnValue(4, new DateTime(2007, 1, 1)));
columnSeries2.Values.Add(new DateTimeColumnValue(2, new DateTime(2007, 2, 1)));
columnSeries2.Values.Add(new DateTimeColumnValue(5, new DateTime(2007, 3, 1)));
columnSeries2.Values.Add(new DateTimeColumnValue(8, new DateTime(2007, 4, 1)));
DateTimeColumnSeries columnSeries3 = new DateTimeColumnSeries("Website C");
columnSeries3.Values.Add(new DateTimeColumnValue(2, new DateTime(2007, 1, 1)));
columnSeries3.Values.Add(new DateTimeColumnValue(4, new DateTime(2007, 2, 1)));
columnSeries3.Values.Add(new DateTimeColumnValue(6, new DateTime(2007, 3, 1)));
columnSeries3.Values.Add(new DateTimeColumnValue(9, new DateTime(2007, 4, 1)));
// Add date time column series to the plot area
plotArea.Series.Add(columnSeries1);
plotArea.Series.Add(columnSeries2);
plotArea.Series.Add(columnSeries3);
// Create a title and add it to the yAxis
Title title3 = new Title("Viewers (in millions)");
columnSeries1.YAxis.Titles.Add(title3);
// set label format for the axis labels
columnSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create positions
Dim p0 As DateTime = New DateTime(2007, 1, 1)
Dim p1 As DateTime = New DateTime(2007, 2, 1)
Dim p2 As DateTime = New DateTime(2007, 3, 1)
Dim p3 As DateTime = New DateTime(2007, 4, 1)
' Create a date time line series and add values to it
Dim MyLineSeries1 As DateTimeLineSeries = New DateTimeLineSeries("Website A")
MyLineSeries1.Values.Add(New DateTimeLineValue(5, p0))
MyLineSeries1.Values.Add(New DateTimeLineValue(7, p1))
MyLineSeries1.Values.Add(New DateTimeLineValue(9, p2))
MyLineSeries1.Values.Add(New DateTimeLineValue(6, p3))
Dim MyLineSeries2 As DateTimeLineSeries = New DateTimeLineSeries("Website B")
MyLineSeries2.Values.Add(New DateTimeLineValue(4, p0))
MyLineSeries2.Values.Add(New DateTimeLineValue(2, p1))
MyLineSeries2.Values.Add(New DateTimeLineValue(5, p2))
MyLineSeries2.Values.Add(New DateTimeLineValue(8, p3))
Dim MyLineSeries3 As DateTimeLineSeries = New DateTimeLineSeries("Website C")
MyLineSeries3.Values.Add(New DateTimeLineValue(2, p0))
MyLineSeries3.Values.Add(New DateTimeLineValue(4, p1))
MyLineSeries3.Values.Add(New DateTimeLineValue(6, p2))
MyLineSeries3.Values.Add(New DateTimeLineValue(9, p3))
' Add date time line series to the plot area
MyPlotArea.Series.Add(MyLineSeries1)
MyPlotArea.Series.Add(MyLineSeries2)
MyPlotArea.Series.Add(MyLineSeries3)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyLineSeries1.YAxis.Titles.Add(MyTitle3)
' Set label format for the axis labels
MyLineSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create positions
DateTime p0 = new DateTime(2007, 1, 1);
DateTime p1 = new DateTime(2007, 2, 1);
DateTime p2 = new DateTime(2007, 3, 1);
DateTime p3 = new DateTime(2007, 4, 1);
// Create a date time line series and add values to it
DateTimeLineSeries lineSeries1 = new DateTimeLineSeries("Website A");
lineSeries1.Values.Add(new DateTimeLineValue(5, p0));
lineSeries1.Values.Add(new DateTimeLineValue(7, p1));
lineSeries1.Values.Add(new DateTimeLineValue(9, p2));
lineSeries1.Values.Add(new DateTimeLineValue(6, p3));
DateTimeLineSeries lineSeries2 = new DateTimeLineSeries("Website B");
lineSeries2.Values.Add(new DateTimeLineValue(4, p0));
lineSeries2.Values.Add(new DateTimeLineValue(2, p1));
lineSeries2.Values.Add(new DateTimeLineValue(5, p2));
lineSeries2.Values.Add(new DateTimeLineValue(8, p3));
DateTimeLineSeries lineSeries3 = new DateTimeLineSeries("Website C");
lineSeries3.Values.Add(new DateTimeLineValue(2, p0));
lineSeries3.Values.Add(new DateTimeLineValue(4, p1));
lineSeries3.Values.Add(new DateTimeLineValue(6, p2));
lineSeries3.Values.Add(new DateTimeLineValue(9, p3));
// Add date time line series to the plot area
plotArea.Series.Add(lineSeries1);
plotArea.Series.Add(lineSeries2);
plotArea.Series.Add(lineSeries3);
// Create a title and add it to the yAxis
Title title3 = new Title("Viewers (in millions)");
lineSeries1.YAxis.Titles.Add(title3);
// Set label format for the axis labels
lineSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time stacked area series element and add values to it
Dim MySeriesElement1 As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(New DateTimeStackedAreaValue(5, New DateTime(2007, 1, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedAreaValue(7, New DateTime(2007, 2, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedAreaValue(9, New DateTime(2007, 3, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedAreaValue(6, New DateTime(2007, 4, 1)))
Dim MySeriesElement2 As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(New DateTimeStackedAreaValue(4, New DateTime(2007, 1, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedAreaValue(2, New DateTime(2007, 2, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedAreaValue(5, New DateTime(2007, 3, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedAreaValue(8, New DateTime(2007, 4, 1)))
Dim MySeriesElement3 As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website C")
MySeriesElement3.Values.Add(New DateTimeStackedAreaValue(2, New DateTime(2007, 1, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedAreaValue(4, New DateTime(2007, 2, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedAreaValue(6, New DateTime(2007, 3, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedAreaValue(9, New DateTime(2007, 4, 1)))
' Create a date time stacked area series and add date time stacked area series elements to it
Dim MyStackedAreaSeries1 As DateTimeStackedAreaSeries = New DateTimeStackedAreaSeries()
MyStackedAreaSeries1.Add(MySeriesElement1)
MyStackedAreaSeries1.Add(MySeriesElement2)
MyStackedAreaSeries1.Add(MySeriesElement3)
' Add date time stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' Create a title and add it to yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyStackedAreaSeries1.YAxis.Titles.Add(MyTitle3)
' set label format for the axis labels
MyStackedAreaSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time stacked area series element and add values to it
DateTimeStackedAreaSeriesElement seriesElement1 = new DateTimeStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(new DateTimeStackedAreaValue(5, new DateTime(2007, 1, 1)));
seriesElement1.Values.Add(new DateTimeStackedAreaValue(7, new DateTime(2007, 2, 1)));
seriesElement1.Values.Add(new DateTimeStackedAreaValue(9, new DateTime(2007, 3, 1)));
seriesElement1.Values.Add(new DateTimeStackedAreaValue(6, new DateTime(2007, 4, 1)));
DateTimeStackedAreaSeriesElement seriesElement2 = new DateTimeStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(new DateTimeStackedAreaValue(4, new DateTime(2007, 1, 1)));
seriesElement2.Values.Add(new DateTimeStackedAreaValue(2, new DateTime(2007, 2, 1)));
seriesElement2.Values.Add(new DateTimeStackedAreaValue(5, new DateTime(2007, 3, 1)));
seriesElement2.Values.Add(new DateTimeStackedAreaValue(8, new DateTime(2007, 4, 1)));
DateTimeStackedAreaSeriesElement seriesElement3 = new DateTimeStackedAreaSeriesElement("Website C");
seriesElement3.Values.Add(new DateTimeStackedAreaValue(2, new DateTime(2007, 1, 1)));
seriesElement3.Values.Add(new DateTimeStackedAreaValue(4, new DateTime(2007, 2, 1)));
seriesElement3.Values.Add(new DateTimeStackedAreaValue(6, new DateTime(2007, 3, 1)));
seriesElement3.Values.Add(new DateTimeStackedAreaValue(9, new DateTime(2007, 4, 1)));
// Create a date time stacked area series and add date time stacked area series elements to it
DateTimeStackedAreaSeries stackedAreaSeries1 = new DateTimeStackedAreaSeries();
stackedAreaSeries1.Add(seriesElement1);
stackedAreaSeries1.Add(seriesElement2);
stackedAreaSeries1.Add(seriesElement3);
// Add date time stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// Create a title and add it to yAxis
Title title3 = new Title("Viewers (in millions)");
stackedAreaSeries1.YAxis.Titles.Add(title3);
// set label format for the axis labels
stackedAreaSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create percentage xAxis
Dim xAxis As PercentageXAxis = New PercentageXAxis()
' Create date time yAxis
Dim yAxis As DateTimeYAxis = New DateTimeYAxis()
' Create a date time stacked bar series element and add values to it
Dim MySeriesElement1 As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(New DateTimeStackedBarValue(5, New DateTime(2007, 1, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedBarValue(7, New DateTime(2007, 2, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedBarValue(9, New DateTime(2007, 3, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedBarValue(6, New DateTime(2007, 4, 1)))
Dim MySeriesElement2 As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(New DateTimeStackedBarValue(4, New DateTime(2007, 1, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedBarValue(2, New DateTime(2007, 2, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedBarValue(5, New DateTime(2007, 3, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedBarValue(8, New DateTime(2007, 4, 1)))
Dim MySeriesElement3 As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(New DateTimeStackedBarValue(2, New DateTime(2007, 1, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedBarValue(4, New DateTime(2007, 2, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedBarValue(6, New DateTime(2007, 3, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedBarValue(9, New DateTime(2007, 4, 1)))
' Create a date time stacked bar series and add date time stacked bar series elements to it
Dim MyStackedBarSeries1 As DateTimeStackedBarSeries = New DateTimeStackedBarSeries()
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add date time stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' set label format for the axis labels
MyStackedBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create percentage x axis
PercentageXAxis xAxis = new PercentageXAxis();
// Create date time y axis
DateTimeYAxis yAxis = new DateTimeYAxis();
// Create a date time stacked bar series element and add values to it
DateTimeStackedBarSeriesElement seriesElement1 = new DateTimeStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(new DateTimeStackedBarValue(5, new DateTime(2007, 1, 1)));
seriesElement1.Values.Add(new DateTimeStackedBarValue(7, new DateTime(2007, 2, 1)));
seriesElement1.Values.Add(new DateTimeStackedBarValue(9, new DateTime(2007, 3, 1)));
seriesElement1.Values.Add(new DateTimeStackedBarValue(6, new DateTime(2007, 4, 1)));
DateTimeStackedBarSeriesElement seriesElement2 = new DateTimeStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(new DateTimeStackedBarValue(4, new DateTime(2007, 1, 1)));
seriesElement2.Values.Add(new DateTimeStackedBarValue(2, new DateTime(2007, 2, 1)));
seriesElement2.Values.Add(new DateTimeStackedBarValue(5, new DateTime(2007, 3, 1)));
seriesElement2.Values.Add(new DateTimeStackedBarValue(8, new DateTime(2007, 4, 1)));
DateTimeStackedBarSeriesElement seriesElement3 = new DateTimeStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(new DateTimeStackedBarValue(2, new DateTime(2007, 1, 1)));
seriesElement3.Values.Add(new DateTimeStackedBarValue(4, new DateTime(2007, 2, 1)));
seriesElement3.Values.Add(new DateTimeStackedBarValue(6, new DateTime(2007, 3, 1)));
seriesElement3.Values.Add(new DateTimeStackedBarValue(9, new DateTime(2007, 4, 1)));
// Create a date time stacked bar series and add date time stacked bar series elements to it
DateTimeStackedBarSeries stackedBarSeries1 = new DateTimeStackedBarSeries();
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add date time stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// set label format for the axis labels
stackedBarSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time stacked column series element and add values to it
Dim MySeriesElement1 As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(New DateTimeStackedColumnValue(5, New DateTime(2007, 1, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedColumnValue(7, New DateTime(2007, 2, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedColumnValue(4, New DateTime(2007, 3, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedColumnValue(3, New DateTime(2007, 4, 1)))
Dim MySeriesElement2 As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(New DateTimeStackedColumnValue(4, New DateTime(2007, 1, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedColumnValue(2, New DateTime(2007, 2, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedColumnValue(5, New DateTime(2007, 3, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedColumnValue(8, New DateTime(2007, 4, 1)))
Dim MySeriesElement3 As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(New DateTimeStackedColumnValue(2, New DateTime(2007, 1, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedColumnValue(4, New DateTime(2007, 2, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedColumnValue(6, New DateTime(2007, 3, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedColumnValue(9, New DateTime(2007, 4, 1)))
' Create a date time stacked column series and add date time stacked column series elements to it
Dim MyColumnSeries1 As DateTimeStackedColumnSeries = New DateTimeStackedColumnSeries()
MyColumnSeries1.Add(MySeriesElement1)
MyColumnSeries1.Add(MySeriesElement2)
MyColumnSeries1.Add(MySeriesElement3)
' Add date time stacked column series to the plot area
MyPlotArea.Series.Add(MyColumnSeries1)
' Create a title and add it to yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyColumnSeries1.YAxis.Titles.Add(MyTitle3)
' set label format for the axis labels
MyColumnSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time stacked column series element and add values to it
DateTimeStackedColumnSeriesElement seriesElement1 = new DateTimeStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(new DateTimeStackedColumnValue(5, new DateTime(2007, 1, 1)));
seriesElement1.Values.Add(new DateTimeStackedColumnValue(7, new DateTime(2007, 2, 1)));
seriesElement1.Values.Add(new DateTimeStackedColumnValue(4, new DateTime(2007, 3, 1)));
seriesElement1.Values.Add(new DateTimeStackedColumnValue(3, new DateTime(2007, 4, 1)));
DateTimeStackedColumnSeriesElement seriesElement2 = new DateTimeStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(new DateTimeStackedColumnValue(4, new DateTime(2007, 1, 1)));
seriesElement2.Values.Add(new DateTimeStackedColumnValue(2, new DateTime(2007, 2, 1)));
seriesElement2.Values.Add(new DateTimeStackedColumnValue(5, new DateTime(2007, 3, 1)));
seriesElement2.Values.Add(new DateTimeStackedColumnValue(8, new DateTime(2007, 4, 1)));
DateTimeStackedColumnSeriesElement seriesElement3 = new DateTimeStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(new DateTimeStackedColumnValue(2, new DateTime(2007, 1, 1)));
seriesElement3.Values.Add(new DateTimeStackedColumnValue(4, new DateTime(2007, 2, 1)));
seriesElement3.Values.Add(new DateTimeStackedColumnValue(6, new DateTime(2007, 3, 1)));
seriesElement3.Values.Add(new DateTimeStackedColumnValue(9, new DateTime(2007, 4, 1)));
// Create a date time stacked column series and add date time stacked column series elements to it
DateTimeStackedColumnSeries columnSeries1 = new DateTimeStackedColumnSeries();
columnSeries1.Add(seriesElement1);
columnSeries1.Add(seriesElement2);
columnSeries1.Add(seriesElement3);
// Add date time stacked column series to the plot area
plotArea.Series.Add(columnSeries1);
// Create a title and add it to yaxis
Title title3 = new Title("Viewers (in millions)");
columnSeries1.YAxis.Titles.Add(title3);
// set label format for the axislabels
columnSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a date time xAxis
Dim xAxis As DateTimeXAxis = New DateTimeXAxis()
' Create a percentage yAxis
Dim yAxis As PercentageYAxis = New PercentageYAxis()
' Create a date time stacked line series element and add values to it
Dim MySeriesElement1 As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(New DateTimeStackedLineValue(5, New DateTime(2007, 1, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedLineValue(7, New DateTime(2007, 2, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedLineValue(9, New DateTime(2007, 3, 1)))
MySeriesElement1.Values.Add(New DateTimeStackedLineValue(6, New DateTime(2007, 4, 1)))
Dim MySeriesElement2 As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(New DateTimeStackedLineValue(4, New DateTime(2007, 1, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedLineValue(2, New DateTime(2007, 2, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedLineValue(5, New DateTime(2007, 3, 1)))
MySeriesElement2.Values.Add(New DateTimeStackedLineValue(8, New DateTime(2007, 4, 1)))
Dim MySeriesElement3 As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(New DateTimeStackedLineValue(2, New DateTime(2007, 1, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedLineValue(4, New DateTime(2007, 2, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedLineValue(6, New DateTime(2007, 3, 1)))
MySeriesElement3.Values.Add(New DateTimeStackedLineValue(9, New DateTime(2007, 4, 1)))
' Create a date time stacked line series and add date time stacked line series elements to it
Dim MyStackedLineSeries1 As DateTimeStackedLineSeries = New DateTimeStackedLineSeries()
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add date time stacked line series to the plot area
MyPlotArea.Series.Add(MyStackedLineSeries1)
' set label format for the axis labels
MyStackedLineSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a date time xAxis
DateTimeXAxis xAxis = new DateTimeXAxis();
//Create a percentage yAxis
PercentageYAxis yAxis = new PercentageYAxis();
// Create a date time stacked line series element and add values to it
DateTimeStackedLineSeriesElement seriesElement1 = new DateTimeStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(new DateTimeStackedLineValue(5, new DateTime(2007, 1, 1)));
seriesElement1.Values.Add(new DateTimeStackedLineValue(7, new DateTime(2007, 2, 1)));
seriesElement1.Values.Add(new DateTimeStackedLineValue(9, new DateTime(2007, 3, 1)));
seriesElement1.Values.Add(new DateTimeStackedLineValue(6, new DateTime(2007, 4, 1)));
DateTimeStackedLineSeriesElement seriesElement2 = new DateTimeStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(new DateTimeStackedLineValue(4, new DateTime(2007, 1, 1)));
seriesElement2.Values.Add(new DateTimeStackedLineValue(2, new DateTime(2007, 2, 1)));
seriesElement2.Values.Add(new DateTimeStackedLineValue(5, new DateTime(2007, 3, 1)));
seriesElement2.Values.Add(new DateTimeStackedLineValue(8, new DateTime(2007, 4, 1)));
DateTimeStackedLineSeriesElement seriesElement3 = new DateTimeStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(new DateTimeStackedLineValue(2, new DateTime(2007, 1, 1)));
seriesElement3.Values.Add(new DateTimeStackedLineValue(4, new DateTime(2007, 2, 1)));
seriesElement3.Values.Add(new DateTimeStackedLineValue(6, new DateTime(2007, 3, 1)));
seriesElement3.Values.Add(new DateTimeStackedLineValue(9, new DateTime(2007, 4, 1)));
// Create a date time stacked line series and add date time stacked line series elements to it
DateTimeStackedLineSeries stackedLineSeries1 = new DateTimeStackedLineSeries();
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add date time stacked line series to the plot area
plotArea.Series.Add(stackedLineSeries1);
// set label format for the axis labels
stackedLineSeries1.XAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed 100Percent stacked area series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedAreaSeriesElement = New Indexed100PercentStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(New Indexed100PercentStackedAreaValue(5, 0))
MySeriesElement1.Values.Add(New Indexed100PercentStackedAreaValue(7, 1))
MySeriesElement1.Values.Add(New Indexed100PercentStackedAreaValue(9, 2))
MySeriesElement1.Values.Add(New Indexed100PercentStackedAreaValue(6, 3))
Dim MySeriesElement2 As Indexed100PercentStackedAreaSeriesElement = New Indexed100PercentStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(New Indexed100PercentStackedAreaValue(4, 0))
MySeriesElement2.Values.Add(New Indexed100PercentStackedAreaValue(2, 1))
MySeriesElement2.Values.Add(New Indexed100PercentStackedAreaValue(5, 2))
MySeriesElement2.Values.Add(New Indexed100PercentStackedAreaValue(8, 3))
Dim MySeriesElement3 As Indexed100PercentStackedAreaSeriesElement = New Indexed100PercentStackedAreaSeriesElement("Website C")
MySeriesElement3.Values.Add(New Indexed100PercentStackedAreaValue(2, 0))
MySeriesElement3.Values.Add(New Indexed100PercentStackedAreaValue(4, 1))
MySeriesElement3.Values.Add(New Indexed100PercentStackedAreaValue(6, 2))
MySeriesElement3.Values.Add(New Indexed100PercentStackedAreaValue(9, 3))
' Create a indexed 100Percent stacked area series and add indexed 100Percent stacked area series elements to it
Dim MyStackedAreaSeries1 As Indexed100PercentStackedAreaSeries = New Indexed100PercentStackedAreaSeries()
MyStackedAreaSeries1.Add(MySeriesElement1)
MyStackedAreaSeries1.Add(MySeriesElement2)
MyStackedAreaSeries1.Add(MySeriesElement3)
' Add indexed 100Percent stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' Add Indexed x AxisLabels to the XAxis
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed 100Percent stacked area series element and add values to it
Indexed100PercentStackedAreaSeriesElement seriesElement1 = new Indexed100PercentStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(new Indexed100PercentStackedAreaValue(5, 0));
seriesElement1.Values.Add(new Indexed100PercentStackedAreaValue(7, 1));
seriesElement1.Values.Add(new Indexed100PercentStackedAreaValue(9, 2));
seriesElement1.Values.Add(new Indexed100PercentStackedAreaValue(6, 3));
Indexed100PercentStackedAreaSeriesElement seriesElement2 = new Indexed100PercentStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(new Indexed100PercentStackedAreaValue(4, 0));
seriesElement2.Values.Add(new Indexed100PercentStackedAreaValue(2, 1));
seriesElement2.Values.Add(new Indexed100PercentStackedAreaValue(5, 2));
seriesElement2.Values.Add(new Indexed100PercentStackedAreaValue(8, 3));
Indexed100PercentStackedAreaSeriesElement seriesElement3 = new Indexed100PercentStackedAreaSeriesElement("Website C");
seriesElement3.Values.Add(new Indexed100PercentStackedAreaValue(2, 0));
seriesElement3.Values.Add(new Indexed100PercentStackedAreaValue(4, 1));
seriesElement3.Values.Add(new Indexed100PercentStackedAreaValue(6, 2));
seriesElement3.Values.Add(new Indexed100PercentStackedAreaValue(9, 3));
// Create a indexed 100Percent stacked area series and add indexed 100Percent stacked area series elements to it
Indexed100PercentStackedAreaSeries stackedAreaSeries1 = new Indexed100PercentStackedAreaSeries();
stackedAreaSeries1.Add(seriesElement1);
stackedAreaSeries1.Add(seriesElement2);
stackedAreaSeries1.Add(seriesElement3);
// Add indexed 100Percent stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// Add Indexed x AxisLabels to the XAxis
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedAreaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create percentage xAxis
Dim xAxis As PercentageXAxis = New PercentageXAxis()
' Create indexed yAxis
Dim yAxis As IndexedYAxis = New IndexedYAxis()
' Create a indexed 100Percent stacked bar series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedBarSeriesElement = New Indexed100PercentStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(New Indexed100PercentStackedBarValue(5, 0))
MySeriesElement1.Values.Add(New Indexed100PercentStackedBarValue(7, 1))
MySeriesElement1.Values.Add(New Indexed100PercentStackedBarValue(9, 2))
MySeriesElement1.Values.Add(New Indexed100PercentStackedBarValue(6, 3))
Dim MySeriesElement2 As Indexed100PercentStackedBarSeriesElement = New Indexed100PercentStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(New Indexed100PercentStackedBarValue(4, 0))
MySeriesElement2.Values.Add(New Indexed100PercentStackedBarValue(2, 1))
MySeriesElement2.Values.Add(New Indexed100PercentStackedBarValue(5, 2))
MySeriesElement2.Values.Add(New Indexed100PercentStackedBarValue(8, 3))
Dim MySeriesElement3 As Indexed100PercentStackedBarSeriesElement = New Indexed100PercentStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(New Indexed100PercentStackedBarValue(2, 0))
MySeriesElement3.Values.Add(New Indexed100PercentStackedBarValue(4, 1))
MySeriesElement3.Values.Add(New Indexed100PercentStackedBarValue(6, 2))
MySeriesElement3.Values.Add(New Indexed100PercentStackedBarValue(9, 3))
' Create a indexed 100Percent stacked bar series and add indexed 100 percent stacked bar series elements to it
Dim MyStackedBarSeries1 As Indexed100PercentStackedBarSeries = New Indexed100PercentStackedBarSeries(xAxis, yAxis)
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add indexed 100Percent stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Add Indexed y AxisLabels to the YAxis
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q1", 0))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q2", 1))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q3", 2))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create percentage xAxis
PercentageXAxis xAxis = new PercentageXAxis();
// Create indexed yAxis
IndexedYAxis yAxis = new IndexedYAxis();
// Create a indexed 100Percent stacked bar series element and add values to it
Indexed100PercentStackedBarSeriesElement seriesElement1 = new Indexed100PercentStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(new Indexed100PercentStackedBarValue(5, 0));
seriesElement1.Values.Add(new Indexed100PercentStackedBarValue(7, 1));
seriesElement1.Values.Add(new Indexed100PercentStackedBarValue(9, 2));
seriesElement1.Values.Add(new Indexed100PercentStackedBarValue(6, 3));
Indexed100PercentStackedBarSeriesElement seriesElement2 = new Indexed100PercentStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(new Indexed100PercentStackedBarValue(4, 0));
seriesElement2.Values.Add(new Indexed100PercentStackedBarValue(2, 1));
seriesElement2.Values.Add(new Indexed100PercentStackedBarValue(5, 2));
seriesElement2.Values.Add(new Indexed100PercentStackedBarValue(8, 3));
Indexed100PercentStackedBarSeriesElement seriesElement3 = new Indexed100PercentStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(new Indexed100PercentStackedBarValue(2, 0));
seriesElement3.Values.Add(new Indexed100PercentStackedBarValue(4, 1));
seriesElement3.Values.Add(new Indexed100PercentStackedBarValue(6, 2));
seriesElement3.Values.Add(new Indexed100PercentStackedBarValue(9, 3));
// Create a indexed 100Percent stacked bar series and add indexed 100 percent stacked bar series elements to it
Indexed100PercentStackedBarSeries stackedBarSeries1 = new Indexed100PercentStackedBarSeries(xAxis, yAxis);
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add indexed 100Percent stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Add Indexed y AxisLabels to the YAxis
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q1", 0));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q2", 1));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q3", 2));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed 100Percent stacked column series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedColumnSeriesElement = New Indexed100PercentStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(New Indexed100PercentStackedColumnValue(5, 0))
MySeriesElement1.Values.Add(New Indexed100PercentStackedColumnValue(7, 1))
MySeriesElement1.Values.Add(New Indexed100PercentStackedColumnValue(9, 2))
MySeriesElement1.Values.Add(New Indexed100PercentStackedColumnValue(6, 3))
Dim MySeriesElement2 As Indexed100PercentStackedColumnSeriesElement = New Indexed100PercentStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(New Indexed100PercentStackedColumnValue(4, 0))
MySeriesElement2.Values.Add(New Indexed100PercentStackedColumnValue(2, 1))
MySeriesElement2.Values.Add(New Indexed100PercentStackedColumnValue(5, 2))
MySeriesElement2.Values.Add(New Indexed100PercentStackedColumnValue(8, 3))
Dim MySeriesElement3 As Indexed100PercentStackedColumnSeriesElement = New Indexed100PercentStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(New Indexed100PercentStackedColumnValue(2, 0))
MySeriesElement3.Values.Add(New Indexed100PercentStackedColumnValue(4, 1))
MySeriesElement3.Values.Add(New Indexed100PercentStackedColumnValue(6, 2))
MySeriesElement3.Values.Add(New Indexed100PercentStackedColumnValue(9, 3))
' Create a indexed 100Percent stacked column series and add indexed 100Percent stacked column series elements to it
Dim MyStackedColumnSeries1 As Indexed100PercentStackedColumnSeries = New Indexed100PercentStackedColumnSeries()
MyStackedColumnSeries1.Add(MySeriesElement1)
MyStackedColumnSeries1.Add(MySeriesElement2)
MyStackedColumnSeries1.Add(MySeriesElement3)
' Add indexed 100Percent stacked column series to the plot area
MyPlotArea.Series.Add(MyStackedColumnSeries1)
' Add indexed x AxisLabels to the XAxis
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed 100Percent stacked column series element and add values to it
Indexed100PercentStackedColumnSeriesElement seriesElement1 = new Indexed100PercentStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(new Indexed100PercentStackedColumnValue(5, 0));
seriesElement1.Values.Add(new Indexed100PercentStackedColumnValue(7, 1));
seriesElement1.Values.Add(new Indexed100PercentStackedColumnValue(9, 2));
seriesElement1.Values.Add(new Indexed100PercentStackedColumnValue(6, 3));
Indexed100PercentStackedColumnSeriesElement seriesElement2 = new Indexed100PercentStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(new Indexed100PercentStackedColumnValue(4, 0));
seriesElement2.Values.Add(new Indexed100PercentStackedColumnValue(2, 1));
seriesElement2.Values.Add(new Indexed100PercentStackedColumnValue(5, 2));
seriesElement2.Values.Add(new Indexed100PercentStackedColumnValue(8, 3));
Indexed100PercentStackedColumnSeriesElement seriesElement3 = new Indexed100PercentStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(new Indexed100PercentStackedColumnValue(2, 0));
seriesElement3.Values.Add(new Indexed100PercentStackedColumnValue(4, 1));
seriesElement3.Values.Add(new Indexed100PercentStackedColumnValue(6, 2));
seriesElement3.Values.Add(new Indexed100PercentStackedColumnValue(9, 3));
// Create a indexed 100Percent stacked column series and add indexed 100Percent stacked column series elements to it
Indexed100PercentStackedColumnSeries stackedColumnSeries1 = new Indexed100PercentStackedColumnSeries();
stackedColumnSeries1.Add(seriesElement1);
stackedColumnSeries1.Add(seriesElement2);
stackedColumnSeries1.Add(seriesElement3);
// Add indexed 100Percent stacked column series to the plot area
plotArea.Series.Add(stackedColumnSeries1);
// Add indexed x AxisLabels to the XAxis
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed 100Percent stacked line series element and add values to it
Dim MySeriesElement1 As Indexed100PercentStackedLineSeriesElement = New Indexed100PercentStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(New Indexed100PercentStackedLineValue(5, 0))
MySeriesElement1.Values.Add(New Indexed100PercentStackedLineValue(7, 1))
MySeriesElement1.Values.Add(New Indexed100PercentStackedLineValue(9, 2))
MySeriesElement1.Values.Add(New Indexed100PercentStackedLineValue(6, 3))
Dim MySeriesElement2 As Indexed100PercentStackedLineSeriesElement = New Indexed100PercentStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(New Indexed100PercentStackedLineValue(4, 0))
MySeriesElement2.Values.Add(New Indexed100PercentStackedLineValue(2, 1))
MySeriesElement2.Values.Add(New Indexed100PercentStackedLineValue(5, 2))
MySeriesElement2.Values.Add(New Indexed100PercentStackedLineValue(8, 3))
Dim MySeriesElement3 As Indexed100PercentStackedLineSeriesElement = New Indexed100PercentStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(New Indexed100PercentStackedLineValue(2, 0))
MySeriesElement3.Values.Add(New Indexed100PercentStackedLineValue(4, 1))
MySeriesElement3.Values.Add(New Indexed100PercentStackedLineValue(6, 2))
MySeriesElement3.Values.Add(New Indexed100PercentStackedLineValue(9, 3))
' Create a indexed 100Percent stacked line series and add indexed 100 percent stacked line series elements to it
Dim MyStackedLineSeries1 As Indexed100PercentStackedLineSeries = New Indexed100PercentStackedLineSeries()
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add indexed 100 percent stacked line series to the plot area
MyPlotArea.Series.Add(MyStackedLineSeries1)
' Add indexed x AxisLabels to the XAxis
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed 100Percent stacked line series element and add values to it
Indexed100PercentStackedLineSeriesElement seriesElement1 = new Indexed100PercentStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(new Indexed100PercentStackedLineValue(5, 0));
seriesElement1.Values.Add(new Indexed100PercentStackedLineValue(7, 1));
seriesElement1.Values.Add(new Indexed100PercentStackedLineValue(9, 2));
seriesElement1.Values.Add(new Indexed100PercentStackedLineValue(6, 3));
Indexed100PercentStackedLineSeriesElement seriesElement2 = new Indexed100PercentStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(new Indexed100PercentStackedLineValue(4, 0));
seriesElement2.Values.Add(new Indexed100PercentStackedLineValue(2, 1));
seriesElement2.Values.Add(new Indexed100PercentStackedLineValue(5, 2));
seriesElement2.Values.Add(new Indexed100PercentStackedLineValue(8, 3));
Indexed100PercentStackedLineSeriesElement seriesElement3 = new Indexed100PercentStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(new Indexed100PercentStackedLineValue(2, 0));
seriesElement3.Values.Add(new Indexed100PercentStackedLineValue(4, 1));
seriesElement3.Values.Add(new Indexed100PercentStackedLineValue(6, 2));
seriesElement3.Values.Add(new Indexed100PercentStackedLineValue(9, 3));
// Create a indexed 100Percent stacked line series and add indexed 100 percent stacked line series elements to it
Indexed100PercentStackedLineSeries stackedLineSeries1 = new Indexed100PercentStackedLineSeries();
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add indexed 100 percent stacked line series to the plot area
plotArea.Series.Add(stackedLineSeries1);
// Add indexed x AxisLabels to the XAxis
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed xAxis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Create a numeric yAxis
Dim yAxis As NumericYAxis = New NumericYAxis()
' Create a indexed area series and add values to it
Dim MyAreaSeries1 As IndexedAreaSeries = New IndexedAreaSeries("Website A", xAxis, yAxis)
MyAreaSeries1.Values.Add(New IndexedAreaValue(5, 0))
MyAreaSeries1.Values.Add(New IndexedAreaValue(7, 1))
MyAreaSeries1.Values.Add(New IndexedAreaValue(9, 2))
MyAreaSeries1.Values.Add(New IndexedAreaValue(6, 3))
Dim MyAreaSeries2 As IndexedAreaSeries = New IndexedAreaSeries("Website B", xAxis, yAxis)
MyAreaSeries2.Values.Add(New IndexedAreaValue(4, 0))
MyAreaSeries2.Values.Add(New IndexedAreaValue(2, 1))
MyAreaSeries2.Values.Add(New IndexedAreaValue(5, 2))
MyAreaSeries2.Values.Add(New IndexedAreaValue(8, 3))
Dim MyAreaSeries3 As IndexedAreaSeries = New IndexedAreaSeries("Website C", xAxis, yAxis)
MyAreaSeries3.Values.Add(New IndexedAreaValue(2, 0))
MyAreaSeries3.Values.Add(New IndexedAreaValue(4, 1))
MyAreaSeries3.Values.Add(New IndexedAreaValue(6, 2))
MyAreaSeries3.Values.Add(New IndexedAreaValue(9, 3))
' Add indexed area series to the plot area
MyPlotArea.Series.Add(MyAreaSeries1)
MyPlotArea.Series.Add(MyAreaSeries2)
MyPlotArea.Series.Add(MyAreaSeries3)
' Create a title and add it to the YAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
yAxis.Titles.Add(MyTitle3)
' Add Indexed x AxisLabels to the XAxis
MyAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyAreaSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed xAxis
IndexedXAxis xAxis = new IndexedXAxis();
// Create a numeric yAxis
NumericYAxis yAxis = new NumericYAxis();
// Create a indexed area series and add values to it
IndexedAreaSeries areaSeries1 = new IndexedAreaSeries("Website A", xAxis, yAxis);
areaSeries1.Values.Add(new IndexedAreaValue(5, 0));
areaSeries1.Values.Add(new IndexedAreaValue(7, 1));
areaSeries1.Values.Add(new IndexedAreaValue(9, 2));
areaSeries1.Values.Add(new IndexedAreaValue(6, 3));
IndexedAreaSeries areaSeries2 = new IndexedAreaSeries("Website B", xAxis, yAxis);
areaSeries2.Values.Add(new IndexedAreaValue(4, 0));
areaSeries2.Values.Add(new IndexedAreaValue(2, 1));
areaSeries2.Values.Add(new IndexedAreaValue(5, 2));
areaSeries2.Values.Add(new IndexedAreaValue(8, 3));
IndexedAreaSeries areaSeries3 = new IndexedAreaSeries("Website C", xAxis, yAxis);
areaSeries3.Values.Add(new IndexedAreaValue(2, 0));
areaSeries3.Values.Add(new IndexedAreaValue(4, 1));
areaSeries3.Values.Add(new IndexedAreaValue(6, 2));
areaSeries3.Values.Add(new IndexedAreaValue(9, 3));
// Add indexed area series to the plot area
plotArea.Series.Add(areaSeries1);
plotArea.Series.Add(areaSeries2);
plotArea.Series.Add(areaSeries3);
// Create a title and add it to the YAxis
Title lTitle = new Title("Visitors (in millions)");
yAxis.Titles.Add(lTitle);
// Add indexed x AxisLabels to the XAxis
areaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
areaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
areaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
areaSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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()
' Create a chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a numeric x axis
Dim xAxis As NumericXAxis = New NumericXAxis()
' Create a indexed y axis
Dim yAxis As IndexedYAxis = New IndexedYAxis()
' Create a indexed bar series and add values to it
Dim MyBarSeries1 As IndexedBarSeries = New IndexedBarSeries("Website A", xAxis, yAxis)
MyBarSeries1.Values.Add(New IndexedBarValue(5, 0))
MyBarSeries1.Values.Add(New IndexedBarValue(7, 1))
MyBarSeries1.Values.Add(New IndexedBarValue(9, 2))
MyBarSeries1.Values.Add(New IndexedBarValue(6, 3))
Dim MyBarSeries2 As IndexedBarSeries = New IndexedBarSeries("Website B", xAxis, yAxis)
MyBarSeries2.Values.Add(New IndexedBarValue(4, 0))
MyBarSeries2.Values.Add(New IndexedBarValue(2, 1))
MyBarSeries2.Values.Add(New IndexedBarValue(5, 2))
MyBarSeries2.Values.Add(New IndexedBarValue(8, 3))
Dim MyBarSeries3 As IndexedBarSeries = New IndexedBarSeries("Website C", xAxis, yAxis)
MyBarSeries3.Values.Add(New IndexedBarValue(2, 0))
MyBarSeries3.Values.Add(New IndexedBarValue(4, 1))
MyBarSeries3.Values.Add(New IndexedBarValue(6, 2))
MyBarSeries3.Values.Add(New IndexedBarValue(8, 3))
' Add indexed bar series to the plot area
MyPlotArea.Series.Add(MyBarSeries1)
MyPlotArea.Series.Add(MyBarSeries2)
MyPlotArea.Series.Add(MyBarSeries3)
' Create a title and add it to the xAxis
Dim MyTitle As Title = New Title("Visitors (in millions)")
MyBarSeries1.XAxis.Titles.Add(MyTitle)
' Add Indexed y AxisLabels to the yAxis
MyBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q1", 0))
MyBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q2", 1))
MyBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q3", 2))
MyBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
MyDocument.Pages.Add(MyPage)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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();
// Create a chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a numeric x axis
NumericXAxis xAxis = new NumericXAxis();
// Create a indexed y axis
IndexedYAxis yAxis = new IndexedYAxis();
// Create a indexed bar series and add values to it
IndexedBarSeries barSeries1 = new IndexedBarSeries("Website A", xAxis, yAxis);
barSeries1.Values.Add(new IndexedBarValue(5, 0));
barSeries1.Values.Add(new IndexedBarValue(7, 1));
barSeries1.Values.Add(new IndexedBarValue(9, 2));
barSeries1.Values.Add(new IndexedBarValue(6, 3));
IndexedBarSeries barSeries2 = new IndexedBarSeries("Website B", xAxis, yAxis);
barSeries2.Values.Add(new IndexedBarValue(4, 0));
barSeries2.Values.Add(new IndexedBarValue(2, 1));
barSeries2.Values.Add(new IndexedBarValue(5, 2));
barSeries2.Values.Add(new IndexedBarValue(8, 3));
IndexedBarSeries barSeries3 = new IndexedBarSeries("Website C", xAxis, yAxis);
barSeries3.Values.Add(new IndexedBarValue(2, 0));
barSeries3.Values.Add(new IndexedBarValue(4, 1));
barSeries3.Values.Add(new IndexedBarValue(6, 2));
barSeries3.Values.Add(new IndexedBarValue(8, 3));
// Add indexed bar series to the plot area
plotArea.Series.Add(barSeries1);
plotArea.Series.Add(barSeries2);
plotArea.Series.Add(barSeries3);
// Create a title and add it to the xAxis
Title lTitle = new Title("Visitors (in millions)");
barSeries1.XAxis.Titles.Add(lTitle);
// Add Indexed y AxisLabels to the YAxis
barSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q1", 0));
barSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q2", 1));
barSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q3", 2));
barSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
document.Pages.Add(page);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
Imports ceTe.DynamicPDF.PageElements.Charting.Values
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed column series and add values to it
Dim MyColumnSeries1 As IndexedColumnSeries = New IndexedColumnSeries("Website A")
MyColumnSeries1.Values.Add(New IndexedColumnValue(5, 0))
MyColumnSeries1.Values.Add(New IndexedColumnValue(7, 1))
MyColumnSeries1.Values.Add(New IndexedColumnValue(9, 2))
MyColumnSeries1.Values.Add(New IndexedColumnValue(6, 3))
Dim MyColumnSeries2 As IndexedColumnSeries = New IndexedColumnSeries("Website B")
MyColumnSeries2.Values.Add(New IndexedColumnValue(4, 0))
MyColumnSeries2.Values.Add(New IndexedColumnValue(2, 1))
MyColumnSeries2.Values.Add(New IndexedColumnValue(5, 2))
MyColumnSeries2.Values.Add(New IndexedColumnValue(8, 3))
Dim MyColumnSeries3 As IndexedColumnSeries = New IndexedColumnSeries("Website C")
MyColumnSeries3.Values.Add(New IndexedColumnValue(2, 0))
MyColumnSeries3.Values.Add(New IndexedColumnValue(4, 1))
MyColumnSeries3.Values.Add(New IndexedColumnValue(6, 2))
MyColumnSeries3.Values.Add(New IndexedColumnValue(8, 3))
' Add indexed column series to the plot area
MyPlotArea.Series.Add(MyColumnSeries1)
MyPlotArea.Series.Add(MyColumnSeries2)
MyPlotArea.Series.Add(MyColumnSeries3)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyColumnSeries1.YAxis.Titles.Add(MyTitle3)
' Add Indexed X AxisLabels to the XAxis
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
using ceTe.DynamicPDF.PageElements.Charting.Values;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed column series and add values to it
IndexedColumnSeries columnSeries1 = new IndexedColumnSeries("Website A");
columnSeries1.Values.Add(new IndexedColumnValue(5, 0));
columnSeries1.Values.Add(new IndexedColumnValue(7, 1));
columnSeries1.Values.Add(new IndexedColumnValue(9, 2));
columnSeries1.Values.Add(new IndexedColumnValue(6, 3));
IndexedColumnSeries columnSeries2 = new IndexedColumnSeries("Website B");
columnSeries2.Values.Add(new IndexedColumnValue(4, 0));
columnSeries2.Values.Add(new IndexedColumnValue(2, 1));
columnSeries2.Values.Add(new IndexedColumnValue(5, 2));
columnSeries2.Values.Add(new IndexedColumnValue(8, 3));
IndexedColumnSeries columnSeries3 = new IndexedColumnSeries("Website C");
columnSeries3.Values.Add(new IndexedColumnValue(2, 0));
columnSeries3.Values.Add(new IndexedColumnValue(4, 1));
columnSeries3.Values.Add(new IndexedColumnValue(6, 2));
columnSeries3.Values.Add(new IndexedColumnValue(8, 3));
// Add indexed column series to the plot area
plotArea.Series.Add(columnSeries1);
plotArea.Series.Add(columnSeries2);
plotArea.Series.Add(columnSeries3);
// Create a title and add it to the yAxis
Title title3 = new Title("Visitors (in millions)");
columnSeries1.YAxis.Titles.Add(title3);
// Add Indexed x AxisLabels to the XAxis
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed x Axis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Create a numeric y Axis
Dim yAxis As NumericYAxis = New NumericYAxis()
' Create a indexed line series and add values to it
Dim MyLineSeries1 As IndexedLineSeries = New IndexedLineSeries("Website A", xAxis, yAxis)
MyLineSeries1.Values.Add(New IndexedLineValue(5, 0))
MyLineSeries1.Values.Add(New IndexedLineValue(7, 1))
MyLineSeries1.Values.Add(New IndexedLineValue(9, 2))
MyLineSeries1.Values.Add(New IndexedLineValue(6, 3))
Dim MyLineSeries2 As IndexedLineSeries = New IndexedLineSeries("Website B", xAxis, yAxis)
MyLineSeries2.Values.Add(New IndexedLineValue(4, 0))
MyLineSeries2.Values.Add(New IndexedLineValue(2, 1))
MyLineSeries2.Values.Add(New IndexedLineValue(5, 2))
MyLineSeries2.Values.Add(New IndexedLineValue(8, 3))
Dim MyLineSeries3 As IndexedLineSeries = New IndexedLineSeries("Website C", xAxis, yAxis)
MyLineSeries3.Values.Add(New IndexedLineValue(2, 0))
MyLineSeries3.Values.Add(New IndexedLineValue(4, 1))
MyLineSeries3.Values.Add(New IndexedLineValue(6, 2))
MyLineSeries3.Values.Add(New IndexedLineValue(9, 3))
' Add indexed line series to the plot Area
MyPlotArea.Series.Add(MyLineSeries1)
MyPlotArea.Series.Add(MyLineSeries2)
MyPlotArea.Series.Add(MyLineSeries3)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyLineSeries1.YAxis.Titles.Add(MyTitle3)
' Add indexed x AxisLabels to the XAxis
MyLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed x Axis
IndexedXAxis xAxis = new IndexedXAxis();
// Create a numeric y Axis
NumericYAxis yAxis = new NumericYAxis();
// Create a indexed line series and add values to it
IndexedLineSeries lineSeries1 = new IndexedLineSeries("Website A", xAxis, yAxis);
lineSeries1.Values.Add(new IndexedLineValue(5, 0));
lineSeries1.Values.Add(new IndexedLineValue(7, 1));
lineSeries1.Values.Add(new IndexedLineValue(9, 2));
lineSeries1.Values.Add(new IndexedLineValue(6, 3));
IndexedLineSeries lineSeries2 = new IndexedLineSeries("Website B", xAxis, yAxis);
lineSeries2.Values.Add(new IndexedLineValue(4, 0));
lineSeries2.Values.Add(new IndexedLineValue(2, 1));
lineSeries2.Values.Add(new IndexedLineValue(5, 2));
lineSeries2.Values.Add(new IndexedLineValue(8, 3));
IndexedLineSeries lineSeries3 = new IndexedLineSeries("Website C", xAxis, yAxis);
lineSeries3.Values.Add(new IndexedLineValue(2, 0));
lineSeries3.Values.Add(new IndexedLineValue(4, 1));
lineSeries3.Values.Add(new IndexedLineValue(6, 2));
lineSeries3.Values.Add(new IndexedLineValue(9, 3));
// Add indexed line series to the plot Area
plotArea.Series.Add(lineSeries1);
plotArea.Series.Add(lineSeries2);
plotArea.Series.Add(lineSeries3);
// Create a title and add it to the yAxis
Title lTitle = new Title("Visitors (in millions)");
lineSeries1.YAxis.Titles.Add(lTitle);
// Add indexed x AxisLabels to the XAxis
lineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
lineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
lineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
lineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed x axis
Dim xAxis As IndexedXAxis = New IndexedXAxis()
' Add indexed x AxisLabels to the XAxis
xAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
xAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
xAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
xAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Create a numeric y axis
Dim yAxis As NumericYAxis = New NumericYAxis()
' Create a indexed stacked area series element and add values to it
Dim MySeriesElement1 As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(New IndexedStackedAreaValue(5, 0))
MySeriesElement1.Values.Add(New IndexedStackedAreaValue(7, 1))
MySeriesElement1.Values.Add(New IndexedStackedAreaValue(9, 2))
MySeriesElement1.Values.Add(New IndexedStackedAreaValue(6, 3))
Dim MySeriesElement2 As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(New IndexedStackedAreaValue(4, 0))
MySeriesElement2.Values.Add(New IndexedStackedAreaValue(2, 1))
MySeriesElement2.Values.Add(New IndexedStackedAreaValue(5, 2))
MySeriesElement2.Values.Add(New IndexedStackedAreaValue(8, 3))
Dim MySeriesElement3 As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website C")
MySeriesElement3.Values.Add(New IndexedStackedAreaValue(2, 0))
MySeriesElement3.Values.Add(New IndexedStackedAreaValue(4, 1))
MySeriesElement3.Values.Add(New IndexedStackedAreaValue(6, 2))
MySeriesElement3.Values.Add(New IndexedStackedAreaValue(9, 3))
' Create a indexed stacked area series and add indexed stacked area series elements to it
Dim MyStackedAreaSeries1 As IndexedStackedAreaSeries = New IndexedStackedAreaSeries(xAxis, yAxis)
MyStackedAreaSeries1.Add(MySeriesElement1)
MyStackedAreaSeries1.Add(MySeriesElement2)
MyStackedAreaSeries1.Add(MySeriesElement3)
' Add indexed stacked area series to the plot area
MyPlotArea.Series.Add(MyStackedAreaSeries1)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyStackedAreaSeries1.YAxis.Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed x axis
IndexedXAxis xAxis = new IndexedXAxis();
// Add indexed x AxisLabels to the XAxis
xAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
xAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
xAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
xAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Create a numeric y axis
NumericYAxis yAxis = new NumericYAxis();
// Create a indexed stacked area series element and add values to it
IndexedStackedAreaSeriesElement seriesElement1 = new IndexedStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(new IndexedStackedAreaValue(5, 0));
seriesElement1.Values.Add(new IndexedStackedAreaValue(7, 1));
seriesElement1.Values.Add(new IndexedStackedAreaValue(9, 2));
seriesElement1.Values.Add(new IndexedStackedAreaValue(6, 3));
IndexedStackedAreaSeriesElement seriesElement2 = new IndexedStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(new IndexedStackedAreaValue(4, 0));
seriesElement2.Values.Add(new IndexedStackedAreaValue(2, 1));
seriesElement2.Values.Add(new IndexedStackedAreaValue(5, 2));
seriesElement2.Values.Add(new IndexedStackedAreaValue(8, 3));
IndexedStackedAreaSeriesElement seriesElement3 = new IndexedStackedAreaSeriesElement("Website C");
seriesElement3.Values.Add(new IndexedStackedAreaValue(2, 0));
seriesElement3.Values.Add(new IndexedStackedAreaValue(4, 1));
seriesElement3.Values.Add(new IndexedStackedAreaValue(6, 2));
seriesElement3.Values.Add(new IndexedStackedAreaValue(9, 3));
// Create a indexed stacked area series and add indexed stacked area series elements to it
IndexedStackedAreaSeries stackedAreaSeries1 = new IndexedStackedAreaSeries(xAxis, yAxis);
stackedAreaSeries1.Add(seriesElement1);
stackedAreaSeries1.Add(seriesElement2);
stackedAreaSeries1.Add(seriesElement3);
// Add indexed stacked area series to the plot area
plotArea.Series.Add(stackedAreaSeries1);
// Create a title and add it to the yAxis
Title lTitle = new Title("Visitors (in millions)");
stackedAreaSeries1.YAxis.Titles.Add(lTitle);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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()
' Create a chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a numeric x axis
Dim xAxis As NumericXAxis = New NumericXAxis()
' Create a indexed y axis
Dim yAxis As IndexedYAxis = New IndexedYAxis()
' Create a indexed stacked bar series element and add values to it
Dim MySeriesElement1 As IndexedStackedBarSeriesElement = New IndexedStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(New IndexedStackedBarValue(5, 0))
MySeriesElement1.Values.Add(New IndexedStackedBarValue(7, 1))
MySeriesElement1.Values.Add(New IndexedStackedBarValue(9, 2))
MySeriesElement1.Values.Add(New IndexedStackedBarValue(6, 3))
Dim MySeriesElement2 As IndexedStackedBarSeriesElement = New IndexedStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(New IndexedStackedBarValue(4, 0))
MySeriesElement2.Values.Add(New IndexedStackedBarValue(2, 1))
MySeriesElement2.Values.Add(New IndexedStackedBarValue(5, 2))
MySeriesElement2.Values.Add(New IndexedStackedBarValue(8, 3))
Dim MySeriesElement3 As IndexedStackedBarSeriesElement = New IndexedStackedBarSeriesElement("Website C")
MySeriesElement3.Values.Add(New IndexedStackedBarValue(2, 0))
MySeriesElement3.Values.Add(New IndexedStackedBarValue(4, 1))
MySeriesElement3.Values.Add(New IndexedStackedBarValue(6, 2))
MySeriesElement3.Values.Add(New IndexedStackedBarValue(8, 3))
' Create a indexed stacked bar series and add indexed stacked bar series elements to it
Dim MyStackedBarSeries1 As IndexedStackedBarSeries = New IndexedStackedBarSeries(xAxis, yAxis)
MyStackedBarSeries1.Add(MySeriesElement1)
MyStackedBarSeries1.Add(MySeriesElement2)
MyStackedBarSeries1.Add(MySeriesElement3)
' Add indexed stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Create a title and add it to the XAxis
Dim MyTitle As Title = New Title("Visitors (in millions)")
MyStackedBarSeries1.XAxis.Titles.Add(MyTitle)
' Add Indexed y AxisLabels to the YAxis
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q1", 0))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q2", 1))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q3", 2))
MyStackedBarSeries1.YAxis.Labels.Add(New IndexedYAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
MyDocument.Pages.Add(MyPage)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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();
// Create a chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a numeric x axis
NumericXAxis xAxis = new NumericXAxis();
// Create a indexed y axis
IndexedYAxis yAxis = new IndexedYAxis();
// Create a indexed stacked bar series elements and add values to it
IndexedStackedBarSeriesElement seriesElement1 = new IndexedStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(new IndexedStackedBarValue(5, 0));
seriesElement1.Values.Add(new IndexedStackedBarValue(7, 1));
seriesElement1.Values.Add(new IndexedStackedBarValue(9, 2));
seriesElement1.Values.Add(new IndexedStackedBarValue(6, 3));
IndexedStackedBarSeriesElement seriesElement2 = new IndexedStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(new IndexedStackedBarValue(4, 0));
seriesElement2.Values.Add(new IndexedStackedBarValue(2, 1));
seriesElement2.Values.Add(new IndexedStackedBarValue(5, 2));
seriesElement2.Values.Add(new IndexedStackedBarValue(8, 3));
IndexedStackedBarSeriesElement seriesElement3 = new IndexedStackedBarSeriesElement("Website C");
seriesElement3.Values.Add(new IndexedStackedBarValue(2, 0));
seriesElement3.Values.Add(new IndexedStackedBarValue(4, 1));
seriesElement3.Values.Add(new IndexedStackedBarValue(6, 2));
seriesElement3.Values.Add(new IndexedStackedBarValue(8, 3));
// Create a indexed stacked bar series and add indexed stacked bar series elements to it
IndexedStackedBarSeries stackedBarSeries1 = new IndexedStackedBarSeries(xAxis, yAxis);
stackedBarSeries1.Add(seriesElement1);
stackedBarSeries1.Add(seriesElement2);
stackedBarSeries1.Add(seriesElement3);
// Add indexed stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Create a title and add it to the XAxis
Title lTitle = new Title("Visitors (in millions)");
stackedBarSeries1.XAxis.Titles.Add(lTitle);
// Add indexed y AxisLabels to the YAxis
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q1", 0));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q2", 1));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q3", 2));
stackedBarSeries1.YAxis.Labels.Add(new IndexedYAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
document.Pages.Add(page);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed stacked column series element and add values to it
Dim MySeriesElement1 As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(New IndexedStackedColumnValue(5, 0))
MySeriesElement1.Values.Add(New IndexedStackedColumnValue(7, 1))
MySeriesElement1.Values.Add(New IndexedStackedColumnValue(9, 2))
MySeriesElement1.Values.Add(New IndexedStackedColumnValue(6, 3))
Dim MySeriesElement2 As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(New IndexedStackedColumnValue(4, 0))
MySeriesElement2.Values.Add(New IndexedStackedColumnValue(2, 1))
MySeriesElement2.Values.Add(New IndexedStackedColumnValue(5, 2))
MySeriesElement2.Values.Add(New IndexedStackedColumnValue(8, 3))
Dim MySeriesElement3 As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website C")
MySeriesElement3.Values.Add(New IndexedStackedColumnValue(2, 0))
MySeriesElement3.Values.Add(New IndexedStackedColumnValue(4, 1))
MySeriesElement3.Values.Add(New IndexedStackedColumnValue(6, 2))
MySeriesElement3.Values.Add(New IndexedStackedColumnValue(8, 3))
' Create a indexed stacked column series and add indexed stacked column series elements to it
Dim MyStackedColumnSeries1 As IndexedStackedColumnSeries = New IndexedStackedColumnSeries()
MyStackedColumnSeries1.Add(MySeriesElement1)
MyStackedColumnSeries1.Add(MySeriesElement2)
MyStackedColumnSeries1.Add(MySeriesElement3)
' Add indexed stacked column series to the plot area
MyPlotArea.Series.Add(MyStackedColumnSeries1)
' Create a title and add it to the yAxis
Dim lTitle As Title = New Title("Visitors (in millions)")
MyStackedColumnSeries1.YAxis.Titles.Add(lTitle)
' Add Indexed x AxisLabels to the XAxis
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed stacked column series element and add values to it
IndexedStackedColumnSeriesElement seriesElement1 = new IndexedStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(new IndexedStackedColumnValue(5, 0));
seriesElement1.Values.Add(new IndexedStackedColumnValue(7, 1));
seriesElement1.Values.Add(new IndexedStackedColumnValue(9, 2));
seriesElement1.Values.Add(new IndexedStackedColumnValue(6, 3));
IndexedStackedColumnSeriesElement seriesElement2 = new IndexedStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(new IndexedStackedColumnValue(4, 0));
seriesElement2.Values.Add(new IndexedStackedColumnValue(2, 1));
seriesElement2.Values.Add(new IndexedStackedColumnValue(5, 2));
seriesElement2.Values.Add(new IndexedStackedColumnValue(8, 3));
IndexedStackedColumnSeriesElement seriesElement3 = new IndexedStackedColumnSeriesElement("Website C");
seriesElement3.Values.Add(new IndexedStackedColumnValue(2, 0));
seriesElement3.Values.Add(new IndexedStackedColumnValue(4, 1));
seriesElement3.Values.Add(new IndexedStackedColumnValue(6, 2));
seriesElement3.Values.Add(new IndexedStackedColumnValue(8, 3));
// Create a indexed stacked column series and add indexed stacked column series elements to it
IndexedStackedColumnSeries stackedColumnSeries1 = new IndexedStackedColumnSeries();
stackedColumnSeries1.Add(seriesElement1);
stackedColumnSeries1.Add(seriesElement2);
stackedColumnSeries1.Add(seriesElement3);
// Add indexed stacked column series to the plot area
plotArea.Series.Add(stackedColumnSeries1);
// Create a title and add it to the yAxis
Title lTitle = new Title("Visitors (in millions)");
stackedColumnSeries1.YAxis.Titles.Add(lTitle);
// Add indexed x AxisLabels to the XAxis
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedColumnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
Imports ceTe.DynamicPDF.PageElements.Charting.Values
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed stacked line series element and add values to it
Dim MySeriesElement1 As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(New IndexedStackedLineValue(5, 0))
MySeriesElement1.Values.Add(New IndexedStackedLineValue(7, 1))
MySeriesElement1.Values.Add(New IndexedStackedLineValue(9, 2))
MySeriesElement1.Values.Add(New IndexedStackedLineValue(6, 3))
Dim MySeriesElement2 As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(New IndexedStackedLineValue(4, 0))
MySeriesElement2.Values.Add(New IndexedStackedLineValue(2, 1))
MySeriesElement2.Values.Add(New IndexedStackedLineValue(5, 2))
MySeriesElement2.Values.Add(New IndexedStackedLineValue(8, 3))
Dim MySeriesElement3 As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website C")
MySeriesElement3.Values.Add(New IndexedStackedLineValue(2, 0))
MySeriesElement3.Values.Add(New IndexedStackedLineValue(4, 1))
MySeriesElement3.Values.Add(New IndexedStackedLineValue(6, 2))
MySeriesElement3.Values.Add(New IndexedStackedLineValue(9, 3))
' Create a indexed stacked line series and add indexed stacked line series elements to it
Dim MyStackedLineSeries1 As IndexedStackedLineSeries = New IndexedStackedLineSeries()
MyStackedLineSeries1.Add(MySeriesElement1)
MyStackedLineSeries1.Add(MySeriesElement2)
MyStackedLineSeries1.Add(MySeriesElement3)
' Add indexed stacked line series to the plot area
MyPlotArea.Series.Add(MyStackedLineSeries1)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyStackedLineSeries1.YAxis.Titles.Add(MyTitle3)
' Add Indexed x AxisLabels to the XAxis
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyStackedLineSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
using ceTe.DynamicPDF.PageElements.Charting.Values;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed stacked line series element and add values to it
IndexedStackedLineSeriesElement seriesElement1 = new IndexedStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(new IndexedStackedLineValue(5, 0));
seriesElement1.Values.Add(new IndexedStackedLineValue(7, 1));
seriesElement1.Values.Add(new IndexedStackedLineValue(9, 2));
seriesElement1.Values.Add(new IndexedStackedLineValue(6, 3));
IndexedStackedLineSeriesElement seriesElement2 = new IndexedStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(new IndexedStackedLineValue(4, 0));
seriesElement2.Values.Add(new IndexedStackedLineValue(2, 1));
seriesElement2.Values.Add(new IndexedStackedLineValue(5, 2));
seriesElement2.Values.Add(new IndexedStackedLineValue(8, 3));
IndexedStackedLineSeriesElement seriesElement3 = new IndexedStackedLineSeriesElement("Website C");
seriesElement3.Values.Add(new IndexedStackedLineValue(2, 0));
seriesElement3.Values.Add(new IndexedStackedLineValue(4, 1));
seriesElement3.Values.Add(new IndexedStackedLineValue(6, 2));
seriesElement3.Values.Add(new IndexedStackedLineValue(9, 3));
// Create a indexed stacked line series and add indexed stacked line series elements to it
IndexedStackedLineSeries stackedLineSeries1 = new IndexedStackedLineSeries();
stackedLineSeries1.Add(seriesElement1);
stackedLineSeries1.Add(seriesElement2);
stackedLineSeries1.Add(seriesElement3);
// Add indexed stacked line series to the plot area
plotArea.Series.Add(stackedLineSeries1);
// Create a title and add it to the yAxis
Title title3 = new Title("Visitors (in millions)");
stackedLineSeries1.YAxis.Titles.Add(title3);
// Add Indexed x AxisLabels to the XAxis
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
stackedLineSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 450, 230)
' Get the default plot Area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create a Header title and add it to the chart
Dim MyTitle1 As Title = New Title("Player Height and Weight")
MyChart.HeaderTitles.Add(MyTitle1)
' Create xyScatter series and add values to it
Dim MyXyScatterSeries1 As XYScatterSeries = New XYScatterSeries("Team A")
MyXyScatterSeries1.Values.Add(New XYScatterValue(112, 55))
MyXyScatterSeries1.Values.Add(New XYScatterValue(125, 60))
MyXyScatterSeries1.Values.Add(New XYScatterValue(138, 68))
MyXyScatterSeries1.Values.Add(New XYScatterValue(150, 73))
MyXyScatterSeries1.Values.Add(New XYScatterValue(172, 82))
Dim MyXyScatterSeries2 As XYScatterSeries = New XYScatterSeries("Team B")
MyXyScatterSeries2.Values.Add(New XYScatterValue(110, 54))
MyXyScatterSeries2.Values.Add(New XYScatterValue(128, 62))
MyXyScatterSeries2.Values.Add(New XYScatterValue(140, 70))
MyXyScatterSeries2.Values.Add(New XYScatterValue(155, 75))
MyXyScatterSeries2.Values.Add(New XYScatterValue(170, 80))
' Add xyScatter series to the plot Area
MyPlotArea.Series.Add(MyXyScatterSeries1)
MyPlotArea.Series.Add(MyXyScatterSeries2)
' Create axis titles and add it to the axis
Dim MyTitle2 As Title = New Title("Height (Inches)")
Dim MyTitle3 As Title = New Title("Weight (Pounds)")
MyXyScatterSeries1.YAxis.Titles.Add(MyTitle2)
MyXyScatterSeries1.XAxis.Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 450, 230);
// Get the default plot Area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create a Header title and add it to the chart
Title tTitle = new Title("Player Height and Weight");
chart.HeaderTitles.Add(tTitle);
// Create xyScatter series and add values to it
XYScatterSeries xyScatterSeries1 = new XYScatterSeries("Team A");
xyScatterSeries1.Values.Add(new XYScatterValue(112, 55));
xyScatterSeries1.Values.Add(new XYScatterValue(125, 60));
xyScatterSeries1.Values.Add(new XYScatterValue(138, 68));
xyScatterSeries1.Values.Add(new XYScatterValue(150, 73));
xyScatterSeries1.Values.Add(new XYScatterValue(172, 82));
XYScatterSeries xyScatterSeries2 = new XYScatterSeries("Team B");
xyScatterSeries2.Values.Add(new XYScatterValue(110, 54));
xyScatterSeries2.Values.Add(new XYScatterValue(128, 62));
xyScatterSeries2.Values.Add(new XYScatterValue(140, 70));
xyScatterSeries2.Values.Add(new XYScatterValue(155, 75));
xyScatterSeries2.Values.Add(new XYScatterValue(170, 80));
// Add xyScatter series to the plot Area
plotArea.Series.Add(xyScatterSeries1);
plotArea.Series.Add(xyScatterSeries2);
// Create axis titles and add it to the axis
Title title1 = new Title("Height (Inches)");
Title title2 = new Title("Weight (Pounds)");
xyScatterSeries1.YAxis.Titles.Add(title1);
xyScatterSeries1.XAxis.Titles.Add(title2);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create percentageXAxis and add labels to it
Dim xAxis As PercentageXAxis = New PercentageXAxis()
xAxis.Labels.Add(New PercentageXAxisLabel("0%", 0))
xAxis.Labels.Add(New PercentageXAxisLabel("20%", 20))
xAxis.Labels.Add(New PercentageXAxisLabel("40%", 40))
xAxis.Labels.Add(New PercentageXAxisLabel("60%", 60))
xAxis.Labels.Add(New PercentageXAxisLabel("80%", 80))
xAxis.Labels.Add(New PercentageXAxisLabel("100%", 100))
' Create a date time yAxis
Dim yAxis As DateTimeYAxis = New DateTimeYAxis()
' Create date time 100percent stacked bar series elements and add values to it
Dim MyBarSeriesElement1 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website A")
MyBarSeriesElement1.Values.Add(5, New DateTime(2007, 1, 1))
MyBarSeriesElement1.Values.Add(7, New DateTime(2007, 2, 1))
MyBarSeriesElement1.Values.Add(9, New DateTime(2007, 3, 1))
MyBarSeriesElement1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyBarSeriesElement2 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website B")
MyBarSeriesElement2.Values.Add(4, New DateTime(2007, 1, 1))
MyBarSeriesElement2.Values.Add(2, New DateTime(2007, 2, 1))
MyBarSeriesElement2.Values.Add(5, New DateTime(2007, 3, 1))
MyBarSeriesElement2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyBarSeriesElement3 As DateTime100PercentStackedBarSeriesElement = New DateTime100PercentStackedBarSeriesElement("Website C")
MyBarSeriesElement3.Values.Add(2, New DateTime(2007, 1, 1))
MyBarSeriesElement3.Values.Add(4, New DateTime(2007, 2, 1))
MyBarSeriesElement3.Values.Add(6, New DateTime(2007, 3, 1))
MyBarSeriesElement3.Values.Add(9, New DateTime(2007, 4, 1))
' Create a date time 100percent stacked bar series and add date time 100percent stacked bar series elements to it
Dim MyStackedBarSeries1 As DateTime100PercentStackedBarSeries = New DateTime100PercentStackedBarSeries(xAxis, yAxis)
MyStackedBarSeries1.Add(MyBarSeriesElement1)
MyStackedBarSeries1.Add(MyBarSeriesElement2)
MyStackedBarSeries1.Add(MyBarSeriesElement3)
' Create a percentage data label
Dim MyPercentageDataLabel As PercentageDataLabel = New PercentageDataLabel(True)
MyBarSeriesElement1.DataLabel = MyPercentageDataLabel
MyBarSeriesElement2.DataLabel = MyPercentageDataLabel
MyBarSeriesElement3.DataLabel = MyPercentageDataLabel
' Add stacked bar series to the plot area
MyPlotArea.Series.Add(MyStackedBarSeries1)
' Set label format for the YAxisLabel
MyStackedBarSeries1.YAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
//Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a percentageXAxis and add labels to it
PercentageXAxis xAxis = new PercentageXAxis();
xAxis.Labels.Add(new PercentageXAxisLabel("0%", 0));
xAxis.Labels.Add(new PercentageXAxisLabel("20%", 20));
xAxis.Labels.Add(new PercentageXAxisLabel("40%", 40));
xAxis.Labels.Add(new PercentageXAxisLabel("60%", 60));
xAxis.Labels.Add(new PercentageXAxisLabel("80%", 80));
xAxis.Labels.Add(new PercentageXAxisLabel("100%", 100));
// Create a date time yAxis
DateTimeYAxis yAxis = new DateTimeYAxis();
// Create date time 100percent stacked bar series elements and add values to it
DateTime100PercentStackedBarSeriesElement barSeriesElement1 = new DateTime100PercentStackedBarSeriesElement("Website A");
barSeriesElement1.Values.Add(5, new DateTime(2007, 1, 1));
barSeriesElement1.Values.Add(7, new DateTime(2007, 2, 1));
barSeriesElement1.Values.Add(9, new DateTime(2007, 3, 1));
barSeriesElement1.Values.Add(6, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement barSeriesElement2 = new DateTime100PercentStackedBarSeriesElement("Website B");
barSeriesElement2.Values.Add(4, new DateTime(2007, 1, 1));
barSeriesElement2.Values.Add(2, new DateTime(2007, 2, 1));
barSeriesElement2.Values.Add(5, new DateTime(2007, 3, 1));
barSeriesElement2.Values.Add(8, new DateTime(2007, 4, 1));
DateTime100PercentStackedBarSeriesElement barSeriesElement3 = new DateTime100PercentStackedBarSeriesElement("Website C");
barSeriesElement3.Values.Add(2, new DateTime(2007, 1, 1));
barSeriesElement3.Values.Add(4, new DateTime(2007, 2, 1));
barSeriesElement3.Values.Add(6, new DateTime(2007, 3, 1));
barSeriesElement3.Values.Add(9, new DateTime(2007, 4, 1));
// Create a date time 100percent stacked bar series and add date time 100percent stacked bar series elements to it
DateTime100PercentStackedBarSeries stackedBarSeries1 = new DateTime100PercentStackedBarSeries(xAxis, yAxis);
stackedBarSeries1.Add(barSeriesElement1);
stackedBarSeries1.Add(barSeriesElement2);
stackedBarSeries1.Add(barSeriesElement3);
// Create a percentage data label
PercentageDataLabel percentageDataLabel = new PercentageDataLabel(true);
barSeriesElement1.DataLabel = percentageDataLabel;
barSeriesElement2.DataLabel = percentageDataLabel;
barSeriesElement3.DataLabel = percentageDataLabel;
// Add stacked bar series to the plot area
plotArea.Series.Add(stackedBarSeries1);
// Set label format for the YAxisLabel
stackedBarSeries1.YAxis.LabelFormat = "MMM";
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:/MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 230)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a indexed column series and add values to it
Dim MyColumnSeries1 As IndexedColumnSeries = New IndexedColumnSeries("Website A")
MyColumnSeries1.Values.Add(New Single() {5, 7, 9, 6})
Dim MyColumnSeries2 As IndexedColumnSeries = New IndexedColumnSeries("Website B")
MyColumnSeries2.Values.Add(New Single() {4, 2, 5, 8})
Dim MyColumnSeries3 As IndexedColumnSeries = New IndexedColumnSeries("Website C")
MyColumnSeries3.Values.Add(New Single() {2, 4, 6, 9})
' Create a value position data label
Dim MyValuePositionDataLabel As ValuePositionDataLabel = New ValuePositionDataLabel(True)
MyColumnSeries1.DataLabel = MyValuePositionDataLabel
MyColumnSeries2.DataLabel = MyValuePositionDataLabel
MyColumnSeries3.DataLabel = MyValuePositionDataLabel
' Add indexed column series to the plot area
MyPlotArea.Series.Add(MyColumnSeries1)
MyPlotArea.Series.Add(MyColumnSeries2)
MyPlotArea.Series.Add(MyColumnSeries3)
' Create a title and add it to the yAxis
Dim MyTitle3 As Title = New Title("Visitors (in millions)")
MyColumnSeries1.YAxis.Titles.Add(MyTitle3)
' Add AxisLabels to the XAxis
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q1", 0))
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q2", 1))
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q3", 2))
MyColumnSeries1.XAxis.Labels.Add(New IndexedXAxisLabel("Q4", 3))
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 230);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a indexed column series and add values to it
IndexedColumnSeries columnSeries1 = new IndexedColumnSeries("Website A");
columnSeries1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedColumnSeries columnSeries2 = new IndexedColumnSeries("Website B");
columnSeries2.Values.Add(new float[] { 4, 2, 5, 8 });
IndexedColumnSeries columnSeries3 = new IndexedColumnSeries("Website C");
columnSeries3.Values.Add(new float[] { 2, 4, 6, 9 });
// Create a value position data label
ValuePositionDataLabel val = new ValuePositionDataLabel(true);
columnSeries1.DataLabel = val;
columnSeries2.DataLabel = val;
columnSeries3.DataLabel = val;
// Add indexed column series to the plot area
plotArea.Series.Add(columnSeries1);
plotArea.Series.Add(columnSeries2);
plotArea.Series.Add(columnSeries3);
// Create a title and add it to the yAxis
Title lTitle = new Title("Visitors (in millions)");
columnSeries1.YAxis.Titles.Add(lTitle);
// Add AxisLabels to the XAxis
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q1", 0));
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q2", 1));
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q3", 2));
columnSeries1.XAxis.Labels.Add(new IndexedXAxisLabel("Q4", 3));
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create date time area series and add values to it
Dim MyAreaSeries1 As DateTimeAreaSeries = New DateTimeAreaSeries("Website A")
MyAreaSeries1.Values.Add(5, New DateTime(2007, 1, 1))
MyAreaSeries1.Values.Add(7, New DateTime(2007, 2, 1))
MyAreaSeries1.Values.Add(9, New DateTime(2007, 3, 1))
MyAreaSeries1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyAreaSeries2 As DateTimeAreaSeries = New DateTimeAreaSeries("Website B")
MyAreaSeries2.Values.Add(4, New DateTime(2007, 1, 1))
MyAreaSeries2.Values.Add(2, New DateTime(2007, 2, 1))
MyAreaSeries2.Values.Add(5, New DateTime(2007, 3, 1))
MyAreaSeries2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyAreaSeries3 As DateTimeAreaSeries = New DateTimeAreaSeries("Website C")
MyAreaSeries3.Values.Add(2, New DateTime(2007, 1, 1))
MyAreaSeries3.Values.Add(4, New DateTime(2007, 2, 1))
MyAreaSeries3.Values.Add(6, New DateTime(2007, 3, 1))
MyAreaSeries3.Values.Add(9, New DateTime(2007, 4, 1))
' Add date time area series to the plot area
MyPlotArea.Series.Add(MyAreaSeries1)
MyPlotArea.Series.Add(MyAreaSeries2)
MyPlotArea.Series.Add(MyAreaSeries3)
' Create a title and add it to yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyAreaSeries1.YAxis.Titles.Add(MyTitle3)
' Set label format for the axis labels
MyAreaSeries1.XAxis.LabelFormat = "MMM"
MyChart.AutoLayout = True
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create date time area series and add values to it
DateTimeAreaSeries areaSeries1 = new DateTimeAreaSeries("Website A");
areaSeries1.Values.Add(5, new DateTime(2007, 1, 1));
areaSeries1.Values.Add(7, new DateTime(2007, 2, 1));
areaSeries1.Values.Add(9, new DateTime(2007, 3, 1));
areaSeries1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeAreaSeries areaSeries2 = new DateTimeAreaSeries("Website B");
areaSeries2.Values.Add(4, new DateTime(2007, 1, 1));
areaSeries2.Values.Add(2, new DateTime(2007, 2, 1));
areaSeries2.Values.Add(5, new DateTime(2007, 3, 1));
areaSeries2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeAreaSeries areaSeries3 = new DateTimeAreaSeries("Website C");
areaSeries3.Values.Add(2, new DateTime(2007, 1, 1));
areaSeries3.Values.Add(4, new DateTime(2007, 2, 1));
areaSeries3.Values.Add(6, new DateTime(2007, 3, 1));
areaSeries3.Values.Add(9, new DateTime(2007, 4, 1));
// Add date time area series to the plot area
plotArea.Series.Add(areaSeries1);
plotArea.Series.Add(areaSeries2);
plotArea.Series.Add(areaSeries3);
// Create a title and add it to yAxis
Title title3 = new Title("Viewers (in millions)");
areaSeries1.YAxis.Titles.Add(title3);
// Set label format for the axis labels
areaSeries1.XAxis.LabelFormat = "MMM";
chart.AutoLayout = true;
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:/MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a legend to the chart
Dim MyLegend1 As Legend = MyChart.Legends.Add(2, 3, 10, 10)
MyLegend1.BackgroundColor = RgbColor.Pink
' Create date time area series and add values to it
Dim MyAreaSeries1 As DateTimeAreaSeries = New DateTimeAreaSeries("Website A")
MyAreaSeries1.Values.Add(5, New DateTime(2007, 1, 1))
MyAreaSeries1.Values.Add(7, New DateTime(2007, 2, 1))
MyAreaSeries1.Values.Add(9, New DateTime(2007, 3, 1))
MyAreaSeries1.Values.Add(6, New DateTime(2007, 4, 1))
Dim MyAreaSeries2 As DateTimeAreaSeries = New DateTimeAreaSeries("Website B")
MyAreaSeries2.Values.Add(4, New DateTime(2007, 1, 1))
MyAreaSeries2.Values.Add(2, New DateTime(2007, 2, 1))
MyAreaSeries2.Values.Add(5, New DateTime(2007, 3, 1))
MyAreaSeries2.Values.Add(8, New DateTime(2007, 4, 1))
Dim MyAreaSeries3 As DateTimeAreaSeries = New DateTimeAreaSeries("Website C")
MyAreaSeries3.Values.Add(2, New DateTime(2007, 1, 1))
MyAreaSeries3.Values.Add(4, New DateTime(2007, 2, 1))
MyAreaSeries3.Values.Add(6, New DateTime(2007, 3, 1))
MyAreaSeries3.Values.Add(9, New DateTime(2007, 4, 1))
'Add date time area series to the plot area
MyPlotArea.Series.Add(MyAreaSeries1)
MyPlotArea.Series.Add(MyAreaSeries2)
MyPlotArea.Series.Add(MyAreaSeries3)
' Create a title and add it to yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyAreaSeries1.YAxis.Titles.Add(MyTitle3)
' Set label format for the axis labels
MyAreaSeries1.XAxis.LabelFormat = "MMM"
'Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a legend to the chart
Legend legend1 = chart.Legends.Add(2, 3, 10, 10);
legend1.BackgroundColor = RgbColor.Pink;
// Create date time area series and add values to it
DateTimeAreaSeries areaSeries1 = new DateTimeAreaSeries("Website A");
areaSeries1.Values.Add(5, new DateTime(2007, 1, 1));
areaSeries1.Values.Add(7, new DateTime(2007, 2, 1));
areaSeries1.Values.Add(9, new DateTime(2007, 3, 1));
areaSeries1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeAreaSeries areaSeries2 = new DateTimeAreaSeries("Website B");
areaSeries2.Values.Add(4, new DateTime(2007, 1, 1));
areaSeries2.Values.Add(2, new DateTime(2007, 2, 1));
areaSeries2.Values.Add(5, new DateTime(2007, 3, 1));
areaSeries2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeAreaSeries areaSeries3 = new DateTimeAreaSeries("Website C");
areaSeries3.Values.Add(2, new DateTime(2007, 1, 1));
areaSeries3.Values.Add(4, new DateTime(2007, 2, 1));
areaSeries3.Values.Add(6, new DateTime(2007, 3, 1));
areaSeries3.Values.Add(9, new DateTime(2007, 4, 1));
//Add date time area series to the plot area
plotArea.Series.Add(areaSeries1);
plotArea.Series.Add(areaSeries2);
plotArea.Series.Add(areaSeries3);
// Create a title and add it to yAxis
Title title3 = new Title("Viewers (in millions)");
areaSeries1.YAxis.Titles.Add(title3);
// Set label format for the axis labels
areaSeries1.XAxis.LabelFormat = "MMM";
//Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:/MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Values
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document()
' Create a Page
Dim MyPage As Page = New Page(PageSize.A4, PageOrientation.Landscape)
' Create a chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create a scalar data label
Dim da As ScalarDataLabel = New ScalarDataLabel(True, False, False)
' Create a pie series and add data label to the pie series
Dim MyPieSeries As PieSeries = New PieSeries()
MyPieSeries.DataLabel = da
' Add the series and elements to the plot area
MyPlotArea.Series.Add(MyPieSeries)
MyPieSeries.Elements.Add(27, "Website A")
MyPieSeries.Elements.Add(19, "Website B")
MyPieSeries.Elements.Add(21, "Website C")
' Add the chart to page and add the page to document
MyPage.Elements.Add(MyChart)
MyDocument.Pages.Add(MyPage)
' Draw the document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Values;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a Page
Page page = new Page(PageSize.A4, PageOrientation.Landscape);
// Create a chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create a scalar data label
ScalarDataLabel da = new ScalarDataLabel(true, false, false);
// Create a pie series and add data label to the pie series
PieSeries pieSeries = new PieSeries();
pieSeries.DataLabel = da;
// Add the series and elements to the plot area
plotArea.Series.Add(pieSeries);
pieSeries.Elements.Add(27, "Website A");
pieSeries.Elements.Add(19, "Website B");
pieSeries.Elements.Add(21, "Website C");
// Add the chart to page and add the page to document
page.Elements.Add(chart);
document.Pages.Add(page);
// Draw the document
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 400, 200)
' Get the default plot area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create header titles and add it to the chart
Dim MyTitle1 As Title = New Title("Website Visitors")
Dim MyTitle2 As Title = New Title("Year - 2007")
MyChart.HeaderTitles.Add(MyTitle1)
MyChart.HeaderTitles.Add(MyTitle2)
' Create positions
Dim p0 As DateTime = New DateTime(2007, 1, 1)
Dim p1 As DateTime = New DateTime(2007, 2, 1)
Dim p2 As DateTime = New DateTime(2007, 3, 1)
Dim p3 As DateTime = New DateTime(2007, 4, 1)
' Create date time area series and add values to it
Dim MyAreaSeries1 As DateTimeAreaSeries = New DateTimeAreaSeries("Website A")
MyAreaSeries1.Values.Add(5, p0)
MyAreaSeries1.Values.Add(7, p1)
MyAreaSeries1.Values.Add(9, p2)
MyAreaSeries1.Values.Add(6, p3)
Dim MyAreaSeries2 As DateTimeAreaSeries = New DateTimeAreaSeries("Website B")
MyAreaSeries2.Values.Add(4, p0)
MyAreaSeries2.Values.Add(2, p1)
MyAreaSeries2.Values.Add(5, p2)
MyAreaSeries2.Values.Add(8, p3)
Dim MyAreaSeries3 As DateTimeAreaSeries = New DateTimeAreaSeries("Website C")
MyAreaSeries3.Values.Add(2, p0)
MyAreaSeries3.Values.Add(4, p1)
MyAreaSeries3.Values.Add(6, p2)
MyAreaSeries3.Values.Add(9, p3)
' Add date time area series to the plot area
MyPlotArea.Series.Add(MyAreaSeries1)
MyPlotArea.Series.Add(MyAreaSeries2)
MyPlotArea.Series.Add(MyAreaSeries3)
' Create a title and add it to yAxis
Dim MyTitle3 As Title = New Title("Viewers (in millions)")
MyAreaSeries1.YAxis.Titles.Add(MyTitle3)
' Set label format for the axis labels
MyAreaSeries1.XAxis.LabelFormat = "MMM"
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 400, 200);
// Get the default plot area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create header titles and add it to the chart
Title title1 = new Title("Website Visitors");
Title title2 = new Title("Year - 2007");
chart.HeaderTitles.Add(title1);
chart.HeaderTitles.Add(title2);
// Create date time area series and add values to it
DateTimeAreaSeries areaSeries1 = new DateTimeAreaSeries("Website A");
areaSeries1.Values.Add(5, new DateTime(2007, 1, 1));
areaSeries1.Values.Add(7, new DateTime(2007, 2, 1));
areaSeries1.Values.Add(9, new DateTime(2007, 3, 1));
areaSeries1.Values.Add(6, new DateTime(2007, 4, 1));
DateTimeAreaSeries areaSeries2 = new DateTimeAreaSeries("Website B");
areaSeries2.Values.Add(4, new DateTime(2007, 1, 1));
areaSeries2.Values.Add(2, new DateTime(2007, 2, 1));
areaSeries2.Values.Add(5, new DateTime(2007, 3, 1));
areaSeries2.Values.Add(8, new DateTime(2007, 4, 1));
DateTimeAreaSeries areaSeries3 = new DateTimeAreaSeries("Website C");
areaSeries3.Values.Add(2, new DateTime(2007, 1, 1));
areaSeries3.Values.Add(4, new DateTime(2007, 2, 1));
areaSeries3.Values.Add(6, new DateTime(2007, 3, 1));
areaSeries3.Values.Add(9, new DateTime(2007, 4, 1));
//Add date time area series to the plot area
plotArea.Series.Add(areaSeries1);
plotArea.Series.Add(areaSeries2);
plotArea.Series.Add(areaSeries3);
// Create a title and add it to yAxis
Title title3 = new Title("Viewers (in millions)");
areaSeries1.YAxis.Titles.Add(title3);
// Set label format for the axis labels
areaSeries1.XAxis.LabelFormat = "MMM";
//Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Charting
Imports ceTe.DynamicPDF.PageElements.Charting.Series
Imports ceTe.DynamicPDF.PageElements.Charting.Axes
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 chart
Dim MyChart As Chart = New Chart(0, 0, 450, 230)
' Get the default plot Area from the chart
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea
' Create a Header title and add it to the chart
Dim MyTitle1 As Title = New Title("Player Height and Weight")
MyChart.HeaderTitles.Add(MyTitle1)
' Create xyScatter series and add values to it
Dim MyXyScatterSeries1 As XYScatterSeries = New XYScatterSeries("Team A")
MyXyScatterSeries1.Values.Add(112, 55)
MyXyScatterSeries1.Values.Add(125, 60)
MyXyScatterSeries1.Values.Add(138, 68)
MyXyScatterSeries1.Values.Add(150, 73)
MyXyScatterSeries1.Values.Add(172, 82)
Dim MyXyScatterSeries2 As XYScatterSeries = New XYScatterSeries("Team B")
MyXyScatterSeries2.Values.Add(110, 54)
MyXyScatterSeries2.Values.Add(128, 62)
MyXyScatterSeries2.Values.Add(140, 70)
MyXyScatterSeries2.Values.Add(155, 75)
MyXyScatterSeries2.Values.Add(170, 80)
' Create XYScatter data label
Dim MyXyScatterDataLabel As XYScatterDataLabel = New XYScatterDataLabel(True)
MyXyScatterSeries1.DataLabel = MyXyScatterDataLabel
MyXyScatterDataLabel.Color = RgbColor.Red
' Add xyScatter series to the plot Area
MyPlotArea.Series.Add(MyXyScatterSeries1)
MyPlotArea.Series.Add(MyXyScatterSeries2)
' Create axis titles and add it to the axis
Dim MyTitle2 As Title = New Title("Height (Inches)")
Dim MyTitle3 As Title = New Title("Weight (Pounds)")
MyXyScatterSeries1.YAxis.Titles.Add(MyTitle2)
MyXyScatterSeries1.XAxis.Titles.Add(MyTitle3)
' Add the chart to the page
MyPage.Elements.Add(MyChart)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Charting;
using ceTe.DynamicPDF.PageElements.Charting.Series;
using ceTe.DynamicPDF.PageElements.Charting.Axes;
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 chart
Chart chart = new Chart(0, 0, 450, 230);
// Get the default plot Area from the chart
PlotArea plotArea = chart.PrimaryPlotArea;
// Create a Header title and add it to the chart
Title tTitle = new Title("Player Height and Weight");
chart.HeaderTitles.Add(tTitle);
// Create xyScatter series and add values to it
XYScatterSeries xyScatterSeries1 = new XYScatterSeries("Team A");
xyScatterSeries1.Values.Add(112, 55);
xyScatterSeries1.Values.Add(125, 60);
xyScatterSeries1.Values.Add(138, 68);
xyScatterSeries1.Values.Add(150, 73);
xyScatterSeries1.Values.Add(172, 82);
XYScatterSeries xyScatterSeries2 = new XYScatterSeries("Team B");
xyScatterSeries2.Values.Add(110, 54);
xyScatterSeries2.Values.Add(128, 62);
xyScatterSeries2.Values.Add(140, 70);
xyScatterSeries2.Values.Add(155, 75);
xyScatterSeries2.Values.Add(170, 80);
// Create XYScatter data label
XYScatterDataLabel xyScatterDataLabel = new XYScatterDataLabel(true);
xyScatterSeries1.DataLabel = xyScatterDataLabel;
xyScatterDataLabel.Color = RgbColor.Red;
// Add xyScatter series to the plot Area
plotArea.Series.Add(xyScatterSeries1);
plotArea.Series.Add(xyScatterSeries2);
// Create axis titles and add it to the axis
Title title1 = new Title("Height (Inches)");
Title title2 = new Title("Weight (Pounds)");
xyScatterSeries1.YAxis.Titles.Add(title1);
xyScatterSeries1.XAxis.Titles.Add(title2);
// Add the chart to the page
page.Elements.Add(chart);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
Imports ceTe.DynamicPDF.Text
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page(PageSize.Letter)
' Create an Button
Dim MyButton As Button = New Button("btn", 50, 50, 100, 50)
MyButton.Action = New JavaScriptAction("app.alert('Hello');")
MyButton.BackgroundColor = RgbColor.AliceBlue
MyButton.Behavior = Behavior.CreatePush("downLabel", "rolloverLabel")
MyButton.BorderColor = RgbColor.BlueViolet
MyButton.BorderStyle = BorderStyle.Beveled
Dim MyFont As OpenTypeFont = new OpenTypeFont("fontname")
MyButton.Font = MyFont
MyButton.Label = "Push"
MyButton.TextColor = RgbColor.DarkGreen
MyButton.ToolTip = "Click"
' Add the Button to the page
MyPage.Elements.Add(MyButton)
' Add pages to the document
MyDocument.Pages.Add(MyPage)
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
using ceTe.DynamicPDF.Text;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page( PageSize.Letter );
// Create an Button
Button button = new Button( "btn", 50, 50, 100, 50 );
button.Action = new JavaScriptAction( "app.alert('Hello');" );
button.BackgroundColor = RgbColor.AliceBlue;
button.Behavior = Behavior.CreatePush( "downLabel", "rolloverLabel" );
button.BorderColor = RgbColor.BlueViolet;
button.BorderStyle = BorderStyle.Beveled;
OpenTypeFont myFont = new OpenTypeFont("fontname");
button.Font = myFont;
button.Label = "Push";
button.TextColor = RgbColor.DarkGreen;
button.ToolTip = "Click";
// Add the Button to the page
page.Elements.Add( button );
// Add pages to the document
document.Pages.Add( page );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page(PageSize.Letter)
' Create an Check Box
Dim MyCheckBox As CheckBox = New CheckBox("chk", 5, 7, 50, 50)
MyCheckBox.DefaultChecked = true
MyCheckBox.ToolTip = "Check it"
' Add the Check Box to the page
MyPage.Elements.Add(MyCheckBox)
' Add pages to the document
MyDocument.Pages.Add(MyPage)
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page( PageSize.Letter );
// Create an Check Box
CheckBox checkBox = new CheckBox( "chk", 5, 7, 50, 50 );
checkBox.DefaultChecked = true;
checkBox.ToolTip = "Check it";
// Add the Check Box to the page
page.Elements.Add( checkBox );
// Add pages to the document
document.Pages.Add( page );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
ListBoxField
class.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
Imports ceTe.DynamicPDF.Text
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page(PageSize.Letter)
' Create an Combo Box
Dim MyComboBox As ComboBox = New ComboBox("combo", 50, 75, 150, 25)
Dim MyFont As OpenTypeFont = new OpenTypeFont("fontname")
MyComboBox.Font = MyFont
MyComboBox.Items.Add("One", true)
MyComboBox.Items.Add("Two")
MyComboBox.Items.Add("Three")
MyComboBox.Items.Add("Four")
MyComboBox.Items.Add("Five")
MyComboBox.BackgroundColor = RgbColor.AliceBlue
MyComboBox.BorderColor = RgbColor.DarkMagenta
MyComboBox.Editable = true
MyComboBox.ToolTip = "Select"
' Add the Combo Box to the page
MyPage.Elements.Add(MyComboBox)
' Add pages to the document
MyDocument.Pages.Add(MyPage)
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
using ceTe.DynamicPDF.Text;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page( PageSize.Letter );
// Create an Combo Box
ComboBox comboBox = new ComboBox( "combo", 50, 75, 150, 25 );
OpenTypeFont myFont = new OpenTypeFont("fontname");
comboBox.Font = myFont;
comboBox.Items.Add( "One", true );
comboBox.Items.Add( "Two" );
comboBox.Items.Add( "Three" );
comboBox.Items.Add( "Four" );
comboBox.Items.Add( "Five" );
comboBox.BackgroundColor = RgbColor.AliceBlue;
comboBox.BorderColor = RgbColor.DarkMagenta;
comboBox.Editable = true;
comboBox.ToolTip = "Select";
// Add the Combo Box to the page
page.Elements.Add( comboBox );
// Add pages to the document
document.Pages.Add( page );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
Imports ceTe.DynamicPDF.Text
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page(PageSize.Letter)
' Create an List Box
Dim MyListBox As ListBox = New ListBox("list", 5, 2, 100, 150)
Dim MyFont As OpenTypeFont = new OpenTypeFont("fontname")
MyListBox.Font = MyFont
MyListBox.Items.Add("One",true)
MyListBox.Items.Add("Two","ExportTwo",true)
MyListBox.Items.Add("Three")
MyListBox.Items.Add("Four")
MyListBox.Items.Add("Five")
MyListBox.BackgroundColor = RgbColor.AliceBlue
MyListBox.BorderColor = RgbColor.DarkMagenta
MyListBox.BorderStyle = BorderStyle.Dashed
MyListBox.Multiselect = true
MyListBox.ToolTip = "Select"
' Add the List Box to the page
MyPage.Elements.Add(MyListBox)
' Add pages to the document
MyDocument.Pages.Add(MyPage)
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
using ceTe.DynamicPDF.Text;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page( PageSize.Letter );
// Create an List Box
ListBox listBox = new ListBox( "list", 5, 2, 100, 150 );
OpenTypeFont myFont = new OpenTypeFont("fontname");
listBox.Font = myFont;
listBox.Items.Add( "One", true );
listBox.Items.Add( "Two", "ExportTwo", true );
listBox.Items.Add( "Three" );
listBox.Items.Add( "Four" );
listBox.Items.Add( "Five" );
listBox.BackgroundColor = RgbColor.AliceBlue;
listBox.BorderColor = RgbColor.DarkMagenta;
listBox.BorderStyle = BorderStyle.Dashed;
listBox.Multiselect = true;
listBox.ToolTip = "Select";
// Add the List Box to the page
page.Elements.Add( listBox );
// Add pages to the document
document.Pages.Add( page );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page(PageSize.Letter)
' Create an Radio Buttons
Dim MyRadio As RadioButton = New RadioButton("rdbtn", 50, 25, 100, 75)
MyRadio.DefaultChecked = true
MyRadio.ToolTip = "first"
Dim MyRadio1 As RadioButton = New RadioButton("rdbtn", 50, 140, 100, 75)
MyRadio1.DefaultChecked = true
MyRadio1.ExportValue = "abc"
MyRadio1.ToolTip = "second"
Dim MyRadio2 As RadioButton = New RadioButton("rdbtn", 50, 250, 100, 75)
MyRadio2.DefaultChecked = true
MyRadio2.ExportValue = "xyz"
MyRadio2.ToolTip = "third"
' Add the Radio Buttons to the page
MyPage.Elements.Add(MyRadio)
MyPage.Elements.Add(MyRadio1)
MyPage.Elements.Add(MyRadio2)
' Add pages to the document
MyDocument.Pages.Add(MyPage)
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page( PageSize.Letter );
// Create an Radio Buttons
RadioButton radio = new RadioButton( "rdbtn", 50, 25, 100, 75 );
radio.DefaultChecked = true;
radio.ToolTip = "first";
RadioButton radio1 = new RadioButton( "rdbtn", 50, 140, 100, 75 );
radio1.DefaultChecked = true;
radio1.ExportValue = "abc";
radio1.ToolTip = "second";
RadioButton radio2 = new RadioButton( "rdbtn", 50, 250, 100, 75 );
radio2.DefaultChecked = true;
radio2.ExportValue = "xyz";
radio2.ToolTip = "third";
// Add the Radio Buttons to the page
page.Elements.Add( radio );
page.Elements.Add( radio1 );
page.Elements.Add( radio2 );
// Add pages to the document
document.Pages.Add( page );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
Imports ceTe.DynamicPDF.Text
Module Module1
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page
' Create a signature form field
Dim MySignature As Signature = New Signature("MySigField", 10, 10, 300, 100)
Dim MyFont As OpenTypeFont = new OpenTypeFont("fontname")
MySignature.Font = MyFont
' Set a full background image
MySignature.FullPanel.SetImage("C:\MyImage.gif")
' Set new color property for the left panel text
MySignature.LeftPanel.TextColor = RgbColor.Red
' Add signature field to the page
MyPage.Elements.Add(MySignature)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Create a Certificate
Dim MyCertificate As Certificate = New Certificate("C:\PersonalCertificate.pfx", "MyPassword")
' Add an Invisible Signature (Signing the document)
MyDocument.Sign("MySigField", MyCertificate)
' Save the document
MyDocument.Draw("C:\MySignedDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
using ceTe.DynamicPDF.Text;
class MyClass
{
static void Main(string[] args)
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page();
// Create a signature form field
Signature signature = new Signature("MySigField", 10, 10, 300, 100);
OpenTypeFont myFont = new OpenTypeFont("fontname");
signature.Font = myFont;
// Set a full background image
signature.FullPanel.SetImage(@"C:\MyImage.gif");
// Set new color property for the left panel text
signature.LeftPanel.TextColor = RgbColor.Red;
// Add signature field to the page
page.Elements.Add(signature);
// Add the page to the document
document.Pages.Add(page);
// Create a Certificate from the file
Certificate certificate = new Certificate(@"c:\MyPersonalCertificate.pfx", "MyPassword");
// Sign the document referring the sign field
document.Sign("MySigField", certificate);
// Save the document
document.Draw(@"C:\MySignedDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
Imports ceTe.DynamicPDF.Text
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page(PageSize.Letter)
' Create an Text Field
Dim MyTextField As TextField = New TextField("txt", 50, 75, 150, 100)
MyTextField.TextAlign = Align.Center
MyTextField.BackgroundColor = RgbColor.AliceBlue
MyTextField.BorderColor = RgbColor.DeepPink
Dim MyFont As OpenTypeFont = new OpenTypeFont("fontname")
MyTextField.Font = MyFont
MyTextField.FontSize = 16.0f
MyTextField.TextColor = RgbColor.Brown
MyTextField.DefaultValue = "Hello World."
MyTextField.MultiLine = true
MyTextField.ToolTip = "Text"
' Add the Text Field to the page
MyPage.Elements.Add(MyTextField)
' Add pages to the document
MyDocument.Pages.Add(MyPage)
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
using ceTe.DynamicPDF.Text;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page( PageSize.Letter );
// Create an Text Field
TextField textField = new TextField( "txt", 50, 75, 150, 100 );
textField.TextAlign = Align.Center;
textField.BackgroundColor = RgbColor.AliceBlue;
textField.BorderColor = RgbColor.DeepPink;
OpenTypeFont myFont = new OpenTypeFont("fontname");
textField.Font = myFont;
textField.FontSize = 16.0f;
textField.TextColor = RgbColor.Brown;
textField.DefaultValue = "Hello World.";
textField.MultiLine = true;
textField.ToolTip = "Text";
// Add the Text Field to the page
page.Elements.Add( textField );
// Add pages to the document
document.Pages.Add( page );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
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
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" );
}
}
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 an area group
Dim MyGroup As AreaGroup = New AreaGroup(200, 200)
' 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
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 an area group
AreaGroup group = new AreaGroup( 200, 200 );
// 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" );
}
}
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 background image
Dim MyBackgroundImage As BackgroundImage = New BackgroundImage("C:\MyImage.jpg")
' Place the image with in the page margins
MyBackgroundImage.UseMargins = True
' Add the background image to the page
MyPage.Elements.Add(MyBackgroundImage)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 background image
BackgroundImage backgroundImage = new BackgroundImage( @"C:\MyImage.jpg" );
// Place the image with in the page margins
backgroundImage.UseMargins = true;
// Add the background image to the page
page.Elements.Add( backgroundImage );
//Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create three page objects
Dim MyPage1 As Page = New Page(PageSize.Letter)
Dim MyPage2 As Page = New Page(PageSize.Letter)
Dim MyPage3 As Page = New Page(PageSize.Letter)
' Add a top level Outline
Dim MyParentOutline As Outline = MyDocument.Outlines.Add("Parent Outline")
' Add a top level bookmark
MyPage1.Elements.Add(New Bookmark("Top level bookmark to page 1", 0, 0))
' Add child bookmarks
MyPage1.Elements.Add(New Bookmark("Bookmark to page 1", 0, 0, MyParentOutline))
MyPage2.Elements.Add(New Bookmark("Bookmark to page 2", 0, 0, MyParentOutline))
MyPage3.Elements.Add(New Bookmark("Bookmark to page 3", 0, 0, MyParentOutline))
' Add the three pages to the document
MyDocument.Pages.Add(MyPage1)
MyDocument.Pages.Add(MyPage2)
MyDocument.Pages.Add(MyPage3)
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create three page objects
Page page1 = new Page( PageSize.Letter );
Page page2 = new Page( PageSize.Letter );
Page page3 = new Page( PageSize.Letter );
// Add a top level Outline
Outline parentOutline = document.Outlines.Add( "Parent Outline" );
// Add a top level bookmark
page1.Elements.Add( new Bookmark( "Top level bookmark to page 1", 0, 0 ) );
// Add child bookmarks
page1.Elements.Add( new Bookmark( "Bookmark to page 1", 0, 0, parentOutline ) );
page2.Elements.Add( new Bookmark( "Bookmark to page 2", 0, 0, parentOutline ) );
page3.Elements.Add( new Bookmark( "Bookmark to page 3", 0, 0, parentOutline ) );
// Add the three pages to the document
document.Pages.Add( page1 );
document.Pages.Add( page2 );
document.Pages.Add( page3 );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 table
Dim MyTable As Table = New Table(0, 0, 600, 600)
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
' Add rows to the table and add cells to the rows
Dim row1 As Row = MyTable.Rows.Add(40, ceTe.DynamicPDF.Font.HelveticaBold, _
16, Grayscale.Black, Grayscale.Gray)
row1.Align = TextAlign.Center
row1.VAlign = VAlign.Center
row1.Cells.Add("Header 1")
row1.Cells.Add("Header 2")
row1.Cells.Add("Header 3")
row1.Cells.Add("Header 4")
Dim row2 As Row = MyTable.Rows.Add(30)
Dim cell1 As Cell = row2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell1.Align = CellAlign.Center
cell1.VAlign = CellVAlign.Center
row2.Cells.Add("Item 1")
row2.Cells.Add("Item 2")
row2.Cells.Add("Item 3")
Dim row3 As Row = MyTable.Rows.Add(30)
Dim cell2 As Cell = row3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell2.Align = CellAlign.Center
cell2.VAlign = CellVAlign.Center
row3.Cells.Add("Item 4")
row3.Cells.Add("Item 5")
row3.Cells.Add("Item 6")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 table
Table table = new Table(0, 0, 600, 600);
//Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 40, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.Gray );
row1.Align = CellAlign.Center;
row1.VAlign = CellVAlign.Center;
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
row1.Cells.Add( "Header 4" );
Row row2 = table.Rows.Add( 30 );
Cell cell1 = row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell1.Align = CellAlign.Center;
cell1.VAlign = CellVAlign.Center;
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
row2.Cells.Add( "Item 3" );
Row row3 = table.Rows.Add( 30 );
Cell cell2 = row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell2.Align = CellAlign.Center;
cell2.VAlign = CellVAlign.Center;
row3.Cells.Add( "Item 4" );
row3.Cells.Add( "Item 5" );
row3.Cells.Add( "Item 6" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 table
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
' Add rows to the table and add cells to the rows
Dim row1 As Row2 = MyTable.Rows.Add(40, ceTe.DynamicPDF.Font.HelveticaBold, _
16, Grayscale.Black, Grayscale.Gray)
row1.CellDefault.Align = TextAlign.Center
row1.CellDefault.VAlign = VAlign.Center
row1.CellDefault.Border.Color = RgbColor.Blue
row1.CellDefault.Border.Width = 2.0f
row1.CellDefault.Border.LineStyle = LineStyle.Dots
row1.Cells.Add("Header 1")
row1.Cells.Add("Header 2")
row1.Cells.Add("Header 3")
row1.Cells.Add("Header 4")
Dim row2 As Row2 = MyTable.Rows.Add(30)
Dim cell1 As Cell2 = row2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell1.Align = TextAlign.Center
cell1.VAlign = VAlign.Center
cell1.Border.Color = RgbColor.Green
cell1.Border.Width = 2.0f
cell1.Border.Right.LineStyle = LineStyle.Solid
row2.Cells.Add("Item 1")
row2.Cells.Add("Item 2")
row2.Cells.Add("Item 3")
row2.CellDefault.Border.Top.Width = 3.0f
Dim row3 As Row2 = MyTable.Rows.Add(30)
Dim cell2 As Cell2 = row3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell2.Align = TextAlign.Center
cell2.VAlign = VAlign.Center
cell2.Border.Color = RgbColor.Blue
cell2.Border.Width = 2.0f
cell2.Border.LineStyle = LineStyle.None
row3.Cells.Add("Item 4")
row3.Cells.Add("Item 5")
row3.Cells.Add("Item 6")
row3.CellDefault.Padding.Left = 4.0f
row3.CellDefault.Padding.Top = 4.0f
row3.CellDefault.Padding.Right = 2.0f
row3.CellDefault.Padding.Bottom = 2.0f
MyTable.CellDefault.Padding.Value = 3.0f
MyTable.CellSpacing = 5.0f
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 table
Table2 table = new Table2(0, 0, 600, 600);
//Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 40, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.Gray );
row1.CellDefault.Align = TextAlign.Center;
row1.CellDefault.VAlign = VAlign.Center;
row1.CellDefault.Border.Color = RgbColor.Blue;
row1.CellDefault.Border.Width = 2.0f;
row1.CellDefault.Border.LineStyle = LineStyle.Dots;
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
row1.Cells.Add( "Header 4" );
Row2 row2 = table.Rows.Add( 30 );
Cell2 cell1 = row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell1.Align = TextAlign.Center;
cell1.VAlign = VAlign.Center;
cell1.Border.Color = RgbColor.Green;
cell1.Border.Width = 2.0f;
cell1.Border.Right.LineStyle = LineStyle.Solid;
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
row2.Cells.Add( "Item 3" );
row2.CellDefault.Border.Top.Width = 3.0f;
Row2 row3 = table.Rows.Add( 30 );
Cell2 cell2 = row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell2.Align = TextAlign.Center;
cell2.VAlign = VAlign.Center;
cell2.Border.Color = RgbColor.Blue;
cell2.Border.Width = 2.0f;
cell2.Border.LineStyle = LineStyle.None;
row3.Cells.Add( "Item 4" );
row3.Cells.Add( "Item 5" );
row3.Cells.Add( "Item 6" );
row3.CellDefault.Padding.Left = 4.0f;
row3.CellDefault.Padding.Top = 4.0f;
row3.CellDefault.Padding.Right = 2.0f;
row3.CellDefault.Padding.Bottom = 2.0f;
table.CellDefault.Padding.Value = 3.0f;
table.CellSpacing = 5.0f;
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.CellDefault.Align = TextAlign.Center
MyTable.CellDefault.VAlign = VAlign.Center
MyTable.Border.LineStyle = LineStyle.Solid
MyTable.CellSpacing = 5.0f
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row2 = MyTable.Rows.Add(0, Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row2 = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1")
MyRow2.Cells.Add("Item 2")
Dim MyRow3 As Row2 = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 3")
MyRow3.Cells.Add("Item 4")
Dim MyRow4 As Row2 = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 5")
MyRow4.Cells.Add("Item 6")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table2 table = new Table2(0, 0, 600, 800);
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Center;
table.Border.LineStyle = LineStyle.Solid;
table.CellSpacing = 5.0f;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row2 row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
Row2 row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 3" );
row3.Cells.Add( "Item 4" );
Row2 row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 5" );
row4.Cells.Add( "Item 6" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.CellDefault.Align = TextAlign.Center
MyTable.CellDefault.VAlign = VAlign.Center
MyTable.Border.LineStyle = LineStyle.Solid
MyTable.CellSpacing = 5.0f
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row2 = MyTable.Rows.Add(0, Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row2 = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1")
MyRow2.Cells.Add("Item 2")
Dim MyRow3 As Row2 = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 3")
MyRow3.Cells.Add("Item 4")
Dim MyRow4 As Row2 = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 5", 2)
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table2 table = new Table2(0, 0, 600, 600);
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Center;
table.Border.LineStyle = LineStyle.Solid;
table.CellSpacing = 5.0f;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row2 row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
Row2 row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 3" );
row3.Cells.Add( "Item 4" );
Row2 row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 5", 2 );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.CellDefault.Align = TextAlign.Center
MyTable.CellDefault.VAlign = VAlign.Center
MyTable.Border.LineStyle = LineStyle.Solid
MyTable.CellSpacing = 5.0f
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row2 = MyTable.Rows.Add(0, Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row2 = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1")
MyRow2.Cells.Add("Item 2")
Dim MyRow3 As Row2 = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 3")
MyRow3.Cells.Add("Item 4")
Dim MyRow4 As Row2 = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 5", Font.Courier, 10)
MyRow4.Cells.Add("Item 6", Font.Courier, 10)
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table2 table = new Table2(0, 0, 600, 600);
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Center;
table.Border.LineStyle = LineStyle.Solid;
table.CellSpacing = 5.0f;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row2 row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
Row2 row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 3" );
row3.Cells.Add( "Item 4" );
Row2 row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 5", Font.Courier, 10 );
row4.Cells.Add( "Item 6", Font.Courier, 10 );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.CellDefault.Align = TextAlign.Center
MyTable.CellDefault.VAlign = VAlign.Center
MyTable.Border.LineStyle = LineStyle.Solid
MyTable.CellSpacing = 5.0f
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row2 = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row2 = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1", Font.HelveticaOblique, 14, 2)
Dim MyRow3 As Row2 = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 2")
MyRow3.Cells.Add("Item 3")
Dim MyRow4 As Row2 = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 4")
MyRow4.Cells.Add("Item 5")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table2 table = new Table2(0, 0, 600, 600);
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Center;
table.Border.LineStyle = LineStyle.Solid;
table.CellSpacing = 5.0f;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row2 row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1", Font.HelveticaOblique, 14, 2 );
Row2 row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 2" );
row3.Cells.Add( "Item 3" );
Row2 row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 4" );
row4.Cells.Add( "Item 5" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.CellDefault.Align = TextAlign.Center
MyTable.CellDefault.VAlign = VAlign.Center
MyTable.Border.LineStyle = LineStyle.Solid
MyTable.CellSpacing = 5.0f
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row2 = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row2 = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1", Font.Symbol, 20, 2, 2)
Dim MyRow3 As Row2 = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim MyRow4 As Row2 = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 2")
MyRow4.Cells.Add("Item 3")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table2 table = new Table2(0, 0, 600, 600);
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Center;
table.Border.LineStyle = LineStyle.Solid;
table.CellSpacing = 5.0f;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row2 row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1", Font.Symbol, 20, 2, 2 );
Row2 row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
Row2 row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 2" );
row4.Cells.Add( "Item 3" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.CellDefault.Align = TextAlign.Center
MyTable.CellDefault.VAlign = VAlign.Center
MyTable.Border.LineStyle = LineStyle.Solid
MyTable.CellSpacing = 5.0f
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row2 = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row2 = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1", 2, 2)
Dim MyRow3 As Row2 = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim MyRow4 As Row2 = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 2")
MyRow4.Cells.Add("Item 3")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table2 table = new Table2(0, 0, 600, 600);
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Center;
table.Border.LineStyle = LineStyle.Solid;
table.CellSpacing = 5.0f;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row2 row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1", 2, 2 );
Row2 row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
Row2 row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 2" );
row4.Cells.Add( "Item 3" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.CellDefault.Align = TextAlign.Center
MyTable.CellDefault.VAlign = VAlign.Center
MyTable.Border.LineStyle = LineStyle.Solid
MyTable.CellSpacing = 5.0f
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row2 = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row2 = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1", Font.HelveticaOblique, 14, RgbColor.Blue, _
RgbColor.Yellow, 2)
Dim MyRow3 As Row2 = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 2")
MyRow3.Cells.Add("Item 3")
Dim MyRow4 As Row2 = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 4")
MyRow4.Cells.Add("Item 5")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table2 table = new Table2(0, 0, 600, 600);
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Center;
table.Border.LineStyle = LineStyle.Solid;
table.CellSpacing = 5.0f;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row2 row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1", Font.HelveticaOblique, 14, RgbColor.Blue,
RgbColor.Yellow, 2 );
Row2 row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 2" );
row3.Cells.Add( "Item 3" );
Row2 row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 4" );
row4.Cells.Add( "Item 5" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.CellDefault.Align = TextAlign.Center
MyTable.CellDefault.VAlign = VAlign.Center
MyTable.Border.LineStyle = LineStyle.Solid
MyTable.CellSpacing = 5.0f
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row2 = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row2 = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1", Font.HelveticaOblique, 16, RgbColor.Red, _
RgbColor.LightSkyBlue, 2, 2)
Dim MyRow3 As Row2 = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim MyRow4 As Row2 = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 2")
MyRow4.Cells.Add("Item 3")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table2 table = new Table2(0, 0, 600, 600);
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Center;
table.Border.LineStyle = LineStyle.Solid;
table.CellSpacing = 5.0f;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row2 row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1", Font.HelveticaOblique, 14, RgbColor.Red,
RgbColor.LightSkyBlue, 2, 2 );
Row2 row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
Row2 row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 2" );
row4.Cells.Add( "Item 3" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.CellDefault.Align = TextAlign.Center
MyTable.CellDefault.VAlign = VAlign.Center
MyTable.Border.LineStyle = LineStyle.Solid
MyTable.CellSpacing = 5.0f
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row2 = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row2 = MyTable.Rows.Add()
MyRow2.Cells.Add("Formatted Text", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim formattedText As String = "<font face='Times'>Font Face, </font>" + _
"<font color='FF0000'>Color, </font><b>Bold.</b>"
MyRow2.Cells.Add(New FormattedTextArea(formattedText, 0, 0, 140, 15, _
FontFamily.Helvetica, 14, False))
MyRow2.Cells.Add("Item 1")
Dim MyRow3 As Row2 = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 2")
MyRow3.Cells.Add("Item 3")
Dim MyRow4 As Row2 = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 4")
MyRow4.Cells.Add("Item 5")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table2 table = new Table2(0, 0, 600, 600);
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Center;
table.Border.LineStyle = LineStyle.Solid;
table.CellSpacing = 5.0f;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row2 row2 = table.Rows.Add( 30 );
row2.Cells.Add( "Formatted Text", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
string formattedText = "<font face='Times'>Font Face, </font>" +
"<font color='FF0000'>Color, </font><b>Bold.</b>";
row2.Cells.Add( new FormattedTextArea( formattedText, 0, 0, 140, 15,
FontFamily.Helvetica, 14, false ) );
row2.Cells.Add( "Item 1" );
Row2 row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 2" );
row3.Cells.Add( "Item 3" );
Row2 row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 4" );
row4.Cells.Add( "Item 5" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.CellDefault.Align = TextAlign.Center
MyTable.CellDefault.VAlign = VAlign.Center
MyTable.Border.LineStyle = LineStyle.Solid
MyTable.CellSpacing = 5.0f
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row2 = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow8 As Row2 = MyTable.Rows.Add()
MyRow8.Cells.Add("Lines", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim lineGroup As AreaGroup = New AreaGroup(150, 150)
lineGroup.Add(New Line(25, 25, 125, 125, 5))
lineGroup.Add(New Line(25, 125, 125, 25, 5))
MyRow8.Cells.Add(lineGroup, 2)
Dim MyRow3 As Row2 = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 1")
MyRow3.Cells.Add("Item 2")
Dim MyRow4 As Row2 = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 3")
MyRow4.Cells.Add("Item 4")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table2 table = new Table2(0, 0, 600, 600);
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Center;
table.Border.LineStyle = LineStyle.Solid;
table.CellSpacing = 5.0f;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row2 row2 = table.Rows.Add( 30 );
row2.Cells.Add( "Lines", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
AreaGroup lineGroup = new AreaGroup( 150, 150 );
lineGroup.Add( new Line( 25, 25, 125, 125, 5 ) );
lineGroup.Add( new Line( 25, 125, 125, 25, 5 ) );
row2.Cells.Add( lineGroup, 2 );
Row2 row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 1" );
row3.Cells.Add( "Item 2" );
Row2 row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 3" );
row4.Cells.Add( "Item 4" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.CellDefault.Align = TextAlign.Center
MyTable.CellDefault.VAlign = VAlign.Center
MyTable.Border.LineStyle = LineStyle.Solid
MyTable.CellSpacing = 5.0f
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row2 = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row2 = MyTable.Rows.Add()
MyRow2.Cells.Add("Rectangle", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim rect As Rectangle = New Rectangle(0, 0, 90, 90, RgbColor.YellowGreen, _
RgbColor.Blue, 2)
MyRow2.Cells.Add(rect, 2, 2)
Dim MyRow3 As Row2 = MyTable.Rows.Add()
MyRow3.Cells.Add("Rectangle", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim MyRow4 As Row2 = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 1")
MyRow4.Cells.Add("Item 2")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table2 table = new Table2(0, 0, 600, 600);
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Center;
table.Border.LineStyle = LineStyle.Solid;
table.CellSpacing = 5.0f;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row2 row2 = table.Rows.Add();
row2.Cells.Add( "Rectangle", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
Rectangle rect = new Rectangle( 0, 0, 90, 90, RgbColor.YellowGreen,
RgbColor.Blue, 2 );
row2.Cells.Add( rect, 2, 2 );
Row2 row3 = table.Rows.Add();
row3.Cells.Add( "Rectangle", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
Row2 row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 1" );
row4.Cells.Add( "Item 2" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table = New Table(0, 0, 600, 600)
MyTable.Align = TextAlign.Center
MyTable.VAlign = VAlign.Center
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row = MyTable.Rows.Add(0, Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1")
MyRow2.Cells.Add("Item 2")
Dim MyRow3 As Row = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 3")
MyRow3.Cells.Add("Item 4")
Dim MyRow4 As Row = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 5")
MyRow4.Cells.Add("Item 6")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table table = new Table(0, 0, 600, 800);
table.Align = TextAlign.Center;
table.VAlign = VAlign.Center;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
Row row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 3" );
row3.Cells.Add( "Item 4" );
Row row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 5" );
row4.Cells.Add( "Item 6" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table = New Table(0, 0, 600, 600)
MyTable.Align = TextAlign.Center
MyTable.VAlign = VAlign.Center
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row = MyTable.Rows.Add(0, Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1")
MyRow2.Cells.Add("Item 2")
Dim MyRow3 As Row = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 3")
MyRow3.Cells.Add("Item 4")
Dim MyRow4 As Row = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 5", 2)
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table table = new Table(0, 0, 600, 600);
table.Align = TextAlign.Center;
table.VAlign = VAlign.Center;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
Row row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 3" );
row3.Cells.Add( "Item 4" );
Row row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 5", 2 );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table = New Table(0, 0, 600, 600)
MyTable.Align = TextAlign.Center
MyTable.VAlign = VAlign.Center
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row = MyTable.Rows.Add(0, Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1")
MyRow2.Cells.Add("Item 2")
Dim MyRow3 As Row = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 3")
MyRow3.Cells.Add("Item 4")
Dim MyRow4 As Row = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 5", Font.Courier, 10)
MyRow4.Cells.Add("Item 6", Font.Courier, 10)
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table table = new Table(0, 0, 600, 600);
table.Align = TextAlign.Center;
table.VAlign = VAlign.Center;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
Row row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 3" );
row3.Cells.Add( "Item 4" );
Row row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 5", Font.Courier, 10 );
row4.Cells.Add( "Item 6", Font.Courier, 10 );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table = New Table(0, 0, 600, 600)
MyTable.Align = TextAlign.Center
MyTable.VAlign = VAlign.Center
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1", Font.HelveticaOblique, 14, 2)
Dim MyRow3 As Row = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 2")
MyRow3.Cells.Add("Item 3")
Dim MyRow4 As Row = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 4")
MyRow4.Cells.Add("Item 5")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table table = new Table(0, 0, 600, 600);
table.Align = TextAlign.Center;
table.VAlign = VAlign.Center;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1", Font.HelveticaOblique, 14, 2 );
Row row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 2" );
row3.Cells.Add( "Item 3" );
Row row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 4" );
row4.Cells.Add( "Item 5" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table = New Table(0, 0, 600, 600)
MyTable.Align = TextAlign.Center
MyTable.VAlign = VAlign.Center
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1", Font.Symbol, 20, 2, 2)
Dim MyRow3 As Row = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim MyRow4 As Row = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 2")
MyRow4.Cells.Add("Item 3")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table table = new Table(0, 0, 600, 600);
table.Align = TextAlign.Center;
table.VAlign = VAlign.Center;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1", Font.Symbol, 20, 2, 2 );
Row row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
Row row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 2" );
row4.Cells.Add( "Item 3" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table = New Table(0, 0, 600, 600)
MyTable.Align = TextAlign.Center
MyTable.VAlign = VAlign.Center
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1", 2, 2)
Dim MyRow3 As Row = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim MyRow4 As Row = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 2")
MyRow4.Cells.Add("Item 3")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table table = new Table(0, 0, 600, 600);
table.Align = TextAlign.Center;
table.VAlign = VAlign.Center;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1", 2, 2 );
Row row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
Row row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 2" );
row4.Cells.Add( "Item 3" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table = New Table(0, 0, 600, 600)
MyTable.Align = TextAlign.Center
MyTable.VAlign = VAlign.Center
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1", Font.HelveticaOblique, 14, RgbColor.Blue, _
RgbColor.Yellow, 2)
Dim MyRow3 As Row = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 2")
MyRow3.Cells.Add("Item 3")
Dim MyRow4 As Row = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 4")
MyRow4.Cells.Add("Item 5")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table table = new Table(0, 0, 600, 600);
table.Align = TextAlign.Center;
table.VAlign = VAlign.Center;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1", Font.HelveticaOblique, 14, RgbColor.Blue,
RgbColor.Yellow, 2 );
Row row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 2" );
row3.Cells.Add( "Item 3" );
Row row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 4" );
row4.Cells.Add( "Item 5" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table = New Table(0, 0, 600, 600)
MyTable.Align = TextAlign.Center
MyTable.VAlign = VAlign.Center
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row = MyTable.Rows.Add()
MyRow2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow2.Cells.Add("Item 1", Font.HelveticaOblique, 16, RgbColor.Red, _
RgbColor.LightSkyBlue, 2, 2)
Dim MyRow3 As Row = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim MyRow4 As Row = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 2")
MyRow4.Cells.Add("Item 3")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table table = new Table(0, 0, 600, 600);
table.Align = TextAlign.Center;
table.VAlign = VAlign.Center;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row row2 = table.Rows.Add();
row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row2.Cells.Add( "Item 1", Font.HelveticaOblique, 14, RgbColor.Red,
RgbColor.LightSkyBlue, 2, 2 );
Row row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
Row row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 3", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 2" );
row4.Cells.Add( "Item 3" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table = New Table(0, 0, 600, 600)
MyTable.Align = TextAlign.Center
MyTable.VAlign = VAlign.Center
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row = MyTable.Rows.Add()
MyRow2.Cells.Add("Formatted Text", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim formattedText As String = "<font face='Times'>Font Face, </font>" + _
"<font color='FF0000'>Color, </font><b>Bold.</b>"
MyRow2.Cells.Add(New FormattedTextArea(formattedText, 0, 0, 140, 15, _
FontFamily.Helvetica, 14, False))
MyRow2.Cells.Add("Item 1")
Dim MyRow3 As Row = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 2")
MyRow3.Cells.Add("Item 3")
Dim MyRow4 As Row = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 4")
MyRow4.Cells.Add("Item 5")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table table = new Table(0, 0, 600, 600);
table.Align = TextAlign.Center;
table.VAlign = VAlign.Center;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row row2 = table.Rows.Add( 30 );
row2.Cells.Add( "Formatted Text", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
string formattedText = "<font face='Times'>Font Face, </font>" +
"<font color='FF0000'>Color, </font><b>Bold.</b>";
row2.Cells.Add( new FormattedTextArea( formattedText, 0, 0, 140, 15,
FontFamily.Helvetica, 14, false ) );
row2.Cells.Add( "Item 1" );
Row row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 2" );
row3.Cells.Add( "Item 3" );
Row row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 4" );
row4.Cells.Add( "Item 5" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table = New Table(0, 0, 600, 600)
MyTable.Align = TextAlign.Center
MyTable.VAlign = VAlign.Center
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow8 As Row = MyTable.Rows.Add()
MyRow8.Cells.Add("Lines", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim lineGroup As AreaGroup = New AreaGroup(150, 150)
lineGroup.Add(New Line(25, 25, 125, 125, 5))
lineGroup.Add(New Line(25, 125, 125, 25, 5))
MyRow8.Cells.Add(lineGroup, 2)
Dim MyRow3 As Row = MyTable.Rows.Add()
MyRow3.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow3.Cells.Add("Item 1")
MyRow3.Cells.Add("Item 2")
Dim MyRow4 As Row = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 3")
MyRow4.Cells.Add("Item 4")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table table = new Table(0, 0, 600, 600);
table.Align = TextAlign.Center;
table.VAlign = VAlign.Center;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row row2 = table.Rows.Add( 30 );
row2.Cells.Add( "Lines", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
AreaGroup lineGroup = new AreaGroup( 150, 150 );
lineGroup.Add( new Line( 25, 25, 125, 125, 5 ) );
lineGroup.Add( new Line( 25, 125, 125, 25, 5 ) );
row2.Cells.Add( lineGroup, 2 );
Row row3 = table.Rows.Add();
row3.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row3.Cells.Add( "Item 1" );
row3.Cells.Add( "Item 2" );
Row row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 3" );
row4.Cells.Add( "Item 4" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyTable As Table = New Table(0, 0, 600, 600)
MyTable.Align = TextAlign.Center
MyTable.VAlign = VAlign.Center
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
MyTable.Columns.Add(150)
' Add rows to the table and add cells to the rows
Dim MyRow1 As Row = MyTable.Rows.Add(0, Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.LightGrey)
MyRow1.Cells.Add("Header 1")
MyRow1.Cells.Add("Header 2")
MyRow1.Cells.Add("Header 3")
Dim MyRow2 As Row = MyTable.Rows.Add()
MyRow2.Cells.Add("Rectangle", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim rect As Rectangle = New Rectangle(0, 0, 90, 90, RgbColor.YellowGreen, _
RgbColor.Blue, 2)
MyRow2.Cells.Add(rect, 2, 2)
Dim MyRow3 As Row = MyTable.Rows.Add()
MyRow3.Cells.Add("Rectangle", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
Dim MyRow4 As Row = MyTable.Rows.Add()
MyRow4.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, _
Grayscale.LightGrey, 1)
MyRow4.Cells.Add("Item 1")
MyRow4.Cells.Add("Item 2")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Table table = new Table(0, 0, 600, 600);
table.Align = TextAlign.Center;
table.VAlign = VAlign.Center;
// Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 150 );
table.Columns.Add( 150 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 0, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey );
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
Row row2 = table.Rows.Add();
row2.Cells.Add( "Rectangle", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
Rectangle rect = new Rectangle( 0, 0, 90, 90, RgbColor.YellowGreen,
RgbColor.Blue, 2 );
row2.Cells.Add( rect, 2, 2 );
Row row3 = table.Rows.Add();
row3.Cells.Add( "Rectangle", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
Row row4 = table.Rows.Add();
row4.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.LightGrey, 1 );
row4.Cells.Add( "Item 1" );
row4.Cells.Add( "Item 2" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 two circles
Dim circle1 As Circle = New Circle(100, 100, 50, 100, Grayscale.Black, _
RgbColor.OrangeRed, 2, LineStyle.Solid)
Dim circle2 As Circle = New Circle(150, 75, 50, 50, Grayscale.Black, _
RgbColor.Lime, 2, LineStyle.Solid)
' Add the circles to the page
MyPage.Elements.Add(circle1)
MyPage.Elements.Add(circle2)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 two circles
Circle circle1 = new Circle(100, 100, 50, 100, Grayscale.Black, RgbColor.OrangeRed,
2, LineStyle.Solid);
Circle circle2 = new Circle(150, 75, 50, 50, Grayscale.Black, RgbColor.Lime,
2, LineStyle.Solid);
// Add the circles to the page
page.Elements.Add( circle1 );
page.Elements.Add( circle2 );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 table
Dim MyTable As Table = New Table(0, 0, 600, 600)
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
' Add rows to the table and add cells to the rows
Dim row1 As Row = MyTable.Rows.Add(40, ceTe.DynamicPDF.Font.HelveticaBold, _
16, Grayscale.Black, Grayscale.Gray)
row1.Align = TextAlign.Center
row1.VAlign = VAlign.Center
row1.Cells.Add("Header 1")
row1.Cells.Add("Header 2")
row1.Cells.Add("Header 3")
row1.Cells.Add("Header 4")
Dim row2 As Row = MyTable.Rows.Add(30)
Dim cell1 As Cell = row2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell1.Align = CellAlign.Center
cell1.VAlign = CellVAlign.Center
row2.Cells.Add("Item 1")
row2.Cells.Add("Item 2")
row2.Cells.Add("Item 3")
Dim row3 As Row = MyTable.Rows.Add(30)
Dim cell2 As Cell = row3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell2.Align = CellAlign.Center
cell2.VAlign = CellVAlign.Center
row3.Cells.Add("Item 4")
row3.Cells.Add("Item 5")
row3.Cells.Add("Item 6")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 table
Table table = new Table(0, 0, 600, 600);
//Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 40, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.Gray );
row1.Align = CellAlign.Center;
row1.VAlign = CellVAlign.Center;
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
row1.Cells.Add( "Header 4" );
Row row2 = table.Rows.Add( 30 );
Cell cell1 = row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell1.Align = CellAlign.Center;
cell1.VAlign = CellVAlign.Center;
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
row2.Cells.Add( "Item 3" );
Row row3 = table.Rows.Add( 30 );
Cell cell2 = row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell2.Align = CellAlign.Center;
cell2.VAlign = CellVAlign.Center;
row3.Cells.Add( "Item 4" );
row3.Cells.Add( "Item 5" );
row3.Cells.Add( "Item 6" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 table
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
MyTable.Border.Width = 2
MyTable.CellSpacing = 5
' Add columns to the table
Dim column1 As Column2 = MyTable.Columns.Add(150)
column1.CellDefault.Border.Right.LineStyle = LineStyle.Dots
column1.CellDefault.Border.Right.Color = RgbColor.Blue
column1.CellDefault.Border.Top.Width = 3
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
' Add rows to the table and add cells to the rows
Dim row1 As Row2 = MyTable.Rows.Add(40, ceTe.DynamicPDF.Font.HelveticaBold, _
16, Grayscale.Black, Grayscale.Gray)
row1.CellDefault.Align = TextAlign.Center
row1.CellDefault.VAlign = VAlign.Center
row1.Cells.Add("Header 1")
row1.Cells.Add("Header 2")
row1.Cells.Add("Header 3")
row1.Cells.Add("Header 4")
Dim row2 As Row2 = MyTable.Rows.Add(30)
Dim cell1 As Cell2 = row2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell1.Align = TextAlign.Center
cell1.VAlign = VAlign.Center
row2.Cells.Add("Item 1")
row2.Cells.Add("Item 2")
row2.Cells.Add("Item 3")
Dim row3 As Row2 = MyTable.Rows.Add(30)
Dim cell2 As Cell2 = row3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell2.Align = TextAlign.Center
cell2.VAlign = VAlign.Center
row3.Cells.Add("Item 4")
row3.Cells.Add("Item 5")
row3.Cells.Add("Item 6")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 table
Table2 table = new Table2(0, 0, 600, 600);
table.Border.Width = 2;
table.CellSpacing = 5;
//Add columns to the table
Column2 column1 = table.Columns.Add(150);
column1.CellDefault.Border.Right.LineStyle = LineStyle.Dots;
column1.CellDefault.Border.Right.Color = RgbColor.Blue;
column1.CellDefault.Border.Top.Width = 3;
table.Columns.Add(90);
table.Columns.Add(90);
table.Columns.Add(90);
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add(40, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.Gray);
row1.CellDefault.Align = TextAlign.Center;
row1.CellDefault.VAlign = VAlign.Center;
row1.Cells.Add("Header 1");
row1.Cells.Add("Header 2");
row1.Cells.Add("Header 3");
row1.Cells.Add("Header 4");
Row2 row2 = table.Rows.Add(30);
Cell2 cell1 = row2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1);
cell1.Align = TextAlign.Center;
cell1.VAlign = VAlign.Center;
row2.Cells.Add("Item 1");
row2.Cells.Add("Item 2");
row2.Cells.Add("Item 3");
Row2 row3 = table.Rows.Add(30);
Cell2 cell2 = row3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1);
cell2.Align = TextAlign.Center;
cell2.VAlign = VAlign.Center;
row3.Cells.Add("Item 4");
row3.Cells.Add("Item 5");
row3.Cells.Add("Item 6");
// Add the table to the page
page.Elements.Add(table);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
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 path
Dim MyPath As Path = New Path(50, 150, RgbColor.Blue, RgbColor.Yellow, _
3, LineStyle.Solid, True)
' Add some sub paths to the path
MyPath.SubPaths.Add(New CurveSubPath(50, 400, 300, 150, -200, 400))
MyPath.SubPaths.Add(New LineSubPath(300, 400))
MyPath.SubPaths.Add(New CurveToSubPath(300, 150, 50, 300))
MyPath.SubPaths.Add(New CurveFromSubPath(150, 100, 200, -100))
' Add the path to the page
MyPage.Elements.Add(MyPath)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 path
Path path = new Path( 50, 150, RgbColor.Blue, RgbColor.Yellow, 3,
LineStyle.Solid, true );
// Add some sub paths to the path
path.SubPaths.Add( new CurveSubPath( 50, 400, 300, 150, -200, 400 ) );
path.SubPaths.Add( new LineSubPath( 300, 400 ) );
path.SubPaths.Add( new CurveToSubPath( 300, 150, 50, 300 ) );
path.SubPaths.Add( new CurveFromSubPath( 150, 100, 200, -100 ) );
// Add the path to the page
page.Elements.Add( path );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 path
Dim MyPath As Path = New Path(50, 150, RgbColor.Blue, RgbColor.Yellow, _
3, LineStyle.Solid, True)
' Add some sub paths to the path
MyPath.SubPaths.Add(New CurveSubPath(50, 400, 300, 150, -200, 400))
MyPath.SubPaths.Add(New LineSubPath(300, 400))
MyPath.SubPaths.Add(New CurveToSubPath(300, 150, 50, 300))
MyPath.SubPaths.Add(New CurveFromSubPath(150, 100, 200, -100))
' Add the path to the page
MyPage.Elements.Add(MyPath)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 path
Path path = new Path( 50, 150, RgbColor.Blue, RgbColor.Yellow, 3,
LineStyle.Solid, true );
// Add some sub paths to the path
path.SubPaths.Add( new CurveSubPath( 50, 400, 300, 150, -200, 400 ) );
path.SubPaths.Add( new LineSubPath( 300, 400 ) );
path.SubPaths.Add( new CurveToSubPath( 300, 150, 50, 300 ) );
path.SubPaths.Add( new CurveFromSubPath( 150, 100, 200, -100 ) );
// Add the path to the page
page.Elements.Add( path );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 path
Dim MyPath As Path = New Path(50, 150, RgbColor.Blue, RgbColor.Yellow, _
3, LineStyle.Solid, True)
' Add some sub paths to the path
MyPath.SubPaths.Add(New CurveSubPath(50, 400, 300, 150, -200, 400))
MyPath.SubPaths.Add(New LineSubPath(300, 400))
MyPath.SubPaths.Add(New CurveToSubPath(300, 150, 50, 300))
MyPath.SubPaths.Add(New CurveFromSubPath(150, 100, 200, -100))
' Add the path to the page
MyPage.Elements.Add(MyPath)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 path
Path path = new Path( 50, 150, RgbColor.Blue, RgbColor.Yellow, 3,
LineStyle.Solid, true );
// Add some sub paths to the path
path.SubPaths.Add( new CurveSubPath( 50, 400, 300, 150, -200, 400 ) );
path.SubPaths.Add( new LineSubPath( 300, 400 ) );
path.SubPaths.Add( new CurveToSubPath( 300, 150, 50, 300 ) );
path.SubPaths.Add( new CurveFromSubPath( 150, 100, 200, -100 ) );
// Add the path to the page
page.Elements.Add( path );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 style
Dim style As FormattedTextAreaStyle = New FormattedTextAreaStyle(FontFamily.Helvetica, 12, False)
' Create the text and the formatted text area
Dim formattedText As String = "<p>Formatted text area provide rich formatting support for " + _
"text that appears in the document. You have complete control over 8 paragraph " + _
"properties: spacing before, spacing after, first line indentation, left indentation," + _
" right indentation, alignment, allowing orphan lines, and white space preservation; " + _
"6 font properties: <font face='Times'>font face, </font><font " + _
"pointSize='6'>font size, </font><font color='FF0000'>color, " + _
"</font><b>bold, </b><i<italic and </i><u>" + _
"underline</u>; and 2 line properties: leading, and leading type. Text can " + _
"also be rotated.</p>"
Dim MyFormattedTextArea As FormattedTextArea = New FormattedTextArea(formattedText, 0, 0, 256, 400, style)
' Add the formatted text area to the page
MyPage.Elements.Add(MyFormattedTextArea)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 an formatted style
FormattedTextAreaStyle style = new FormattedTextAreaStyle( FontFamily.Helvetica, 12, false );
// Create the text and the formatted text area
string formattedText = "<p>Formatted text area provide rich formatting support for text that " +
"appears in the document. You have complete control over 8 paragraph properties: " +
"spacing before, spacing after, first line indentation, left indentation, right " +
"indentation, alignment, allowing orphan lines, and white space preservation; 6 " +
"font properties: <font face='Times'>font face, </font><font " +
"pointSize='6'>font size, </font><font color='FF0000'>color, " +
"</font><b>bold, </b><i>italic and </i><u>" +
"underline</u>; and 2 line properties: leading, and leading type. Text can " +
"also be rotated.</p>";
FormattedTextArea formattedTextArea = new FormattedTextArea( formattedText, 0, 0, 256, 400, style );
// Add the formatted text area to the page
page.Elements.Add( formattedTextArea );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 string and assign it to text of variable length
Dim myVariableText As String = ""
Dim i As Integer
For i = 0 To 50
MyVariableText &= "<i>This</i> is a <font color='FF0000'>sentence</font> that " + _
"I will use as my <b>variable length</b> text. "
Next
' Create an formatted text area
Dim MyFormattedTextArea As FormattedTextArea = New FormattedTextArea(MyVariableText, 0, 0, 250, 200, FontFamily.Helvetica, 12, False)
Do
' Create a new page
Dim MyPage As Page = New Page
' Add the text area to the page;
MyPage.Elements.Add(MyFormattedTextArea)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Set the text area object equal to the rest of the text that did not fit
' if all the text fit this will set textArea to null
MyFormattedTextArea = MyFormattedTextArea.GetOverflowFormattedTextArea()
Loop While Not MyFormattedTextArea Is Nothing
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a string and assign it to text of variable length
string variableText = "";
for( int i = 0; i < 50; i++ )
variableText += "<i>This</i> is a <font color='FF0000'>sentence</font> that I " +
"will use as my <b>variable length</b> text. ";
// Create an formatted text area
FormattedTextArea formattedTextArea = new FormattedTextArea( variableText, 0, 0, 250, 200, FontFamily.Helvetica, 12, false );
do
{
// Create a new page
Page page = new Page();
// Add the text area to the page;
page.Elements.Add( formattedTextArea );
// Add the page to the document
document.Pages.Add( page );
// Set the formatted text area object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowFormattedTextArea will return null
formattedTextArea = formattedTextArea.GetOverflowFormattedTextArea();
} while( formattedTextArea != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 string and assign it to text of variable length
Dim myVariableText As String = ""
Dim i As Integer
For i = 0 To 50
MyVariableText &= "<i>This</i> is a <font color='FF0000'>sentence</font> that " + _
"I will use as my <b>variable length</b> text. "
Next
' Create an formatted text area
Dim MyFormattedTextArea As FormattedTextArea = New FormattedTextArea(MyVariableText, 0, 0, 250, 200, FontFamily.Helvetica, 12, False)
Do
' Create a new page
Dim MyPage As Page = New Page
' Add the text area to the page;
MyPage.Elements.Add(MyFormattedTextArea)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Set the text area object equal to the rest of the text that did not fit
' if all the text fit this will set textArea to null
MyFormattedTextArea = MyFormattedTextArea.GetOverflowFormattedTextArea(50, 50)
Loop While Not MyFormattedTextArea Is Nothing
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a string and assign it to text of variable length
string variableText = "";
for( int i = 0; i < 50; i++ )
variableText += "<i>This</i> is a <font color='FF0000'>sentence</font> that I " +
"will use as my <b>variable length</b> text. ";
// Create an formatted text area
FormattedTextArea formattedTextArea = new FormattedTextArea( variableText, 0, 0, 250, 200, FontFamily.Helvetica, 12, false );
do
{
// Create a new page
Page page = new Page();
// Add the text area to the page;
page.Elements.Add( formattedTextArea );
// Add the page to the document
document.Pages.Add( page );
// Set the formatted text area object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowFormattedTextArea will return null
formattedTextArea = formattedTextArea.GetOverflowFormattedTextArea( 50, 50 );
} while( formattedTextArea != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 string and assign it to text of variable length
Dim myVariableText As String = ""
Dim i As Integer
For i = 0 To 50
MyVariableText &= "<i>This</i> is a <font color='FF0000'>sentence</font> that " + _
"I will use as my <b>variable length</b> text. "
Next
' Create an formatted text area
Dim MyFormattedTextArea As FormattedTextArea = New FormattedTextArea(MyVariableText, 0, 0, 250, 200, FontFamily.Helvetica, 12, False)
Do
' Create a new page
Dim MyPage As Page = New Page
' Add the text area to the page;
MyPage.Elements.Add(MyFormattedTextArea)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Set the text area object equal to the rest of the text that did not fit
' if all the text fit this will set textArea to null
MyFormattedTextArea = MyFormattedTextArea.GetOverflowFormattedTextArea(50, 50, 100)
Loop While Not MyFormattedTextArea Is Nothing
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a string and assign it to text of variable length
string variableText = "";
for( int i = 0; i < 50; i++ )
variableText += "<i>This</i> is a <font color='FF0000'>sentence</font> that I " +
"will use as my <b>variable length</b> text. ";
// Create an formatted text area
FormattedTextArea formattedTextArea = new FormattedTextArea( variableText, 0, 0, 250, 200, FontFamily.Helvetica, 12, false );
do
{
// Create a new page
Page page = new Page();
// Add the text area to the page;
page.Elements.Add( formattedTextArea );
// Add the page to the document
document.Pages.Add( page );
// Set the formatted text area object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowFormattedTextArea will return null
formattedTextArea = formattedTextArea.GetOverflowFormattedTextArea( 50, 50, 100 );
} while( formattedTextArea != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 an formatted style
Dim style As FormattedTextAreaStyle = New FormattedTextAreaStyle(FontFamily.Helvetica, 12, False)
' Create the text and the formatted text area
Dim formattedText As String = "<p>Formatted text area provide rich formatting support for " + _
"text that appears in the document. You have complete control over 8 paragraph " + _
"properties: spacing before, spacing after, first line indentation, left indentation," + _
" right indentation, alignment, allowing orphan lines, and white space preservation; " + _
"6 font properties: <font face='Times'>font face, </font><font " + _
"pointSize='6'>font size, </font><font color='FF0000'>color, " + _
"</font><b>bold, </b><i<italic and </i><u>" + _
"underline</u>; and 2 line properties: leading, and leading type. Text can " + _
"also be rotated.</p>"
Dim MyFormattedTextArea As FormattedTextArea = New FormattedTextArea(formattedText, 0, 0, 256, 400, style)
' Add the formatted text area to the page
MyPage.Elements.Add(MyFormattedTextArea)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 an formatted style
FormattedTextAreaStyle style = new FormattedTextAreaStyle( FontFamily.Helvetica, 12, false );
// Create the text and the formatted text area
string formattedText = "<p>Formatted text area provide rich formatting support for text that " +
"appears in the document. You have complete control over 8 paragraph properties: " +
"spacing before, spacing after, first line indentation, left indentation, right " +
"indentation, alignment, allowing orphan lines, and white space preservation; 6 " +
"font properties: <font face='Times'>font face, </font><font " +
"pointSize='6'>font size, </font><font color='FF0000'>color, " +
"</font><b>bold, </b><i>italic and </i><u>" +
"underline</u>; and 2 line properties: leading, and leading type. Text can " +
"also be rotated.</p>";
FormattedTextArea formattedTextArea = new FormattedTextArea( formattedText, 0, 0, 256, 400, style );
// Add the formatted text area to the page
page.Elements.Add( formattedTextArea );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 an image
Dim MyImage As Image = New Image("C:\MyImage.jpg", 0, 0)
' Add the image to the page
MyPage.Elements.Add(MyImage)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 an image
Image image = new Image( @"C:\MyImage.jpg", 0, 0 );
// Add the image to the page
page.Elements.Add( image );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 the string and label
Dim MyText As String = "This is the dark blue, centered text at a 15 degree angle contained in the label."
Dim MyLabel As Label = New Label(MyText, 0, 0, 512, 14, Font.Helvetica, 14, TextAlign.Center, RgbColor.DarkBlue)
' Change the angle property
MyLabel.Angle = 15
' Add the label to the page
MyPage.Elements.Add(MyLabel)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 the string and label
string text = "This is the dark blue, centered text at a 15 degree angle contained in the label.";
Label label = new Label( text, 0, 0, 512, 14, Font.Helvetica, 14, TextAlign.Center, RgbColor.DarkBlue );
// Change the angle property
label.Angle = 15;
// Add the label to the page
page.Elements.Add( label );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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;
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 layout grid to the page
page.Elements.Add( grid );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 line
Dim MyLine As Line = New Line(50, 50, 50, 400, 5, _
Grayscale.Black, LineStyle.Solid)
' Change the line cap property
MyLine.Cap = LineCap.Round
' Add two lines to the page
MyPage.Elements.Add(MyLine)
MyPage.Elements.Add(New Line(60, 50, 150, 400, 2, _
RgbColor.Blue, LineStyle.DashLarge))
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 line
Line line = new Line( 50, 50, 50, 400, 5, Grayscale.Black,
LineStyle.Solid );
// Change the line cap property
line.Cap = LineCap.Round;
// Add two lines to the page
page.Elements.Add( line );
page.Elements.Add( new Line( 60, 50, 150, 400, 2,
RgbColor.Blue, LineStyle.DashLarge ) );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 path
Dim MyPath As Path = New Path(50, 150, RgbColor.Blue, RgbColor.Yellow, _
3, LineStyle.Solid, True)
' Add some sub paths to the path
MyPath.SubPaths.Add(New CurveSubPath(50, 400, 300, 150, -200, 400))
MyPath.SubPaths.Add(New LineSubPath(300, 400))
MyPath.SubPaths.Add(New CurveToSubPath(300, 150, 50, 300))
MyPath.SubPaths.Add(New CurveFromSubPath(150, 100, 200, -100))
' Add the path to the page
MyPage.Elements.Add(MyPath)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 path
Path path = new Path( 50, 150, RgbColor.Blue, RgbColor.Yellow, 3,
LineStyle.Solid, true );
// Add some sub paths to the path
path.SubPaths.Add( new CurveSubPath( 50, 400, 300, 150, -200, 400 ) );
path.SubPaths.Add( new LineSubPath( 300, 400 ) );
path.SubPaths.Add( new CurveToSubPath( 300, 150, 50, 300 ) );
path.SubPaths.Add( new CurveFromSubPath( 150, 100, 200, -100 ) );
// Add the path to the page
page.Elements.Add( path );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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)
Dim MyText As String = "This is a link to mydomain.com"
Dim MyFont As Font = Font.Helvetica
' Create the link's label
Dim MyLabel As Label = New Label(MyText, 50, 50, 400, 20, MyFont, 18, _
RgbColor.Blue)
MyLabel.Underline = True
' Set the action then create the link
Dim action As UrlAction = New UrlAction("http://www.mydomain.com")
Dim MyLink As Link = New Link(50, 50, MyFont.GetTextWidth(MyText, 18), _
20, Action)
' Add the label and the link to the page
MyPage.Elements.Add(MyLabel)
MyPage.Elements.Add(MyLink)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 );
string text = "This is a link to mydomain.com";
Font font = Font.Helvetica;
// Create the link's label
Label label = new Label( text, 50, 50, 400, 20, font, 18,
RgbColor.Blue );
label.Underline = true;
// Set the action then create the link
UrlAction action = new UrlAction( "http://www.mydomain.com" );
Link link = new Link( 50, 50, font.GetTextWidth( text, 18 ), 20,
action );
// Add the label and the link to the page
page.Elements.Add( label );
page.Elements.Add( link );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 note
Dim MyNote As Note = New Note("This is my help note.", 50, 50, _
150, 50, NoteType.Help, False)
' Change the color property
MyNote.Color = RgbColor.Red
' Add the note to the page
MyPage.Elements.Add(MyNote)
MyPage.Elements.Add(New Label("Click on the above icon to view " + _
"the note.", 50, 80, 150, 72, Font.HelveticaBold, 18))
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 note
Note note = new Note( "This is my help note.", 50, 50, 150, 50,
NoteType.Help, true );
// Change the color property
note.Color = RgbColor.Red;
// Add the note to the page
page.Elements.Add( note );
page.Elements.Add( new Label( "Click on the above icon to view " +
"the note.", 50, 80, 150, 72, Font.HelveticaBold, 18 ) );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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
Dim MyPage As Page = New Page
' Create a OrderedList.
Dim list As OrderedList = New OrderedList(50, 50, 300, 500)
list.ListItemTopMargin = 5
list.ListItemBottomMargin = 5
list.BulletPrefix = "("
list.BulletSuffix = ")"
list.TextColor = RgbColor.BlueViolet
' Add ListItem to the List.
Dim item1 As ListItem = list.Items.Add("List item 1")
item1.Underline = True
Dim item2 As ListItem = list.Items.Add("List item 2")
item2.Underline = True
Dim item3 As ListItem = list.Items.Add("List item 3")
item3.Underline = True
Dim item4 As ListItem = list.Items.Add("List item 4")
item4.Underline = True
' Add OrderedSubList under ListItem item1
Dim subList1 As OrderedSubList = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase)
subList1.TextColor = RgbColor.HotPink
Dim item5 As ListItem = subList1.Items.Add("Sub-list item 1")
Dim item6 As ListItem = subList1.Items.Add("Sub-list item 2")
Dim subList2 As OrderedSubList = item2.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList2.TextColor = RgbColor.DarkGoldenRod
Dim item7 As ListItem = subList2.Items.Add("Second level sub-list item 1")
Dim item8 As ListItem = subList2.Items.Add("Second level sub-list item 2")
Dim subList3 As OrderedSubList = item3.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList3.TextColor = RgbColor.DarkGoldenRod
Dim item9 As ListItem = subList3.Items.Add("Second level sub-list item 1")
Dim item10 As ListItem = subList3.Items.Add("Second level sub-list item 2")
Dim subList4 As OrderedSubList = item6.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase)
subList4.TextColor = RgbColor.HotPink
Dim item11 As ListItem = subList4.Items.Add("Sub-list item 1")
Dim item12 As ListItem = subList4.Items.Add("Sub-list item 2")
Dim subList5 As OrderedSubList = item7.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList5.TextColor = RgbColor.DarkGoldenRod
Dim item13 As ListItem = subList5.Items.Add("Second level sub-list item 1")
Dim item14 As ListItem = subList5.Items.Add("Second level sub-list item 2")
Dim subList6 As OrderedSubList = item4.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList6.TextColor = RgbColor.DarkGoldenRod
Dim item15 As ListItem = subList6.Items.Add("Second level sub-list item 1")
Dim item16 As ListItem = subList6.Items.Add("Second level sub-list item 2")
Dim subList7 As OrderedSubList = item5.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase)
subList7.TextColor = RgbColor.HotPink
Dim item17 As ListItem = subList7.Items.Add("Sub-list item 1")
Dim item18 As ListItem = subList7.Items.Add("Sub-list item 2")
' Add the OrderedList to the Page.
MyPage.Elements.Add(list)
'Add the Page to the Document.
MyDocument.Pages.Add(MyPage)
' Save the PDF.
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
Document document = new Document();
// Create a Page.
Page page = new Page();
// Create a OrderedList.
OrderedList list = new OrderedList(50, 50, 300, 500);
list.ListItemTopMargin = 5;
list.ListItemBottomMargin = 5;
list.BulletPrefix = "(";
list.BulletSuffix = ")";
list.TextColor = RgbColor.BlueViolet;
// Add ListItem to the List.
ListItem item1 = list.Items.Add("List item 1");
item1.Underline = true;
ListItem item2 = list.Items.Add("List item 2");
item2.Underline = true;
ListItem item3 = list.Items.Add("List item 3");
item3.Underline = true;
ListItem item4 = list.Items.Add("List item 4");
item4.Underline = true;
// Add OrderedSubList under ListItem item1
OrderedSubList subList1 = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase);
subList1.TextColor = RgbColor.HotPink;
ListItem item5 = subList1.Items.Add("Sub-list item 1");
ListItem item6 = subList1.Items.Add("Sub-list item 2");
OrderedSubList subList2 = item5.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList2.TextColor = RgbColor.DarkGoldenRod;
ListItem item7 = subList2.Items.Add("Second level sub-list item 1");
ListItem item8 = subList2.Items.Add("Second level sub-list item 2");
OrderedSubList subList3 = item6.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList3.TextColor = RgbColor.DarkGoldenRod;
ListItem item9 = subList3.Items.Add("Second level sub-list item 1");
ListItem item10 = subList3.Items.Add("Second level sub-list item 2");
OrderedSubList subList4 = item2.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase);
subList4.TextColor = RgbColor.HotPink;
ListItem item11 = subList4.Items.Add("Sub-list item 1");
ListItem item12 = subList4.Items.Add("Sub-list item 2");
OrderedSubList subList5 = item11.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList5.TextColor = RgbColor.DarkGoldenRod;
ListItem item13 = subList5.Items.Add("Second level sub-list item 1");
ListItem item14 = subList5.Items.Add("Second level sub-list item 2");
OrderedSubList subList6 = item12.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList6.TextColor = RgbColor.DarkGoldenRod;
ListItem item15 = subList6.Items.Add("Second level sub-list item 1");
ListItem item16 = subList6.Items.Add("Second level sub-list item 2");
OrderedSubList subList7 = item3.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase);
subList7.TextColor = RgbColor.HotPink;
ListItem item17 = subList7.Items.Add("Sub-list item 1");
ListItem item18 = subList7.Items.Add("Sub-list item 2");
// Add the OrderedList to the page
page.Elements.Add(list);
// Add the Page to the Document.
document.Pages.Add(page);
//save the PDF.
document.Draw(@"c:\MyDocument.pdf");
}
}
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
Dim MyPage As Page = New Page
' Create a OrderedList.
Dim list As OrderedList = New OrderedList(50, 50, 300, 250)
list.ListItemTopMargin = 5
list.ListItemBottomMargin = 5
list.BulletPrefix = "("
list.BulletSuffix = ")"
list.TextColor = RgbColor.BlueViolet
' Add ListItem to the List.
Dim item1 As ListItem = list.Items.Add("List item 1")
item1.Underline = True
Dim item2 As ListItem = list.Items.Add("List item 2")
item2.Underline = True
Dim item3 As ListItem = list.Items.Add("List item 3")
item3.Underline = True
Dim item4 As ListItem = list.Items.Add("List item 4")
item4.Underline = True
' Add OrderedSubList under ListItem item1
Dim subList1 As OrderedSubList = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase)
subList1.TextColor = RgbColor.HotPink
Dim item5 As ListItem = subList1.Items.Add("Sub-list item 1")
Dim item6 As ListItem = subList1.Items.Add("Sub-list item 2")
Dim subList2 As OrderedSubList = item2.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList2.TextColor = RgbColor.DarkGoldenRod
Dim item7 As ListItem = subList2.Items.Add("Second level sub-list item 1")
Dim item8 As ListItem = subList2.Items.Add("Second level sub-list item 2")
Dim subList3 As OrderedSubList = item3.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList3.TextColor = RgbColor.DarkGoldenRod
Dim item9 As ListItem = subList3.Items.Add("Second level sub-list item 1")
Dim item10 As ListItem = subList3.Items.Add("Second level sub-list item 2")
Dim subList4 As OrderedSubList = item6.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase)
subList4.TextColor = RgbColor.HotPink
Dim item11 As ListItem = subList4.Items.Add("Sub-list item 1")
Dim item12 As ListItem = subList4.Items.Add("Sub-list item 2")
Dim subList5 As OrderedSubList = item7.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList5.TextColor = RgbColor.DarkGoldenRod
Dim item13 As ListItem = subList5.Items.Add("Second level sub-list item 1")
Dim item14 As ListItem = subList5.Items.Add("Second level sub-list item 2")
Dim subList6 As OrderedSubList = item4.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList6.TextColor = RgbColor.DarkGoldenRod
Dim item15 As ListItem = subList6.Items.Add("Second level sub-list item 1")
Dim item16 As ListItem = subList6.Items.Add("Second level sub-list item 2")
Dim subList7 As OrderedSubList = item5.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList7.TextColor = RgbColor.HotPink
Dim item17 As ListItem = subList7.Items.Add("Sub-list item 1")
Dim item18 As ListItem = subList7.Items.Add("Sub-list item 2")
' Add the OrderedList to the Page.
MyPage.Elements.Add(list)
'Add the Page to the Document.
MyDocument.Pages.Add(MyPage)
' Set the UnorderedList object equal to the rest of the text that did not fit
'if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList()
While Not list Is Nothing
MyPage = New Page(PageSize.A4)
MyPage.Elements.Add(list)
MyDocument.Pages.Add(MyPage)
list = list.GetOverFlowList()
End While
' Save the PDF.
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
Document document = new Document();
// Create a Page.
Page page = new Page();
// Create a OrderedList.
OrderedList list = new OrderedList(50, 50, 300, 250);
list.ListItemTopMargin = 5;
list.ListItemBottomMargin = 5;
list.BulletPrefix = "(";
list.BulletSuffix = ")";
list.TextColor = RgbColor.BlueViolet;
// Add ListItem to the List.
ListItem item1 = list.Items.Add("List item 1");
item1.Underline = true;
ListItem item2 = list.Items.Add("List item 2");
item2.Underline = true;
ListItem item3 = list.Items.Add("List item 3");
item3.Underline = true;
ListItem item4 = list.Items.Add("List item 4");
item4.Underline = true;
// Add OrderedSubList under ListItem item1
OrderedSubList subList1 = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase);
subList1.TextColor = RgbColor.HotPink;
ListItem item5 = subList1.Items.Add("Sub-list item 1");
ListItem item6 = subList1.Items.Add("Sub-list item 2");
OrderedSubList subList2 = item5.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList2.TextColor = RgbColor.DarkGoldenRod;
ListItem item7 = subList2.Items.Add("Second level sub-list item 1");
ListItem item8 = subList2.Items.Add("Second level sub-list item 2");
OrderedSubList subList3 = item6.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList3.TextColor = RgbColor.DarkGoldenRod;
ListItem item9 = subList3.Items.Add("Second level sub-list item 1");
ListItem item10 = subList3.Items.Add("Second level sub-list item 2");
OrderedSubList subList4 = item2.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase);
subList4.TextColor = RgbColor.HotPink;
ListItem item11 = subList4.Items.Add("Sub-list item 1");
ListItem item12 = subList4.Items.Add("Sub-list item 2");
OrderedSubList subList5 = item11.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList5.TextColor = RgbColor.DarkGoldenRod;
ListItem item13 = subList5.Items.Add("Second level sub-list item 1");
ListItem item14 = subList5.Items.Add("Second level sub-list item 2");
OrderedSubList subList6 = item12.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList6.TextColor = RgbColor.DarkGoldenRod;
ListItem item15 = subList6.Items.Add("Second level sub-list item 1");
ListItem item16 = subList6.Items.Add("Second level sub-list item 2");
OrderedSubList subList7 = item3.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase);
subList7.TextColor = RgbColor.HotPink;
ListItem item17 = subList7.Items.Add("Sub-list item 1");
ListItem item18 = subList7.Items.Add("Sub-list item 2");
// Add the OrderedList to the page
page.Elements.Add(list);
// Add the Page to the Document.
document.Pages.Add(page);
// if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList();
while (list != null)
{
page = new Page(PageSize.A4);
page.Elements.Add(list);
document.Pages.Add(page);
list = list.GetOverFlowList();
}
//save the PDF.
document.Draw(@"c:\MyDocument.pdf");
}
}
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
Dim MyPage As Page = New Page
' Create a OrderedList.
Dim list As OrderedList = New OrderedList(50, 50, 300, 250)
list.ListItemTopMargin = 5
list.ListItemBottomMargin = 5
list.BulletPrefix = "("
list.BulletSuffix = ")"
list.TextColor = RgbColor.BlueViolet
' Add ListItem to the List.
Dim item1 As ListItem = list.Items.Add("List item 1")
item1.Underline = True
Dim item2 As ListItem = list.Items.Add("List item 2")
item2.Underline = True
Dim item3 As ListItem = list.Items.Add("List item 3")
item3.Underline = True
Dim item4 As ListItem = list.Items.Add("List item 4")
item4.Underline = True
' Add OrderedSubList under ListItem item1
Dim subList1 As OrderedSubList = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase)
subList1.TextColor = RgbColor.HotPink
Dim item5 As ListItem = subList1.Items.Add("Sub-list item 1")
Dim item6 As ListItem = subList1.Items.Add("Sub-list item 2")
Dim subList2 As OrderedSubList = item2.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList2.TextColor = RgbColor.DarkGoldenRod
Dim item7 As ListItem = subList2.Items.Add("Second level sub-list item 1")
Dim item8 As ListItem = subList2.Items.Add("Second level sub-list item 2")
Dim subList3 As OrderedSubList = item3.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList3.TextColor = RgbColor.DarkGoldenRod
Dim item9 As ListItem = subList3.Items.Add("Second level sub-list item 1")
Dim item10 As ListItem = subList3.Items.Add("Second level sub-list item 2")
Dim subList4 As OrderedSubList = item6.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase)
subList4.TextColor = RgbColor.HotPink
Dim item11 As ListItem = subList4.Items.Add("Sub-list item 1")
Dim item12 As ListItem = subList4.Items.Add("Sub-list item 2")
Dim subList5 As OrderedSubList = item7.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList5.TextColor = RgbColor.DarkGoldenRod
Dim item13 As ListItem = subList5.Items.Add("Second level sub-list item 1")
Dim item14 As ListItem = subList5.Items.Add("Second level sub-list item 2")
Dim subList6 As OrderedSubList = item4.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList6.TextColor = RgbColor.DarkGoldenRod
Dim item15 As ListItem = subList6.Items.Add("Second level sub-list item 1")
Dim item16 As ListItem = subList6.Items.Add("Second level sub-list item 2")
Dim subList7 As OrderedSubList = item5.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase)
subList7.TextColor = RgbColor.HotPink
Dim item17 As ListItem = subList7.Items.Add("Sub-list item 1")
Dim item18 As ListItem = subList7.Items.Add("Sub-list item 2")
' Add the OrderedList to the Page.
MyPage.Elements.Add(list)
'Add the Page to the Document.
MyDocument.Pages.Add(MyPage)
' Set the UnorderedList object equal to the rest of the text that did not fit
'if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList(50,50)
While Not list Is Nothing
MyPage = New Page(PageSize.A4)
MyPage.Elements.Add(list)
MyDocument.Pages.Add(MyPage)
list = list.GetOverFlowList(50,50)
End While
' Save the PDF.
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
Document document = new Document();
// Create a Page.
Page page = new Page();
// Create a OrderedList.
OrderedList list = new OrderedList(50, 50, 300, 250);
list.ListItemTopMargin = 5;
list.ListItemBottomMargin = 5;
list.BulletPrefix = "(";
list.BulletSuffix = ")";
list.TextColor = RgbColor.BlueViolet;
// Add ListItem to the List.
ListItem item1 = list.Items.Add("List item 1");
item1.Underline = true;
ListItem item2 = list.Items.Add("List item 2");
item2.Underline = true;
ListItem item3 = list.Items.Add("List item 3");
item3.Underline = true;
ListItem item4 = list.Items.Add("List item 4");
item4.Underline = true;
// Add OrderedSubList under ListItem item1
OrderedSubList subList1 = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase);
subList1.TextColor = RgbColor.HotPink;
ListItem item5 = subList1.Items.Add("Sub-list item 1");
ListItem item6 = subList1.Items.Add("Sub-list item 2");
OrderedSubList subList2 = item5.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList2.TextColor = RgbColor.DarkGoldenRod;
ListItem item7 = subList2.Items.Add("Second level sub-list item 1");
ListItem item8 = subList2.Items.Add("Second level sub-list item 2");
OrderedSubList subList3 = item6.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList3.TextColor = RgbColor.DarkGoldenRod;
ListItem item9 = subList3.Items.Add("Second level sub-list item 1");
ListItem item10 = subList3.Items.Add("Second level sub-list item 2");
OrderedSubList subList4 = item2.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase);
subList4.TextColor = RgbColor.HotPink;
ListItem item11 = subList4.Items.Add("Sub-list item 1");
ListItem item12 = subList4.Items.Add("Sub-list item 2");
OrderedSubList subList5 = item11.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList5.TextColor = RgbColor.DarkGoldenRod;
ListItem item13 = subList5.Items.Add("Second level sub-list item 1");
ListItem item14 = subList5.Items.Add("Second level sub-list item 2");
OrderedSubList subList6 = item12.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase);
subList6.TextColor = RgbColor.DarkGoldenRod;
ListItem item15 = subList6.Items.Add("Second level sub-list item 1");
ListItem item16 = subList6.Items.Add("Second level sub-list item 2");
OrderedSubList subList7 = item3.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase);
subList7.TextColor = RgbColor.HotPink;
ListItem item17 = subList7.Items.Add("Sub-list item 1");
ListItem item18 = subList7.Items.Add("Sub-list item 2");
// Add the OrderedList to the page
page.Elements.Add(list);
// Add the Page to the Document.
document.Pages.Add(page);
// if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList(50,50);
while (list != null)
{
page = new Page(PageSize.A4);
page.Elements.Add(list);
document.Pages.Add(page);
list = list.GetOverFlowList(50,50);
}
//save the PDF.
document.Draw(@"c:\MyDocument.pdf");
}
}
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 document template and add it to the document
Dim documentTemplate As Template = New Template()
MyDocument.Template = documentTemplate
' Place a page numbering label in the document template
documentTemplate.Elements.Add( New PageNumberingLabel( _
"%%PR%%%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica, _
12, TextAlign.Center ) )
' Begin the first section
MyDocument.Sections.Begin( NumberingStyle.RomanLowerCase )
' Add three pages
MyDocument.Pages.Add( new Page() ) 'Page 1
MyDocument.Pages.Add( new Page() ) 'Page 2
MyDocument.Pages.Add( new Page() ) 'Page 3
' Begin the second section
MyDocument.Sections.Begin( NumberingStyle.Numeric )
' Add four pages
MyDocument.Pages.Add( new Page() ) 'Page 4
MyDocument.Pages.Add( new Page() ) 'page 5
MyDocument.Pages.Add( new Page() ) 'page 6
MyDocument.Pages.Add( new Page() ) 'page 7
' Begin the third section specifying a section prefix
MyDocument.Sections.Begin( NumberingStyle.RomanLowerCase, _
"Appendix A - " )
' Add two pages
MyDocument.Pages.Add( new Page() ) 'page 8
MyDocument.Pages.Add( new Page() ) 'page 9
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a document template and add it to the document
Template documentTemplate = new Template();
document.Template = documentTemplate;
// Place a page numbering label in the document template
documentTemplate.Elements.Add( new PageNumberingLabel(
"%%PR%%%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica,
12, TextAlign.Center ) );
// Begin the first section
document.Sections.Begin( NumberingStyle.RomanLowerCase );
// Add three pages
document.Pages.Add( new Page() ); //Page 1
document.Pages.Add( new Page() ); //Page 2
document.Pages.Add( new Page() ); //Page 3
// Begin the second section
document.Sections.Begin( NumberingStyle.Numeric );
// Add four pages
document.Pages.Add( new Page() ); //Page 4
document.Pages.Add( new Page() ); //page 5
document.Pages.Add( new Page() ); //page 6
document.Pages.Add( new Page() ); //page 7
// Begin the third section specifying a section prefix
document.Sections.Begin( NumberingStyle.RomanLowerCase,
"Appendix A - " );
// Add two pages
document.Pages.Add( new Page() ); //page 8
document.Pages.Add( new Page() ); //page 9
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 path
Dim MyPath As Path = New Path(50, 150, RgbColor.Blue, RgbColor.Yellow, _
3, LineStyle.Solid, True)
' Add some sub paths to the path
MyPath.SubPaths.Add(New CurveSubPath(50, 400, 300, 150, -200, 400))
MyPath.SubPaths.Add(New LineSubPath(300, 400))
MyPath.SubPaths.Add(New CurveToSubPath(300, 150, 50, 300))
MyPath.SubPaths.Add(New CurveFromSubPath(150, 100, 200, -100))
' Add the path to the page
MyPage.Elements.Add(MyPath)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 path
Path path = new Path( 50, 150, RgbColor.Blue, RgbColor.Yellow,
3, LineStyle.Solid, true );
// Add some sub paths to the path
path.SubPaths.Add( new CurveSubPath( 50, 400, 300, 150, -200, 400 ) );
path.SubPaths.Add( new LineSubPath( 300, 400 ) );
path.SubPaths.Add( new CurveToSubPath( 300, 150, 50, 300 ) );
path.SubPaths.Add( new CurveFromSubPath( 150, 100, 200, -100 ) );
// Add the path to the page
page.Elements.Add( path );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 rectangle
Dim MyRectangle As Rectangle = New Rectangle(50, 50, 200, _
200, Grayscale.Black, RgbColor.Gray, 4, LineStyle.Solid)
' Change the corner radius property
MyRectangle.CornerRadius = 10
' Add the rectangle to the page
MyPage.Elements.Add(MyRectangle)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 rectangle
Rectangle rectangle = new Rectangle( 50, 50, 200, 200,
Grayscale.Black, RgbColor.Gray, 4, LineStyle.Solid );
// Change the corner radius property
rectangle.CornerRadius = 10;
// Add the rectangle to the page
page.Elements.Add( rectangle );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 table
Dim MyTable As Table = New Table(0, 0, 600, 600)
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
' Add rows to the table and add cells to the rows
Dim row1 As Row = MyTable.Rows.Add(40, ceTe.DynamicPDF.Font.HelveticaBold, _
16, Grayscale.Black, Grayscale.Gray)
row1.Align = TextAlign.Center
row1.VAlign = VAlign.Center
row1.Cells.Add("Header 1")
row1.Cells.Add("Header 2")
row1.Cells.Add("Header 3")
row1.Cells.Add("Header 4")
Dim row2 As Row = MyTable.Rows.Add(30)
Dim cell1 As Cell = row2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell1.Align = CellAlign.Center
cell1.VAlign = CellVAlign.Center
row2.Cells.Add("Item 1")
row2.Cells.Add("Item 2")
row2.Cells.Add("Item 3")
Dim row3 As Row = MyTable.Rows.Add(30)
Dim cell2 As Cell = row3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell2.Align = CellAlign.Center
cell2.VAlign = CellVAlign.Center
row3.Cells.Add("Item 4")
row3.Cells.Add("Item 5")
row3.Cells.Add("Item 6")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 table
Table table = new Table(0, 0, 600, 600);
//Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 40, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.Gray );
row1.Align = CellAlign.Center;
row1.VAlign = CellVAlign.Center;
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
row1.Cells.Add( "Header 4" );
Row row2 = table.Rows.Add( 30 );
Cell cell1 = row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell1.Align = CellAlign.Center;
cell1.VAlign = CellVAlign.Center;
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
row2.Cells.Add( "Item 3" );
Row row3 = table.Rows.Add( 30 );
Cell cell2 = row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell2.Align = CellAlign.Center;
cell2.VAlign = CellVAlign.Center;
row3.Cells.Add( "Item 4" );
row3.Cells.Add( "Item 5" );
row3.Cells.Add( "Item 6" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 table
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
' Add rows to the table and add cells to the rows
Dim row1 As Row2 = MyTable.Rows.Add(40, ceTe.DynamicPDF.Font.HelveticaBold, _
16, Grayscale.Black, Grayscale.Gray)
row1.CellDefault.Align = TextAlign.Center
row1.CellDefault.VAlign = VAlign.Center
row1.CellDefault.Border.Color = RgbColor.Blue
row1.CellDefault.Border.Width = 2.0f
row1.CellDefault.Border.LineStyle = LineStyle.None
row1.Cells.Add("Header 1")
row1.Cells.Add("Header 2")
row1.Cells.Add("Header 3")
row1.Cells.Add("Header 4")
Dim row2 As Row2 = MyTable.Rows.Add(30)
Dim cell1 As Cell2 = row2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell1.Align = TextAlign.Center
cell1.VAlign = VAlign.Center
cell1.Border.Color = RgbColor.Blue
cell1.Border.Width = 2.0f
cell1.Border.LineStyle = LineStyle.Solid
row2.Cells.Add("Item 1")
row2.Cells.Add("Item 2")
row2.Cells.Add("Item 3")
row2.CellDefault.Border.Left.Color = RgbColor.Green
row2.CellDefault.Border.Top.Width = 3.0f
row2.CellDefault.Border.Right.LineStyle = LineStyle.None
row2.CellDefault.Border.Bottom.Color = RgbColor.Green
Dim row3 As Row2 = MyTable.Rows.Add(30)
Dim cell2 As Cell2 = row3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell2.Align = TextAlign.Center
cell2.VAlign = VAlign.Center
cell2.Border.Color = RgbColor.Blue
cell2.Border.Width = 2.0f
cell2.Border.LineStyle = LineStyle.None
row3.Cells.Add("Item 4")
row3.Cells.Add("Item 5")
row3.Cells.Add("Item 6")
row3.CellDefault.Padding.Left = 4.0f
row3.CellDefault.Padding.Top = 4.0f
row3.CellDefault.Padding.Right = 2.0f
row3.CellDefault.Padding.Bottom = 2.0f
MyTable.CellDefault.Padding.Value = 3.0f
MyTable.CellSpacing = 5.0f
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 table
Table2 table = new Table2(0, 0, 600, 600);
//Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 40, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.Gray );
row1.CellDefault.Align = TextAlign.Center;
row1.CellDefault.VAlign = VAlign.Center;
row1.CellDefault.Border.Color = RgbColor.Blue;
row1.CellDefault.Border.Width = 2.0f;
row1.CellDefault.Border.LineStyle = LineStyle.None;
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
row1.Cells.Add( "Header 4" );
Row2 row2 = table.Rows.Add( 30 );
Cell2 cell1 = row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell1.Align = TextAlign.Center;
cell1.VAlign = VAlign.Center;
cell1.Border.Left.Color = RgbColor.Blue;
cell1.Border.Right.Width = 2.0f;
cell1.Border.Right.LineStyle = LineStyle.Solid;
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
row2.Cells.Add( "Item 3" );
row2.CellDefault.Border.Left.Color = RgbColor.Green;
row2.CellDefault.Border.Top.Width = 3.0f;
row2.CellDefault.Border.Right.LineStyle = LineStyle.None;
row2.CellDefault.Border.Bottom.Color = RgbColor.Green;
Row2 row3 = table.Rows.Add( 30 );
Cell2 cell2 = row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell2.Align = TextAlign.Center;
cell2.VAlign = VAlign.Center;
cell2.Border.Color = RgbColor.Blue;
cell2.Border.Width = 2.0f;
cell2.Border.LineStyle = LineStyle.None;
row3.Cells.Add( "Item 4" );
row3.Cells.Add( "Item 5" );
row3.Cells.Add( "Item 6" );
row3.CellDefault.Padding.Left = 4.0f;
row3.CellDefault.Padding.Top = 4.0f;
row3.CellDefault.Padding.Right = 2.0f;
row3.CellDefault.Padding.Bottom = 2.0f;
table.CellDefault.Padding.Value = 3.0f;
table.CellSpacing = 5.0f;
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 table
Dim MyTable As Table = New Table(0, 0, 600, 600)
' Add columns to the table
MyTable.Columns.Add(150)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
' Add rows to the table and add cells to the rows
Dim row1 As Row = MyTable.Rows.Add(40, ceTe.DynamicPDF.Font.HelveticaBold, _
16, Grayscale.Black, Grayscale.Gray)
row1.Align = TextAlign.Center
row1.VAlign = VAlign.Center
row1.Cells.Add("Header 1")
row1.Cells.Add("Header 2")
row1.Cells.Add("Header 3")
row1.Cells.Add("Header 4")
Dim row2 As Row = MyTable.Rows.Add(30)
Dim cell1 As Cell = row2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell1.Align = CellAlign.Center
cell1.VAlign = CellVAlign.Center
row2.Cells.Add("Item 1")
row2.Cells.Add("Item 2")
row2.Cells.Add("Item 3")
Dim row3 As Row = MyTable.Rows.Add(30)
Dim cell2 As Cell = row3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell2.Align = CellAlign.Center
cell2.VAlign = CellVAlign.Center
row3.Cells.Add("Item 4")
row3.Cells.Add("Item 5")
row3.Cells.Add("Item 6")
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 table
Table table = new Table(0, 0, 600, 600);
//Add columns to the table
table.Columns.Add( 150 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
// Add rows to the table and add cells to the rows
Row row1 = table.Rows.Add( 40, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.Gray );
row1.Align = CellAlign.Center;
row1.VAlign = CellVAlign.Center;
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
row1.Cells.Add( "Header 4" );
Row row2 = table.Rows.Add( 30 );
Cell cell1 = row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell1.Align = CellAlign.Center;
cell1.VAlign = CellVAlign.Center;
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
row2.Cells.Add( "Item 3" );
Row row3 = table.Rows.Add( 30 );
Cell cell2 = row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell2.Align = CellAlign.Center;
cell2.VAlign = CellVAlign.Center;
row3.Cells.Add( "Item 4" );
row3.Cells.Add( "Item 5" );
row3.Cells.Add( "Item 6" );
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table = New Table(0, 0, 200, 700)
MyTable.Columns.Add(100)
MyTable.Columns.Add(100)
' This loop populates the table
Dim I As Integer
For I = 1 To 400
Dim MyRow As Row = MyTable.Rows.Add(20)
MyRow.Cells.Add("Row #" & I)
MyRow.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowRows()
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table table = new Table( 0, 0, 200, 700 );
table.Columns.Add( 100 );
table.Columns.Add( 100 );
// This loop populates the table
for ( int i = 1; i <= 400; i++ )
{
Row row = table.Rows.Add( 20 );
row.Cells.Add( "Row #" + i );
row.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowRows();
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table = New Table(0, 0, 200, 700)
MyTable.Columns.Add(100)
MyTable.Columns.Add(100)
' This loop populates the table
Dim I As Integer
For I = 1 To 400
Dim MyRow As Row = MyTable.Rows.Add(20)
MyRow.Cells.Add("Row #" & I)
MyRow.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowRows(50, 50)
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table table = new Table( 0, 0, 200, 700 );
table.Columns.Add( 100 );
table.Columns.Add( 100 );
// This loop populates the table
for ( int i = 1; i <= 400; i++ )
{
Row row = table.Rows.Add( 20 );
row.Cells.Add( "Row #" + i );
row.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowRows( 50, 50 );
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table = New Table(0, 0, 200, 700)
MyTable.Columns.Add(100)
MyTable.Columns.Add(100)
' This loop populates the table
Dim I As Integer
For I = 1 To 400
Dim MyRow As Row = MyTable.Rows.Add(20)
MyRow.Cells.Add("Row #" & I)
MyRow.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowRows(50, 50, 200, 350)
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table table = new Table( 0, 0, 200, 700 );
table.Columns.Add( 100 );
table.Columns.Add( 100 );
// This loop populates the table
for ( int i = 1; i <= 400; i++ )
{
Row row = table.Rows.Add( 20 );
row.Cells.Add( "Row #" + i );
row.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowRows( 50, 50, 200, 350 );
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table = New Table(0, 0, 500, 50)
' Create some number of columns
Dim Cols As Integer = 50
Dim Int As Integer
For Int = 0 To Cols
MyTable.Columns.Add(100)
Next
' Create your rows to fill in
Dim MyRow1 As Row = MyTable.Rows.Add(20)
Dim MyRow2 As Row = MyTable.Rows.Add(20)
Dim J As Integer
For J = 1 To Cols
MyRow1.Cells.Add("Column #" & J)
MyRow2.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowColumns()
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table table = new Table( 0, 0, 500, 50 );
// Create some number of columns
int cols = 50;
for( int i = 0; i <= cols; i++ )
table.Columns.Add( 100 );
// Create your rows to fill in
Row row1 = table.Rows.Add( 20 );
Row row2 = table.Rows.Add( 20 );
for( int j = 0; j <= cols; j++ )
{
row1.Cells.Add( "Column #" + j );
row2.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowColumns();
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table = New Table(0, 0, 500, 50)
' Create some number of columns
Dim Cols As Integer = 50
Dim Int As Integer
For Int = 0 To Cols
MyTable.Columns.Add(100)
Next
' Create your rows to fill in
Dim MyRow1 As Row = MyTable.Rows.Add(20)
Dim MyRow2 As Row = MyTable.Rows.Add(20)
Dim J As Integer
For J = 1 To Cols
MyRow1.Cells.Add("Column #" & J)
MyRow2.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowColumns(50, 50)
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table table = new Table( 0, 0, 500, 50 );
// Create some number of columns
int cols = 50;
for( int i = 0; i <= cols; i++ )
table.Columns.Add( 100 );
// Create your rows to fill in
Row row1 = table.Rows.Add( 20 );
Row row2 = table.Rows.Add( 20 );
for( int j = 0; j <= cols; j++ )
{
row1.Cells.Add( "Column #" + j );
row2.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowColumns( 50, 50 );
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table = New Table(0, 0, 500, 50)
' Create some number of columns
Dim Cols As Integer = 50
Dim Int As Integer
For Int = 0 To Cols
MyTable.Columns.Add(100)
Next
' Create your rows to fill in
Dim MyRow1 As Row = MyTable.Rows.Add(20)
Dim MyRow2 As Row = MyTable.Rows.Add(20)
Dim J As Integer
For J = 1 To Cols
MyRow1.Cells.Add("Column #" & J)
MyRow2.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowColumns(50, 50, 250, 50)
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table table = new Table( 0, 0, 500, 50 );
// Create some number of columns
int cols = 50;
for( int i = 0; i <= cols; i++ )
table.Columns.Add( 100 );
// Create your rows to fill in
Row row1 = table.Rows.Add( 20 );
Row row2 = table.Rows.Add( 20 );
for( int j = 0; j <= cols; j++ )
{
row1.Cells.Add( "Column #" + j );
row2.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowColumns( 50, 50, 250, 50 );
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 table
Dim MyTable As Table2 = New Table2(0, 0, 600, 600)
' Add columns to the table
Column2 column1 = MyTable.Columns.Add(150)
column1.CellDefault.Align = TextAlign.Center
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
MyTable.Columns.Add(90)
' Add rows to the table and add cells to the rows
Dim row1 As Row2 = MyTable.Rows.Add(40, ceTe.DynamicPDF.Font.HelveticaBold, _
16, Grayscale.Black, Grayscale.Gray)
row1.CellDefault.Align = TextAlign.Center
row1.CellDefault.VAlign = VAlign.Center
row1.Cells.Add("Header 1")
row1.Cells.Add("Header 2")
row1.Cells.Add("Header 3")
row1.Cells.Add("Header 4")
Dim row2 As Row2 = MyTable.Rows.Add(30)
Dim cell1 As Cell2 = row2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell1.Align = TextAlign.Center
cell1.VAlign = VAlign.Center
row2.Cells.Add("Item 1")
row2.Cells.Add("Item 2")
row2.Cells.Add("Item 3")
Dim row3 As Row2 = MyTable.Rows.Add(30)
Dim cell2 As Cell2 = row3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, _
Grayscale.Black, Grayscale.Gray, 1)
cell2.Align = TextAlign.Center
cell2.VAlign = VAlign.Center
row3.Cells.Add("Item 4")
row3.Cells.Add("Item 5")
row3.Cells.Add("Item 6")
MyTable.CellDefault.Padding.Value = 5.0f
MyTable.CellSpacing = 5.0f
MyTable.Border.Top.Color = RgbColor.Blue
MyTable.Border.Bottom.Color = RgbColor.Blue
MyTable.Border.Top.Width = 2
MyTable.Border.Bottom.Width = 2
MyTable.Border.Left.LineStyle = LineStyle.None;
MyTable.Border.Right.LineStyle = LineStyle.None
' Add the table to the page
MyPage.Elements.Add(MyTable)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 table
Table2 table = new Table2(0, 0, 600, 600);
//Add columns to the table
Column2 column1 = table.Columns.Add(150);
column1.CellDefault.Align = TextAlign.Center;
table.Columns.Add( 90 );
table.Columns.Add( 90 );
table.Columns.Add( 90 );
// Add rows to the table and add cells to the rows
Row2 row1 = table.Rows.Add( 40, Font.HelveticaBold, 16, Grayscale.Black,
Grayscale.Gray );
row1.CellDefault.Align = TextAlign.Center;
row1.CellDefault.VAlign = VAlign.Center;
row1.Cells.Add( "Header 1" );
row1.Cells.Add( "Header 2" );
row1.Cells.Add( "Header 3" );
row1.Cells.Add( "Header 4" );
Row2 row2 = table.Rows.Add( 30 );
Cell2 cell1 = row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell1.Align = TextAlign.Center;
cell1.VAlign = VAlign.Center;
row2.Cells.Add( "Item 1" );
row2.Cells.Add( "Item 2" );
row2.Cells.Add( "Item 3" );
Row2 row3 = table.Rows.Add( 30 );
Cell2 cell2 = row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16,
Grayscale.Black, Grayscale.Gray, 1 );
cell2.Align = TextAlign.Center;
cell2.VAlign = VAlign.Center;
row3.Cells.Add( "Item 4" );
row3.Cells.Add( "Item 5" );
row3.Cells.Add( "Item 6" );
table.CellDefault.Padding.Value = 5.0f;
table.CellSpacing = 5.0f;
table.Border.Top.Color = RgbColor.Blue;
table.Border.Bottom.Color = RgbColor.Blue;
table.Border.Top.Width = 2;
table.Border.Bottom.Width = 2;
table.Border.Left.LineStyle = LineStyle.None;
table.Border.Right.LineStyle = LineStyle.None;
// Add the table to the page
page.Elements.Add( table );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table2 = New Table2(0, 0, 200, 700)
MyTable.Columns.Add(100)
MyTable.Columns.Add(100)
' This loop populates the table
Dim I As Integer
For I = 1 To 400
Dim MyRow As Row2 = MyTable.Rows.Add(20)
MyRow.Cells.Add("Row #" & I)
MyRow.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowRows()
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table2 table = new Table2( 0, 0, 200, 700 );
table.Columns.Add( 100 );
table.Columns.Add( 100 );
// This loop populates the table
for ( int i = 1; i <= 400; i++ )
{
Row2 row = table.Rows.Add( 20 );
row.Cells.Add( "Row #" + i );
row.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowRows();
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table2 = New Table2(0, 0, 200, 700)
MyTable.Columns.Add(100)
MyTable.Columns.Add(100)
' This loop populates the table
Dim I As Integer
For I = 1 To 400
Dim MyRow As Row2 = MyTable.Rows.Add(20)
MyRow.Cells.Add("Row #" & I)
MyRow.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowRows(30, 30)
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table2 table = new Table2( 0, 0, 200, 700 );
table.Columns.Add( 100 );
table.Columns.Add( 100 );
// This loop populates the table
for ( int i = 1; i <= 400; i++ )
{
Row2 row = table.Rows.Add( 20 );
row.Cells.Add( "Row #" + i );
row.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowRows( 30, 30 );
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table2 = New Table2(0, 0, 200, 700)
MyTable.Columns.Add(100)
MyTable.Columns.Add(100)
' This loop populates the table
Dim I As Integer
For I = 1 To 400
Dim MyRow As Row2 = MyTable.Rows.Add(20)
MyRow.Cells.Add("Row #" & I)
MyRow.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowRows(50, 50, 200, 350)
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table2 table = new Table2( 0, 0, 200, 700 );
table.Columns.Add( 100 );
table.Columns.Add( 100 );
// This loop populates the table
for ( int i = 1; i <= 400; i++ )
{
Row2 row = table.Rows.Add( 20 );
row.Cells.Add( "Row #" + i );
row.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowRows( 50, 50, 200, 350 );
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table2 = New Table2(0, 0, 500, 50)
' Create some number of columns
Dim ColumnCount As Integer = 50
Dim Int As Integer
For Int = 0 To ColumnCount
MyTable.Columns.Add(100)
Next
' Create your rows to fill in
Dim MyRow1 As Row2 = MyTable.Rows.Add(20)
Dim MyRow2 As Row2 = MyTable.Rows.Add(20)
Dim J As Integer
For J = 1 To ColumnCount
MyRow1.Cells.Add("Column #" & J)
MyRow2.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowColumns()
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table2 table = new Table2( 0, 0, 500, 50 );
// Create some number of columns
int columnCount = 50;
for( int i = 0; i <= columnCount; i++ )
table.Columns.Add( 100 );
// Create your rows to fill in
Row2 row1 = table.Rows.Add( 20 );
Row2 row2 = table.Rows.Add( 20 );
for( int j = 0; j <= columnCount; j++ )
{
row1.Cells.Add( "Column #" + j );
row2.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowColumns();
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table2 = New Table2(0, 0, 500, 50)
' Create some number of columns
Dim ColumnCount As Integer = 50
Dim Int As Integer
For Int = 0 To ColumnCount
MyTable.Columns.Add(100)
Next
' Create your rows to fill in
Dim MyRow1 As Row2 = MyTable.Rows.Add(20)
Dim MyRow2 As Row2 = MyTable.Rows.Add(20)
Dim J As Integer
For J = 1 To ColumnCount
MyRow1.Cells.Add("Column #" & J)
MyRow2.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowColumns(50, 50)
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table2 table = new Table2( 0, 0, 500, 50 );
// Create some number of columns
int columnCount = 50;
for( int i = 0; i <= columnCount; i++ )
table.Columns.Add( 100 );
// Create your rows to fill in
Row2 row1 = table.Rows.Add( 20 );
Row2 row2 = table.Rows.Add( 20 );
for( int j = 0; j <= columnCount; j++ )
{
row1.Cells.Add( "Column #" + j );
row2.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowColumns( 50, 50 );
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
Dim MyTable As Table2 = New Table2(0, 0, 500, 50)
' Create some number of columns
Dim ColumnCount As Integer = 50
Dim Int As Integer
For Int = 0 To ColumnCount
MyTable.Columns.Add(100)
Next
' Create your rows to fill in
Dim MyRow1 As Row2 = MyTable.Rows.Add(20)
Dim MyRow2 As Row2 = MyTable.Rows.Add(20)
Dim J As Integer
For J = 1 To ColumnCount
MyRow1.Cells.Add("Column #" & J)
MyRow2.Cells.Add("Item")
Next
Do
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
MyPage.Elements.Add(MyTable)
MyTable = MyTable.GetOverflowColumns(50, 50, 250, 50)
Loop While Not (MyTable Is Nothing)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
Table2 table = new Table2( 0, 0, 500, 50 );
// Create some number of columns
int columnCount = 50;
for( int i = 0; i <= columnCount; i++ )
table.Columns.Add( 100 );
// Create your rows to fill in
Row2 row1 = table.Rows.Add( 20 );
Row2 row2 = table.Rows.Add( 20 );
for( int j = 0; j <= columnCount; j++ )
{
row1.Cells.Add( "Column #" + j );
row2.Cells.Add( "Item" );
}
do
{
Page page = new Page();
document.Pages.Add( page );
page.Elements.Add( table );
table = table.GetOverflowColumns( 50, 50, 250, 50 );
} while ( table != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 text area
Dim MyTextArea As TextArea = New TextArea("This is the " + "underlined text of a TextArea", 100, 100, 400, 30, _
ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18)
' Change the underline property to true
MyTextArea.Underline = True
' Add the text to the page
MyPage.Elements.Add(MyTextArea)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 text area
TextArea textArea = new TextArea( "This is the underlined " + "text of a TextArea", 100, 100, 400, 30,
ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18 );
// Change the underline property to true
textArea.Underline = true;
// Add the text area to the page
page.Elements.Add( textArea );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 string and assign it to text of variable length
Dim myVariableText As String = ""
Dim i As Integer
For i = 0 To 50
myVariableText &= "This is a sentence that I will use as my variable length text. "
Next
' Create a text area
Dim MyTextArea As TextArea = New TextArea(myVariableText, 0, 0, 250, 200)
Do
' Create a new page
Dim MyPage As Page = New Page
' Add the text area to the page;
MyPage.Elements.Add(MyTextArea)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Set the text area object equal to the rest of the text that did not fit
' if all the text fit this will set textArea to null
MyTextArea = MyTextArea.GetOverflowTextArea()
Loop While Not MyTextArea Is Nothing
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a string and assign it to text of variable length
string variableText = "";
for( int i = 0; i < 50; i++ )
variableText += "This is a sentence that I will use as my variable length text. ";
// Create a text area
TextArea textArea = new TextArea( variableText, 0, 0, 250, 200 );
do
{
// Create a new page
Page page = new Page();
// Add the text area to the page;
page.Elements.Add( textArea );
// Add the page to the document
document.Pages.Add( page );
// Set the text area object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowTextArea will return null
textArea = textArea.GetOverflowTextArea();
} while( textArea != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 string and assign it to text of variable length
Dim myVariableText As String = ""
Dim i As Integer
For i = 0 To 50
myVariableText &= "This is a sentence that I will use as my variable length text. "
Next
' Create a text area
Dim MyTextArea As TextArea = New TextArea(myVariableText, 0, 0, 250, 200)
Do
' Create a new page
Dim MyPage As Page = New Page
' Add the text area to the page;
MyPage.Elements.Add(MyTextArea)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Set the text area object equal to the rest of the text that did not fit
' if all the text fit this will set textArea to null
MyTextArea = MyTextArea.GetOverflowTextArea(50, 50)
Loop While Not MyTextArea Is Nothing
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a string and assign it to text of variable length
string variableText = "";
for( int i = 0; i < 50; i++ )
variableText += "This is a sentence that I will use as my variable length text. ";
// Create a text area
TextArea textArea = new TextArea( variableText, 0, 0, 250, 200 );
do
{
// Create a new page
Page page = new Page();
// Add the text area to the page;
page.Elements.Add( textArea );
// Add the page to the document
document.Pages.Add( page );
// Set the text area object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowTextArea will return null
textArea = textArea.GetOverflowTextArea( 50, 50 );
} while( textArea != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 string and assign it to text of variable length
Dim myVariableText As String = ""
Dim i As Integer
For i = 0 To 50
myVariableText &= "This is a sentence that I will use as my variable length text. "
Next
' Create a text area
Dim MyTextArea As TextArea = New TextArea(myVariableText, 0, 0, 250, 200)
Do
' Create a new page
Dim MyPage As Page = New Page
' Add the text area to the page;
MyPage.Elements.Add(MyTextArea)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Set the text area object equal to the rest of the text that did not fit
' if all the text fit this will set textArea to null
MyTextArea = MyTextArea.GetOverflowTextArea(50, 50, 100,200)
Loop While Not MyTextArea Is Nothing
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a string and assign it to text of variable length
string variableText = "";
for( int i = 0; i < 50; i++ )
variableText += "This is a sentence that I will use as my variable length text. ";
// Create a text area
TextArea textArea = new TextArea( variableText, 0, 0, 250, 200 );
do
{
// Create a new page
Page page = new Page();
// Add the text area to the page;
page.Elements.Add( textArea );
// Add the page to the document
document.Pages.Add( page );
// Set the text area object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowTextArea will return null
textArea = textArea.GetOverflowTextArea( 50, 50, 100,200);
} while( textArea != null );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Text
Imports ceTe.DynamicPDF.PageElements
Module Module1
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page
' Create a Text Area
Dim MyTextArea As TextArea = New TextArea("Text with kerning", 10, 10, 200, 100)
' Enable the kerning for the text area
MyTextArea.KerningEnabled = True
' Get the Kerning Pairs for the text area
Dim MyKerningValues As KerningValues = MyTextArea.GetKerningValues
' Apply a custom kerning value between 'T' & 'e' in 'Text'
' so that chars will be closer than normal
MyKerningValues.Spacing(0) = 200
' Add the text area to the page
MyPage.Elements.Add(MyTextArea)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Save the document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Text;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main(string[] args)
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page();
// Create a Text Area
TextArea textArea = new TextArea("Text with kerning", 10, 10, 200, 100);
// Enable the kerning for the text area
textArea.KerningEnabled = true;
// Get the Kerning Pairs for the text area
KerningValues kerningValues = textArea.GetKerningValues();
// Apply a custom kerning value between 'T' & 'e' in 'Text'
// so that chars will be closer than normal
kerningValues.Spacing[0] = 200;
// Add the text area to the page
page.Elements.Add(textArea);
// Add the page to the document
document.Pages.Add(page);
// Save the document
document.Draw(@"C:\MyDocument.pdf");
}
}
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 transformation group and add a rectangle and a label to it
Dim MyGroup As TransformationGroup = New TransformationGroup(100, 100,200, 200, 30)
MyGroup.Add(New Rectangle(0, 0, 75, 75, RgbColor.Blue, RgbColor.Blue))
MyGroup.Add(New Label("This text is inside a TransformationGroup.", 0,100, 300, 12))
' Vertically scale the group
MyGroup.ScaleY = 2
' Add the transformation group to the page
MyPage.Elements.Add(MyGroup)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 transformation group and add a rectangle and label to it
TransformationGroup group = new TransformationGroup( 100, 100, 200, 200, 30 );
group.Add( new Rectangle( 0, 0, 75, 75, RgbColor.Blue, RgbColor.Blue ) );
group.Add( new Label( "This text is inside a TransformationGroup.", 0, 100, 300, 12 ) );
// Vertically scale the group
group.ScaleY = 2;
// Add the transformation group to the page
page.Elements.Add( group );
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 transparency group and add a rectangle to it
Dim MyGroup As TransparencyGroup = New TransparencyGroup(0.5F)
MyGroup.Add(New Rectangle(50, 0, 100, 100, RgbColor.Red, RgbColor.Red))
' Add a label to the page
MyPage.Elements.Add(New Label("This text is beneath the rectangle.", 0, 0, 200, 12))
'Add the transparency group to the page
MyPage.Elements.Add(MyGroup)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 transparency group and add a rectangle to it
TransparencyGroup group = new TransparencyGroup( 0.5f );
group.Add( new Rectangle( 50, 0, 100, 100, RgbColor.Red, RgbColor.Red ) );
// Add a label to the page
page.Elements.Add( new Label( "This text is beneath the rectangle.", 0, 0, 200, 12 ) );
// Add the transparency group to the page
page.Elements.Add( group );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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
Dim MyPage As Page = New Page
' Create a OrderedList.
Dim list As UnorderedList = New UnorderedList(50, 50, 300, 500)
list.ListItemTopMargin = 5
list.ListItemBottomMargin = 5
list.TextColor = RgbColor.BlueViolet
' Add ListItem to the List.
Dim item1 As ListItem = list.Items.Add("List item 1")
item1.Underline = True
Dim item2 As ListItem = list.Items.Add("List item 2")
item2.Underline = True
Dim item3 As ListItem = list.Items.Add("List item 3")
item3.Underline = True
Dim item4 As ListItem = list.Items.Add("List item 4")
item4.Underline = True
' Add OrderedSubList under ListItem item1
Dim subList1 As UnorderedSubList = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList1.TextColor = RgbColor.HotPink
Dim item5 As ListItem = subList1.Items.Add("Sub-list item 1")
Dim item6 As ListItem = subList1.Items.Add("Sub-list item 2")
Dim subList2 As UnorderedSubList = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList2.TextColor = RgbColor.DarkGoldenRod
Dim item7 As ListItem = subList2.Items.Add("Second level sub-list item 1")
Dim item8 As ListItem = subList2.Items.Add("Second level sub-list item 2")
Dim subList3 As UnorderedSubList = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList3.TextColor = RgbColor.DarkGoldenRod
Dim item9 As ListItem = subList3.Items.Add("Second level sub-list item 1")
Dim item10 As ListItem = subList3.Items.Add("Second level sub-list item 2")
Dim subList4 As UnorderedSubList = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList4.TextColor = RgbColor.HotPink
Dim item11 As ListItem = subList4.Items.Add("Sub-list item 1")
Dim item12 As ListItem = subList4.Items.Add("Sub-list item 2")
Dim subList5 As UnorderedSubList = item7.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList5.TextColor = RgbColor.DarkGoldenRod
Dim item13 As ListItem = subList5.Items.Add("Second level sub-list item 1")
Dim item14 As ListItem = subList5.Items.Add("Second level sub-list item 2")
Dim subList6 As UnorderedSubList = item4.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList6.TextColor = RgbColor.DarkGoldenRod
Dim item15 As ListItem = subList6.Items.Add("Second level sub-list item 1")
Dim item16 As ListItem = subList6.Items.Add("Second level sub-list item 2")
Dim subList7 As UnorderedSubList = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList7.TextColor = RgbColor.HotPink
Dim item17 As ListItem = subList7.Items.Add("Sub-list item 1")
Dim item18 As ListItem = subList7.Items.Add("Sub-list item 2")
' Add the OrderedList to the Page.
MyPage.Elements.Add(list)
'Add the Page to the Document.
MyDocument.Pages.Add(MyPage)
' Save the PDF.
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
Document document = new Document();
// Create a Page.
Page page = new Page();
// Create a UnorderedList.
UnorderedList list = new UnorderedList(50, 50, 300, 500);
list.ListItemTopMargin = 5;
list.ListItemBottomMargin = 5;
list.TextColor = RgbColor.BlueViolet;
// Add ListItem to the List.
ListItem item1 = list.Items.Add("List item 1");
item1.Underline = true;
ListItem item2 = list.Items.Add("List item 2");
item2.Underline = true;
ListItem item3 = list.Items.Add("List item 3");
item3.Underline = true;
ListItem item4 = list.Items.Add("List item 4");
item4.Underline = true;
// Add UnorderedSubList under ListItem item1
UnorderedSubList subList1 = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList1.TextColor = RgbColor.HotPink;
ListItem item5 = subList1.Items.Add("Sub-list item 1");
ListItem item6 = subList1.Items.Add("Sub-list item 2");
UnorderedSubList subList2 = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList2.TextColor = RgbColor.DarkGoldenRod;
ListItem item7 = subList2.Items.Add("Second level sub-list item 1");
ListItem item8 = subList2.Items.Add("Second level sub-list item 2");
UnorderedSubList subList3 = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList3.TextColor = RgbColor.DarkGoldenRod;
ListItem item9 = subList3.Items.Add("Second level sub-list item 1");
ListItem item10 = subList3.Items.Add("Second level sub-list item 2");
UnorderedSubList subList4 = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList4.TextColor = RgbColor.HotPink;
ListItem item11 = subList4.Items.Add("Sub-list item 1");
ListItem item12 = subList4.Items.Add("Sub-list item 2");
UnorderedSubList subList5 = item11.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList5.TextColor = RgbColor.DarkGoldenRod;
ListItem item13 = subList5.Items.Add("Second level sub-list item 1");
ListItem item14 = subList5.Items.Add("Second level sub-list item 2");
UnorderedSubList subList6 = item12.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList6.TextColor = RgbColor.DarkGoldenRod;
ListItem item15 = subList6.Items.Add("Second level sub-list item 1");
ListItem item16 = subList6.Items.Add("Second level sub-list item 2");
UnorderedSubList subList7 = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList7.TextColor = RgbColor.HotPink;
ListItem item17 = subList7.Items.Add("Sub-list item 1");
ListItem item18 = subList7.Items.Add("Sub-list item 2");
// Add the UnorderedList to the page
page.Elements.Add(list);
// Add the Page to the Document.
document.Pages.Add(page);
// Save the PDF.
document.Draw(@"c:\MyDocument.pdf");
}
}
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
Dim MyPage As Page = New Page
' Create a OrderedList.
Dim list As UnorderedList = New UnorderedList(50, 50, 300, 250)
list.ListItemTopMargin = 5
list.ListItemBottomMargin = 5
list.TextColor = RgbColor.BlueViolet
' Add ListItem to the List.
Dim item1 As ListItem = list.Items.Add("List item 1")
item1.Underline = True
Dim item2 As ListItem = list.Items.Add("List item 2")
item2.Underline = True
Dim item3 As ListItem = list.Items.Add("List item 3")
item3.Underline = True
Dim item4 As ListItem = list.Items.Add("List item 4")
item4.Underline = True
' Add OrderedSubList under ListItem item1
Dim subList1 As UnorderedSubList = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList1.TextColor = RgbColor.HotPink
Dim item5 As ListItem = subList1.Items.Add("Sub-list item 1")
Dim item6 As ListItem = subList1.Items.Add("Sub-list item 2")
Dim subList2 As UnorderedSubList = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList2.TextColor = RgbColor.DarkGoldenRod
Dim item7 As ListItem = subList2.Items.Add("Second level sub-list item 1")
Dim item8 As ListItem = subList2.Items.Add("Second level sub-list item 2")
Dim subList3 As UnorderedSubList = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList3.TextColor = RgbColor.DarkGoldenRod
Dim item9 As ListItem = subList3.Items.Add("Second level sub-list item 1")
Dim item10 As ListItem = subList3.Items.Add("Second level sub-list item 2")
Dim subList4 As UnorderedSubList = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList4.TextColor = RgbColor.HotPink
Dim item11 As ListItem = subList4.Items.Add("Sub-list item 1")
Dim item12 As ListItem = subList4.Items.Add("Sub-list item 2")
Dim subList5 As UnorderedSubList = item7.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList5.TextColor = RgbColor.DarkGoldenRod
Dim item13 As ListItem = subList5.Items.Add("Second level sub-list item 1")
Dim item14 As ListItem = subList5.Items.Add("Second level sub-list item 2")
Dim subList6 As UnorderedSubList = item4.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList6.TextColor = RgbColor.DarkGoldenRod
Dim item15 As ListItem = subList6.Items.Add("Second level sub-list item 1")
Dim item16 As ListItem = subList6.Items.Add("Second level sub-list item 2")
Dim subList7 As UnorderedSubList = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList7.TextColor = RgbColor.HotPink
Dim item17 As ListItem = subList7.Items.Add("Sub-list item 1")
Dim item18 As ListItem = subList7.Items.Add("Sub-list item 2")
'Add the OrderedList to the Page.
MyPage.Elements.Add(list)
'Add the Page to the Document.
MyDocument.Pages.Add(MyPage)
' Set the UnorderedList object equal to the rest of the text that did not fit
' if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList()
While Not list Is Nothing
MyPage = New Page(PageSize.A4)
MyPage.Elements.Add(list)
MyDocument.Pages.Add(MyPage)
list = list.GetOverFlowList()
End While
' Save the PDF.
MyDocument.Draw("C:\MyDocument.pdf")
End sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
Document document = new Document();
// Create a Page.
Page page = new Page();
// Create a OrderedList.
UnorderedList list = new UnorderedList(50, 50, 300, 250);
list.ListItemTopMargin = 5;
list.ListItemBottomMargin = 5;
list.TextColor = RgbColor.BlueViolet;
// Add ListItem to the List.
ListItem item1 = list.Items.Add("List item 1");
item1.Underline = true;
ListItem item2 = list.Items.Add("List item 2");
item2.Underline = true;
ListItem item3 = list.Items.Add("List item 3");
item3.Underline = true;
ListItem item4 = list.Items.Add("List item 4");
item4.Underline = true;
// Add UnorderedSubList under ListItem item1
UnorderedSubList subList1 = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList1.TextColor = RgbColor.HotPink;
ListItem item5 = subList1.Items.Add("Sub-list item 1");
ListItem item6 = subList1.Items.Add("Sub-list item 2");
UnorderedSubList subList2 = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList2.TextColor = RgbColor.DarkGoldenRod;
ListItem item7 = subList2.Items.Add("Second level sub-list item 1");
ListItem item8 = subList2.Items.Add("Second level sub-list item 2");
UnorderedSubList subList3 = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList3.TextColor = RgbColor.DarkGoldenRod;
ListItem item9 = subList3.Items.Add("Second level sub-list item 1");
ListItem item10 = subList3.Items.Add("Second level sub-list item 2");
UnorderedSubList subList4 = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList4.TextColor = RgbColor.HotPink;
ListItem item11 = subList4.Items.Add("Sub-list item 1");
ListItem item12 = subList4.Items.Add("Sub-list item 2");
UnorderedSubList subList5 = item11.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList5.TextColor = RgbColor.DarkGoldenRod;
ListItem item13 = subList5.Items.Add("Second level sub-list item 1");
ListItem item14 = subList5.Items.Add("Second level sub-list item 2");
UnorderedSubList subList6 = item12.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList6.TextColor = RgbColor.DarkGoldenRod;
ListItem item15 = subList6.Items.Add("Second level sub-list item 1");
ListItem item16 = subList6.Items.Add("Second level sub-list item 2");
UnorderedSubList subList7 = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList7.TextColor = RgbColor.HotPink;
ListItem item17 = subList7.Items.Add("Sub-list item 1");
ListItem item18 = subList7.Items.Add("Sub-list item 2");
// Add the UnorderedList to the page
page.Elements.Add(list);
// Add the Page to the Document.
document.Pages.Add(page);
// Set the UnorderedList object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList();
while (list != null)
{
page = new Page(PageSize.A4);
page.Elements.Add(list);
document.Pages.Add(page);
list = list.GetOverFlowList();
}
//save the PDF.
document.Draw(@"c:\MyDocument.pdf");
}
}
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
Dim MyPage As Page = New Page
' Create a OrderedList.
Dim list As UnorderedList = New UnorderedList(50, 50, 300, 250)
list.ListItemTopMargin = 5
list.ListItemBottomMargin = 5
list.TextColor = RgbColor.BlueViolet
' Add ListItem to the List.
Dim item1 As ListItem = list.Items.Add("List item 1")
item1.Underline = True
Dim item2 As ListItem = list.Items.Add("List item 2")
item2.Underline = True
Dim item3 As ListItem = list.Items.Add("List item 3")
item3.Underline = True
Dim item4 As ListItem = list.Items.Add("List item 4")
item4.Underline = True
' Add OrderedSubList under ListItem item1
Dim subList1 As UnorderedSubList = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList1.TextColor = RgbColor.HotPink
Dim item5 As ListItem = subList1.Items.Add("Sub-list item 1")
Dim item6 As ListItem = subList1.Items.Add("Sub-list item 2")
Dim subList2 As UnorderedSubList = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList2.TextColor = RgbColor.DarkGoldenRod
Dim item7 As ListItem = subList2.Items.Add("Second level sub-list item 1")
Dim item8 As ListItem = subList2.Items.Add("Second level sub-list item 2")
Dim subList3 As UnorderedSubList = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList3.TextColor = RgbColor.DarkGoldenRod
Dim item9 As ListItem = subList3.Items.Add("Second level sub-list item 1")
Dim item10 As ListItem = subList3.Items.Add("Second level sub-list item 2")
Dim subList4 As UnorderedSubList = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList4.TextColor = RgbColor.HotPink
Dim item11 As ListItem = subList4.Items.Add("Sub-list item 1")
Dim item12 As ListItem = subList4.Items.Add("Sub-list item 2")
Dim subList5 As UnorderedSubList = item7.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList5.TextColor = RgbColor.DarkGoldenRod
Dim item13 As ListItem = subList5.Items.Add("Second level sub-list item 1")
Dim item14 As ListItem = subList5.Items.Add("Second level sub-list item 2")
Dim subList6 As UnorderedSubList = item4.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList6.TextColor = RgbColor.DarkGoldenRod
Dim item15 As ListItem = subList6.Items.Add("Second level sub-list item 1")
Dim item16 As ListItem = subList6.Items.Add("Second level sub-list item 2")
Dim subList7 As UnorderedSubList = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList7.TextColor = RgbColor.HotPink
Dim item17 As ListItem = subList7.Items.Add("Sub-list item 1")
Dim item18 As ListItem = subList7.Items.Add("Sub-list item 2")
'Add the OrderedList to the Page.
MyPage.Elements.Add(list)
'Add the Page to the Document.
MyDocument.Pages.Add(MyPage)
' Set the UnorderedList object equal to the rest of the text that did not fit
' if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList(50,50)
While Not list Is Nothing
MyPage = New Page(PageSize.A4)
MyPage.Elements.Add(list)
MyDocument.Pages.Add(MyPage)
list = list.GetOverFlowList(50,50)
End While
' Save the PDF.
MyDocument.Draw("C:\MyDocument.pdf")
End sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
Document document = new Document();
// Create a Page.
Page page = new Page();
// Create a OrderedList.
UnorderedList list = new UnorderedList(50, 50, 300, 250);
list.ListItemTopMargin = 5;
list.ListItemBottomMargin = 5;
list.TextColor = RgbColor.BlueViolet;
// Add ListItem to the List.
ListItem item1 = list.Items.Add("List item 1");
item1.Underline = true;
ListItem item2 = list.Items.Add("List item 2");
item2.Underline = true;
ListItem item3 = list.Items.Add("List item 3");
item3.Underline = true;
ListItem item4 = list.Items.Add("List item 4");
item4.Underline = true;
// Add UnorderedSubList under ListItem item1
UnorderedSubList subList1 = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList1.TextColor = RgbColor.HotPink;
ListItem item5 = subList1.Items.Add("Sub-list item 1");
ListItem item6 = subList1.Items.Add("Sub-list item 2");
UnorderedSubList subList2 = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList2.TextColor = RgbColor.DarkGoldenRod;
ListItem item7 = subList2.Items.Add("Second level sub-list item 1");
ListItem item8 = subList2.Items.Add("Second level sub-list item 2");
UnorderedSubList subList3 = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList3.TextColor = RgbColor.DarkGoldenRod;
ListItem item9 = subList3.Items.Add("Second level sub-list item 1");
ListItem item10 = subList3.Items.Add("Second level sub-list item 2");
UnorderedSubList subList4 = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList4.TextColor = RgbColor.HotPink;
ListItem item11 = subList4.Items.Add("Sub-list item 1");
ListItem item12 = subList4.Items.Add("Sub-list item 2");
UnorderedSubList subList5 = item11.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList5.TextColor = RgbColor.DarkGoldenRod;
ListItem item13 = subList5.Items.Add("Second level sub-list item 1");
ListItem item14 = subList5.Items.Add("Second level sub-list item 2");
UnorderedSubList subList6 = item12.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList6.TextColor = RgbColor.DarkGoldenRod;
ListItem item15 = subList6.Items.Add("Second level sub-list item 1");
ListItem item16 = subList6.Items.Add("Second level sub-list item 2");
UnorderedSubList subList7 = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList7.TextColor = RgbColor.HotPink;
ListItem item17 = subList7.Items.Add("Sub-list item 1");
ListItem item18 = subList7.Items.Add("Sub-list item 2");
// Add the UnorderedList to the page
page.Elements.Add(list);
// Add the Page to the Document.
document.Pages.Add(page);
// Set the UnorderedList object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList(50,50);
while (list != null)
{
page = new Page(PageSize.A4);
page.Elements.Add(list);
document.Pages.Add(page);
list = list.GetOverFlowList(50,50);
}
//save the PDF.
document.Draw(@"c:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Text
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 core font with a specified encoding
Dim MyCentralEuropeHelveticaFont As Font = New Helvetica(Encoder.CentralEurope)
' Use the font in a text area Page Element
MyPage.Elements.Add(New TextArea("Text using the Central Europe encoder", 0, 0, 200, 12, MyCentralEuropeHelveticaFont, 12))
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Text;
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 core font with a specified encoding
Font centralEuropeHelveticaFont = new Helvetica( Encoder.CentralEurope );
// Use the font in a text area Page Element
page.Elements.Add( new TextArea( "Text using the Central Europe encoder", 0, 0, 200, 12, centralEuropeHelveticaFont, 12 ) );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Text
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 core font with a specified encoding
Dim MyCentralEuropeHelveticaFont As Font = New Helvetica(Encoder.CentralEurope)
' Use the font in a text area Page Element
MyPage.Elements.Add(New TextArea("Text using the Central Europe encoder", 0, 0, 200, 12, MyCentralEuropeHelveticaFont, 12))
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Text;
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 core font with a specified encoding
Font centralEuropeHelveticaFont = new Helvetica( Encoder.CentralEurope );
// Use the font in a text area Page Element
page.Elements.Add( new TextArea( "Text using the Central Europe encoder", 0, 0, 200, 12, centralEuropeHelveticaFont, 12 ) );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.Text
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
' Add page to the document
MyDocument.Pages.Add(MyPage)
' Assign some text to a string
Dim MyText As String = "To and WA are examples of when kerning would be used."
' Create a textarea
Dim MyTextArea As TextArea = New TextArea(MyText, 10, 10, 400, 700, ceTe.DynamicPDF.Font.TimesRoman)
' Must be enabled before kern values can be read
MyTextArea.KerningEnabled = true
' Create a KerningValues
Dim MyKernValues As KerningValues = MyTextArea.GetKerningValues()
' Assign positive value for making the space between chars closer and negative value for making the space further
For i As Integer = 0 To MyKernValues.Spacing.Length - 1
MyKernValues.Spacing(i) = Short.Parse((MyKernValues.Spacing(i) - 400).ToString)
Next
' Add the text to the page
MyPage.Elements.Add(MyTextArea)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.Text;
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();
// Add page to the document
document.Pages.Add( page );
//Assign some text to a string
string text = "To and WA are examples of when kerning would be used.";
// Create a textarea
TextArea textArea = new TextArea(text, 10, 10, 400, 700, ceTe.DynamicPDF.Font.TimesRoman);
// Must be enabled before kern values can be read
textArea.KerningEnabled = true;
// Create a KerningValues
KerningValues kernValues = textArea.GetKerningValues();
// Assign positive value for making the space between chars closer and negative value for making the space further
for (int i = 0; i < kernValues.Spacing.Length; i++)
{
kernValues.Spacing[i] = (short)(kernValues.Spacing[i] - 400);
}
// Add the text area to the page
page.Elements.Add( textArea );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.Text;
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 open type font
Dim MyOpentypefont As OpenTypeFont = New OpenTypeFont("Path of .otf file")
' Create a label
Dim MyLabel As ceTe.DynamicPDF.PageElements.Label = New ceTe.DynamicPDF.PageElements.Label("This text uses open type font ", 0, 0, 300, 300)
' Assign open type font to label
MyLabel.Font = MyOpentypefont
' Add label to the page
MyPage.Elements.Add(MyLabel)
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.Text;
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 open type font
OpenTypeFont opentypefont = new OpenTypeFont("Path of .otf file");
//Create a label
ceTe.DynamicPDF.PageElements.Label label = new ceTe.DynamicPDF.PageElements.Label("This text uses opentype font ", 0, 0, 300, 300);
// Assign opentype font to label
label.Font = opentypefont;
// Add label to the page
page.Elements.Add(label);
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Xmp
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add blank pages to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Create an Xmp Metadata
Dim MyXmp As XmpMetadata = New XmpMetadata
' Basic Job Ticket Schema.
Dim MyJob As BasicJobTicketSchema = New BasicJobTicketSchema
MyJob.JobRef.Add( "MyCompany", "Xmp Test", new Uri( "http://www.mydomain.com/" ) )
MyJob.JobRef.Add( "MyProduct", "XMP Metadata", new Uri( "http://www.mydomain.com/" ) )
MyXmp.AddSchema( MyJob )
' Add the Xmp Metadata to the document
MyDocument.XmpMetadata = MyXmp
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Xmp;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add blank pages to the document
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Create an Xmp Metadata
XmpMetadata xmp = new XmpMetadata();
// Basic Job Ticket Schema.
BasicJobTicketSchema job = new BasicJobTicketSchema();
job.JobRef.Add( "MyCompany", "Xmp Test", new Uri( "http://www.mydomain.com/" ) );
job.JobRef.Add( "MyProduct", "XMP Metadata", new Uri( "http://www.mydomain.com/" ) );
xmp.AddSchema( job );
// Add the Xmp Metadata to the document
document.XmpMetadata = xmp;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports System.IO
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Xmp
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add blank pages to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Create an Xmp Metadata
Dim MyXmp As XmpMetadata = New XmpMetadata
' Basic Schema.
Dim Mybs As BasicSchema = MyXmp.BasicSchema
Mybs.Advisory.Add("Date")
Mybs.Advisory.Add("Contributors")
Mybs.Nickname = "xyz"
Mybs.Thumbnails.Add(106, 80, "JPEG", GetImage("C:\thumbnail.jpg"))
' Note: Need not have to add Basic Schema, already added internally.
' Add the Xmp Metadata to the document
MyDocument.XmpMetadata = MyXmp
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
Private Function GetImage(ByVal filePath As String) As Byte()
Dim MyInFile As FileStream = New FileStream(filePath, FileMode.Open, FileAccess.Read)
Dim MyBinaryData(MyInFile.Length) As Byte
MyInFile.Read(MyBinaryData, 0, MyInFile.Length)
MyInFile.Close()
return MyBinaryData
End Function
End Module
using System;
using System.IO;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Xmp;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add blank pages to the document
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Create an Xmp Metadata
XmpMetadata xmp = new XmpMetadata();
// Basic Schema.
BasicSchema bs = xmp.BasicSchema;
bs.Advisory.Add( "Date" );
bs.Advisory.Add( "Contributors" );
bs.Nickname = "xyz";
bs.Thumbnails.Add(106, 80, "JPEG", GetImage( @"C:\thumbnail.jpg" ) );
// Note: Need not have to add Basic Schema, already added internally.
// Add the Xmp Metadata to the document
document.XmpMetadata = xmp;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
private static byte[] GetImage( string filePath )
{
FileStream inFile = new FileStream( filePath, FileMode.Open, FileAccess.Read );
byte[] binaryData = new byte[ inFile.Length ];
inFile.Read( binaryData, 0, (int)inFile.Length );
inFile.Close();
return binaryData;
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Xmp
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add blank pages to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Create an Xmp Metadata
Dim MyXmp As XmpMetadata = New XmpMetadata
' Dublin Core Schema.
Dim Mydc As DublinCoreSchema = MyXmp.DublinCore
Mydc.Contributors.Add( "Abc" )
Mydc.Contributors.Add( "Xyz" )
Mydc.Contributors.Add( "Pqrs" )
Mydc.Coverage = "To test all the attributes of schema's provided"
Mydc.Creators.Add( "MyProduct" )
Mydc.Creators.Add( "MyCompany" )
Mydc.Date.Add( DateTime.Now )
Mydc.Description.AddLang( "en-us", "XMP Schema's test" )
Mydc.Identifier = "First XMP pdf"
Mydc.Publisher.Add( "mydomain.com" )
Mydc.Publisher.Add( "MyCompany" )
Mydc.Relation.Add( "test pdf with xmp" )
Mydc.Rights.DefaultText = "US English"
Mydc.Rights.AddLang( "en-us", "All rights reserved 2012, MyCompany." )
Mydc.Source = "XMP Project"
Mydc.Subject.Add( "eXtensible Metadata Platform" )
Mydc.Title.AddLang( "en-us", "XMP" )
Mydc.Title.AddLang( "it-it", "XMP - Piattaforma Estendible di Metadata" )
Mydc.Title.AddLang( "du-du", "De hallo Wereld" )
Mydc.Title.AddLang( "fr-fr", "XMP - Une Platforme Extensible pour les Métédonnées" )
Mydc.Title.AddLang( "DE-DE", "ÄËßÜ Hallo Welt" )
Mydc.Type.Add( "Pdf file containing xmp metadata" )
' Note: Need not have to add Dublin Core Schema, already added internally.
' Add the Xmp Metadata to the document
MyDocument.XmpMetadata = MyXmp
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Xmp;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add blank pages to the document
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Create an Xmp Metadata
XmpMetadata xmp = new XmpMetadata();
// Dublin Core Schema.
DublinCoreSchema dc = xmp.DublinCore;
dc.Contributors.Add( "Abc" );
dc.Contributors.Add( "Xyz" );
dc.Contributors.Add( "Pqrs" );
dc.Coverage = "To test all the attributes of schema's provided";
dc.Creators.Add( "MyProduct" );
dc.Creators.Add( "MyCompany" );
dc.Date.Add( DateTime.Now );
dc.Description.AddLang( "en-us", "XMP Schema's test" );
dc.Identifier = "First XMP pdf";
dc.Publisher.Add( "mydomain.com" );
dc.Publisher.Add( "MyCompany" );
dc.Relation.Add( "test pdf with xmp" );
dc.Rights.DefaultText = "US English";
dc.Rights.AddLang( "en-us", "All rights reserved 2012, MyCompany." );
dc.Source = "XMP Project";
dc.Subject.Add( "eXtensible Metadata Platform" );
dc.Title.AddLang( "en-us", "XMP" );
dc.Title.AddLang( "it-it", "XMP - Piattaforma Estendible di Metadata" );
dc.Title.AddLang( "du-du", "De hallo Wereld" );
dc.Title.AddLang( "fr-fr", "XMP - Une Platforme Extensible pour les Métédonnées" );
dc.Title.AddLang( "DE-DE", "ÄËßÜ Hallo Welt" );
dc.Type.Add( "Pdf file containing xmp metadata" );
// Note: Need not have to add Dublin Core Schema, already added internally.
// Add the Xmp Metadata to the document
document.XmpMetadata = xmp;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Xmp
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add blank pages to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Create an Xmp Metadata
Dim MyXmp As XmpMetadata = New XmpMetadata
' Paged-Text Schema.
Dim Mypt As PagedTextSchema = New PagedTextSchema
MyXmp.AddSchema(Mypt)
' Add the Xmp Metadata to the document
MyDocument.XmpMetadata = MyXmp
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Xmp;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add blank pages to the document
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Create an Xmp Metadata
XmpMetadata xmp = new XmpMetadata();
// Paged-Text Schema.
PagedTextSchema pt = new PagedTextSchema();
xmp.AddSchema( pt );
// Add the Xmp Metadata to the document
document.XmpMetadata = xmp;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.Xmp
Imports ceTe.DynamicPDF.Text
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Set Document Title Property
MyDocument.Title = "PDF/A1 Document"
' Create a XmpaMetadata instance
Dim MyXmp As XmpMetadata = New XmpMetadata()
' Add PDF/A schema with the conformance level.
Dim MyPdfaSchema As PdfASchema = New PdfASchema(PdfAStandard.PDF_A_1b_2005)
MyXmp.AddSchema(MyPdfaSchema)
Dim MyDc As DublinCoreSchema = MyXmp.DublinCore
MyDc.Title.AddLang("en-us", "PDF/A1 Document")
MyDocument.XmpMetadata = MyXmp
' Embedded iccprofile file.
Dim MyIccProfile As IccProfile = New IccProfile("C:\Temp\IccProfile\sRGB_IEC61966-2-1_noBPC.icc")
' Create Output intent and add to document's outputIntents
Dim MyOutputIntents As OutputIntent = New OutputIntent("","IEC 61966-2.1 Default RGB color space - sRGB 1 ","http://www.color.org","sRGB IEC61966-2.1 1",MyIccProfile)
MyOutputIntents.Version = OutputIntentVersion.PDF_A
MyDocument.OutputIntents.Add(MyOutputIntents)
Dim MyText As String = "Hello World"
' Create a Type1font
Dim MyType1Font As Type1Font = New Type1Font("C:\Temp\Type1\HELVETICA.PFM","C:\Temp\Type1\HELVETICA.PFB")
' Create a label using type1font
Dim MyLabel As Label = New Label(MyText,0,0,504,100,MyType1Font,18,TextAlign.Center,RgbColor.BlueViolet)
' Create a page
Dim MyPage As Page = New Page(PageSize.Letter,PageOrientation.Portrait,54.0f)
' Add label to the page
MyPage.Elements.Add(MyLabel)
' Add Page to the Document
MyDocument.Pages.Add(MyPage)
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.Xmp;
using ceTe.DynamicPDF.Text;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Set Document Title Property
document.Title = "PDF/A1 Document";
// Create a XmpaMetadata instance
XmpMetadata xmp = new XmpMetadata();
// Add PDF/A schema with the conformance level.
PdfASchema pdfaschema = new PdfASchema(PdfAStandard.PDF_A_1b_2005);
xmp.AddSchema(pdfaschema);
DublinCoreSchema dc = xmp.DublinCore;
dc.Title.AddLang("en-us", "PDF/A1 Document");
document.XmpMetadata = xmp;
// Embedded iccprofile file
IccProfile iccProfile = new IccProfile(@"C:\Temp\IccProfile\sRGB_IEC61966-2-1_noBPC.icc");
// Create Output intent and add to document's outputIntents
OutputIntent outputIntents = new OutputIntent("", "IEC 61966-2.1 Default RGB color space - sRGB 1 ", "http://www.color.org", "sRGB IEC61966-2.1 1", iccProfile);
outputIntents.Version = OutputIntentVersion.PDF_A;
document.OutputIntents.Add(outputIntents);
string text = "Hello World";
// Create a Type1font
Type1Font type1Font = new Type1Font(@"C:\Temp\Type1\HELVETICA.PFM", @"C:\Temp\Type1\HELVETICA.PFB");
// Create a label using type1font
Label label = new Label(text, 0, 0, 504, 100, type1Font, 18, TextAlign.Center, RgbColor.BlueViolet);
// Create a page
Page page = new Page(PageSize.Letter, PageOrientation.Portrait, 54.0f);
// Add label to the page
page.Elements.Add(label);
// Add page to the document
document.Pages.Add(page);
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Xmp
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add blank pages to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Create an Xmp Metadata
Dim MyXmp As XmpMetadata = New XmpMetadata
' Rights Management Schema.
Dim Myrm As RightsManagementSchema = New RightsManagementSchema
Myrm.Marked2 = CopyrightStatus.PublicDomain
Myrm.Owner.Add( "Company Name" )
Myrm.UsageTerms.AddLang( "en-us", "Contact MyCompany" )
MyXmp.AddSchema(Myrm)
' Add the Xmp Metadata to the document
MyDocument.XmpMetadata = MyXmp
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Xmp;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add blank pages to the document
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Create an Xmp Metadata
XmpMetadata xmp = new XmpMetadata();
// Rights Management Schema.
RightsManagementSchema rm = new RightsManagementSchema();
rm.Marked2 = CopyrightStatus.PublicDomain;
rm.Owner.Add( "Company Name" );
rm.UsageTerms.AddLang( "en-us", "Contact MyCompany" );
xmp.AddSchema( rm );
// Add the Xmp Metadata to the document
document.XmpMetadata = xmp;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports System.IO
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Xmp
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
MyDocument.Keywords = "XMP, metadata, pdf, example"
MyDocument.Title = "Pdf document with xmp metadata"
' Add blank pages to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Create an Xmp Metadata
Dim MyXmp As XmpMetadata = New XmpMetadata
' Dublin Core Schema.
Dim Mydc As DublinCoreSchema = MyXmp.DublinCore
Mydc.Contributors.Add( "Abc" )
Mydc.Contributors.Add( "Xyz" )
Mydc.Contributors.Add( "Pqrs" )
Mydc.Coverage = "To test all the attributes of schema's provided"
Mydc.Creators.Add( "MyProduct" )
Mydc.Creators.Add( "MyCompany" )
Mydc.Date.Add( DateTime.Now )
Mydc.Description.AddLang( "en-us", "XMP Schema's test" )
Mydc.Identifier = "First XMP pdf"
Mydc.Publisher.Add( "mydomain.com" )
Mydc.Publisher.Add( "My Company" )
Mydc.Relation.Add( "test pdf with xmp" )
Mydc.Rights.DefaultText = "US English"
Mydc.Rights.AddLang( "en-us", "All rights reserved 2012, MyCompany." )
Mydc.Source = "XMP Project"
Mydc.Subject.Add( "eXtensible Metadata Platform" )
Mydc.Title.AddLang( "en-us", "XMP" )
Mydc.Title.AddLang( "it-it", "XMP - Piattaforma Estendible di Metadata" )
Mydc.Title.AddLang( "du-du", "De hallo Wereld" )
Mydc.Title.AddLang( "fr-fr", "XMP - Une Platforme Extensible pour les Métédonnées" )
Mydc.Title.AddLang( "DE-DE", "ÄËßÜ Hallo Welt" )
Mydc.Type.Add( "Pdf file containing xmp metadata" )
' Basic Schema.
Dim Mybs As BasicSchema = MyXmp.BasicSchema
Mybs.Advisory.Add( "Date" )
Mybs.Advisory.Add( "Contributors" )
Mybs.Nickname = "xyz"
Mybs.Thumbnails.Add(106, 80, "JPEG", GetImage("C:\thumbnail.jpg"))
' Rights Management Schema.
Dim Myrm As RightsManagementSchema = New RightsManagementSchema
Myrm.Marked2 = CopyrightStatus.PublicDomain
Myrm.Owner.Add( "MyCompany" )
Myrm.UsageTerms.AddLang( "en-us", "Contact MyCompany" )
' Basic Job Ticket Schema.
Dim MyJob As BasicJobTicketSchema = New BasicJobTicketSchema
MyJob.JobRef.Add( "MyCompany", "Xmp Test", new Uri( "http://www.mydomain.com/" ) )
MyJob.JobRef.Add( "MyCompany", "XMP Metadata", new Uri( "http://www.mydomain.com/" ) )
' Paged-Text Schema.
Dim Mypt As PagedTextSchema = New PagedTextSchema
' Add the Xmp Metadata to the document
MyDocument.XmpMetadata = MyXmp
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
Private Function GetImage(ByVal filePath As String) As Byte()
Dim MyInFile As FileStream = New FileStream(filePath, FileMode.Open, FileAccess.Read)
Dim MyBinaryData(MyInFile.Length) As Byte
MyInFile.Read(MyBinaryData, 0, MyInFile.Length)
MyInFile.Close()
return MyBinaryData
End Function
End Module
using System;
using System.IO;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Xmp;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
document.Keywords = "XMP, metadata, pdf, example";
document.Title = "Pdf document with xmp metadata";
// Add blank pages to the document
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Create an Xmp Metadata
XmpMetadata xmp = new XmpMetadata();
// Dublin Core Schema.
DublinCoreSchema dc = xmp.DublinCore;
dc.Contributors.Add( "Abc" );
dc.Contributors.Add( "Xyz" );
dc.Contributors.Add( "Pqrs" );
dc.Coverage = "To test all the attributes of schema's provided";
dc.Creators.Add( "MyProduct" );
dc.Creators.Add( "MyCompany" );
dc.Date.Add( DateTime.Now );
dc.Description.AddLang( "en-us", "XMP Schema's test" );
dc.Identifier = "First XMP pdf";
dc.Publisher.Add( "mydomain.com" );
dc.Publisher.Add( "MyCompany" );
dc.Relation.Add( "test pdf with xmp" );
dc.Rights.DefaultText = "US English";
dc.Rights.AddLang( "en-us", "All rights reserved 2012, MyCompany." );
dc.Source = "XMP Project";
dc.Subject.Add( "eXtensible Metadata Platform" );
dc.Title.AddLang( "en-us", "XMP" );
dc.Title.AddLang( "it-it", "XMP - Piattaforma Estendible di Metadata" );
dc.Title.AddLang( "du-du", "De hallo Wereld" );
dc.Title.AddLang( "fr-fr", "XMP - Une Platforme Extensible pour les Métédonnées" );
dc.Title.AddLang( "DE-DE", "ÄËßÜ Hallo Welt" );
dc.Type.Add( "Pdf file containing xmp metadata" );
// Basic Schema.
BasicSchema bs = xmp.BasicSchema;
bs.Advisory.Add( "Date" );
bs.Advisory.Add( "Contributors" );
bs.Nickname = "xyz";
bs.Thumbnails.Add(106, 80, "JPEG", GetImage( @"C:\thumbnail.jpg" ) );
// Rights Management Schema.
RightsManagementSchema rm = new RightsManagementSchema();
rm.Marked2 = CopyrightStatus.PublicDomain;
rm.Owner.Add( "MyCompany" );
rm.UsageTerms.AddLang( "en-us", "Contact MyCompany" );
// Basic Job Ticket Schema.
BasicJobTicketSchema job = new BasicJobTicketSchema();
job.JobRef.Add( "MyCompany", "Xmp Test", new Uri( "http://www.mydomain.com/" ) );
job.JobRef.Add( "MyCompany", "XMP Metadata", new Uri( "http://www.mydomain.com/" ) );
// Paged-Text Schema.
PagedTextSchema pt = new PagedTextSchema();
// Add the Xmp Metadata to the document
document.XmpMetadata = xmp;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
private static byte[] GetImage( string filePath )
{
FileStream inFile = new FileStream( filePath, FileMode.Open, FileAccess.Read );
byte[] binaryData = new byte[ inFile.Length ];
inFile.Read( binaryData, 0, (int)inFile.Length );
inFile.Close();
return binaryData;
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Specify document as a tagged PDF
MyDocument.Tag = New TagOptions()
' Create a document template and add it to the document
Dim documentTemplate As Template = New Template()
MyDocument.Template = documentTemplate
Dim MyNumberText As String = "PageNumberingLabels contain page numbering: %%CP%% of %%TP%% pages."
' Create a Page numbering label
Dim MyPageNumberingLabel As PageNumberingLabel = New PageNumberingLabel(MyNumberText, 0, 680, 512, 12, Font.Helvetica, _
12, TextAlign.Center)
' Create an artifact and set its type to pagination
Dim MyArtifact As Artifact = New Artifact()
MyArtifact.SetType(ArtifactType.Pagination)
' Tag the page numbering label with the artifact
MyPageNumberingLabel.Tag = MyArtifact
' Add page numbering label to the document template
documentTemplate.Elements.Add(MyPageNumberingLabel)
' Begin the first section
MyDocument.Sections.Begin(NumberingStyle.RomanLowerCase)
' Add three pages to the document
Dim MyPage1 As Page = New Page()
MyPage1.Elements.Add(New Label("This is the first page", 100, 100, 200, 100))
MyDocument.Pages.Add(MyPage1)
Dim MyPage2 As Page = New Page()
MyPage2.Elements.Add(New Label("This is the second page", 100, 100, 200, 100))
MyDocument.Pages.Add(MyPage2)
Dim MyPage3 As Page = New Page()
MyPage3.Elements.Add(New Label("This is the third page", 100, 100, 200, 100))
MyDocument.Pages.Add(MyPage3)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Specify document as a tagged PDF
document.Tag = new TagOptions();
// Create a document template and add it to the document
Template documentTemplate = new Template();
document.Template = documentTemplate;
string numberText = "PageNumberingLabels contain page numbering: %%CP%% of %%TP%% pages.";
// Create a Page numbering label
PageNumberingLabel pageNumberingLabel = new PageNumberingLabel(numberText, 0, 680, 512, 12, Font.Helvetica,
12, TextAlign.Center);
// Create an artifact and add its type to pagination
Artifact artifact = new Artifact();
artifact.SetType(ArtifactType.Pagination);
// Tag the page numbering label with the artifact
pageNumberingLabel.Tag = artifact;
// Add page numbering label to the document template
documentTemplate.Elements.Add(pageNumberingLabel);
// Begin the first section
document.Sections.Begin(NumberingStyle.RomanLowerCase);
// Add three pages to the document
Page page1 = new Page();
page1.Elements.Add(new Label("This is the first page", 100, 100, 200, 100));
document.Pages.Add(page1);
Page page2 = new Page();
page2.Elements.Add(new Label("This is the second page", 100, 100, 200, 100));
document.Pages.Add(page2);
Page page3 = new Page();
page3.Elements.Add(new Label("This is the third page", 100, 100, 200, 100));
document.Pages.Add(page3);
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document()
' Specify document as a tagged PDF
MyDocument.Tag = New TagOptions()
' Create a page and add it to the document
Dim MyPage As Page = New Page()
MyDocument.Pages.Add(MyPage)
' Create a background image
Dim MyBackgroundImage As BackgroundImage = New BackgroundImage("C:\MyImage.jpg")
' Create an artifact
Dim MyArtifact As Artifact = New Artifact(ArtifactType.Background, New Attached(Edge.Left, Edge.Bottom, Edge.Right, Edge.Top))
' Add bounding box to the artifact
MyArtifact.SetBoundingBox(New BoundingBox(MyPage.Dimensions.Edge.Left, MyPage.Dimensions.Edge.Bottom, MyPage.Dimensions.Edge.Right, MyPage.Dimensions.Edge.Top))
' Tag the background image with the artifact
MyBackgroundImage.Tag = MyArtifact
' Add the background image to the page
MyPage.Elements.Add(MyBackgroundImage)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Specify document as a tagged PDF
document.Tag = new TagOptions();
// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);
// Create a background image
BackgroundImage backgroundImage = new BackgroundImage(@"C:\MyImage.jpg");
// Create an artifact
Artifact artifact = new Artifact(ArtifactType.Background, new Attached(Edge.Left, Edge.Bottom, Edge.Right, Edge.Top));
// Add bounding box to the artifact
artifact.SetBoundingBox(new BoundingBox(page.Dimensions.Edge.Left, page.Dimensions.Edge.Bottom, page.Dimensions.Edge.Right, page.Dimensions.Edge.Top));
// Tag the background image with the artifact
backgroundImage.Tag = artifact;
// Add the background image to the page
page.Elements.Add(backgroundImage);
//Save the PDF
document.Draw(@"C:\MyDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Specify document as a tagged PDF
MyDocument.Tag = New TagOptions()
' Create a page and add it to the document
Dim MyPage As Page = New Page()
MyDocument.Pages.Add(MyPage)
' Create a text area
Dim MyTextArea As TextArea = New TextArea("This is the text of a TextArea", _
100, 100, 400, 30, _
ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18)
' Create a structure element
Dim MyStructureElement As StructureElement = New StructureElement(TagType.Paragraph, True)
' Create an attribute class
Dim MyAttributeClass As AttributeClass = New AttributeClass("MyAttribueClass")
' Create an attribute object
Dim MyAttributeObject1 As AttributeObject = New AttributeObject(AttributeOwner.Layout)
' Add attributes to the attribute object
MyAttributeObject1.SetLineHeight() 'Sets default value to the line height attribute
MyAttributeObject1.SetHeight(30) ' Sets specified value to the height attribute
' Add attribute object to the attribute class
MyAttributeClass.AttributeObjects.Add(MyAttributeObject1)
' Create an attribute object
Dim MyAttributeObject2 As AttributeObject = New AttributeObject(AttributeOwner.HTML_3_20)
' Add attributes to the attribute object
MyAttributeObject2.SetPlacement() ' Sets default value to the line height attribute
MyAttributeObject2.SetSpaceBefore() ' Sets default value to the space after attribute
' Add attribute object to the attribute class
MyAttributeClass.AttributeObjects.Add(MyAttributeObject2)
' Add attribute class to the structure element
MyStructureElement.Classes.Add(MyAttributeClass)
' Tag the text area with the structure element
MyTextArea.Tag = MyStructureElement
' Add the text area to the page
MyPage.Elements.Add(MyTextArea)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Specify document as a tagged PDF
document.Tag = new TagOptions();
// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);
// Create a text area
TextArea textArea = new TextArea("This is the " +
"text of a TextArea", 100, 100, 400, 30,
ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18);
// Create a structure element
StructureElement structureElement = new StructureElement(TagType.Paragraph, true);
// Create an attribute class
AttributeClass attributeClass = new AttributeClass("MyAttribueClass");
// Create an attribute object
AttributeObject attributeObject1 = new AttributeObject(AttributeOwner.Layout);
// Add attributes to the attribute object
attributeObject1.SetLineHeight(); // Sets default value to the line height attribute
attributeObject1.SetHeight(30); // Sets specified value to the height attribute
// Add attribute object to the attribute class
attributeClass.AttributeObjects.Add(attributeObject1);
// Create an attribute object
AttributeObject attributeObject2 = new AttributeObject(AttributeOwner.HTML_3_20);
// Add attributes to the attribute object
attributeObject2.SetPlacement(); // Sets default value to the line height attribute
attributeObject2.SetSpaceBefore(); // Sets default value to the space after attribute
// Add attribute object to the attribute class
attributeClass.AttributeObjects.Add(attributeObject2);
// Add attribute class to the structure element
structureElement.Classes.Add(attributeClass);
// Tag the text area with the structure element
textArea.Tag = structureElement;
// Add the text area to the page
page.Elements.Add(textArea);
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Specify document as a tagged PDF
MyDocument.Tag = New TagOptions()
' Create a page and add it to the document
Dim MyPage As Page = New Page()
MyDocument.Pages.Add(MyPage)
' Create a text area
Dim MyTextArea As TextArea = New TextArea("This is the text of a TextArea", _
100, 100, 400, 30,ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18)
' Create a structure element
Dim MyStructureElement As StructureElement = New StructureElement(TagType.Paragraph, True)
' Create an attribute object
Dim MyAttributeObject As AttributeObject = New AttributeObject(AttributeOwner.Layout)
' Add attributes to the attribute object
MyAttributeObject.SetLineHeight() ' Sets default value to the line height attribute
MyAttributeObject.SetHeight(30) ' Sets specified value to the height attribute
' Add attribute object to the structure element
MyStructureElement.AttributeLists.Add(MyAttributeObject)
' Tag the text area with the structure element
MyTextArea.Tag = MyStructureElement
' Add the text area to the page
MyPage.Elements.Add(MyTextArea)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Specify document as a tagged PDF
document.Tag = new TagOptions();
// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);
// Create a text area
TextArea textArea = new TextArea("This is the " +"text of a TextArea", 100, 100, 400, 30,
ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18);
// Create a structure element
StructureElement structureElement = new StructureElement(TagType.Paragraph, true);
// Create an attribute object
AttributeObject attributeObject = new AttributeObject(AttributeOwner.Layout);
// Add attributes to the attribute object
attributeObject.SetLineHeight(); // Sets default value to the line height attribute
attributeObject.SetHeight(30); // Sets specified value to the height attribute
// Add attribute object to the structure element
structureElement.AttributeLists.Add(attributeObject);
// Tag the text area with the structure element
textArea.Tag = structureElement;
// Add the text area to the page
page.Elements.Add(textArea);
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 rectangle
Dim MyRectangle As Rectangle = New Rectangle(50, 50, 200, _
200, Grayscale.Black, RgbColor.Gray, 4, LineStyle.Solid)
' Change the corner radius property
MyRectangle.CornerRadius = 10
' Create a autogradient
Dim MyAutoGradient As AutoGradient = New AutoGradient(90.0F, CmykColor.Blue, CmykColor.Red)
' Assign autogradient to FillColor property of rectangle
MyRectangle.FillColor = MyAutoGradient
' Add the rectangle to the page
MyPage.Elements.Add(MyRectangle)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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();
// Add page to document
document.Pages.Add( page );
// Create a rectangle
Rectangle rectangle = new Rectangle( 50, 50, 200, 200,
Grayscale.Black, RgbColor.Gray, 4, LineStyle.Solid );
// Change the corner radius property
rectangle.CornerRadius = 10;
// Create a autogradient
AutoGradient autogradient = new AutoGradient(90.0f, CmykColor.Blue, CmykColor.Red);
// Assign autogradient to FillColor property of rectangle
rectangle.FillColor = autogradient;
// Add the rectangle to the page
page.Elements.Add( rectangle );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Specify document as a tagged PDF
MyDocument.Tag = New TagOptions()
' Create a page and add it to the document
Dim MyPage As Page = New Page()
MyDocument.Pages.Add(MyPage)
' Create a rectangle
Dim MyRectangle As Rectangle = New Rectangle(100, 100, 100, 100, RgbColor.Black, RgbColor.Blue)
' Create a structure element
Dim MyStructureElement As StructureElement = New StructureElement(TagType.Figure)
' Create an attribute object
Dim MyAttributeObject As AttributeObject = New AttributeObject(AttributeOwner.Layout)
MyAttributeObject.SetHeight() ' Sets default value to the height attribute
MyAttributeObject.SetWidth() ' Sets default value to the width attribute
' Calculates bounding box and Add it to the bounding box attribute
MyAttributeObject.SetBoundingBox(New BoundingBox(MyPage, MyRectangle.X, MyRectangle.Y, MyRectangle.Width, MyRectangle.Height, MyRectangle.Angle))
' Add attribute object to the structure element
MyStructureElement.AttributeLists.Add(MyAttributeObject)
' Tag the rectangle with the structure element
MyRectangle.Tag = MyStructureElement
' Add rectangle to the page
MyPage.Elements.Add(MyRectangle)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Specify document as a tagged PDF
document.Tag = new TagOptions();
// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);
// Create a rectangle
Rectangle rectangle = new Rectangle(100, 100, 100, 100, RgbColor.Black, RgbColor.Blue);
// Create a structure element
StructureElement structureElement = new StructureElement(TagType.Figure);
// Create an attribute object
AttributeObject attributeObject = new AttributeObject(AttributeOwner.Layout);
attributeObject.SetHeight(); // Sets default value to the height attribute
attributeObject.SetWidth(); // Sets default value to the width attribute
// Calculates bounding box and Add it to the bounding box attribute
attributeObject.SetBoundingBox(new BoundingBox(page, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, rectangle.Angle));
// Add attribute object to the structure element
structureElement.AttributeLists.Add(attributeObject);
// Tag the rectangle with the structure element
rectangle.Tag = structureElement;
// Add rectangle to the page
page.Elements.Add(rectangle);
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
Module Module1
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document()
' Create a PDF Page
Dim MyPage As Page = New Page
' Create a signature form field
Dim MySignature As Signature = New Signature("SigField", 10, 10, 250, 100)
' Add signature field to the page
MyPage.Elements.Add(MySignature)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Create a Certificate
Dim MyCertificate As Certificate = New Certificate("C:\PersonalCertificate.pfx", "CertificatePassword")
' Certify the document referring the sign field
MyDocument.Certify("SigField", MyCertificate, CertifyingPermission.NoChangesAllowed)
' Save the document
MyDocument.Draw("C:\MySignedDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
class MyClass
{
static void Main(string[] args)
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page();
// Create a signature form field
Signature signature = new Signature("SigField", 10, 10, 250, 100);
// Add signature field to the page
page.Elements.Add(signature);
// Add the page to the document
document.Pages.Add(page);
// Create a Certificate from the file
Certificate certificate = new Certificate(@"C:\MyPersonalCertificate.pfx", "CertificatePassword");
// Certify the document referring the sign field
//document.Certify("SigField", certificate, CertifyingPermission.NoChangesAllowed);
// Save the document
document.Draw(@"C:\MySignedDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
'Create a MyDocument and set it's properties
Dim MyDocument As ceTe.DynamicPDF.Document = New ceTe.DynamicPDF.Document
'Create a MyPage to add to the MyDocument
Dim MyPage As ceTe.DynamicPDF.Page = New ceTe.DynamicPDF.Page(PageSize.Letter, PageOrientation.Portrait, 54.0F)
'Create a label to add to the MyPage
Dim Text As String = "JavaScript Example"
Dim MyLabel As Label = New Label(Text, 0, 0, 504, 100, Font.Helvetica, 18, TextAlign.Center)
'Add the JavaScript Alert to the Document
MyDocument.JavaScripts.Add(New DocumentJavaScript("HelloWorld", "app.alert(""Hello World!!"")"))
'Add label to MyPage
MyPage.Elements.Add(MyLabel)
'Add MyPage to MyDocument
MyDocument.Pages.Add(MyPage)
' Save the PDF Document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a document and set it's properties
ceTe.DynamicPDF.Document document = new ceTe.DynamicPDF.Document();
// Create a page to add to the document
ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page( PageSize.Letter, PageOrientation.Portrait, 54.0f );
// Create a Label to add to the page
string text = "JavaScript Example";
Label label = new Label( text, 0, 0, 504, 100, Font.Helvetica, 18, TextAlign.Center );
// Add the JavaScript alert to the Document
document.JavaScripts.Add( new DocumentJavaScript( "HelloWorld", "app.alert(\"Hello World!!\")" ) );
// Add label to page
page.Elements.Add( label );
// Add page to document
document.Pages.Add( page );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
'Create a MyDocument and set it's properties
Dim MyDocument As ceTe.DynamicPDF.Document = New ceTe.DynamicPDF.Document
'Create a MyPage to add to the MyDocument
Dim MyPage As ceTe.DynamicPDF.Page = New ceTe.DynamicPDF.Page(PageSize.Letter, PageOrientation.Portrait, 54.0F)
'Create a label to add to the MyPage
Dim Text As String = "JavaScript Example"
Dim MyLabel As Label = New Label(Text, 0, 0, 504, 100, Font.Helvetica, 18, TextAlign.Center)
'Add the JavaScript Alert to the Document
MyDocument.JavaScripts.Add(New DocumentJavaScript("HelloWorld", "app.alert(""Hello World!!"")"))
'Add label to MyPage
MyPage.Elements.Add(MyLabel)
'Add MyPage to MyDocument
MyDocument.Pages.Add(MyPage)
' Save the PDF Document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a document and set it's properties
ceTe.DynamicPDF.Document document = new ceTe.DynamicPDF.Document();
// Create a page to add to the document
ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page( PageSize.Letter, PageOrientation.Portrait, 54.0f );
// Create a Label to add to the page
string text = "JavaScript Example";
Label label = new Label( text, 0, 0, 504, 100, Font.Helvetica, 18, TextAlign.Center );
// Add the JavaScript alert to the Document
document.JavaScripts.Add( new DocumentJavaScript( "HelloWorld", "app.alert(\"Hello World!!\")" ) );
// Add label to page
page.Elements.Add( label );
// Add page to document
document.Pages.Add( page );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As MergeDocument = New MergeDocument("C:\MyduplicateImagedata.pdf")
' Set document optimization
Dim optimization As DocumentOptimization = New DocumentOptimization()
MyDocument.Optimization = optimization
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;
class MyClass
{
static void Main()
{
// Create a PDF Document
MergeDocument document = new MergeDocument(@"C:\DuplicateImagedata.pdf");
// Set document optimization
document.Optimization = new DocumentOptimization();
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports System.IO
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' FileStreams used for creating the instance of EmbeddedFile
Dim fileStream1 As FileStream = New FileStream("C:\DocumentA.pdf",FileMode.Open,FileAccess.Read,FileShare.ReadWrite)
Dim fileStream2 As FileStream = New FileStream("C:\DocumentB.pdf",FileMode.Open,FileAccess.Read,FileShare.ReadWrite)
' byte array of the file by reading the file.
Dim filebyte(fileStream2.Length) As byte
fileStream2.Read(filebyte, 0, filebyte.Length )
' Created 3 instances of EmbeddedFile using all the available constructors.
Dim embeddedFile1 As EmbeddedFile = New EmbeddedFile("C:\DocumentC.pdf")
Dim embeddedFile2 As EmbeddedFile = New EmbeddedFile( fileStream1, "DocumentA.pdf", DateTime.Now )
Dim embeddedFile3 As EmbeddedFile = New EmbeddedFile( filebyte, "DocumentB.pdf", DateTime.Now )
' Added the embeddedFiles to the EmbeddedFileList of the document class.
MyDocument.EmbeddedFiles.Add( embeddedFile1 )
MyDocument.EmbeddedFiles.Add( embeddedFile2 )
MyDocument.EmbeddedFiles.Add( embeddedFile3 )
' Set the PageMode to the ShowAttachments
MyDocument.InitialPageMode = PageMode.ShowAttachments
' Create a Page and add it to the document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
' Add a label to the page
MyPage.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using System.IO;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// FileStreams used for creating the instance of EmbeddedFile
FileStream fileStream1 = new FileStream(@"C:\DocumentA.pdf",FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
FileStream fileStream2 = new FileStream(@"C:\DocumentB.pdf",FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
// byte array of the file by reading the file.
byte[] filebyte = new byte[fileStream2.Length];
fileStream2.Read(filebyte, 0, filebyte.Length );
// Created 3 instances of EmbeddedFile using all the available constructors.
EmbeddedFile embeddedFile1 = new EmbeddedFile(@"C:\DocumentC.pdf");
EmbeddedFile embeddedFile2 = new EmbeddedFile( fileStream1, "DocumentA.pdf", DateTime.Now );
EmbeddedFile embeddedFile3 = new EmbeddedFile( filebyte, "DocumentB.pdf", DateTime.Now );
// Added the embeddedFiles to the EmbeddedFileList of the document class.
document.EmbeddedFiles.Add( embeddedFile1 );
document.EmbeddedFiles.Add( embeddedFile2 );
document.EmbeddedFiles.Add( embeddedFile3 );
// Set the PageMode to the ShowAttachments
document.InitialPageMode = PageMode.ShowAttachments;
// Create a Page and add it to the document
Page page = new Page();
document.Pages.Add( page );
// Add a label to the page
page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add 5 blank pages to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Create an even odd template and add elements to it
Dim MyTemplate As EvenOddTemplate = New EvenOddTemplate
MyTemplate.EvenElements.Add(New Label("Even Header", 0, 0, 200, 12))
MyTemplate.OddElements.Add(New Label("Odd Header", 0, 0, 200, 12))
MyTemplate.Elements.Add(New Label("Footer", 0, 680, 200, 12))
' Add the template to the document
MyDocument.Template = MyTemplate
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add 5 blank pages to the document
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Create an even odd template and add elements to it
EvenOddTemplate template = new EvenOddTemplate();
template.EvenElements.Add( new Label( "Even Header", 0, 0, 200, 12 ) );
template.OddElements.Add( new Label( "Odd Header", 0, 0, 200, 12 ) );
template.Elements.Add( new Label( "Footer", 0, 680, 200, 12 ) );
// Add the template to the document
document.Template = template;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add 5 blank pages to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Create a template and add elements to it
Dim MyTemplate As Template = New Template
MyTemplate.Elements.Add(New Label("Header", 0, 0, 200, 12))
MyTemplate.Elements.Add(New Label("Footer", 0, 680, 200, 12))
' Add the template to the document
MyDocument.Template = MyTemplate
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add 5 blank pages to the document
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Create a template and add elements to it
Template template = new Template();
template.Elements.Add( new Label( "Header", 0, 0, 200, 12 ) );
template.Elements.Add( new Label( "Footer", 0, 680, 200, 12 ) );
// Add the template to the document
document.Template = template;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 dimensions object and set the margins
Dim dimensions As PageDimensions = New PageDimensions(PageSize.Letter, PageOrientation.Portrait)
dimensions.BottomMargin = 50
dimensions.TopMargin = 50
dimensions.LeftMargin = 35
dimensions.RightMargin = 35
' Create a page using a page dimensions object and add it to the document
Dim MyPage As Page = New Page(dimensions)
MyDocument.Pages.Add(MyPage)
' Add a label to the page
MyPage.Elements.Add(New Label("this page was rotated 90 degrees.", 0, 0, 300, 20, Font.Helvetica, 18))
' Rotate the page 90 degrees
MyPage.Rotate = 90
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 dimensions object and set the margins
PageDimensions dimensions = new PageDimensions( PageSize.Letter, PageOrientation.Portrait );
dimensions.BottomMargin = 50;
dimensions.TopMargin = 50;
dimensions.LeftMargin = 35;
dimensions.RightMargin = 35;
// Create a page using a page dimensions object and add it to the document
Page page = new Page( dimensions );
document.Pages.Add( page );
// Add a label to the page
page.Elements.Add( new Label( "This page was rotated 90 degrees.", 0, 0, 300, 20, Font.Helvetica, 18 ) );
// Rotate the page 90 degrees
page.Rotate = 90;
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 high security object
Dim security As HighSecurity = New HighSecurity("owner", "user")
' Set the permissions on that security object
security.AllowAccessibility = False
security.AllowDocumentAssembly = False
security.AllowHighResolutionPrinting = False
' Add the security object to the document
MyDocument.Security = security
' Create and display a label as a reference
Dim text As String = "This document has been encrypted with 128 bit encryption."
MyPage.Elements.Add(New Label(text, 50, 50, 400, 100, Font.Helvetica, 18))
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 high security object
HighSecurity security = new HighSecurity( "owner", "user" );
// Set the permissions on that security object
security.AllowAccessibility = false;
security.AllowDocumentAssembly = false;
security.AllowUpdateAnnotsAndFields = false;
// Add the security object to the document
document.Security = security;
// Create and display a label as a reference
string text = "This document has been encrypted with 128 bit encryption.";
page.Elements.Add( new Label( text, 50, 50, 400, 100, Font.Helvetica, 18 ) );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Text
Module MyModule
Sub Main()
' Create a document and set it's properties
Dim MyDocument As ceTe.DynamicPDF.Document = New ceTe.DynamicPDF.Document
MyDocument.Title = "PDF/X-1a Document"
MyDocument.PdfVersion = PdfVersion.v1_4
' Create a page to add to the document
Dim MyPage As ceTe.DynamicPDF.Page = New ceTe.DynamicPDF.Page(PageSize.Letter, PageOrientation.Portrait, 54.0F)
MyDocument.PdfXVersion = PdfXVersion.PDF_X_1a_2003
Dim MyIccProfile As IccProfile = New IccProfile("C:\ICC Profiles\USWebCoatedSWOP.icc")
Dim MyOutputIntent As OutputIntent = New OutputIntent("CGATS TR 001-1995 (SWOP)", "CGATS TR 001", "http://www.color.org", "U.S. Web Coated (SWOP) v2", MyIccProfile)
MyDocument.OutputIntents.Add(MyOutputIntent)
MyDocument.Trapped = Trapped.False
' Create a Label using a OpenType font and CMYK color
Dim Text As String = "PDF/X 1-a Document"
Dim MyOpenTypeFont As OpenTypeFont = New OpenTypeFont("verdana.otf")
Dim MyLabel As Label = New Label(Text, 0, 0, 504, 100, MyOpenTypeFont, 18, TextAlign.Center, CmykColor.BlueViolet)
' Add label to page
MyPage.Elements.Add(MyLabel)
' Add page to document
MyDocument.Pages.Add(MyPage)
' Save the PDF Document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Text;
class MyClass
{
static void Main()
{
// Create a document and set it's properties
ceTe.DynamicPDF.Document document = new ceTe.DynamicPDF.Document();
document.Title = "PDF/X-1a Document";
document.PdfVersion = PdfVersion.v1_4;
// Create a page to add to the document
ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page( PageSize.Letter, PageOrientation.Portrait, 54.0f );
document.PdfXVersion = PdfXVersion.PDF_X_1a_2003;
IccProfile iccProfile = new IccProfile( @"C:\ICC Profiles\USWebCoatedSWOP.icc" );
OutputIntent outputIntent = new OutputIntent( "CGATS TR 001-1995 (SWOP)", "CGATS TR 001", "http://www.color.org", "U.S. Web Coated (SWOP) v2", iccProfile );
document.OutputIntents.Add( outputIntent );
document.Trapped = Trapped.False;
// Create a Label using a OpenType font and CMYK color
string text = "PDF/X 1-a Document";
OpenTypeFont openTypeFont = new OpenTypeFont( "verdana.otf" );
Label label = new Label( text, 0, 0, 504, 100, openTypeFont, 18, TextAlign.Center, CmykColor.BlueViolet );
// Add label to page
page.Elements.Add( label );
// Add page to document
document.Pages.Add( page );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page(PageSize.Letter)
' Create an Button
Dim MyButton As Button = New Button("btn", 50, 50, 100, 50)
MyButton.Action = New JavaScriptAction("app.alert('Hello');")
MyButton.Behavior = Behavior.CreatePush("downLabel", "rolloverLabel")
MyButton.Label = "Push"
' Add the Button to the page
MyPage.Elements.Add(MyButton)
' Add pages to the document
MyDocument.Pages.Add(MyPage)
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page( PageSize.Letter );
// Create an Button
Button button = new Button( "btn", 50, 50, 100, 50 );
button.Action = new JavaScriptAction( "app.alert('Hello');" );
button.Behavior = Behavior.CreatePush( "downLabel", "rolloverLabel" );
button.Label = "Push";
// Add the Button to the page
page.Elements.Add( button );
// Add pages to the document
document.Pages.Add( page );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Specify document as a tagged PDF
MyDocument.Tag = New TagOptions()
' Create a page and add it to the document
Dim MyPage As Page = New Page()
MyDocument.Pages.Add(MyPage)
' Create a text area
Dim MyTextArea As TextArea = New TextArea("This is the text of a TextArea", _
100, 100, 400, 30,ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18)
' Create a named tag type
Dim MyNamedTagType As NamedTagType = New NamedTagType("Para", TagType.Paragraph)
' Create a structure element
Dim MyStructureElement As StructureElement = New StructureElement(MyNamedTagType, True)
' Tag the text area with the structure element
MyTextArea.Tag = MyStructureElement
' Add the text area to the page
MyPage.Elements.Add(MyTextArea)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Specify document as a tagged PDF
document.Tag = new TagOptions();
// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);
// Create a text area
TextArea textArea = new TextArea("This is the " +"text of a TextArea", 100, 100, 400, 30,
ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18);
// Create a named tag type
NamedTagType namedTagType = new NamedTagType("Para", TagType.Paragraph);
// Create a structure element
StructureElement structureElement = new StructureElement(namedTagType, true);
// Tag the text area with the structure element
textArea.Tag = structureElement;
// Add the text area to the page
page.Elements.Add(textArea);
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add three blank pages
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Add a top level outline and set properties
Dim MyOutline1 As Outline = MyDocument.Outlines.Add("Outline1")
MyOutline1.Style = TextStyle.Bold
MyOutline1.Color = New RgbColor(1.0F, 0.0F, 0.0F)
' Add child outlines
Dim MyOutline1A As Outline = MyOutline1.ChildOutlines.Add("Outline1A", New ZoomDestination(2, PageZoom.FitPage))
MyOutline1A.Expanded = False
Dim MyOutline1A1 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A1", New XYDestination(2, 0, 0))
Dim MyOutline1A2 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A2", New ZoomDestination(2, PageZoom.FitHeight))
Dim MyOutline1B As Outline = MyOutline1.ChildOutlines.Add("Outline1B", New ZoomDestination(2, PageZoom.FitWidth))
' Add a second top level outline
Dim MyOutline2 As Outline = MyDocument.Outlines.Add("Outline2", New XYDestination(3, 0, 300))
' Add a child outline
Dim MyOutline2A As Outline = MyOutline2.ChildOutlines.Add("Outline2A")
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add three blank pages
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Add a top level outline and set properties
Outline outline1 = document.Outlines.Add( "Outline1" );
outline1.Style = TextStyle.Bold;
outline1.Color = new RgbColor( 1.0f, 0.0f, 0.0f );
// Add child outlines
Outline outline1A = outline1.ChildOutlines.Add( "Outline1A", new ZoomDestination( 2, PageZoom.FitPage ) );
outline1A.Expanded = false;
Outline outline1A1 = outline1A.ChildOutlines.Add( "Outline1A1", new XYDestination( 2, 0, 0 ) );
Outline outline1A2 = outline1A.ChildOutlines.Add( "Outline1A2", new ZoomDestination( 2, PageZoom.FitHeight ) );
Outline outline1B = outline1.ChildOutlines.Add( "Outline1B", new ZoomDestination( 2, PageZoom.FitWidth ) );
// Add a second top level outline
Outline outline2 = document.Outlines.Add( "Outline2", new XYDestination( 3, 0, 300 ) );
// Add a child outline
Outline outline2A = outline2.ChildOutlines.Add( "Outline2A" );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Text
Module MyModule
Sub Main()
' Create a document and set it's properties
Dim MyDocument As ceTe.DynamicPDF.Document = New ceTe.DynamicPDF.Document
MyDocument.Title = "PDF/X-1a Document"
MyDocument.PdfVersion = PdfVersion.v1_4
' Create a page to add to the document
Dim MyPage As ceTe.DynamicPDF.Page = New ceTe.DynamicPDF.Page(PageSize.Letter, PageOrientation.Portrait, 54.0F)
MyDocument.PdfXVersion = PdfXVersion.PDF_X_1a_2003
MyDocument.OutputIntents.Add(OutputIntent.USWebCoatedSwop)
MyDocument.Trapped = Trapped.False
' Create a Label using a OpenType font and CMYK color
Dim Text As String = "PDF/X 1-a Document"
Dim MyOpenTypeFont As OpenTypeFont = New OpenTypeFont("verdana.otf")
Dim MyLabel As Label = New Label(Text, 0, 0, 504, 100, MyOpenTypeFont, 18, TextAlign.Center, CmykColor.BlueViolet)
' Add label to page
MyPage.Elements.Add(MyLabel)
' Add page to document
MyDocument.Pages.Add(MyPage)
' Save the PDF Document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Text;
class MyClass
{
static void Main()
{
// Create a document and set it's properties
ceTe.DynamicPDF.Document document = new ceTe.DynamicPDF.Document();
document.Title = "PDF/X-1a Document";
document.PdfVersion = PdfVersion.v1_4;
// Create a page to add to the document
ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page( PageSize.Letter, PageOrientation.Portrait, 54.0f );
document.PdfXVersion = PdfXVersion.PDF_X_1a_2003;
document.OutputIntents.Add( OutputIntent.USWebCoatedSwop );
document.Trapped = Trapped.False;
// Create a Label using a OpenType font and CMYK color
string text = "PDF/X 1-a Document";
OpenTypeFont openTypeFont = new OpenTypeFont( "verdana.otf" );
Label label = new Label( text, 0, 0, 504, 100, openTypeFont, 18, TextAlign.Center, CmykColor.BlueViolet );
// Add label to page
page.Elements.Add( label );
// Add page to document
document.Pages.Add( page );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
'Create a template object and add a page numbering label
Dim MyTemplate As Template = New Template
MyTemplate.Elements.Add(New PageNumberingLabel("%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica, 12, TextAlign.Center))
'Add the template to the document
MyDocument.Template = MyTemplate
'Begin the first section
MyDocument.Sections.Begin(NumberingStyle.RomanLowerCase)
'Add two pages
MyDocument.Pages.Add(New Page) 'Page 1
MyDocument.Pages.Add(New Page) 'Page 2
'Begin the second section
MyDocument.Sections.Begin(NumberingStyle.Numeric, MyTemplate)
'Add three pages
MyDocument.Pages.Add(New Page) 'Page 3
MyDocument.Pages.Add(New Page) 'page 4
MyDocument.Pages.Add(New Page) 'page 5
'Begin the third section specifying a section prefix
MyDocument.Sections.Begin(NumberingStyle.RomanLowerCase, "Appendix A - ")
'Add two pages
MyDocument.Pages.Add(New Page) 'page 6
MyDocument.Pages.Add(New Page) 'page 7
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
//Create a template object and add a page numbering label
Template template = new Template();
template.Elements.Add( new PageNumberingLabel( "%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica, 12, TextAlign.Center ) );
document.Template = template;
//Begin the first section
document.Sections.Begin( NumberingStyle.RomanLowerCase );
//Add two pages
document.Pages.Add( new Page() ); //Page 1
document.Pages.Add( new Page() ); //Page 2
//Begin the second section
document.Sections.Begin( NumberingStyle.Numeric, template );
//Add three pages
document.Pages.Add( new Page() ); //Page 3
document.Pages.Add( new Page() ); //page 4
document.Pages.Add( new Page() ); //page 5
//Begin the third section specifying a section prefix
document.Sections.Begin( NumberingStyle.RomanLowerCase, "Appendix A - " );
//Add two pages
document.Pages.Add( new Page() ); //page 6
document.Pages.Add( new Page() ); //page 7
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
'Create a template object and add a page numbering label
Dim MyTemplate As Template = New Template
MyTemplate.Elements.Add(New PageNumberingLabel("%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica, 12, TextAlign.Center))
'Add the template to the document
MyDocument.Template = MyTemplate
'Begin the first section
MyDocument.Sections.Begin(NumberingStyle.RomanLowerCase)
'Add two pages
MyDocument.Pages.Add(New Page) 'Page 1
MyDocument.Pages.Add(New Page) 'Page 2
'Begin the second section
MyDocument.Sections.Begin(NumberingStyle.Numeric, MyTemplate)
'Add three pages
MyDocument.Pages.Add(New Page) 'Page 3
MyDocument.Pages.Add(New Page) 'page 4
MyDocument.Pages.Add(New Page) 'page 5
'Begin the third section specifying a section prefix
MyDocument.Sections.Begin(NumberingStyle.RomanLowerCase, "Appendix A - ")
'Add two pages
MyDocument.Pages.Add(New Page) 'page 6
MyDocument.Pages.Add(New Page) 'page 7
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
//Create a template object and add a page numbering label
Template template = new Template();
template.Elements.Add( new PageNumberingLabel( "%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica, 12, TextAlign.Center ) );
document.Template = template;
//Begin the first section
document.Sections.Begin( NumberingStyle.RomanLowerCase );
//Add two pages
document.Pages.Add( new Page() ); //Page 1
document.Pages.Add( new Page() ); //Page 2
//Begin the second section
document.Sections.Begin( NumberingStyle.Numeric, template );
//Add three pages
document.Pages.Add( new Page() ); //Page 3
document.Pages.Add( new Page() ); //page 4
document.Pages.Add( new Page() ); //page 5
//Begin the third section specifying a section prefix
document.Sections.Begin( NumberingStyle.RomanLowerCase, "Appendix A - " );
//Add two pages
document.Pages.Add( new Page() ); //page 6
document.Pages.Add( new Page() ); //page 7
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
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 standard security object
Dim security As StandardSecurity = New StandardSecurity("owner", "user")
' Set the permissions on that security object
security.AllowPrint = False
security.AllowCopy = False
security.AllowEdit = False
' Add the security object to the document
MyDocument.Security = security
' Create and display a label as a reference
Dim text As String = "This document has been encrypted with 40 bit encryption."
MyPage.Elements.Add(New Label(text, 50, 50, 400, 100, Font.Helvetica, 18))
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
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 standard security object
StandardSecurity security = new StandardSecurity( "owner", "user" );
// Set the permissions on that security object
security.AllowPrint = false;
security.AllowCopy = false;
security.AllowEdit = false;
// Add the security object to the document
document.Security = security;
// Create and display a label as a reference
string text = "This document has been encrypted with 40 bit encryption.";
page.Elements.Add( new Label( text, 50, 50, 400, 100, Font.Helvetica, 18 ) );
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Specify document as a tagged PDF
MyDocument.Tag = New TagOptions()
' Create a page and add it to the document
Dim MyPage As Page = New Page()
MyDocument.Pages.Add(MyPage)
' Add a label to the page
MyPage.Elements.Add(New Label("My Tagged PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Specify document as a tagged PDF
document.Tag = new TagOptions();
// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);
// Add a label to the page
page.Elements.Add(new Label("My Tagged PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center));
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a PDF Page
Dim MyPage As Page = New Page
' Create a signature form field
Dim MySignature As Signature = New Signature("SigField", 10, 10, 250, 100)
' Add signature field to the page
MyPage.Elements.Add(MySignature)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Create a Certificate
Dim MyCertificate As Certificate = New Certificate("C:\PersonalCertificate.pfx", "CertificatePassword")
' Create a TimestampServer
Dim MyTimeStampServer as TimestampServer = New TimestampServer("Url of the Timestamp Server")
' Sign the document referring the sign field
MyDocument.Sign("SigField", MyCertificate, MyTimeStampServer)
' Save the document
MyDocument.Draw("C:\MySignedDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
class MyClass
{
static void Main(string[] args)
{
// Create a PDF Document
Document document = new Document();
// Create a PDF Page
Page page = new Page();
// Create a signature form field
Signature signature = new Signature("SigField", 10, 10, 250, 100);
// Add signature field to the page
page.Elements.Add(signature);
// Add the page to the document
document.Pages.Add(page);
// Create a Certificate from the file
Certificate certificate = new Certificate(@"c:\MyPersonalCertificate.pfx", "CertificatePassword");
// Create TimestampServer
TimestampServer timestampServer = new TimestampServer("Url of the Timestamp Server");
// Sign the document referring the sign field
document.Sign("SigField", certificate, timestampServer);
// Save the document
document.Draw(@"C:\MySignedDocument.pdf");
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add three blank pages
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Add a top level outline and set properties
Dim MyOutline1 As Outline = MyDocument.Outlines.Add("Outline1")
MyOutline1.Style = TextStyle.Bold
MyOutline1.Color = New RgbColor(1.0F, 0.0F, 0.0F)
' Add child outlines
Dim MyOutline1A As Outline = MyOutline1.ChildOutlines.Add("Outline1A", New UrlAction("http://www.mydomain.com"))
MyOutline1A.Expanded = False
Dim MyOutline1A1 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A1", New XYDestination(2, 0, 0))
Dim MyOutline1A2 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A2", New ZoomDestination(2, PageZoom.FitHeight))
Dim MyOutline1B As Outline = MyOutline1.ChildOutlines.Add("Outline1B", New ZoomDestination(2, PageZoom.FitWidth))
' Add a second top level outline
Dim MyOutline2 As Outline = MyDocument.Outlines.Add("Outline2", New XYDestination(3, 0, 300))
' Add a child outline
Dim MyOutline2A As Outline = MyOutline2.ChildOutlines.Add("Outline2A")
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add three blank pages
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Add a top level outline and set properties
Outline outline1 = document.Outlines.Add( "Outline1" );
outline1.Style = TextStyle.Bold;
outline1.Color = new RgbColor( 1.0f, 0.0f, 0.0f );
// Add child outlines
Outline outline1A = outline1.ChildOutlines.Add( "Outline1A", new UrlAction( "http://www.mydomain.com" ) );
outline1A.Expanded = false;
Outline outline1A1 = outline1A.ChildOutlines.Add( "Outline1A1", new XYDestination( 2, 0, 0 ) );
Outline outline1A2 = outline1A.ChildOutlines.Add( "Outline1A2", new ZoomDestination( 2, PageZoom.FitHeight ) );
Outline outline1B = outline1.ChildOutlines.Add( "Outline1B", new ZoomDestination( 2, PageZoom.FitWidth ) );
// Add a second top level outline
Outline outline2 = document.Outlines.Add( "Outline2", new XYDestination( 3, 0, 300 ) );
// Add a child outline
Outline outline2A = outline2.ChildOutlines.Add( "Outline2A" );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Specify document as a tagged PDF
MyDocument.Tag = New TagOptions()
' Create a page and add it to the document
Dim MyPage As Page = New Page()
MyDocument.Pages.Add(MyPage)
' Create a text area
Dim MyTextArea As TextArea = New TextArea("This is the text of a TextArea", _
100, 100, 400, 30, ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18)
' Create a structure element
Dim MyStructureElement As StructureElement = New StructureElement(TagType.Paragraph, True)
' Create an user property list and add properties to it
Dim MyList As UserPropertyList = New UserPropertyList()
MyList.Add("Height", 100)
MyList.Add("Align", "Left")
' Add user property list to the structure element
MyStructureElement.AttributeLists.Add(MyList)
' Tag the text area with the structure element
MyTextArea.Tag = MyStructureElement
' Add the text area to the page
MyPage.Elements.Add(MyTextArea)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Specify document as a tagged PDF
document.Tag = new TagOptions();
// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);
// Create a text area
TextArea textArea = new TextArea("This is the " + "text of a TextArea", 100, 100, 400, 30,
ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18);
// Create a structure element
StructureElement structureElement = new StructureElement(TagType.Paragraph, true);
// Create an user property list and add properties to it
UserPropertyList list = new UserPropertyList();
list.Add("Height", 100);
list.Add("Align", "Left");
// Add user property list to the structure element
structureElement.AttributeLists.Add(list);
// Tag the text area with the structure element
textArea.Tag = structureElement;
// Add the text area to the page
page.Elements.Add(textArea);
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a Page and add it to the document
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Set the viewer preferences
MyDocument.ViewerPreferences.CenterWindow = True
MyDocument.ViewerPreferences.DisplayDocTitle = False
MyDocument.ViewerPreferences.HideMenubar = True
MyDocument.ViewerPreferences.HideToolbar = True
MyDocument.ViewerPreferences.HideWindowUI = True
MyDocument.ViewerPreferences.FitWindow = True
MyDocument.ViewerPreferences.NoPrintScaling = True
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a page and add it to the document
document.Pages.Add( new Page( PageSize.Letter ) );
// Set the viewer preferences
document.ViewerPreferences.CenterWindow = true;
document.ViewerPreferences.DisplayDocTitle = false;
document.ViewerPreferences.HideMenubar = true;
document.ViewerPreferences.HideToolbar = true;
document.ViewerPreferences.HideWindowUI = true;
document.ViewerPreferences.FitWindow = true;
document.ViewerPreferences.NoPrintScaling = true;
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add three blank pages
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Add a top level outline and set properties
Dim MyOutline1 As Outline = MyDocument.Outlines.Add("Outline1")
MyOutline1.Style = TextStyle.Bold
MyOutline1.Color = New RgbColor(1.0F, 0.0F, 0.0F)
' Add child outlines
Dim MyOutline1A As Outline = MyOutline1.ChildOutlines.Add("Outline1A", New UrlAction("http://www.mydomain.com"))
MyOutline1A.Expanded = False
Dim MyOutline1A1 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A1", New XYDestination(2, 0, 0))
Dim MyOutline1A2 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A2", New ZoomDestination(2, PageZoom.FitHeight))
Dim MyOutline1B As Outline = MyOutline1.ChildOutlines.Add("Outline1B", New ZoomDestination(2, PageZoom.FitWidth))
' Add a second top level outline
Dim MyOutline2 As Outline = MyDocument.Outlines.Add("Outline2", New XYDestination(3, 0, 300))
' Add a child outline
Dim MyOutline2A As Outline = MyOutline2.ChildOutlines.Add("Outline2A")
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add three blank pages
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Add a top level outline and set properties
Outline outline1 = document.Outlines.Add( "Outline1" );
outline1.Style = TextStyle.Bold;
outline1.Color = new RgbColor( 1.0f, 0.0f, 0.0f );
// Add child outlines
Outline outline1A = outline1.ChildOutlines.Add( "Outline1A", new UrlAction( "http://www.mydomain.com" ) );
outline1A.Expanded = false;
Outline outline1A1 = outline1A.ChildOutlines.Add( "Outline1A1", new XYDestination( 2, 0, 0 ) );
Outline outline1A2 = outline1A.ChildOutlines.Add( "Outline1A2", new ZoomDestination( 2, PageZoom.FitHeight ) );
Outline outline1B = outline1.ChildOutlines.Add( "Outline1B", new ZoomDestination( 2, PageZoom.FitWidth ) );
// Add a second top level outline
Outline outline2 = document.Outlines.Add( "Outline2", new XYDestination( 3, 0, 300 ) );
// Add a child outline
Outline outline2A = outline2.ChildOutlines.Add( "Outline2A" );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}
Imports System
Imports ceTe.DynamicPDF
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Add three blank pages
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
MyDocument.Pages.Add(New Page(PageSize.Letter))
' Add a top level outline and set properties
Dim MyOutline1 As Outline = MyDocument.Outlines.Add("Outline1")
MyOutline1.Style = TextStyle.Bold
MyOutline1.Color = New RgbColor(1.0F, 0.0F, 0.0F)
' Add child outlines
Dim MyOutline1A As Outline = MyOutline1.ChildOutlines.Add("Outline1A", New UrlAction("http://www.mydomain.com"))
MyOutline1A.Expanded = False
Dim MyOutline1A1 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A1", New XYDestination(2, 0, 0))
Dim MyOutline1A2 As Outline = MyOutline1A.ChildOutlines.Add("Outline1A2", New ZoomDestination(2, PageZoom.FitHeight))
Dim MyOutline1B As Outline = MyOutline1.ChildOutlines.Add("Outline1B", New ZoomDestination(2, PageZoom.FitWidth))
' Add a second top level outline
Dim MyOutline2 As Outline = MyDocument.Outlines.Add("Outline2", New XYDestination(3, 0, 300))
' Add a child outline
Dim MyOutline2A As Outline = MyOutline2.ChildOutlines.Add("Outline2A")
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Add three blank pages
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
document.Pages.Add( new Page( PageSize.Letter ) );
// Add a top level outline and set properties
Outline outline1 = document.Outlines.Add( "Outline1" );
outline1.Style = TextStyle.Bold;
outline1.Color = new RgbColor( 1.0f, 0.0f, 0.0f );
// Add child outlines
Outline outline1A = outline1.ChildOutlines.Add( "Outline1A", new UrlAction( "http://www.mydomain.com" ) );
outline1A.Expanded = false;
Outline outline1A1 = outline1A.ChildOutlines.Add( "Outline1A1", new XYDestination( 2, 0, 0 ) );
Outline outline1A2 = outline1A.ChildOutlines.Add( "Outline1A2", new ZoomDestination( 2, PageZoom.FitHeight ) );
Outline outline1B = outline1.ChildOutlines.Add( "Outline1B", new ZoomDestination( 2, PageZoom.FitWidth ) );
// Add a second top level outline
Outline outline2 = document.Outlines.Add( "Outline2", new XYDestination( 3, 0, 300 ) );
// Add a child outline
Outline outline2A = outline2.ChildOutlines.Add( "Outline2A" );
// Save the PDF document
document.Draw( @"C:\MyDocument.pdf" );
}
}