Enter Title

   Minimize
  Slide Show Sample for C# / VB.NET


Download the sample here
 
[C#]
PdfDocumentBuilder pdf = new PdfDocumentBuilder();
IPdfDocument document = pdf.CreateDocument();
document.PageSettings.Orientation = PdfPageOrientation.Landscape;
document.PageSettings.Transition.Duration = 2;
document.PageSettings.Transition.PageDuration = 2;
document.PageSettings.Transition.Style = PdfTransitionStyle.Box;
IPdfBrush b = pdf.BrushFactory.CreateSolidBrush(Color.Black);
IPdfFont f = pdf.FontFactory.CreateStandardFont(PdfStandardFontFamilies.Helvetica, 20f);
document.Pages.AddNew();
document.Pages[0].Graphics.DrawString("Hello world!", f, b, document.Pages[0].Size.Width/2, 15);

document.Pages.AddNew();
document.Pages[0].Graphics.DrawString("Hello world!", f, b, document.Pages[0].Size.Width / 2, 15);

IPdfPage page = null;
page = document.Pages.AddNew();
page.Graphics.DrawString("Hello world!", f, b, page.Size.Width / 2, 15);
page = document.Pages.AddNew();
page.Graphics.DrawString("Hello world!", f, b, page.Size.Width / 2, 15);
page = document.Pages.AddNew();
page.Graphics.DrawString("Hello world!", f, b, page.Size.Width / 2, 15);
page = document.Pages.AddNew();
page.Graphics.DrawString("Hello world!", f, b, page.Size.Width / 2, 15);
page = document.Pages.AddNew();
[VB.NET]
Dim pdf As New PdfDocumentBuilder()
Dim document As IPdfDocument = pdf.CreateDocument()
document.PageSettings.Orientation = PdfPageOrientation.Landscape
document.PageSettings.Transition.Duration = 2
document.PageSettings.Transition.PageDuration = 2
document.PageSettings.Transition.Style = PdfTransitionStyle.Box
Dim b As IPdfBrush = pdf.BrushFactory.CreateSolidBrush(Color.Black)
Dim f As IPdfFont = pdf.FontFactory.CreateStandardFont(PdfStandardFontFamilies.Helvetica, 20.0F)
document.Pages.AddNew()
document.Pages(0).Graphics.DrawString("Hello world!", f, b, document.Pages(0).Size.Width / 2, 15)
document.Pages.AddNew()
document.Pages(0).Graphics.DrawString("Hello world!", f, b, document.Pages(0).Size.Width / 2, 15)
Dim page As IPdfPage = Nothing
page = document.Pages.AddNew()
page.Graphics.DrawString("Hello world!", f, b, page.Size.Width / 2, 15)
page = document.Pages.AddNew()
page.Graphics.DrawString("Hello world!", f, b, page.Size.Width / 2, 15)
page = document.Pages.AddNew()
page.Graphics.DrawString("Hello world!", f, b, page.Size.Width / 2, 15)
page = document.Pages.AddNew()
page.Graphics.DrawString("Hello world!", f, b, page.Size.Width / 2, 15)
page = document.Pages.AddNew()
page.Graphics.DrawString("Hello world!", f, b, page.Size.Width / 2, 15)
document.Save(fileName)