- //Loads an existing Word document
- WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
- //Instantiation of DocToPDFConverter for Word to PDF conversion
- DocToPDFConverter converter = new DocToPDFConverter();
- //Converts Word document into PDF document
- PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
- //Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- //Releases all resources used by the object.
- converter.Dispose();
- //Closes the instance of document objects
- pdfDocument.Close(true);
- wordDocument.Close();
-
-
- 'Loads an existing Word document
- Dim wordDocument As New WordDocument("Template.docx", FormatType.Docx)
- 'Instantiation of DocToPDFConverter for Word to PDF conversion
- Dim converter As New DocToPDFConverter()
- 'Converts Word document into PDF document
- Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
- 'Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- 'Releases all resources used by the object.
- converter.Dispose();
- 'Closes the instance of document objects
- pdfDocument.Close(true);
- wordDocument.Close();
-
-
- //Loads an existing Word document
- WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
- //Instantiation of DocToPDFConverter for Word to PDF conversion
- DocToPDFConverter converter = new DocToPDFConverter();
- //Converts Word document into PDF document
- PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
- //Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- //Releases all resources used by the object.
- converter.Dispose();
- //Closes the instance of document objects
- pdfDocument.Close(true);
- wordDocument.Close();
-
-
- 'Loads an existing Word document
- Dim wordDocument As New WordDocument("Template.docx", FormatType.Docx)
- 'Instantiation of DocToPDFConverter for Word to PDF conversion
- Dim converter As New DocToPDFConverter()
- 'Converts Word document into PDF document
- Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
- 'Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- 'Releases all resources used by the object.
- converter.Dispose();
- 'Closes the instance of document objects
- pdfDocument.Close(true);
- wordDocument.Close();
-
-
- //Loads an existing Word document
- WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
- //Instantiation of DocToPDFConverter for Word to PDF conversion
- DocToPDFConverter converter = new DocToPDFConverter();
- //Converts Word document into PDF document
- PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
- //Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- //Releases all resources used by the object.
- converter.Dispose();
- //Closes the instance of document objects
- pdfDocument.Close(true);
- wordDocument.Close();
-
-
- 'Loads an existing Word document
- Dim wordDocument As New WordDocument("Template.docx", FormatType.Docx)
- 'Instantiation of DocToPDFConverter for Word to PDF conversion
- Dim converter As New DocToPDFConverter()
- 'Converts Word document into PDF document
- Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
- 'Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- 'Releases all resources used by the object.
- converter.Dispose();
- 'Closes the instance of document objects
- pdfDocument.Close(true);
- wordDocument.Close();
-
-
- //Loads an existing Word document
- WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
- //Instantiation of DocToPDFConverter for Word to PDF conversion
- DocToPDFConverter converter = new DocToPDFConverter();
- //Converts Word document into PDF document
- PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
- //Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- //Releases all resources used by the object.
- converter.Dispose();
- //Closes the instance of document objects
- pdfDocument.Close(true);
- wordDocument.Close();
-
-
- 'Loads an existing Word document
- Dim wordDocument As New WordDocument("Template.docx", FormatType.Docx)
- 'Instantiation of DocToPDFConverter for Word to PDF conversion
- Dim converter As New DocToPDFConverter()
- 'Converts Word document into PDF document
- Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
- 'Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- 'Releases all resources used by the object.
- converter.Dispose();
- 'Closes the instance of document objects
- pdfDocument.Close(true);
- wordDocument.Close();
-
-
- //Instantiation of DocToPDFConverter for Word to PDF conversion
- DocToPDFConverter converter = new DocToPDFConverter();
- //Converts the specified WordDocument to PDF.
- PdfDocument pdfDocument = converter.ConvertToPDF(fileName);
- //Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- //Releases all resources used by the object.
- converter.Dispose();
- //Closes the instance of document objects
- pdfDocument.Close(true);
-
-
- 'Creates an instance of the DocToPDFConverter
- Dim converter As New DocToPDFConverter() for Word to PDF conversion
- 'Instantiation of DocToPDFConverter
- Dim pdfDocument As PdfDocument = converter.ConvertToPDF(filename)
- 'Save the document in the given name and PDF format
- pdfDocument.Save("WordtoPDF.pdf");
- 'Releases all resources used by the object.
- converter.Dispose();
- 'Closes the instance of document objects
- pdfDocument.Close(true);
-
-
- //Loads an existing Word document
- Stream fileStream = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.Read);
- //Instantiation of DocToPDFConverter for Word to PDF conversion
- DocToPDFConverter converter = new DocToPDFConverter();
- //Converts the specified WordDocument to PDF.
- PdfDocument pdfDocument = converter.ConvertToPDF(fileStream);
- //Save the document in the given name and PDF format
- pdfDocument.Save("WordtoPDF.pdf");
- //Releases all resources used by the object.
- converter.Dispose();
- //Closes the instance of document objects
- fileStream.Close();
- pdfDocument.Close(true);
-
-
- //Loads an existing Word document
- Dim fileStream As Stream = New FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.Read)
- 'Instantiation of DocToPDFConverter for Word to PDF conversion
- Dim converter As New DocToPDFConverter()
- 'Converts Word document into PDF document
- Dim pdfDocument As PdfDocument = converter.ConvertToPDF(fileStream)
- 'Save the document in the given name and PDF format
- pdfDocument.Save("WordtoPDF.pdf");
- 'Releases all resources used by the object.
- converter.Dispose();
- 'Closes the instance of document objects
- fileStream.Close();
- pdfDocument.Close(true);
-
-
- //Loads an existing Word document
- WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
- //Instantiation of DocToPDFConverter for Word to PDF conversion
- DocToPDFConverter converter = new DocToPDFConverter();
- //Skip the updating process for Alternate chunks in the Word document
- converter.Settings.EnableAlternateChunks = false;
- //Sets the image resolution
- converter.Settings.ImageResolution = 640;
- //Sets the jpeg image quality to reduce the Pdf file size
- converter.Settings.ImageQuality = 100;
- //Sets true to optimize the memory usage for identical image
- converter.Settings.OptimizeIdenticalImages = false;
- //Sets the PdfConformanceLevel
- converter.Settings.PdfConformanceLevel = PdfConformanceLevel.None;
- //Converts Word document into PDF document
- PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
- //Closes the instance of Word document object
- wordDocument.Close();
- //Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- //Releases the resources occupied by DocToPDFConverter instance
- converter.Dispose();
- //Closes the instance of PDF document object
- pdfDocument.Close(true);
-
-
- 'Loads an existing Word document
- Dim wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx)
- 'Instantiation of DocToPDFConverter for Word to PDF conversion
- Dim converter As DocToPDFConverter = New DocToPDFConverter()
- 'Skip the updating process for Alternate chunks in the Word document
- converter.Settings.EnableAlternateChunks = False
- 'Sets the image resolution
- converter.Settings.ImageResolution = 640
- 'Sets the jpeg image quality to reduce the Pdf file size
- converter.Settings.ImageQuality = 100
- 'Sets true to optimize the memory usage for identical image
- converter.Settings.OptimizeIdenticalImages = False
- 'Sets the PdfConformanceLevel
- converter.Settings.PdfConformanceLevel = PdfConformanceLevel.None
- 'Converts Word document into PDF document
- Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
- 'Closes the instance of Word document object
- wordDocument.Close()
- 'Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf")
- 'Releases the resources occupied by DocToPDFConverter instance
- converter.Dispose()
- 'Closes the instance of PDF document object
- pdfDocument.Close(True)
-
-
- //Loads an existing Word document
- WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
- //Instantiates DocToPDFConverter instance for Word to PDF conversion
- DocToPDFConverter converter = new DocToPDFConverter();
- //Sets EmbedFonts property as true, to embed fonts in resultant PDF
- converter.Settings.EmbedFonts = true;
- //Converts Word document into PDF document
- PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
- //Closes the instance of Word document object
- wordDocument.Close();
- //Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- //Releases the resources occupied by DocToPDFConverter instance
- converter.Dispose();
- //Closes the instance of PDF document object
- pdfDocument.Close(true);
-
-
- 'Loads an existing Word document
- Dim wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx)
- 'Instantiates DocToPDFConverter instance for Word to PDF conversion
- Dim converter As DocToPDFConverter = New DocToPDFConverter()
- 'Sets EmbedFonts property as true, to embed fonts in resultant PDF
- converter.Settings.EmbedFonts = True
- 'Converts Word document into PDF document
- Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
- 'Closes the instance of Word document object
- wordDocument.Close()
- 'Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf")
- 'Releases the resources occupied by DocToPDFConverter instance
- converter.Dispose()
- 'Closes the instance of PDF document object
- pdfDocument.Close(True)
-
-
- //Loads an existing Word document
- WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
- //Instantiates DocToPDFConverter instance for Word to PDF conversion
- DocToPDFConverter converter = new DocToPDFConverter();
- //Sets the embed complete font information in converted PDF
- converter.Settings.EmbedCompleteFonts = true;
- //Converts Word document into PDF document
- PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
- //Closes the instance of Word document object
- wordDocument.Close();
- //Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf");
- //Releases the resources occupied by DocToPDFConverter instance
- converter.Dispose();
- //Closes the instance of PDF document object
- pdfDocument.Close(true);
-
-
- 'Loads an existing Word document
- Dim wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx)
- 'Instantiates DocToPDFConverter instance for Word to PDF conversion
- Dim converter As DocToPDFConverter = New DocToPDFConverter()
- 'Sets the embed complete font information in converted PDF
- converter.Settings.EmbedCompleteFonts = True
- 'Converts Word document into PDF document
- Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
- 'Closes the instance of Word document object
- wordDocument.Close()
- 'Saves the PDF file
- pdfDocument.Save("WordtoPDF.pdf")
- 'Releases the resources occupied by DocToPDFConverter instance
- converter.Dispose()
- 'Closes the instance of PDF document object
- pdfDocument.Close(True)
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Invoke the begin update method
- chart.ChartTitleArea.BeginUpdate();
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of the text area
- chart.ChartTitleArea.Color = OfficeKnownColors.Plum;
- //Invoke end update method
- chart.ChartTitleArea.EndUpdate();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the chart title
- chart.ChartTitle = "This is a chart Title"
- 'Invoke the begin update method
- chart.ChartTitleArea.BeginUpdate()
- 'Set the bold font style
- chart.ChartTitleArea.Bold = True
- 'Set the color of the text area
- chart.ChartTitleArea.Color = OfficeKnownColors.Plum
- 'Invoke end update method
- chart.ChartTitleArea.EndUpdate()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Invoke the begin update method
- chart.ChartTitleArea.BeginUpdate();
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of the text area
- chart.ChartTitleArea.Color = OfficeKnownColors.Plum;
- //Invoke end update method
- chart.ChartTitleArea.EndUpdate();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the chart title
- chart.ChartTitle = "This is a chart Title"
- 'Invoke the begin update method
- chart.ChartTitleArea.BeginUpdate()
- 'Set the bold font style
- chart.ChartTitleArea.Bold = True
- 'Set the color of the text area
- chart.ChartTitleArea.Color = OfficeKnownColors.Plum
- 'Invoke end update method
- chart.ChartTitleArea.EndUpdate()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- //Set the number format of axis
- chartAxis.NumberFormat = "Number";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- 'Set the number format of axis
- chartAxis.NumberFormat = "Number"
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Get the chart axis type, read only
- OfficeAxisType axisType = chartAxis.AxisType;
- //Enable reverse plot order
- chartAxis.ReversePlotOrder = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Get the chart axis type, read only
- Dim axisType As OfficeAxisType = chartAxis.AxisType
- 'Enable reverse plot order
- chartAxis.ReversePlotOrder = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- chartAxis.ReversePlotOrder = true;
- //Set the text rotation angle
- chartAxis.TextRotationAngle = 30;
- //Set the title
- chartAxis.Title = "Chart Axis";
- //Set the font style for title area
- chartAxis.TitleArea.Bold = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- chartAxis.ReversePlotOrder = True
- 'Set the text rotation angle
- chartAxis.TextRotationAngle = 30
- 'Set the title
- chartAxis.Title = "Chart Axis"
- 'Set the font style for title area
- chartAxis.TitleArea.Bold = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- chartAxis.ReversePlotOrder = true;
- //Set the text rotation angle
- chartAxis.TextRotationAngle = 50;
- //Set the title
- chartAxis.Title = "Chart Axis";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- chartAxis.ReversePlotOrder = True
- 'Set the text rotation angle
- chartAxis.TextRotationAngle = 30
- 'Set the title
- chartAxis.Title = "Chart Axis"
- 'Set the font style for title area
- chartAxis.TitleArea.Bold = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- chartAxis.ReversePlotOrder = true;
- //Set the text rotation angle
- chartAxis.TextRotationAngle = 30;
- //Set the title
- chartAxis.Title = "Chart Axis";
- //Set the font style for title area
- chartAxis.TitleArea.Bold = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- chartAxis.ReversePlotOrder = True
- 'Set the text rotation angle
- chartAxis.TextRotationAngle = 30
- 'Set the title
- chartAxis.Title = "Chart Axis"
- 'Set the font style for title area
- chartAxis.TitleArea.Bold = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = true;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = True
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set major gridline
- chartAxis.HasMajorGridLines = true;
- //Get the major gridline of chart axis, read only
- IOfficeChartGridLine gridline = chartAxis.MajorGridLines;
- //Set border of major grid line
- gridline.Border.AutoFormat = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set major gridline
- chartAxis.HasMajorGridLines = True
- 'Get the major gridline of chart axis, read only
- Dim gridline As IOfficeChartGridLine = chartAxis.MajorGridLines
- 'Set border of major grid line
- gridline.Border.AutoFormat = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set minor gridline
- chartAxis.HasMinorGridLines = true;
- //Get the minor gridline of chart axis, read only
- IOfficeChartGridLine gridline = chartAxis.MinorGridLines;
- //Set border of minor grid line
- gridline.Border.AutoFormat = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set minor gridline
- chartAxis.HasMinorGridLines = True
- 'Get the minor gridline of chart axis, read only
- Dim gridline As IOfficeChartGridLine = chartAxis.MinorGridLines
- 'Set border of minor grid line
- gridline.Border.AutoFormat = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Set the minor grid lines
- chartAxis.HasMinorGridLines = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Set the minor grid lines
- chartAxis.HasMinorGridLines = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set minor gridline
- chartAxis.HasMinorGridLines = true;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Set the major gridlines
- chartAxis.HasMajorGridLines = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set minor gridline
- chartAxis.HasMinorGridLines = True
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Set the major gridlines
- chartAxis.HasMajorGridLines = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Set the minor tick mark
- chartAxis.MinorTickMark = OfficeTickMark.TickMark_Outside;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Set the minor tick mark
- chartAxis.MinorTickMark = OfficeTickMark.TickMark_Outside
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Set the major tick mark
- chartAxis.MajorTickMark = OfficeTickMark.TickMark_Inside;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Set the major tick mark
- chartAxis.MajorTickMark = OfficeTickMark.TickMark_Inside
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = true;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = True
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = true;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = True
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set the tick label position
- chartAxis.TickLabelPosition = OfficeTickLabelPosition.TickLabelPosition_NextToAxis;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set the tick label position
- chartAxis.TickLabelPosition = OfficeTickLabelPosition.TickLabelPosition_NextToAxis
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Hide the visibility of chart axis
- chartAxis.Visible = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Hide the visibility of chart axis
- chartAxis.Visible = False
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Get the chart axis type, read only
- OfficeAxisType axisType = chartAxis.AxisType;
- //Enable reverse plot order
- chartAxis.ReversePlotOrder = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Get the chart axis type, read only
- Dim axisType As OfficeAxisType = chartAxis.AxisType
- 'Enable reverse plot order
- chartAxis.ReversePlotOrder = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Get the shadow od axis
- IShadow shadow = chartAxis.Shadow;
- //Set the shadow color
- shadow.ShadowColor = Color.Brown;
- //Set the shadow angle
- shadow.Angle = 87;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Get the shadow od axis
- Dim shadow As IShadow = chartAxis.Shadow
- 'Set the shadow color
- shadow.ShadowColor = Color.Brown
- 'Set the shadow angle
- shadow.Angle = 87
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = True
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Enable auto line color
- chartAreaBorder.IsAutoLineColor = false;
- //Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue;
- //Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot;
- //Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide;
- //Set the transparency of border
- chartAreaBorder.Transparency = 0.8;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Enable auto line color
- chartAreaBorder.IsAutoLineColor = False
- 'Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue
- 'Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot
- 'Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide
- 'Set the transparency of border
- chartAreaBorder.Transparency = 0.8
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Enable auto line color
- chartAreaBorder.IsAutoLineColor = false;
- //Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue;
- //Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot;
- //Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide;
- //Set the transparency of border
- chartAreaBorder.Transparency = 0.8;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Enable auto line color
- chartAreaBorder.IsAutoLineColor = False
- 'Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue
- 'Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot
- 'Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide
- 'Set the transparency of border
- chartAreaBorder.Transparency = 0.8
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Enable auto line color
- chartAreaBorder.IsAutoLineColor = false;
- //Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue;
- //Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot;
- //Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide;
- //Set the transparency of border
- chartAreaBorder.Transparency = 0.8;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Enable auto line color
- chartAreaBorder.IsAutoLineColor = False
- 'Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue
- 'Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot
- 'Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide
- 'Set the transparency of border
- chartAreaBorder.Transparency = 0.8
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Set the auto format
- chartAreaBorder.AutoFormat = false;
- //Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Set the auto format
- chartAreaBorder.AutoFormat = False
- 'Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Enable auto line color
- chartAreaBorder.IsAutoLineColor = false;
- //Set the line color
- //chartAreaBorder.LineColor = Color.Chocolate;
- //Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot;
- //Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide;
- //Set the transparency of border
- chartAreaBorder.Transparency = 0.8;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Enable auto line color
- chartAreaBorder.IsAutoLineColor = False
- 'Set the line color
- 'chartAreaBorder.LineColor = Color.Chocolate;
- 'Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot
- 'Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide
- 'Set the transparency of border
- chartAreaBorder.Transparency = 0.8
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange;
- //Set the transparency of border
- chartAreaBorder.Transparency = 0.8;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange
- 'Set the transparency of border
- chartAreaBorder.Transparency = 0.8
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the categories of chart
- IOfficeChartCategories categories = chart.Categories;
- //Get the name of the category
- string name = categories[0].Name;
- //Set the category filter
- categories[0].IsFiltered = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the categories of chart
- Dim categories As IOfficeChartCategories = chart.Categories
- 'Get the name of the category
- Dim name As String = categories(0).Name
- 'Set the category filter
- categories(0).IsFiltered = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the category from the category collection
- IOfficeChartCategory category = chart.Categories[0];
- //Get the name of the category
- string name = category.Name;
- //Get the category label, read only
- IOfficeDataRange dataRange = category.CategoryLabel;
- //Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol");
- dataRange.SetValue(2, 4, 290);
- //Get the values of category
- IOfficeDataRange values = category.Values;
- //Set the value
- values.SetValue(3, 2, 120);
- values.SetValue(5, 2, 320);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the category from the category collection
- Dim category As IOfficeChartCategory = chart.Categories(0)
- 'Get the name of the category
- Dim name As String = category.Name
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = category.CategoryLabel
- 'Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol")
- dataRange.SetValue(2, 4, 290)
- 'Get the values of category
- Dim values As IOfficeDataRange = category.Values
- 'Set the value
- values.SetValue(3, 2, 120)
- values.SetValue(5, 2, 320)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the category from the category collection
- IOfficeChartCategory category = chart.Categories[0];
- //Get the name of the category
- string name = category.Name;
- //Get the category label, read only
- IOfficeDataRange dataRange = category.CategoryLabel;
- //Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol");
- dataRange.SetValue(2, 4, 290);
- //Get the values of category
- IOfficeDataRange values = category.Values;
- //Set the value
- values.SetValue(3, 2, 120);
- values.SetValue(5, 2, 320);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the category from the category collection
- Dim category As IOfficeChartCategory = chart.Categories(0)
- 'Get the name of the category
- Dim name As String = category.Name
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = category.CategoryLabel
- 'Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol")
- dataRange.SetValue(2, 4, 290)
- 'Get the values of category
- Dim values As IOfficeDataRange = category.Values
- 'Set the value
- values.SetValue(3, 2, 120)
- values.SetValue(5, 2, 320)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the category from the category collection
- IOfficeChartCategory category = chart.Categories[0];
- //Get the name of the category
- string name = category.Name;
- //Get the category label, read only
- IOfficeDataRange dataRange = category.CategoryLabel;
- //Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol");
- dataRange.SetValue(2, 4, 290);
- //Get the values of category
- IOfficeDataRange values = category.Values;
- //Set the value
- values.SetValue(3, 2, 120);
- values.SetValue(5, 2, 320);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the category from the category collection
- Dim category As IOfficeChartCategory = chart.Categories(0)
- 'Get the name of the category
- Dim name As String = category.Name
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = category.CategoryLabel
- 'Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol")
- dataRange.SetValue(2, 4, 290)
- 'Get the values of category
- Dim values As IOfficeDataRange = category.Values
- 'Set the value
- values.SetValue(3, 2, 120)
- values.SetValue(5, 2, 320)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMin = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMinor = false;
- //Set the major unit
- chart.PrimaryValueAxis.MinorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MinimumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMajor = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMax = false;
- //Set the major unit
- chart.PrimaryValueAxis.MajorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MaximumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMajor = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMax = false;
- //Set the major unit
- chart.PrimaryValueAxis.MajorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MaximumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMin = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMinor = false;
- //Set the major unit
- chart.PrimaryValueAxis.MinorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MinimumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the crosses At
- chart.PrimaryValueAxis.CrossesAt = 1.2;
- //Set the display unit
- chart.PrimaryValueAxis.DisplayUnit = OfficeChartDisplayUnit.Hundreds;
- //Set the display unit custom
- chart.PrimaryValueAxis.DisplayUnitCustom = 12.34;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMin = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMinor = false;
- //Set the major unit
- chart.PrimaryValueAxis.MinorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MinimumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMajor = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMax = false;
- //Set the major unit
- chart.PrimaryValueAxis.MajorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MaximumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMajor = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMax = false;
- //Set the major unit
- chart.PrimaryValueAxis.MajorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MaximumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Disable the auto cross
- chart.PrimaryValueAxis.IsAutoCross = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the log scale
- chart.PrimaryValueAxis.IsLogScale = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Disable the auto cross
- chart.PrimaryValueAxis.IsAutoCross = false;
- //Set the Max cross
- chart.PrimaryValueAxis.IsMaxCross = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the crosses At
- chart.PrimaryValueAxis.CrossesAt = 1.2;
- //Set the display unit
- chart.PrimaryValueAxis.DisplayUnit = OfficeChartDisplayUnit.Hundreds;
- //Set the display unit custom
- chart.PrimaryValueAxis.DisplayUnitCustom = 12.34;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the crosses At
- chart.PrimaryValueAxis.CrossesAt = 1.2;
- //Set the display unit
- chart.PrimaryValueAxis.DisplayUnit = OfficeChartDisplayUnit.Hundreds;
- //Set the display unit custom
- chart.PrimaryValueAxis.DisplayUnitCustom = 12.34;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the display unit
- chart.PrimaryValueAxis.DisplayUnit = OfficeChartDisplayUnit.MillionMillions;
- //Hide the display unit label
- chart.PrimaryValueAxis.HasDisplayUnitLabel = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the display unit
- chart.PrimaryValueAxis.DisplayUnit = OfficeChartDisplayUnit.MillionMillions;
- //Set the italic font style for the lable
- chart.PrimaryValueAxis.DisplayUnitLabel.Italic = true;
- //Set the RGB color of the label
- chart.PrimaryValueAxis.DisplayUnitLabel.RGBColor = System.Drawing.Color.Bisque;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2;
- //Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2
- 'Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the auto tick label spacing
- categoryAxis.AutoTickLabelSpacing = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the auto tick label spacing
- categoryAxis.AutoTickLabelSpacing = False
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2;
- //Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2
- 'Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2;
- //Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2;
- //Set IsBetween, default is true
- categoryAxis.IsBetween = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2
- 'Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2
- 'Set IsBetween, default is true
- categoryAxis.IsBetween = False
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the category type
- categoryAxis.CategoryType = OfficeCategoryType.Category;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the category type
- categoryAxis.CategoryType = OfficeCategoryType.Category
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
- //Set the base unit for the category axis, default is true
- categoryAxis.BaseUnitIsAuto = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
- 'Set the base unit for the category axis, default is true
- categoryAxis.BaseUnitIsAuto = False
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
- //Set the base unit for the category axis, default is true
- categoryAxis.BaseUnitIsAuto = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
- 'Set the base unit for the category axis, default is true
- categoryAxis.BaseUnitIsAuto = False
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
- //Set the major unit scale
- categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month;
- //Set the minor unit scale
- categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month;
- //Set the minor unit
- categoryAxis.MinorUnit = 10;
- //Set the major unit
- categoryAxis.MajorUnit = 10;
- //Set the offset value
- categoryAxis.Offset = 450;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
- 'Set the major unit scale
- categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month
- 'Set the minor unit scale
- categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month
- 'Set the minor unit
- categoryAxis.MinorUnit = 10
- 'Set the major unit
- categoryAxis.MajorUnit = 10
- 'Set the offset value
- categoryAxis.Offset = 450
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
- //Set the major unit scale
- categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month;
- //Set the minor unit scale
- categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month;
- //Set the minor unit
- categoryAxis.MinorUnit = 10;
- //Set the major unit
- categoryAxis.MajorUnit = 10;
- //Set the offset value
- categoryAxis.Offset = 450;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
- 'Set the major unit scale
- categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month
- 'Set the minor unit scale
- categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month
- 'Set the minor unit
- categoryAxis.MinorUnit = 10
- 'Set the major unit
- categoryAxis.MajorUnit = 10
- 'Set the offset value
- categoryAxis.Offset = 450
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[1].Charts[0] as IPresentationChart;
- //Get the categories of chart
- IOfficeChartCategories categories = chart.Categories;
- //Get the count of categories
- int count = categories.Count;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(1).Charts(0), IPresentationChart)
- 'Get the categories of chart
- Dim categories As IOfficeChartCategories = chart.Categories
- 'Get the count of categories
- Dim count As Integer = categories.Count
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the categories of chart
- IOfficeChartCategories categories = chart.Categories;
- //Get the name of the category
- string name = categories[0].Name;
- //Set the category filter
- categories[0].IsFiltered = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the categories of chart
- Dim categories As IOfficeChartCategories = chart.Categories
- 'Get the name of the category
- Dim name As String = categories(0).Name
- 'Set the category filter
- categories(0).IsFiltered = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the category label, read only
- IOfficeDataRange dataRange = chartData[2, 2, 4, 5];
- //Set the cell with an integer
- dataRange.SetValue(2, 4, 290);
- //Set the cell with double value
- dataRange.SetValue(3, 3, 23.34);
- //Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C");
- //Set the cell with an object
- object value = "@!@#";
- dataRange.SetValue(2, 1, "value");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = chartData(2, 2, 4, 5)
- 'Set the cell with an integer
- dataRange.SetValue(2, 4, 290)
- 'Set the cell with double value
- dataRange.SetValue(3, 3, 23.34)
- 'Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C")
- 'Set the cell with an object
- Dim value As Object = "@!@#"
- dataRange.SetValue(2, 1, "value")
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the category label, read only
- IOfficeDataRange dataRange = chartData[2, 2, 4, 5];
- //Set the cell with an integer
- dataRange.SetValue(2, 4, 290);
- //Set the cell with double value
- dataRange.SetValue(3, 3, 23.34);
- //Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C");
- //Set the cell with an object
- object value = "@!@#";
- dataRange.SetValue(2, 1, "value");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = chartData(2, 2, 4, 5)
- 'Set the cell with an integer
- dataRange.SetValue(2, 4, 290)
- 'Set the cell with double value
- dataRange.SetValue(3, 3, 23.34)
- 'Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C")
- 'Set the cell with an object
- Dim value As Object = "@!@#"
- dataRange.SetValue(2, 1, "value")
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the category label, read only
- IOfficeDataRange dataRange = chartData[2, 2, 4, 5];
- //Set the cell with an integer
- dataRange.SetValue(2, 4, 290);
- //Set the cell with double value
- dataRange.SetValue(3, 3, 23.34);
- //Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C");
- //Set the cell with an object
- object value = "@!@#";
- dataRange.SetValue(2, 1, "value");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = chartData(2, 2, 4, 5)
- 'Set the cell with an integer
- dataRange.SetValue(2, 4, 290)
- 'Set the cell with double value
- dataRange.SetValue(3, 3, 23.34)
- 'Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C")
- 'Set the cell with an object
- Dim value As Object = "@!@#"
- dataRange.SetValue(2, 1, "value")
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the category label, read only
- IOfficeDataRange dataRange = chartData[2, 2, 4, 5];
- //Set the cell with an integer
- dataRange.SetValue(2, 4, 290);
- //Set the cell with double value
- dataRange.SetValue(3, 3, 23.34);
- //Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C");
- //Set the cell with an object
- object value = "@!@#";
- dataRange.SetValue(2, 1, "value");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = chartData(2, 2, 4, 5)
- 'Set the cell with an integer
- dataRange.SetValue(2, 4, 290)
- 'Set the cell with double value
- dataRange.SetValue(3, 3, 23.34)
- 'Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C")
- 'Set the cell with an object
- Dim value As Object = "@!@#"
- dataRange.SetValue(2, 1, "value")
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IOfficeChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the value of a particular cell from the chart data
- object value = chartData.GetValue(2, 3);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with postion and size
- Dim chart As IOfficeChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the value of a particular cell from the chart data
- Dim value As Object = chartData.GetValue(2, 3)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Clear the chart data
- chartData.Clear();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Clear the chart data
- chartData.Clear()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the category label, read only
- IOfficeDataRange dataRange = chartData[2, 2, 4, 5];
- //Set the cell with an integer
- dataRange.SetValue(2, 4, 290);
- //Set the cell with double value
- dataRange.SetValue(3, 3, 23.34);
- //Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C");
- //Set the cell with an object
- object value = "@!@#";
- dataRange.SetValue(2, 1, "value");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = chartData(2, 2, 4, 5)
- 'Set the cell with an integer
- dataRange.SetValue(2, 4, 290)
- 'Set the cell with double value
- dataRange.SetValue(3, 3, 23.34)
- 'Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C")
- 'Set the cell with an object
- Dim value As Object = "@!@#"
- dataRange.SetValue(2, 1, "value")
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the size of text area
- chart.ChartTitleArea.Size = 32;
- //Set the RGB color
- chart.ChartTitleArea.RGBColor = System.Drawing.Color.Peru;
- //Set strike through
- chart.ChartTitleArea.Strikethrough = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the size of text area
- chart.ChartTitleArea.Size = 32;
- //Set the RGB color
- chart.ChartTitleArea.RGBColor = System.Drawing.Color.Peru;
- //Set strike through
- chart.ChartTitleArea.Strikethrough = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the size of text area
- chart.ChartTitleArea.Size = 32;
- //Set the RGB color
- chart.ChartTitleArea.RGBColor = System.Drawing.Color.Peru;
- //Set strike through
- chart.ChartTitleArea.Strikethrough = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the size of title text area
- chart.ChartTitleArea.Size = 26;
- //Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru;
- //Set the text for chart title
- chart.ChartTitleArea.Text = "The Chart Title";
- //Set the text rotation angle
- chart.ChartTitleArea.TextRotationAngle = 45;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the size of title text area
- chart.ChartTitleArea.Size = 26
- 'Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru
- 'Set the text for chart title
- chart.ChartTitleArea.Text = "The Chart Title"
- 'Set the text rotation angle
- chart.ChartTitleArea.TextRotationAngle = 45
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the size of title text area
- chart.ChartTitleArea.Size = 26;
- //Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru;
- //Set the text for chart title
- chart.ChartTitleArea.Text = "The Chart Title";
- //Set the text rotation angle
- chart.ChartTitleArea.TextRotationAngle = 45;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the size of title text area
- chart.ChartTitleArea.Size = 26
- 'Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru
- 'Set the text for chart title
- chart.ChartTitleArea.Text = "The Chart Title"
- 'Set the text rotation angle
- chart.ChartTitleArea.TextRotationAngle = 45
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "The Chart Title";
- //Set the size of title text area
- chart.ChartTitleArea.Size = 26;
- //Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru;
- //Set the line pattern
- chart.ChartTitleArea.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot;
- //Set the line weight
- chart.ChartTitleArea.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the chart title
- chart.ChartTitle = "The Chart Title"
- 'Set the size of title text area
- chart.ChartTitleArea.Size = 26
- 'Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru
- 'Set the line pattern
- chart.ChartTitleArea.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot
- 'Set the line weight
- chart.ChartTitleArea.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the serie name
- dataLabels.IsSeriesName = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the serie name
- dataLabels.IsSeriesName = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the serie name
- dataLabels.IsSeriesName = true;
- //Set the category name
- dataLabels.IsCategoryName = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the serie name
- dataLabels.IsSeriesName = True
- 'Set the category name
- dataLabels.IsCategoryName = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the value for data labels
- dataLabels.IsValue = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the value for data labels
- dataLabels.IsValue = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Pie chart
- chart.ChartType = OfficeChartType.Pie;
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the data label as percentage
- dataLabels.IsPercentage = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Pie chart
- chart.ChartType = OfficeChartType.Pie
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the data label as percentage
- dataLabels.IsPercentage = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create an instance equivalent to PowerPoint presentation
- IPresentation presentation = Presentation.Create();
- //Add a blank slide
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart of specific size and position
- IPresentationChart chart = slide.Charts.AddChart(100, 100, 300, 400);
- chart.ChartData.SetValue(1, 2, 1);
- chart.ChartData.SetValue(1, 3, 2);
- chart.ChartData.SetValue(1, 4, 3);
- chart.ChartData.SetValue(2, 1, "Blue");
- chart.ChartData.SetValue(2, 2, 0.4);
- chart.ChartData.SetValue(2, 3, 0.5);
- chart.ChartData.SetValue(2, 4, 1.2);
- chart.ChartData.SetValue(3, 1, "Red");
- chart.ChartData.SetValue(3, 2, 2.6);
- chart.ChartData.SetValue(3, 3, 3.6);
- chart.ChartData.SetValue(3, 4, 2.1);
- chart.ChartData.SetValue(4, 1, "Orange");
- chart.ChartData.SetValue(4, 2, 1.1);
- chart.ChartData.SetValue(4, 3, 0.6);
- chart.ChartData.SetValue(4, 4, 1.2);
- chart.ChartData.SetValue(5, 1, "Light Blue");
- chart.ChartData.SetValue(5, 2, 2.1);
- chart.ChartData.SetValue(5, 3, 3.4);
- chart.ChartData.SetValue(5, 4, 1.1);
- IOfficeChartSerie serieJan = chart.Series.Add("1");
- //Sets the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 5, 2];
- IOfficeChartSerie serieFeb = chart.Series.Add("2");
- //Sets the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 5, 3];
- //Creates a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("3");
- //Sets the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 5, 4];
- //Set chart data range
- chart.DataRange = chart.ChartData[2, 1, 5, 4];
- //Specifies the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked;
- chart.Series[0].DataPoints.DefaultDataPoint.DataLabels.IsValue = true;
- //Set the number format of the data label in percentage, round off to two decimal places
- chart.Series[0].DataPoints.DefaultDataPoint.DataLabels.NumberFormat = "0.00%";
- //Save the presentation
- presentation.Save("sample.pptx");
- //Close the Presentation
- presentation.Close();
-
-
- 'Create an instance equivalent to PowerPoint presentation
- Dim presentationDocument As IPresentation = Presentation.Create()
- 'Add a blank slide
- Dim slide As ISlide = presentationDocument.Slides.Add(SlideLayoutType.Blank)
- 'Add chart of specific size and position
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 100, 300, 400)
- chart.ChartData.SetValue(1, 2, 1)
- chart.ChartData.SetValue(1, 3, 2)
- chart.ChartData.SetValue(1, 4, 3)
- chart.ChartData.SetValue(2, 1, "Blue")
- chart.ChartData.SetValue(2, 2, 0.4)
- chart.ChartData.SetValue(2, 3, 0.5)
- chart.ChartData.SetValue(2, 4, 1.2)
- chart.ChartData.SetValue(3, 1, "Red")
- chart.ChartData.SetValue(3, 2, 2.6)
- chart.ChartData.SetValue(3, 3, 3.6)
- chart.ChartData.SetValue(3, 4, 2.1)
- chart.ChartData.SetValue(4, 1, "Orange")
- chart.ChartData.SetValue(4, 2, 1.1)
- chart.ChartData.SetValue(4, 3, 0.6)
- chart.ChartData.SetValue(4, 4, 1.2)
- chart.ChartData.SetValue(5, 1, "Light Blue")
- chart.ChartData.SetValue(5, 2, 2.1)
- chart.ChartData.SetValue(5, 3, 3.4)
- chart.ChartData.SetValue(5, 4, 1.1)
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("1")
- 'Sets the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 5, 2)
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("2")
- 'Sets the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 5, 3)
- 'Creates a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("3")
- 'Sets the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 5, 4)
- 'Set chart data range
- chart.DataRange = chart.ChartData(2, 1, 5, 4)
- 'Specifies the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked
- chart.Series(0).DataPoints.DefaultDataPoint.DataLabels.IsValue = True
- 'Set the number format of the data label in percentage, round off to two decimal places.
- chart.Series(0).DataPoints.DefaultDataPoint.DataLabels.NumberFormat = "0.00%"
- 'Save the presentation
- presentationDocument.Save("sample.pptx")
- 'Close the Presentation
- presentationDocument.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the position of data labels
- dataLabels.Delimiter = "L";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the position of data labels
- dataLabels.Delimiter = "L"
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the serie name
- dataLabels.IsSeriesName = true;
- //Set the legend key for data labels
- dataLabels.IsLegendKey = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the serie name
- dataLabels.IsSeriesName = True
- 'Set the legend key for data labels
- dataLabels.IsLegendKey = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Pie chart
- chart.ChartType = OfficeChartType.Pie;
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the leader lines
- dataLabels.ShowLeaderLines = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Pie chart
- chart.ChartType = OfficeChartType.Pie
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the leader lines
- dataLabels.ShowLeaderLines = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the serie name
- dataLabels.IsSeriesName = true;
- //Set the legend key for data labels
- dataLabels.IsLegendKey = true;
- //Set the position of data labels
- dataLabels.Position = OfficeDataLabelPosition.Outside;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the serie name
- dataLabels.IsSeriesName = True
- 'Set the legend key for data labels
- dataLabels.IsLegendKey = True
- 'Set the position of data labels
- dataLabels.Position = OfficeDataLabelPosition.Outside
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create an instance equivalent to PowerPoint presentation
- IPresentation presentation = Presentation.Create();
- //Add a blank slide
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart of specific size and position
- IPresentationChart chart = slide.Charts.AddChart(100, 100, 300, 400);
- chart.ChartData.SetValue(1, 2, 1);
- chart.ChartData.SetValue(1, 3, 2);
- chart.ChartData.SetValue(1, 4, 3);
- chart.ChartData.SetValue(2, 1, "Blue");
- chart.ChartData.SetValue(2, 2, 0.4);
- chart.ChartData.SetValue(2, 3, 0.5);
- chart.ChartData.SetValue(2, 4, 1.2);
- chart.ChartData.SetValue(3, 1, "Red");
- chart.ChartData.SetValue(3, 2, 2.6);
- chart.ChartData.SetValue(3, 3, 3.6);
- chart.ChartData.SetValue(3, 4, 2.1);
- chart.ChartData.SetValue(4, 1, "Orange");
- chart.ChartData.SetValue(4, 2, 1.1);
- chart.ChartData.SetValue(4, 3, 0.6);
- chart.ChartData.SetValue(4, 4, 1.2);
- chart.ChartData.SetValue(5, 1, "Light Blue");
- chart.ChartData.SetValue(5, 2, 2.1);
- chart.ChartData.SetValue(5, 3, 3.4);
- chart.ChartData.SetValue(5, 4, 1.1);
- IOfficeChartSerie serieJan = chart.Series.Add("1");
- //Sets the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 5, 2];
- IOfficeChartSerie serieFeb = chart.Series.Add("2");
- //Sets the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 5, 3];
- //Creates a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("3");
- //Sets the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 5, 4];
- //Set chart data range
- chart.DataRange = chart.ChartData[2, 1, 5, 4];
- //Specifies the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked;
- chart.Series[0].DataPoints.DefaultDataPoint.DataLabels.IsValue = true;
- //Set the number format of the data label in percentage, round off to two decimal places
- chart.Series[0].DataPoints.DefaultDataPoint.DataLabels.NumberFormat = "0.00%";
- //Save the presentation
- presentation.Save("sample.pptx");
- //Close the Presentation
- presentation.Close();
-
-
- 'Create an instance equivalent to PowerPoint presentation
- Dim presentationDocument As IPresentation = Presentation.Create()
- 'Add a blank slide
- Dim slide As ISlide = presentationDocument.Slides.Add(SlideLayoutType.Blank)
- 'Add chart of specific size and position
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 100, 300, 400)
- chart.ChartData.SetValue(1, 2, 1)
- chart.ChartData.SetValue(1, 3, 2)
- chart.ChartData.SetValue(1, 4, 3)
- chart.ChartData.SetValue(2, 1, "Blue")
- chart.ChartData.SetValue(2, 2, 0.4)
- chart.ChartData.SetValue(2, 3, 0.5)
- chart.ChartData.SetValue(2, 4, 1.2)
- chart.ChartData.SetValue(3, 1, "Red")
- chart.ChartData.SetValue(3, 2, 2.6)
- chart.ChartData.SetValue(3, 3, 3.6)
- chart.ChartData.SetValue(3, 4, 2.1)
- chart.ChartData.SetValue(4, 1, "Orange")
- chart.ChartData.SetValue(4, 2, 1.1)
- chart.ChartData.SetValue(4, 3, 0.6)
- chart.ChartData.SetValue(4, 4, 1.2)
- chart.ChartData.SetValue(5, 1, "Light Blue")
- chart.ChartData.SetValue(5, 2, 2.1)
- chart.ChartData.SetValue(5, 3, 3.4)
- chart.ChartData.SetValue(5, 4, 1.1)
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("1")
- 'Sets the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 5, 2)
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("2")
- 'Sets the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 5, 3)
- 'Creates a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("3")
- 'Sets the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 5, 4)
- 'Set chart data range
- chart.DataRange = chart.ChartData(2, 1, 5, 4)
- 'Specifies the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked
- chart.Series(0).DataPoints.DefaultDataPoint.DataLabels.IsValue = True
- 'Set the number format of the data label in percentage, round off to two decimal places
- chart.Series(0).DataPoints.DefaultDataPoint.DataLabels.NumberFormat = "0.00%"
- 'Save the presentation
- presentationDocument.Save("sample.pptx")
- 'Close the Presentation
- presentationDocument.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D;
- //Get the serie data point
- IOfficeChartDataPoint dataPoint = chart.Series[0].DataPoints.DefaultDataPoint;
- //Get the data labels of data point
- IOfficeChartDataLabels dataLabels = dataPoint.DataLabels;
- //Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D
- 'Get the serie data point
- Dim dataPoint As IOfficeChartDataPoint = chart.Series(0).DataPoints.DefaultDataPoint
- 'Get the data labels of data point
- Dim dataLabels As IOfficeChartDataLabels = dataPoint.DataLabels
- 'Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D;
- //Get the serie data point
- IOfficeChartDataPoint dataPoint = chart.Series[0].DataPoints.DefaultDataPoint;
- //Gets the index of data point from points collection
- int index = dataPoint.Index;
- //Check if the point is default data point
- bool isDefault = dataPoint.IsDefault;
- //Set the default marker type
- dataPoint.IsDefaultmarkertype = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D
- 'Get the serie data point
- Dim dataPoint As IOfficeChartDataPoint = chart.Series(0).DataPoints.DefaultDataPoint
- 'Gets the index of data point from points collection
- Dim index As Integer = dataPoint.Index
- 'Check if the point is default data point
- Dim isDefault As Boolean = dataPoint.IsDefault
- 'Set the default marker type
- dataPoint.IsDefaultmarkertype = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D;
- //Get the serie data point
- IOfficeChartDataPoint dataPoint = chart.Series[0].DataPoints.DefaultDataPoint;
- //Get the data format of the data point, read only
- IOfficeChartSerieDataFormat dataFormat = dataPoint.DataFormat;
- //Set the BarShapeTop
- dataFormat.BarShapeTop = OfficeTopFormat.Trunc;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D
- 'Get the serie data point
- Dim dataPoint As IOfficeChartDataPoint = chart.Series(0).DataPoints.DefaultDataPoint
- 'Get the data format of the data point, read only
- Dim dataFormat As IOfficeChartSerieDataFormat = dataPoint.DataFormat
- 'Set the BarShapeTop
- dataFormat.BarShapeTop = OfficeTopFormat.Trunc
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D;
- //Get the serie data point
- IOfficeChartDataPoint dataPoint = chart.Series[0].DataPoints.DefaultDataPoint;
- //Gets the index of data point from points collection
- int index = dataPoint.Index;
- //Check if the point is default data point
- bool isDefault = dataPoint.IsDefault;
- //Set the default marker type
- dataPoint.IsDefaultmarkertype = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D
- 'Get the serie data point
- Dim dataPoint As IOfficeChartDataPoint = chart.Series(0).DataPoints.DefaultDataPoint
- 'Gets the index of data point from points collection
- Dim index As Integer = dataPoint.Index
- 'Check if the point is default data point
- Dim isDefault As Boolean = dataPoint.IsDefault
- 'Set the default marker type
- dataPoint.IsDefaultmarkertype = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D;
- //Get the serie data point
- IOfficeChartDataPoint dataPoint = chart.Series[0].DataPoints.DefaultDataPoint;
- //Gets the index of data point from points collection
- int index = dataPoint.Index;
- //Check if the point is default data point
- bool isDefault = dataPoint.IsDefault;
- //Set the default marker type
- dataPoint.IsDefaultmarkertype = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D
- 'Get the serie data point
- Dim dataPoint As IOfficeChartDataPoint = chart.Series(0).DataPoints.DefaultDataPoint
- 'Gets the index of data point from points collection
- Dim index As Integer = dataPoint.Index
- 'Check if the point is default data point
- Dim isDefault As Boolean = dataPoint.IsDefault
- 'Set the default marker type
- dataPoint.IsDefaultmarkertype = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IOfficeChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the series data points
- IOfficeChartDataPoints dataPoints = chart.Series[0].DataPoints;
- //Get the default data point, read only
- IOfficeChartDataPoint dataPoint = dataPoints.DefaultDataPoint;
- //Get the data labels of data point
- IOfficeChartDataLabels dataLabels = dataPoint.DataLabels;
- //Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center;
- //Set the series name
- dataLabels.IsSeriesName = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IOfficeChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the series data points
- Dim dataPoints As IOfficeChartDataPoints = chart.Series(0).DataPoints
- 'Get the default data point, read only
- Dim dataPoint As IOfficeChartDataPoint = dataPoints.DefaultDataPoint
- 'Get the data labels of data point
- Dim dataLabels As IOfficeChartDataLabels = dataPoint.DataLabels
- 'Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center
- 'Set the series name
- dataLabels.IsSeriesName = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IOfficeChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the series data points
- IOfficeChartDataPoints dataPoints = chart.Series[0].DataPoints;
- //Get the data point using the index, read only
- IOfficeChartDataPoint dataPoint = dataPoints[0];
- //Get the data labels of data point
- IOfficeChartDataLabels dataLabels = dataPoint.DataLabels;
- //Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center;
- //Set the series name
- dataLabels.IsSeriesName = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IOfficeChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the series data points
- Dim dataPoints As IOfficeChartDataPoints = chart.Series(0).DataPoints
- 'Get the data point using the index, read only
- Dim dataPoint As IOfficeChartDataPoint = dataPoints(0)
- 'Get the data labels of data point
- Dim dataLabels As IOfficeChartDataLabels = dataPoint.DataLabels
- 'Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center
- 'Set the series name
- dataLabels.IsSeriesName = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Get data from the chart using specific RowIndex and columnIndex
- object value = chart.DataRange.GetValue(2, 3);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- //Set the chart type
- chart.ChartType = OfficeChartType.Area;
- //Get the first and last row
- int _firstRow = chart.DataRange.FirstRow;
- int _lastRow = chart.DataRange.LastRow;
- //Get the first and last column
- int _firstColumn = chart.DataRange.FirstColumn;
- int _lastColumn = chart.DataRange.LastColumn;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- //Set the chart type
- chart.ChartType = OfficeChartType.Area;
- //Get the first and last row
- int _firstRow = chart.DataRange.FirstRow;
- int _lastRow = chart.DataRange.LastRow;
- //Get the first and last column
- int _firstColumn = chart.DataRange.FirstColumn;
- int _lastColumn = chart.DataRange.LastColumn;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- //Set the chart type
- chart.ChartType = OfficeChartType.Area;
- //Get the first and last row
- int _firstRow = chart.DataRange.FirstRow;
- int _lastRow = chart.DataRange.LastRow;
- //Get the first and last column
- int _firstColumn = chart.DataRange.FirstColumn;
- int _lastColumn = chart.DataRange.LastColumn;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- //Set the chart type
- chart.ChartType = OfficeChartType.Area;
- //Get the first and last row
- int _firstRow = chart.DataRange.FirstRow;
- int _lastRow = chart.DataRange.LastRow;
- //Get the first and last column
- int _firstColumn = chart.DataRange.FirstColumn;
- int _lastColumn = chart.DataRange.LastColumn;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Enable the chart data table
- chart.HasDataTable = true;
- //Get the data table of chart
- IOfficeChartDataTable datatable = chart.DataTable;
- //Set the horizontal border
- datatable.HasHorzBorder = true;
- //Set the vertical border
- datatable.HasVertBorder = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Enable the chart data table
- chart.HasDataTable = True
- 'Get the data table of chart
- Dim datatable As IOfficeChartDataTable = chart.DataTable
- 'Set the horizontal border
- datatable.HasHorzBorder = True
- 'Set the vertical border
- datatable.HasVertBorder = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Enable the chart data table
- chart.HasDataTable = true;
- //Get the data table of chart
- IOfficeChartDataTable datatable = chart.DataTable;
- //Set the horizontal border
- datatable.HasHorzBorder = true;
- //Set the vertical border
- datatable.HasVertBorder = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Enable the chart data table
- chart.HasDataTable = True
- 'Get the data table of chart
- Dim datatable As IOfficeChartDataTable = chart.DataTable
- 'Set the horizontal border
- datatable.HasHorzBorder = True
- 'Set the vertical border
- datatable.HasVertBorder = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Enable the chart data table
- chart.HasDataTable = true;
- //Get the data table of chart
- IOfficeChartDataTable datatable = chart.DataTable;
- //Set the borders
- datatable.HasBorders = true;
- //Set the horizontal border
- datatable.HasHorzBorder = true;
- //Set the vertical border
- datatable.HasVertBorder = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Enable the chart data table
- chart.HasDataTable = True
- 'Get the data table of chart
- Dim datatable As IOfficeChartDataTable = chart.DataTable
- 'Set the horizontal border
- datatable.HasHorzBorder = True
- 'Set the vertical border
- datatable.HasVertBorder = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Enable the chart data table
- chart.HasDataTable = true;
- //Get the data table of chart
- IOfficeChartDataTable datatable = chart.DataTable;
- //Set the horizontal border
- datatable.HasHorzBorder = true;
- //Set the vertical border
- datatable.HasVertBorder = true;
- //Set the series keys
- datatable.ShowSeriesKeys = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Enable the chart data table
- chart.HasDataTable = True
- 'Get the data table of chart
- Dim datatable As IOfficeChartDataTable = chart.DataTable
- 'Set the horizontal border
- datatable.HasHorzBorder = True
- 'Set the vertical border
- datatable.HasVertBorder = True
- 'Set the series keys
- datatable.ShowSeriesKeys = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Enable the chart data table
- chart.HasDataTable = true;
- //Get the data table of chart
- IOfficeChartDataTable datatable = chart.DataTable;
- //Get the text area of data table
- IOfficeChartTextArea textArea = datatable.TextArea;
- //Set the color of text area
- textArea.Color = OfficeKnownColors.Violet;
- //Set the font name
- textArea.FontName = "Helvetica";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Enable the chart data table
- chart.HasDataTable = True
- 'Get the data table of chart
- Dim datatable As IOfficeChartDataTable = chart.DataTable
- 'Get the text area of data table
- Dim textArea As IOfficeChartTextArea = datatable.TextArea
- 'Set the color of text area
- textArea.Color = OfficeKnownColors.Violet
- 'Set the font name
- textArea.FontName = "Helvetica"
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill
- IOfficeChartBorder line = chartFill.LineProperties;
- //Check interior object, read only
- bool interior = chartFill.HasInterior;
- //Check for 3D properties, read only
- bool _3DProperties = chartFill.Has3dProperties;
- //Check the line properties, read only
- bool lineProps = chartFill.HasLineProperties;
- //Check the shadow properties, read only
- bool shadowProps = chartFill.HasShadowProperties;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill
- Dim line As IOfficeChartBorder = chartFill.LineProperties
- 'Check interior object, read only
- Dim interior As Boolean = chartFill.HasInterior
- 'Check for 3D properties, read only
- Dim _3DProperties As Boolean = chartFill.Has3dProperties
- 'Check the line properties, read only
- Dim lineProps As Boolean = chartFill.HasLineProperties
- 'Check the shadow properties, read only
- Dim shadowProps As Boolean = chartFill.HasShadowProperties
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill
- IOfficeChartBorder line = chartFill.LineProperties;
- //Check interior object, read only
- bool interior = chartFill.HasInterior;
- //Check for 3D properties, read only
- bool _3DProperties = chartFill.Has3dProperties;
- //Check the line properties, read only
- bool lineProps = chartFill.HasLineProperties;
- //Check the shadow properties, read only
- bool shadowProps = chartFill.HasShadowProperties;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill
- Dim line As IOfficeChartBorder = chartFill.LineProperties
- 'Check interior object, read only
- Dim interior As Boolean = chartFill.HasInterior
- 'Check for 3D properties, read only
- Dim _3DProperties As Boolean = chartFill.Has3dProperties
- 'Check the line properties, read only
- Dim lineProps As Boolean = chartFill.HasLineProperties
- 'Check the shadow properties, read only
- Dim shadowProps As Boolean = chartFill.HasShadowProperties
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill
- IOfficeChartBorder line = chartFill.LineProperties;
- //Check interior object, read only
- bool interior = chartFill.HasInterior;
- //Check for 3D properties, read only
- bool _3DProperties = chartFill.Has3dProperties;
- //Check the line properties, read only
- bool lineProps = chartFill.HasLineProperties;
- //Check the shadow properties, read only
- bool shadowProps = chartFill.HasShadowProperties;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill
- Dim line As IOfficeChartBorder = chartFill.LineProperties
- 'Check interior object, read only
- Dim interior As Boolean = chartFill.HasInterior
- 'Check for 3D properties, read only
- Dim _3DProperties As Boolean = chartFill.Has3dProperties
- 'Check the line properties, read only
- Dim lineProps As Boolean = chartFill.HasLineProperties
- 'Check the shadow properties, read only
- Dim shadowProps As Boolean = chartFill.HasShadowProperties
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill
- IOfficeChartBorder line = chartFill.LineProperties;
- //Check interior object, read only
- bool interior = chartFill.HasInterior;
- //Check for 3D properties, read only
- bool _3DProperties = chartFill.Has3dProperties;
- //Check the line properties, read only
- bool lineProps = chartFill.HasLineProperties;
- //Check the shadow properties, read only
- bool shadowProps = chartFill.HasShadowProperties;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill
- Dim line As IOfficeChartBorder = chartFill.LineProperties
- 'Check interior object, read only
- Dim interior As Boolean = chartFill.HasInterior
- 'Check for 3D properties, read only
- Dim _3DProperties As Boolean = chartFill.Has3dProperties
- 'Check the line properties, read only
- Dim lineProps As Boolean = chartFill.HasLineProperties
- 'Check the shadow properties, read only
- Dim shadowProps As Boolean = chartFill.HasShadowProperties
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill
- IOfficeChartBorder line = chartFill.LineProperties;
- //Set the line color
- line.LineColor = System.Drawing.Color.DarkGreen;
- //Set the line weight
- line.LineWeight = OfficeChartLineWeight.Wide;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill
- Dim line As IOfficeChartBorder = chartFill.LineProperties
- 'Set the line color
- line.LineColor = System.Drawing.Color.DarkGreen
- 'Set the line weight
- line.LineWeight = OfficeChartLineWeight.Wide
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the interior of chart fill
- IOfficeChartInterior _interior = chartFill.Interior;
- //Enable the automatic format
- _interior.UseAutomaticFormat = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the interior of chart fill
- Dim _interior As IOfficeChartInterior = chartFill.Interior
- 'Enable the automatic format
- _interior.UseAutomaticFormat = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill, read only
- IOfficeFill fill = chartFill.Fill;
- //set the fill type as pattern
- fill.FillType = OfficeFillType.Pattern;
- //Set the back color
- fill.BackColor = Color.Red;
- //Set the fore color
- fill.ForeColor = Color.Yellow;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill, read only
- Dim fill As IOfficeFill = chartFill.Fill
- 'set the fill type as pattern
- fill.FillType = OfficeFillType.Pattern
- 'Set the back color
- fill.BackColor = System.Drawing.Color.Red
- 'Set the fore color
- fill.ForeColor = System.Drawing.Color.Yellow
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the shadow properties
- IThreeDFormat _3Dimension = chartFill.ThreeD;
- //Set the 3D properties
- _3Dimension.BevelBottom = Office2007ChartBevelProperties.HardEdge;
- _3Dimension.BevelBottomHeight = 140;
- _3Dimension.BevelBottomWidth = 67;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the shadow properties
- Dim _3Dimension As IThreeDFormat = chartFill.ThreeD
- 'Set the 3D properties
- _3Dimension.BevelBottom = Office2007ChartBevelProperties.HardEdge
- _3Dimension.BevelBottomHeight = 140
- _3Dimension.BevelBottomWidth = 67
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the shadow properties
- IShadow shadow = chartFill.Shadow;
- //Set the custom shadow style
- shadow.HasCustomShadowStyle = true;
- //set the shadow color
- shadow.ShadowColor = System.Drawing.Color.Green;
- //Set the shadow with inner preset
- shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalBottomRight;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the shadow properties
- Dim shadow As IShadow = chartFill.Shadow
- 'Set the custom shadow style
- shadow.HasCustomShadowStyle = True
- 'set the shadow color
- shadow.ShadowColor = System.Drawing.Color.Green
- 'Set the shadow with inner preset
- shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalBottomRight
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the chart serie option
- IOfficeChartFormat chartFormat = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Get the First Drop Bar
- IOfficeChartDropBar dropBar = chartFormat.FirstDropBar;
- //Set the gap width of data series in chart
- dropBar.Gap = 100;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the chart serie option
- Dim chartFormat As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Get the First Drop Bar
- Dim dropBar As IOfficeChartDropBar = chartFormat.FirstDropBar
- 'Set the gap width of data series in chart
- dropBar.Gap = 100
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation;
- //Set the cap for errorbars
- errorBars.HasCap = true;
- //Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus;
- //Clear formats
- errorBars.ClearFormats();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation
- 'Set the cap for errorbars
- errorBars.HasCap = True
- 'Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus
- 'Clear formats
- errorBars.ClearFormats()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation;
- //Set the cap for errorbars
- errorBars.HasCap = true;
- //Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus;
- //Delete the error bars
- errorBars.Delete();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation
- 'Set the cap for errorbars
- errorBars.HasCap = True
- 'Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus
- 'Delete the error bars
- errorBars.Delete()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //set the border line color
- errorBars.Border.LineColor = System.Drawing.Color.BlueViolet;
- //Set the border line weight
- errorBars.Border.LineWeight = OfficeChartLineWeight.Wide;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'set the border line color
- errorBars.Border.LineColor = System.Drawing.Color.BlueViolet
- 'Set the border line weight
- errorBars.Border.LineWeight = OfficeChartLineWeight.Wide
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation;
- //Set the cap for errorbars
- errorBars.HasCap = true;
- //Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation
- 'Set the cap for errorbars
- errorBars.HasCap = True
- 'Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation;
- //Set the cap for errorbars
- errorBars.HasCap = true;
- //Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation
- 'Set the cap for errorbars
- errorBars.HasCap = True
- 'Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //set the border line color
- errorBars.Border.LineColor = System.Drawing.Color.BlueViolet;
- //Set the border line weight
- errorBars.Border.LineWeight = OfficeChartLineWeight.Wide;
- //Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'set the border line color
- errorBars.Border.LineColor = System.Drawing.Color.BlueViolet
- 'Set the border line weight
- errorBars.Border.LineWeight = OfficeChartLineWeight.Wide
- 'Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus;
- //Set the number value
- errorBars.NumberValue = 12.78;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus
- 'Set the number value
- errorBars.NumberValue = 12.78
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the shadow color
- errorBars.Shadow.ShadowColor = System.Drawing.Color.Brown;
- //Set the inner preset of shadow
- errorBars.Shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalBottomRight;
- //Set the size of the shadow
- errorBars.Shadow.Size = 34;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the shadow color
- errorBars.Shadow.ShadowColor = System.Drawing.Color.Brown
- 'Set the inner preset of shadow
- errorBars.Shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalBottomRight
- 'Set the size of the shadow
- errorBars.Shadow.Size = 34
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the picture fill type for plot area
- chart.PlotArea.Fill.UserPicture("Image.gif");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create instance for image
- System.Drawing.Image image = System.Drawing.Image.FromFile("Image.gif");
- //Set the picture fill type for chart area
- chart.ChartArea.Fill.UserPicture(image, "Image");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create instance for image
- System.Drawing.Image image = System.Drawing.Image.FromFile("Image.gif");
- //Set the texture fill type for chart area
- chart.ChartArea.Fill.UserTexture(image, "Image");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the texture fill type for plot area
- chart.PlotArea.Fill.UserTexture("Image.gif");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the pattern fill for chart area
- chart.ChartArea.Fill.Patterned(OfficeGradientPattern.Pat_50_Percent);
- //Set the fore color
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
- //Set the back color
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.Pink;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the preset gradient
- chart.ChartArea.Fill.PresetGradient(OfficeGradientPreset.Grad_Early_Sunset);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the preset gradient
- chart.ChartArea.Fill.PresetGradient(OfficeGradientPreset.Grad_Parchment, OfficeGradientStyle.Horizontal);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the preset gradient
- chart.ChartArea.Fill.PresetGradient(OfficeGradientPreset.Grad_Fire, OfficeGradientStyle.FromCorner, OfficeGradientVariants.ShadingVariants_1);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the preset texture
- chart.ChartArea.Fill.PresetTextured(OfficeTexture.Canvas);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the gradient color
- chart.ChartArea.Fill.TwoColorGradient();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the gradient color
- chart.ChartArea.Fill.TwoColorGradient(OfficeGradientStyle.Horizontal);
- //Set the fore color index
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.BlueCustom;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the gradient color
- chart.ChartArea.Fill.TwoColorGradient(OfficeGradientStyle.Vertical, OfficeGradientVariants.ShadingVariants_2);
- //Set the fore color index
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.BlueCustom;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Se the specified fill to one color gradient
- chart.ChartArea.Fill.OneColorGradient();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Se the specified fill to one color gradient
- chart.ChartArea.Fill.OneColorGradient(OfficeGradientStyle.Vertical, OfficeGradientVariants.ShadingVariants_2);
- //Set the fill type for plot area
- chart.PlotArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the fore color for plot area
- chart.PlotArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
- //Se the specified fill to one color gradient
- chart.PlotArea.Fill.OneColorGradient(OfficeGradientStyle.Diagonl_Up);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Se the specified fill to one color gradient
- chart.ChartArea.Fill.OneColorGradient(OfficeGradientStyle.Vertical, OfficeGradientVariants.ShadingVariants_2);
- //Set the fill type for plot area
- chart.PlotArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the fore color for plot area
- chart.PlotArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
- //Se the specified fill to one color gradient
- chart.PlotArea.Fill.OneColorGradient(OfficeGradientStyle.Diagonl_Up);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the solid fill for chart area
- chart.ChartArea.Fill.Solid();
- //Set the fore color for chart area
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the gradient color type
- chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.TwoColor;
- //Set the Back and fore colors
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.FromArgb(205, 217, 234);
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.White;
- //Set the gradient style
- chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.FromCorner;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the gradient color type
- chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.TwoColor;
- //Set the Back and fore colors
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.FromArgb(205, 217, 234);
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.White;
- //Set the gradient style
- chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.FromCorner;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the fore color index of the fill
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Brown;
- //Set the gradient variant
- chart.ChartArea.Fill.GradientVariant = OfficeGradientVariants.ShadingVariants_2;
- //Set the preset gradient type
- chart.ChartArea.Fill.PresetGradientType = OfficeGradientPreset.Grad_Desert;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the gradient color type
- chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.TwoColor;
- //Set the Back and fore colors
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.FromArgb(205, 217, 234);
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.White;
- //Set the gradient style
- chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.FromCorner;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Pattern;
- //Set the back anf fore color of the pattern
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.Green;
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.Blue;
- //Set the pattern
- chart.ChartArea.Fill.Pattern = OfficeGradientPattern.Pat_30_Percent;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
- //Set the texture type
- chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
- //Set the horizontal scale
- chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
- //Set the offset X
- chart.ChartArea.Fill.TextureOffsetX = 50.40F;
- //Set the offset Y
- chart.ChartArea.Fill.TextureOffsetY = 67.54F;
- //Set the vertical scale
- chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the gradient color type
- chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.OneColor;
- //Set the gradient degree
- chart.ChartArea.Fill.GradientDegree = 0.67;
- //Set the gradient style
- chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.Horizontal;
- //Set the fore color index of the fill
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Blue_grey;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Pattern;
- //Set the back anf fore color of the pattern
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.Green;
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.Blue;
- //Set the pattern
- chart.ChartArea.Fill.Pattern = OfficeGradientPattern.Pat_30_Percent;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Pattern;
- //Set the back anf fore color of the pattern
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.Green;
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.Blue;
- //Set the pattern
- chart.ChartArea.Fill.Pattern = OfficeGradientPattern.Pat_30_Percent;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the fore color index of the fill
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Brown;
- //Set the gradient variant
- chart.ChartArea.Fill.GradientVariant = OfficeGradientVariants.ShadingVariants_2;
- //Set the preset gradient type
- chart.ChartArea.Fill.PresetGradientType = OfficeGradientPreset.Grad_Desert;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the gradient color type
- chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.OneColor;
- //Set the gradient degree
- chart.ChartArea.Fill.GradientDegree = 0.67;
- //Set the gradient style
- chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.Horizontal;
- //chart.ChartArea.Fill.BackColorIndex = OfficeKnownColors.Blue;
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Blue_grey;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.SolidColor;
- //chart.ChartArea.Fill.BackColorIndex = OfficeKnownColors.Blue;
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Blue_grey;
- //Set the transparency of the fill
- chart.ChartArea.Fill.Transparency = 0.5;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
- //Set the texture type
- chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
- //Set the horizontal scale
- chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
- //Set the offset X
- chart.ChartArea.Fill.TextureOffsetX = 50.40F;
- //Set the offset Y
- chart.ChartArea.Fill.TextureOffsetY = 67.54F;
- //Set the vertical scale
- chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
- //Set the texture type
- chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
- //Set the horizontal scale
- chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
- //Set the offset X
- chart.ChartArea.Fill.TextureOffsetX = 50.40F;
- //Set the offset Y
- chart.ChartArea.Fill.TextureOffsetY = 67.54F;
- //Set the vertical scale
- chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
- //Set the texture type
- chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
- //Set the horizontal scale
- chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
- //Set the offset X
- chart.ChartArea.Fill.TextureOffsetX = 50.40F;
- //Set the offset Y
- chart.ChartArea.Fill.TextureOffsetY = 67.54F;
- //Set the vertical scale
- chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
- //Set the texture type
- chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
- //Set the horizontal scale
- chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
- //Set the offset X
- chart.ChartArea.Fill.TextureOffsetX = 50.40F;
- //Set the offset Y
- chart.ChartArea.Fill.TextureOffsetY = 67.54F;
- //Set the vertical scale
- chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the bubble scale
- format.BubbleScale = 200;
- //Set the vary color
- format.IsVaryColor = true;
- //Set negative bubbles
- format.ShowNegativeBubbles = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the bubble chart from the slide
- Dim chart As IPresentationChart = presentation__1.Slides(0).Charts(0)
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the bubble scale
- format.BubbleScale = 200
- 'Set the vary color
- format.IsVaryColor = True
- 'Set negative bubbles
- format.ShowNegativeBubbles = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered;
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the gap width
- format.GapWidth = 200;
- //Set the overlap
- format.Overlap = -90;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the gap width
- format.GapWidth = 200
- 'Set the overlap
- format.Overlap = -90
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Pie
- chart.ChartType = OfficeChartType.Pie;
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the angle of first slice
- format.FirstSliceAngle = 240;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Pie
- chart.ChartType = OfficeChartType.Pie
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the angle of first slice
- format.FirstSliceAngle = 240
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Doughtnut
- chart.ChartType = OfficeChartType.Doughnut;
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the doughnut hole size
- format.DoughnutHoleSize = 50;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Doughtnut
- chart.ChartType = OfficeChartType.Doughnut
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the doughnut hole size
- format.DoughnutHoleSize = 50
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the bubble scale
- format.BubbleScale = 200;
- //Set the vary color
- format.IsVaryColor = true;
- //Set negative bubbles
- format.ShowNegativeBubbles = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the bubble chart from the slide
- Dim chart As IPresentationChart = presentation__1.Slides(0).Charts(0)
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the bubble scale
- format.BubbleScale = 200
- 'Set the vary color
- format.IsVaryColor = True
- 'Set negative bubbles
- format.ShowNegativeBubbles = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the bubble scale
- format.BubbleScale = 200;
- //Set the vary color
- format.IsVaryColor = true;
- //Set negative bubbles
- format.ShowNegativeBubbles = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the bubble chart from the slide
- Dim chart As IPresentationChart = presentation__1.Slides(0).Charts(0)
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the bubble scale
- format.BubbleScale = 200
- 'Set the vary color
- format.IsVaryColor = True
- 'Set negative bubbles
- format.ShowNegativeBubbles = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar;
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the axis labels
- format.HasRadarAxisLabels = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the axis labels
- format.HasRadarAxisLabels = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set border settings
- chart.PlotArea.Border.AutoFormat = false;
- //Set the auto line color
- chart.PlotArea.Border.IsAutoLineColor = false;
- //Set the border line color
- chart.PlotArea.Border.LineColor = System.Drawing.Color.Blue;
- //Set the border line pattern
- chart.PlotArea.Border.LinePattern = OfficeChartLinePattern.DashDot;
- //Set the border line weight
- chart.PlotArea.Border.LineWeight = OfficeChartLineWeight.Wide;
- //Set the border transparency
- chart.PlotArea.Border.Transparency = 0.6;
- //Set the plot area�s fill type
- chart.PlotArea.Fill.FillType = OfficeFillType.SolidColor;
- //Set the plot area�s fill color
- chart.PlotArea.Fill.ForeColor = System.Drawing.Color.LightPink;
- //Set the plot area shodow presence
- chart.PlotArea.Shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalTopLeft;
- //Reset the plotarea
- chart.PlotArea.Clear();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set border settings
- chart.PlotArea.Border.AutoFormat = False
- 'Set the auto line color
- chart.PlotArea.Border.IsAutoLineColor = False
- 'Set the border line color
- chart.PlotArea.Border.LineColor = System.Drawing.Color.Blue
- 'Set the border line pattern
- chart.PlotArea.Border.LinePattern = OfficeChartLinePattern.DashDot
- 'Set the border line weight
- chart.PlotArea.Border.LineWeight = OfficeChartLineWeight.Wide
- 'Set the border transparency
- chart.PlotArea.Border.Transparency = 0.6
- 'Set the plot area�s fill type
- chart.PlotArea.Fill.FillType = OfficeFillType.SolidColor
- 'Set the plot area�s fill color
- chart.PlotArea.Fill.ForeColor = System.Drawing.Color.LightPink
- 'Set the plot area shodow presence
- chart.PlotArea.Shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalTopLeft
- 'Reset the plotarea
- chart.PlotArea.Clear()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the borders with rounded corners
- chart.ChartArea.IsBorderCornersRound = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the borders with rounded corners
- chart.ChartArea.IsBorderCornersRound = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Format Chart Area.
- IOfficeChartFrameFormat chartArea = chart.ChartArea;
- //Chart Area Border Settings
- //Style
- chartArea.Border.LinePattern = OfficeChartLinePattern.Solid;
- //Color
- chartArea.Border.LineColor = System.Drawing.Color.Blue;
- //Weight
- chartArea.Border.LineWeight = OfficeChartLineWeight.Hairline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Format Chart Area.
- Dim chartArea As IOfficeChartFrameFormat = chart.ChartArea
- 'Chart Area Border Settings
- 'Style
- chartArea.Border.LinePattern = OfficeChartLinePattern.Solid
- 'Color
- chartArea.Border.LineColor = System.Drawing.Color.Blue
- 'Weight
- chartArea.Border.LineWeight = OfficeChartLineWeight.Hairline
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get a bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Format Plot Area
- IOfficeChartFrameFormat plotArea = chart.PlotArea;
- //Set the height mode
- plotArea.Layout.Height = 150;
- plotArea.Layout.HeightMode = LayoutModes.factor;
- //Set the top mode
- plotArea.Layout.Top = 100;
- plotArea.Layout.TopMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get a bubble chart from the slide
- Dim chart As IPresentationChart = presentation__1.Slides(0).Charts(0)
- 'Format Plot Area
- Dim plotArea As IOfficeChartFrameFormat = chart.PlotArea
- 'Set the height mode
- plotArea.Layout.Height = 150
- plotArea.Layout.HeightMode = LayoutModes.factor
- 'Set the top mode
- plotArea.Layout.Top = 100
- plotArea.Layout.TopMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Delete gridline
- chart.PrimaryValueAxis.MajorGridLines.Delete();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Delete gridline
- chart.PrimaryValueAxis.MajorGridLines.Delete()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Get the major grid line
- IOfficeChartGridLine gridLine = chart.PrimaryValueAxis.MajorGridLines;
- //Set the line pattern
- gridLine.Border.LinePattern = OfficeChartLinePattern.DarkGray;
- //Set the line weight
- gridLine.Border.LineWeight = OfficeChartLineWeight.Hairline;
- //Set the line color
- gridLine.Border.LineColor = System.Drawing.Color.Green;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Get the major grid line
- Dim gridLine As IOfficeChartGridLine = chart.PrimaryValueAxis.MajorGridLines
- 'Set the line pattern
- gridLine.Border.LinePattern = OfficeChartLinePattern.DarkGray
- 'Set the line weight
- gridLine.Border.LineWeight = OfficeChartLineWeight.Hairline
- 'Set the line color
- gridLine.Border.LineColor = System.Drawing.Color.Green
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation containing charts
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the slide from presentation
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Charts[0];
- //Refresh the chart to set worksheet data to current chart
- chart.Refresh();
- //Save the presentation
- presentation.Save("Sample.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation containing charts
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- 'Get the slide from presentation
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = slide.Charts(0)
- 'Refresh the chart to set worksheet data to current chart
- chart.Refresh()
- 'Save the presentation
- presentation.Save("Sample.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Initialize the ChartToImageConverter class; this is mandatory
- presentation.ChartToImageConverter = new ChartToImageConverter();
- //Set the scaling mode for quality
- presentation.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Best;
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create a stream instance to store the image
- MemoryStream stream = new MemoryStream();
- //Save the image to stream
- chart.SaveAsImage(stream);
- //Save the stream to a file
- using (FileStream fileStream = File.Create("ChartImage.png", (int)stream.Length))
- fileStream.Write(stream.ToArray(), 0, stream.ToArray().Length);
- //Close the stream
- stream.Close();
- //Save the Presentation
- presentation.Save("output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- 'Initialize the ChartToImageConverter class; this is mandatory
- presentation.ChartToImageConverter = New ChartToImageConverter()
- 'Set the scaling mode for quality
- presentation.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Best
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create a stream instance to store the image
- Dim stream As New MemoryStream()
- 'Save the image to stream
- chart.SaveAsImage(stream)
- 'Save the stream to a file
- Using fileStream As FileStream = File.Create("ChartImage.png", CInt(stream.Length))
- fileStream.Write(stream.ToArray(), 0, stream.ToArray().Length)
- End Using
- 'Close the stream
- stream.Close()
- 'Save the Presentation
- presentation.Save("output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a new PowerPoint presentation
- IPresentation presentation = Presentation.Create();
- //Add slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Charts.AddChart(100, 100, 300, 200);
- //Create an instance of object array
- object[][] chartData = { new object[3], new object[4] };
- //Invoke setChartData method by passing object array
- chart.SetChartData(chartData);
- //Set the chart title
- chart.ChartTitle = "Chart";
- //Save the Presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a new PowerPoint presentation
- Dim presentation As IPresentation = Presentation.Create()
- 'Add slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to slide
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 100, 300, 200)
- 'Create an instance of object array
- Dim chartData As Object()() = {New Object(2) {}, New Object(3) {}}
- 'Invoke setChartData method by passing object array
- chart.SetChartData(chartData)
- 'Set the chart title
- chart.ChartTitle = "Chart"
- 'Save the Presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a new PowerPoint presentation
- IPresentation presentation = Presentation.Create();
- //Add slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Charts.AddChart(100, 100, 300, 300);
- //Create an instance of object array
- object[][] dataRange = { new object[5], new object[5] };
- //Invoke set data Range method
- chart.SetDataRange(dataRange, 1, 3);
- //Save the Presentation
- presentation.Save("output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a new PowerPoint presentation
- Dim presentation As IPresentation = Presentation.Create()
- 'Add slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to slide
- Dim chart As IPresentationChart= slide.Charts.AddChart(100, 100, 300, 300)
- 'Create an instance of object array
- Dim dataRange As Object()() = {New Object(4) {}, New Object(4) {}}
- 'Invoke set data Range method
- chart.SetDataRange(dataRange, 1, 3)
- 'Save the Presentation
- presentation.Save("output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D;
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- chart.ChartType = OfficeChartType.Area;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to slide
- Dim chart As IPresentationChart = slide.Shapes.AddChart(100, 120, 500, 300)
- 'Sets the data range of chart
- chart.DataRange = chart.ChartData(1, 2, 4, 3)
- 'Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012")
- chart.ChartData.SetValue(2, 2, 330)
- chart.ChartData.SetValue(3, 2, 490)
- chart.ChartData.SetValue(4, 2, 700)
- chart.ChartType = OfficeChartType.Area
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D;
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Get the chart title text area
- IOfficeChartTextArea textArea = chart.ChartTitleArea;
- //Set the background mode of the title area
- textArea.BackgroundMode = OfficeChartBackgroundMode.Transparent;
- //Set bold font style
- textArea.Bold = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Get the chart title text area
- Dim textArea As IOfficeChartTextArea = chart.ChartTitleArea
- 'Set the background mode of the title area
- textArea.BackgroundMode = OfficeChartBackgroundMode.Transparent
- 'Set bold font style
- textArea.Bold = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the x - position of the chart
- chart.XPos = 300;
- //Set the y - position of the chart
- chart.YPos = 140;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the x - position of the chart
- chart.XPos = 300
- 'Set the y - position of the chart
- chart.YPos = 140
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the x - position of the chart
- chart.XPos = 300;
- //Set the y - position of the chart
- chart.YPos = 140;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the x - position of the chart
- chart.XPos = 300
- 'Set the y - position of the chart
- chart.YPos = 140
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Modify the chart height
- chart.Height = 500;
- //Modify the chart width
- chart.Width = 700;
- //Change the title
- chart.ChartTitle = "New title";
- //Change the serie name of first chart serie
- chart.Series[0].Name = "Modified serie name";
- //Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone;
- //Show Data Table.
- chart.HasDataTable = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Modify the chart height
- chart.Height = 500
- 'Modify the chart width
- chart.Width = 700
- 'Change the title
- chart.ChartTitle = "New title"
- 'Change the serie name of first chart serie
- chart.Series(0).Name = "Modified serie name"
- 'Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone
- 'Show Data Table.
- chart.HasDataTable = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Modify the chart height
- chart.Height = 500;
- //Modify the chart width
- chart.Width = 700;
- //Change the title
- chart.ChartTitle = "New title";
- //Change the serie name of first chart serie
- chart.Series[0].Name = "Modified serie name";
- //Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone;
- //Show Data Table.
- chart.HasDataTable = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Modify the chart height
- chart.Height = 500
- 'Modify the chart width
- chart.Width = 700
- 'Change the title
- chart.ChartTitle = "New title"
- 'Change the serie name of first chart serie
- chart.Series(0).Name = "Modified serie name"
- 'Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone
- 'Show Data Table.
- chart.HasDataTable = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Modify the chart height
- chart.Height = 500;
- //Modify the chart width
- chart.Width = 700;
- //Change the title
- chart.ChartTitle = "New title";
- //Change the serie name of first chart serie
- chart.Series[0].Name = "Modified serie name";
- //Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone;
- //Show Data Table.
- chart.HasDataTable = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Modify the chart height
- chart.Height = 500
- 'Modify the chart width
- chart.Width = 700
- 'Change the title
- chart.ChartTitle = "New title"
- 'Change the serie name of first chart serie
- chart.Series(0).Name = "Modified serie name"
- 'Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone
- 'Show Data Table.
- chart.HasDataTable = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis
- IOfficeChartCategoryAxis primaryCategoryAxis = chart.PrimaryCategoryAxis;
- //Set the data range of the category axis
- primaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis
- Dim primaryCategoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the data range of the category axis
- primaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary value axis
- IOfficeChartValueAxis primaryValueAxis = chart.PrimaryValueAxis;
- //Set bold font style
- primaryValueAxis.Font.Bold = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary value axis
- Dim primaryValueAxis As IOfficeChartValueAxis = chart.PrimaryValueAxis
- 'Set bold font style
- primaryValueAxis.Font.Bold = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Get the primary serie axis
- IOfficeChartSeriesAxis primarySerieAxis = chart.PrimarySerieAxis;
- //Set the font style of serie axis
- primarySerieAxis.Font.Italic = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Get the primary serie axis
- Dim primarySerieAxis As IOfficeChartSeriesAxis = chart.PrimarySerieAxis
- 'Set the font style of serie axis
- primarySerieAxis.Font.Italic = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open a presentation with Combinational chart type
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the secondary category axis
- IOfficeChartCategoryAxis secondaryCategoryAxis = chart.PrimaryCategoryAxis;
- //Set the minor grid lines
- secondaryCategoryAxis.HasMinorGridLines = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation with Combinational chart type
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the secondary category axis
- Dim secondaryCategoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the minor grid lines
- secondaryCategoryAxis.HasMinorGridLines = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open a presentation with Combinational chart type
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the secondary value axis
- IOfficeChartValueAxis secondaryValueAxis = chart.SecondaryValueAxis;
- //Set the tick label position
- secondaryValueAxis.TickLabelPosition = OfficeTickLabelPosition.TickLabelPosition_NextToAxis;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation with Combinational chart type
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the secondary value axis
- Dim secondaryValueAxis As IOfficeChartValueAxis = chart.SecondaryValueAxis
- 'Set the tick label position
- secondaryValueAxis.TickLabelPosition = OfficeTickLabelPosition.TickLabelPosition_NextToAxis
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a new presentation
- IPresentation presentation = Presentation.Create();
- //Add slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 100, 400, 300);
- //Set the chart data value
- chart.ChartData.SetValue(1, 2, "1");
- chart.ChartData.SetValue(2, 1, "A");
- chart.ChartData.SetValue(2, 2, 20);
- //Set chart data range
- chart.DataRange = chart.ChartData[2, 2, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Get the chart area
- IOfficeChartFrameFormat chartArea = chart.ChartArea;
- //Set the line pattern of chart border
- chartArea.Border.LinePattern = OfficeChartLinePattern.DashDotDot;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a new presentation
- Dim presentation As IPresentation = Presentation.Create()
- 'Add slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to slide
- Dim chart As IPresentationChart = slide.Shapes.AddChart(100, 100, 400, 300)
- 'Set the chart data value
- chart.ChartData.SetValue(1, 2, "1")
- chart.ChartData.SetValue(2, 1, "A")
- chart.ChartData.SetValue(2, 2, 20)
- 'Set chart data range
- chart.DataRange = chart.ChartData(2, 2, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Get the chart area
- Dim chartArea As IOfficeChartFrameFormat = chart.ChartArea
- 'Set the line pattern of chart border
- chartArea.Border.LinePattern = OfficeChartLinePattern.DashDotDot
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the fill type of wall as pattern
- chart.Walls.Fill.FillType = OfficeFillType.Pattern;
- //set the back color of the pattern fill
- chart.Walls.Fill.BackColor = Color.AliceBlue;
- //Set the fore color of the pattern fill
- chart.Walls.Fill.ForeColor = Color.Brown;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the fill type of wall as pattern
- chart.Walls.Fill.FillType = OfficeFillType.Pattern
- 'set the back color of the pattern fill
- chart.Walls.Fill.BackColor = Color.AliceBlue
- 'Set the fore color of the pattern fill
- chart.Walls.Fill.ForeColor = Color.Brown
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D;
- //Set the rotation
- chart.Rotation = 80;
- //Set the shadow angle
- chart.SideWall.Shadow.Angle = 60;
- //Set the backwall border weight
- chart.BackWall.Border.LineWeight = OfficeChartLineWeight.Narrow;
- //Save the presentation
- presentation.Save("output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D
- 'Set the rotation
- chart.Rotation = 80
- 'Set the shadow angle
- chart.SideWall.Shadow.Angle = 60
- 'Set the backwall border weight
- chart.BackWall.Border.LineWeight = OfficeChartLineWeight.Narrow
- 'Save the presentation
- presentation.Save("output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D;
- //Get the back wall of the chart
- IOfficeChartWallOrFloor backWall = chart.BackWall;
- //Set the line properties of the back wall
- backWall.LineProperties.LineWeight = OfficeChartLineWeight.Narrow;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D
- 'Get the back wall of the chart
- Dim backWall As IOfficeChartWallOrFloor = chart.BackWall
- 'Set the line properties of the back wall
- backWall.LineProperties.LineWeight = OfficeChartLineWeight.Narrow
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Get the floor of chart
- IOfficeChartWallOrFloor floor = chart.Floor;
- //Set the filltype of floor as pattern fill
- floor.Fill.FillType = OfficeFillType.Pattern;
- //Set the back and fore color of the pattern fill
- floor.Fill.BackColor = Color.Blue;
- floor.Fill.ForeColor = Color.Brown;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Get the floor of chart
- Dim floor As IOfficeChartWallOrFloor = chart.Floor
- 'Set the filltype of floor as pattern fill
- floor.Fill.FillType = OfficeFillType.Pattern
- 'Set the back and fore color of the pattern fill
- floor.Fill.BackColor = Color.Blue
- floor.Fill.ForeColor = Color.Brown
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Set the chart with data table
- chart.HasDataTable = true;
- //Get the data table, read only
- IOfficeChartDataTable dataTable = chart.DataTable;
- //set borders for data table
- dataTable.HasBorders = true;
- //Set the show serie keys
- dataTable.ShowSeriesKeys = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Set the chart with data table
- chart.HasDataTable = True
- 'Get the data table, read only
- Dim dataTable As IOfficeChartDataTable = chart.DataTable
- 'set borders for data table
- dataTable.HasBorders = True
- 'Set the show serie keys
- dataTable.ShowSeriesKeys = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Modify the chart height
- chart.Height = 500;
- //Modify the chart width
- chart.Width = 700;
- //Change the title
- chart.ChartTitle = "New title";
- //Change the serie name of first chart serie
- chart.Series[0].Name = "Modified serie name";
- //Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone;
- //Show Data Table.
- chart.HasDataTable = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Modify the chart height
- chart.Height = 500
- 'Modify the chart width
- chart.Width = 700
- 'Change the title
- chart.ChartTitle = "New title"
- 'Change the serie name of first chart serie
- chart.Series(0).Name = "Modified serie name"
- 'Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone
- 'Show Data Table.
- chart.HasDataTable = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- chart.ChartType = OfficeChartType.Area;
- //Edge: Specifies that the width or Height will be interpreted as right or bottom of the chart element
- //Factor: Specifies that the width or Height will be interpreted as the width or height of the chart element
- chart.PlotArea.Layout.LeftMode = LayoutModes.auto;
- chart.PlotArea.Layout.TopMode = LayoutModes.factor;
- //Value in points should not be a negative value if LayoutMode is Edge
- //It can be a negative value if the LayoutMode is Factor.
- chart.ChartTitleArea.Layout.Left = 10;
- chart.ChartTitleArea.Layout.Top = 100;
- //Manually positioning chart plot area
- chart.PlotArea.Layout.LayoutTarget = LayoutTargets.outer;
- chart.PlotArea.Layout.LeftMode = LayoutModes.edge;
- chart.PlotArea.Layout.TopMode = LayoutModes.edge;
- //Manually positioning chart legend
- chart.Legend.Layout.LeftMode = LayoutModes.factor;
- chart.Legend.Layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to slide
- Dim chart As IPresentationChart = slide.Shapes.AddChart(100, 120, 500, 300)
- 'Sets the data range of chart
- chart.DataRange = chart.ChartData(1, 2, 4, 3)
- 'Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012")
- chart.ChartData.SetValue(2, 2, 330)
- chart.ChartData.SetValue(3, 2, 490)
- chart.ChartData.SetValue(4, 2, 700)
- chart.ChartType = OfficeChartType.Area
- 'Edge: Specifies that the width or Height will be interpreted as right or bottom of the chart element
- 'Factor: Specifies that the width or Height will be interpreted as the width or height of the chart element
- chart.PlotArea.Layout.LeftMode = LayoutModes.auto
- chart.PlotArea.Layout.TopMode = LayoutModes.factor
- 'Value in points should not be a negative value if LayoutMode is Edge
- 'It can be a negative value if the LayoutMode is Factor.
- chart.ChartTitleArea.Layout.Left = 10
- chart.ChartTitleArea.Layout.Top = 100
- 'Manually positioning chart plot area
- chart.PlotArea.Layout.LayoutTarget = LayoutTargets.outer
- chart.PlotArea.Layout.LeftMode = LayoutModes.edge
- chart.PlotArea.Layout.TopMode = LayoutModes.edge
- 'Manually positioning chart legend
- chart.Legend.Layout.LeftMode = LayoutModes.factor
- chart.Legend.Layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Hide the legend
- chart.HasLegend = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Hide the legend
- chart.HasLegend = False
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D;
- //Set the rotation
- chart.Rotation = 80;
- //Set the shadow angle
- chart.SideWall.Shadow.Angle = 60;
- //Set the backwall border weight
- chart.BackWall.Border.LineWeight = OfficeChartLineWeight.Narrow;
- //Save the presentation
- presentation.Save("output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D
- 'Set the rotation
- chart.Rotation = 80
- 'Set the shadow angle
- chart.SideWall.Shadow.Angle = 60
- 'Set the backwall border weight
- chart.BackWall.Border.LineWeight = OfficeChartLineWeight.Narrow
- 'Save the presentation
- presentation.Save("output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the elevation of chart
- chart.Elevation = -50;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the elevation of chart
- chart.Elevation = -50
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the perspective
- chart.Perspective = 100;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the perspective of chart
- chart.Perspective = 100
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the height percent
- chart.HeightPercent = 400;
- //Set the Depth percent
- chart.DepthPercent = 200;
- //Set the gap depth of data series
- chart.GapDepth = 400;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the height percent
- chart.HeightPercent = 400
- 'Set the Depth percent
- chart.DepthPercent = 200
- 'Set the gap depth of data series
- chart.GapDepth = 400
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the height percent
- chart.HeightPercent = 400;
- //Set the Depth percent
- chart.DepthPercent = 200;
- //Set the gap depth of data series
- chart.GapDepth = 400;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the height percent
- chart.HeightPercent = 400
- 'Set the Depth percent
- chart.DepthPercent = 200
- 'Set the gap depth of data series
- chart.GapDepth = 400
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the height percent
- chart.HeightPercent = 400;
- //Set the Depth percent
- chart.DepthPercent = 200;
- //Set the gap depth of data series
- chart.GapDepth = 400;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the height percent
- chart.HeightPercent = 400
- 'Set the Depth percent
- chart.DepthPercent = 200
- 'Set the gap depth of data series
- chart.GapDepth = 400
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the right angle axes
- chart.RightAngleAxes = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the right angle axes
- chart.RightAngleAxes = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the right angle axes property of the chart
- chart.RightAngleAxes = true;
- //Set the auto scaling of chart
- chart.AutoScaling = true;
- //Save the presentation
- presentation.Save("sample.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the right angle axes
- chart.RightAngleAxes = True
- 'Set the auto scaling of chart
- chart.AutoScaling = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the 2D gridlines for chart
- chart.WallsAndGridlines2D = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the 2D gridlines for chart
- chart.WallsAndGridlines2D = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the way blank cells to be plotted
- chart.DisplayBlanksAs = OfficeChartPlotEmpty.Interpolated;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the way blank cells to be plotted
- chart.DisplayBlanksAs = OfficeChartPlotEmpty.Interpolated
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Hide the plot visiblity of cells
- chart.PlotVisibleOnly = false;
- //Hide the chart size with sheet window
- chart.SizeWithWindow = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Hide the plot visiblity of cells
- chart.PlotVisibleOnly = False
- 'Hide the chart size with sheet window
- chart.SizeWithWindow = False
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Hide the plot visiblity of cells
- chart.PlotVisibleOnly = false;
- //Hide the chart size with sheet window
- chart.SizeWithWindow = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Hide the plot visiblity of cells
- chart.PlotVisibleOnly = False
- 'Hide the chart size with sheet window
- chart.SizeWithWindow = False
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //set the serie name level
- chart.SeriesNameLevel = OfficeSeriesNameLevel.SeriesNameLevelNone;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'set the serie name level
- chart.SeriesNameLevel = OfficeSeriesNameLevel.SeriesNameLevelNone
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D;
- //Set the category label level
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelAll;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D
- 'Set the category label level
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelAll
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the legend entries
- IChartLegendEntries legendEntries = chart.Legend.LegendEntries;
- //Get the count of the legend entries
- int count = legendEntries.Count;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the legend entries
- Dim legendEntries As IChartLegendEntries = chart.Legend.LegendEntries
- 'Get the count of the legend entries
- Dim count As Integer = legendEntries.Count
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the legend entries
- IChartLegendEntries legendEntries = chart.Legend.LegendEntries;
- //Get the count of the legend entries
- int count = legendEntries.Count;
- //Set the bold style for text area
- legendEntries[0].TextArea.Bold = true;
- //Set the color of the text area
- legendEntries[0].TextArea.Color = OfficeKnownColors.Magenta;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the legend entries
- Dim legendEntries As IChartLegendEntries = chart.Legend.LegendEntries
- 'Get the count of the legend entries
- Dim count As Integer = legendEntries.Count
- 'Set the bold style for text area
- legendEntries(0).TextArea.Bold = True
- 'Set the color of the text area
- legendEntries(0).TextArea.Color = OfficeKnownColors.Magenta
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend border format
- legend.FrameFormat.Border.AutoFormat = false;
- //Set the legend border auto line color
- legend.FrameFormat.Border.IsAutoLineColor = false;
- //Set the border line color
- legend.FrameFormat.Border.LineColor = Color.Blue;
- //Set the border line pattern
- legend.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot;
- //Set the legend border line weight
- legend.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Wide;
- //Reset the legend format
- legend.Clear();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend border format
- legend.FrameFormat.Border.AutoFormat = False
- 'Set the legend border auto line color
- legend.FrameFormat.Border.IsAutoLineColor = False
- 'Set the border line color
- legend.FrameFormat.Border.LineColor = Color.Blue
- 'Set the border line pattern
- legend.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot
- 'Set the legend border line weight
- legend.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Wide
- 'Reset the legend format
- legend.Clear()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Delete the chart's legend
- legend.Delete();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Delete the chart's legend
- legend.Delete()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend border format
- legend.FrameFormat.Border.AutoFormat = false;
- //Set the legend border auto line color
- legend.FrameFormat.Border.IsAutoLineColor = false;
- //Set the border line color
- legend.FrameFormat.Border.LineColor = System.Drawing.Color.Blue;
- //Set the border line pattern
- legend.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot;
- //Set the legend border line weight
- legend.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Wide;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend border format
- legend.FrameFormat.Border.AutoFormat = False
- 'Set the legend border auto line color
- legend.FrameFormat.Border.IsAutoLineColor = False
- 'Set the border line color
- legend.FrameFormat.Border.LineColor = System.Drawing.Color.Blue
- 'Set the border line pattern
- legend.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot
- 'Set the legend border line weight
- legend.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Wide
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the text area font weight
- legend.TextArea.Bold = true;
- //Set the legend text area forecolor
- legend.TextArea.Color = OfficeKnownColors.Sky_blue;
- //Set the legend text area font name
- legend.TextArea.FontName = "Times New Roman";
- //Set the legend text area font size
- legend.TextArea.Size = 15;
- //Set the legend text area' strike through
- legend.TextArea.Strikethrough = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the text area font weight
- legend.TextArea.Bold = True
- 'Set the legend text area forecolor
- legend.TextArea.Color = OfficeKnownColors.Sky_blue
- 'Set the legend text area font name
- legend.TextArea.FontName = "Times New Roman"
- 'Set the legend text area font size
- legend.TextArea.Size = 15
- 'Set the legend text area' strike through
- legend.TextArea.Strikethrough = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend position
- legend.Position = OfficeLegendPosition.Top;
- //Set the position of legend
- legend.X = 120;
- legend.Y = 25;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend position
- legend.Position = OfficeLegendPosition.Top
- 'Set the position of legend
- legend.X = 120
- legend.Y = 25
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend position
- legend.Position = OfficeLegendPosition.Top;
- //Set the position of legend
- legend.X = 120;
- legend.Y = 25;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend position
- legend.Position = OfficeLegendPosition.Top
- 'Set the position of legend
- legend.X = 120
- legend.Y = 25
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend position
- legend.Position = OfficeLegendPosition.Left;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend position
- legend.Position = OfficeLegendPosition.Left
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend position
- legend.Position = OfficeLegendPosition.Left;
- //Enable the vertical legend
- legend.IsVerticalLegend = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend position
- legend.Position = OfficeLegendPosition.Left
- 'Enable the vertical legend
- legend.IsVerticalLegend = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the text area font weight
- legend.TextArea.Bold = true;
- //Set the legend text area forecolor
- legend.TextArea.Color = OfficeKnownColors.Sky_blue;
- //Set the legend text area font name
- legend.TextArea.FontName = "Times New Roman";
- //Set the legend text area font size
- legend.TextArea.Size = 15;
- //Modify the legend entry
- legend.LegendEntries[0].IsDeleted = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the text area font weight
- legend.TextArea.Bold = True
- 'Set the legend text area forecolor
- legend.TextArea.Color = OfficeKnownColors.Sky_blue
- 'Set the legend text area font name
- legend.TextArea.FontName = "Times New Roman"
- 'Set the legend text area font size
- legend.TextArea.Size = 15
- 'Modify the legend entry
- legend.LegendEntries(0).IsDeleted = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the layout inclusion
- legend.IncludeInLayout = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the layout inclusion
- legend.IncludeInLayout = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Modify the legend layout height
- legend.Layout.Height = 100;
- //Modify the legend layout height mode
- legend.Layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout left position
- legend.Layout.Left = 100;
- //Modify the legend layout left mode
- legend.Layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- legend.Layout.Top = 100;
- //Modify the legend layout top mode
- legend.Layout.TopMode = LayoutModes.factor;
- //Modify the legend layout width
- legend.Layout.Width = 150;
- //Modify the legend layout width mode
- legend.Layout.WidthMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Modify the legend layout height
- legend.Layout.Height = 100
- 'Modify the legend layout height mode
- legend.Layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout left position
- legend.Layout.Left = 100
- 'Modify the legend layout left mode
- legend.Layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- legend.Layout.Top = 100
- 'Modify the legend layout top mode
- legend.Layout.TopMode = LayoutModes.factor
- 'Modify the legend layout width
- legend.Layout.Width = 150
- 'Modify the legend layout width mode
- legend.Layout.WidthMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Add error bars to series
- serieJan.ErrorBar(true);
- serieFeb.ErrorBar(false);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Add error bars to series
- serieJan.ErrorBar(True)
- serieFeb.ErrorBar(False)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Add error bars to series
- serieJan.ErrorBar(true,OfficeErrorBarInclude.Both);
- serieFeb.ErrorBar(false,OfficeErrorBarInclude.Minus);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Add error bars to series
- serieJan.ErrorBar(True, OfficeErrorBarInclude.Both)
- serieFeb.ErrorBar(False, OfficeErrorBarInclude.Minus)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Add error bars to series
- serieJan.ErrorBar(true, OfficeErrorBarInclude.Both, OfficeErrorBarType.StandardDeviation);
- serieFeb.ErrorBar(false, OfficeErrorBarInclude.Plus, OfficeErrorBarType.StandardError);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Add error bars to series
- serieJan.ErrorBar(True, OfficeErrorBarInclude.Both, OfficeErrorBarType.StandardDeviation)
- serieFeb.ErrorBar(False, OfficeErrorBarInclude.Plus, OfficeErrorBarType.StandardError)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Add error bars to series
- serieJan.ErrorBar(true, OfficeErrorBarInclude.Both, OfficeErrorBarType.StandardDeviation, 12.34);
- serieFeb.ErrorBar(false, OfficeErrorBarInclude.Plus, OfficeErrorBarType.StandardError, 25.89);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Add error bars to series
- serieJan.ErrorBar(True, OfficeErrorBarInclude.Both, OfficeErrorBarType.StandardDeviation, 12.34)
- serieFeb.ErrorBar(False, OfficeErrorBarInclude.Plus, OfficeErrorBarType.StandardError, 25.89)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Set the error bar X for serie
- serieJan.HasErrorBarsX = true;
- //Set the plus range
- serieJan.ErrorBarsX.PlusRange = chart.ChartData[2, 2, 4, 2];
- //Set the minus range
- serieJan.ErrorBarsX.MinusRange = chart.ChartData[2, 3, 4, 3];
- //Add Error bar to serie
- serieJan.ErrorBar(true, serieJan.ErrorBarsX.PlusRange, serieJan.ErrorBarsX.MinusRange);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Set the error bar X for serie
- serieJan.HasErrorBarsX = True
- 'Set the plus range
- serieJan.ErrorBarsX.PlusRange = chart.ChartData(2, 2, 4, 2)
- 'Set the minus range
- serieJan.ErrorBarsX.MinusRange = chart.ChartData(2, 3, 4, 3)
- 'Add Error bar to serie
- serieJan.ErrorBar(True, serieJan.ErrorBarsX.PlusRange, serieJan.ErrorBarsX.MinusRange)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentationDocument As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentationDocument.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentationDocument.Save("Output.pptx")
- 'Close the presentation
- presentationDocument.Close()
-
-
- IPresentation presentationDocument = Presentation.Create();
- ISlide slide = presentationDocument.Slides.Add(SlideLayoutType.Blank);
- //Loads the excel file as stream
- Stream excelStream = File.OpenRead("Excel_Template.xlsx");
- //Creates and Appends chart to the paragraph with excel stream as parameter
- IPresentationChart chart = slide.Shapes.AddChart(excelStream, 1, "A1:C6", new RectangleF(0, 0, 470, 300));
- foreach (IOfficeChartSerie serie in chart.Series)
- {
- serie.InvertIfNegative = false;
- }
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 6, 1];
- //Sets chart type and title
- chart.ChartType = OfficeChartType.Bar_Clustered;
- chart.ChartTitle = "Purchase Details";
- chart.ChartTitleArea.FontName = "Calibri";
- chart.ChartTitleArea.Size = 14;
- chart.PrimaryValueAxis.CrossesAt = 1500;
- presentationDocument.Save("Output.pptx");
- presentationDocument.Close();
-
-
- Dim presentationDocument As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentationDocument.Slides.Add(SlideLayoutType.Blank)
- 'Loads the excel file as stream
- Dim excelStream As Stream = File.OpenRead("Excel_Template.xlsx")
- 'Creates and Appends chart to the paragraph with excel stream as parameter
- Dim chart As IPresentationChart = slide.Shapes.AddChart(excelStream, 1, "A1:C6", New RectangleF(0, 0, 470, 300))
- For Each serie As IOfficeChartSerie In chart.Series
- serie.InvertIfNegative = False
- Next
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 6, 1)
- 'Sets chart type and title
- chart.ChartType = OfficeChartType.Bar_Clustered
- chart.ChartTitle = "Purchase Details"
- chart.ChartTitleArea.FontName = "Calibri"
- chart.ChartTitleArea.Size = 14
- chart.PrimaryValueAxis.CrossesAt = 1500
- presentationDocument.Save("Output.pptx")
- presentationDocument.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the range of category labels
- IOfficeDataRange dataRange = chart.Series[0].CategoryLabels;
- //Changes the category label of a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 2.4);
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- Retrieves the range of category labels
- Dim dataRange As IOfficeDataRange = chart.Series(0).CategoryLabels
- 'Changes the category label of a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 2.4)
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the range of bubble sizes of the chart
- IOfficeDataRange dataRange = chart.Series[0].Bubbles;
- //Changes the bubble size in a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 20);
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- 'Retrieves the range of bubble sizes of the chart
- Dim dataRange As IOfficeDataRange = chart.Series(0).Bubbles
- 'Changes the bubble size in a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 20)
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar;
- //Reset the name of the serie
- serieFeb.Name = "February";
- //Get the Serie Format
- IOfficeChartSerieDataFormat serieFormat = serieFeb.SerieFormat;
- //Set the radar axis labels
- serieFormat.CommonSerieOptions.HasRadarAxisLabels = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar
- 'Reset the name of the serie
- serieFeb.Name = "February"
- 'Get the Serie Format
- Dim serieFormat As IOfficeChartSerieDataFormat = serieFeb.SerieFormat
- 'Set the radar axis labels
- serieFormat.CommonSerieOptions.HasRadarAxisLabels = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the name range of the series
- IOfficeDataRange dataRange = chart.Series[0].NameRange;
- //Sets a new name to the series
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, "My serie Name");
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- 'Retrieves the name range of the series
- Dim dataRange As IOfficeDataRange = chart.Series(0).NameRange
- 'Sets a new name to the series
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, "My serie Name")
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the primary axis for the serie
- serieMarch.UsePrimaryAxis = true;
- //Add the trendline to chart serie
- serieJan.TrendLines.Add();
- serieJan.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()///Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the primary axis for the serie
- serieMarch.UsePrimaryAxis = True
- 'Add the trendline to chart serie
- serieJan.TrendLines.Add()
- serieJan.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the series data points
- IOfficeChartDataPoints dataPoints = chart.Series[0].DataPoints;
- //Get the data point using the index, read only
- IOfficeChartDataPoint dataPoint = dataPoints[0];
- //Get the data labels of data point
- IOfficeChartDataLabels dataLabels = dataPoint.DataLabels;
- //Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center;
- //Set the series name
- dataLabels.IsSeriesName = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the series data points
- Dim dataPoints As IOfficeChartDataPoints = chart.Series(0).DataPoints
- 'Get the data point using the index, read only
- Dim dataPoint As IOfficeChartDataPoint = dataPoints(0)
- 'Get the data labels of data point
- Dim dataLabels As IOfficeChartDataLabels = dataPoint.DataLabels
- 'Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center
- 'Set the series name
- dataLabels.IsSeriesName = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar;
- //Reset the name of the serie
- serieFeb.Name = "February";
- //Get the Serie Format
- IOfficeChartSerieDataFormat serieFormat = serieFeb.SerieFormat;
- //Set the radar axis labels
- serieFormat.CommonSerieOptions.HasRadarAxisLabels = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar
- 'Reset the name of the serie
- serieFeb.Name = "February"
- 'Get the Serie Format
- Dim serieFormat As IOfficeChartSerieDataFormat = serieFeb.SerieFormat
- 'Set the radar axis labels
- serieFormat.CommonSerieOptions.HasRadarAxisLabels = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the serie type for each serie
- serieFeb.SerieType = OfficeChartType.Line;
- serieJan.SerieType = OfficeChartType.Area;
- serieMarch.SerieType = OfficeChartType.Bar_Clustered;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the serie type for each serie
- serieFeb.SerieType = OfficeChartType.Line
- serieJan.SerieType = OfficeChartType.Area
- serieMarch.SerieType = OfficeChartType.Bar_Clustered
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Set the error Bar Y
- serieJan.HasErrorBarsY = true;
- //Set the color of error barX border
- serieJan.ErrorBarsY.Border.LineColor = System.Drawing.Color.Red;
- //Set the has cap
- serieJan.ErrorBarsY.HasCap = true;
- //Set the include
- serieJan.ErrorBarsY.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Set the error Bar Y
- serieJan.HasErrorBarsY = True
- 'Set the color of error barX border
- serieJan.ErrorBarsY.Border.LineColor = System.Drawing.Color.Red
- 'Set the has cap
- serieJan.ErrorBarsY.HasCap = True
- 'Set the include
- serieJan.ErrorBarsY.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Set the error Bar Y
- serieJan.HasErrorBarsY = true;
- //Set the color of error barX border
- serieJan.ErrorBarsY.Border.LineColor = System.Drawing.Color.Red;
- //Set the has cap
- serieJan.ErrorBarsY.HasCap = true;
- //Set the include
- serieJan.ErrorBarsY.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Set the error Bar Y
- serieJan.HasErrorBarsY = True
- 'Set the color of error barX border
- serieJan.ErrorBarsY.Border.LineColor = System.Drawing.Color.Red
- 'Set the has cap
- serieJan.ErrorBarsY.HasCap = True
- 'Set the include
- serieJan.ErrorBarsY.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Set the error Bar X
- serieJan.HasErrorBarsX = true;
- //Set the color of error barX border
- serieJan.ErrorBarsX.Border.LineColor = System.Drawing.Color.Red;
- //Set the has cap
- serieJan.ErrorBarsX.HasCap = true;
- //Set the include
- serieJan.ErrorBarsX.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Set the error Bar X
- serieJan.HasErrorBarsX = True
- 'Set the color of error barX border
- serieJan.ErrorBarsX.Border.LineColor = System.Drawing.Color.Red
- 'Set the has cap
- serieJan.ErrorBarsX.HasCap = True
- 'Set the include
- serieJan.ErrorBarsX.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Set the error Bar X
- serieJan.HasErrorBarsX = true;
- //Set the color of error barX border
- serieJan.ErrorBarsX.Border.LineColor = System.Drawing.Color.Red;
- //Set the has cap
- serieJan.ErrorBarsX.HasCap = true;
- //Set the include
- serieJan.ErrorBarsX.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Set the error Bar X
- serieJan.HasErrorBarsX = True
- 'Set the color of error barX border
- serieJan.ErrorBarsX.Border.LineColor = System.Drawing.Color.Red
- 'Set the has cap
- serieJan.ErrorBarsX.HasCap = True
- 'Set the include
- serieJan.ErrorBarsX.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the primary axis for the serie
- serieMarch.UsePrimaryAxis = true;
- //Add the trendline to chart serie
- serieJan.TrendLines.Add();
- serieJan.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the primary axis for the serie
- serieMarch.UsePrimaryAxis = True
- 'Add the trendline to chart serie
- serieJan.TrendLines.Add()
- serieJan.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Filter the serie value
- serieJan.IsFiltered = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Filter the serie value
- serieJan.IsFiltered = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the name range of the series
- IOfficeDataRange dataRange = chart.Series[0].NameRange;
- //Sets a new name to the series
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, "My serie Name");
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- 'Retrieves the name range of the series
- Dim dataRange As IOfficeDataRange = chart.Series(0).NameRange
- 'Sets a new name to the series
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, "My serie Name")
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie - start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie - start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series - start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentationDocument As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentationDocument.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie - start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie - start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series - start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentationDocument.Save("Output.pptx")
- 'Close the presentation
- presentationDocument.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the range of category labels
- IOfficeDataRange dataRange = chart.Series[0].CategoryLabels;
- //Changes the category label of a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 2.4);
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- Retrieves the range of category labels
- Dim dataRange As IOfficeDataRange = chart.Series(0).CategoryLabels
- 'Changes the category label of a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 2.4)
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the range of bubble sizes of the chart
- IOfficeDataRange dataRange = chart.Series[0].Bubbles;
- //Changes the bubble size in a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 20);
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- 'Retrieves the range of bubble sizes of the chart
- Dim dataRange As IOfficeDataRange = chart.Series(0).Bubbles
- 'Changes the bubble size in a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 20)
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the number of series between tick-mark labels
- chart.PrimarySerieAxis.TickLabelSpacing = 10;
- //Sets the number of series between tick marks.
- chart.PrimarySerieAxis.TickMarkSpacing = 15;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the number of series between tick-mark labels
- chart.PrimarySerieAxis.TickLabelSpacing = 10
- 'Sets the number of series between tick marks.
- chart.PrimarySerieAxis.TickMarkSpacing = 15
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the number of series between tick-mark labels
- chart.PrimarySerieAxis.TickLabelSpacing = 10;
- //Sets the number of series between tick marks.
- chart.PrimarySerieAxis.TickMarkSpacing = 15;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the number of series between tick-mark labels
- chart.PrimarySerieAxis.TickLabelSpacing = 10
- 'Sets the number of series between tick marks.
- chart.PrimarySerieAxis.TickMarkSpacing = 15
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Remove a serie using the index position
- chart.Series.RemoveAt(0);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Remove a serie using the index position
- chart.Series.RemoveAt(0)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Remove a specific serie from collection
- chart.Series.Remove(serieJan);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Remove a specific serie from collection
- chart.Series.Remove(serieJan)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the count of the series
- int count = chart.Series.Count;
- //Set the data range of chart serie � start row, start column, end row, end column
- chart.Series[0].Values = chart.ChartData[2, 2, 4, 2];
- chart.Series["Feb"].Values = chart.ChartData[2, 3, 4, 3];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the count of the series
- Dim count As Integer = chart.Series.Count
- 'Set the data range of chart serie � start row, start column, end row, end column
- chart.Series(0).Values = chart.ChartData(2, 2, 4, 2)
- chart.Series("Feb").Values = chart.ChartData(2, 3, 4, 3)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the count of the series
- int count = chart.Series.Count;
- //Set the data range of chart serie � start row, start column, end row, end column
- chart.Series[0].Values = chart.ChartData[2, 2, 4, 2];
- chart.Series["Feb"].Values = chart.ChartData[2, 3, 4, 3];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the count of the series
- Dim count As Integer = chart.Series.Count
- 'Set the data range of chart serie � start row, start column, end row, end column
- chart.Series(0).Values = chart.ChartData(2, 2, 4, 2)
- chart.Series("Feb").Values = chart.ChartData(2, 3, 4, 3)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the count of the series
- int count = chart.Series.Count;
- //Set the data range of chart serie � start row, start column, end row, end column
- chart.Series[0].Values = chart.ChartData[2, 2, 4, 2];
- chart.Series["Feb"].Values = chart.ChartData[2, 3, 4, 3];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the count of the series
- Dim count As Integer = chart.Series.Count
- 'Set the data range of chart serie � start row, start column, end row, end column
- chart.Series(0).Values = chart.ChartData(2, 2, 4, 2)
- chart.Series("Feb").Values = chart.ChartData(2, 3, 4, 3)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Set the trendline color and weight
- serieFeb.TrendLines[0].Border.LineWeight = OfficeChartLineWeight.Wide;
- serieFeb.TrendLines[0].Border.LineColor = System.Drawing.Color.Blue;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Set the trendline color and weight
- serieFeb.TrendLines(0).Border.LineWeight = OfficeChartLineWeight.Wide
- serieFeb.TrendLines(0).Border.LineColor = System.Drawing.Color.Blue
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Set the trendline color and weight
- serieFeb.TrendLines[0].Border.LineWeight = OfficeChartLineWeight.Wide;
- serieFeb.TrendLines[0].Border.LineColor = System.Drawing.Color.Blue;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Set the trendline color and weight
- serieFeb.TrendLines(0).Border.LineWeight = OfficeChartLineWeight.Wide
- serieFeb.TrendLines(0).Border.LineColor = System.Drawing.Color.Blue
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- serieFeb.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Get the count of the trendline
- int count = serieFeb.TrendLines.Count;
- //Get the trendline instance from collection
- IOfficeChartTrendLine trendline = serieFeb.TrendLines[0];
- //Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide;
- trendline.Border.LineColor = System.Drawing.Color.Blue;
- //Remove a trendline object using index
- serieFeb.TrendLines.RemoveAt(1);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- serieFeb.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Get the count of the trendline
- Dim count As Integer = serieFeb.TrendLines.Count
- 'Get the trendline instance from collection
- Dim trendline As IOfficeChartTrendLine = serieFeb.TrendLines(0)
- 'Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide
- trendline.Border.LineColor = System.Drawing.Color.Blue
- 'Remove a trendline object using index
- serieFeb.TrendLines.RemoveAt(1)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- serieFeb.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Get the count of the trendline
- int count = serieFeb.TrendLines.Count;
- //Get the trendline instance from collection
- IOfficeChartTrendLine trendline = serieFeb.TrendLines[0];
- //Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide;
- trendline.Border.LineColor = System.Drawing.Color.Blue;
- //Clear the trendlines in serie
- serieFeb.TrendLines.Clear();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- serieFeb.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Get the count of the trendline
- Dim count As Integer = serieFeb.TrendLines.Count
- 'Get the trendline instance from collection
- Dim trendline As IOfficeChartTrendLine = serieFeb.TrendLines(0)
- 'Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide
- trendline.Border.LineColor = System.Drawing.Color.Blue
- 'Clear the trendlines in serie
- serieFeb.TrendLines.Clear()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- serieFeb.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Get the count of the trendline
- int count = serieFeb.TrendLines.Count;
- //Get the trendline instance from collection
- IOfficeChartTrendLine trendline = serieFeb.TrendLines[0];
- //Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide;
- trendline.Border.LineColor = System.Drawing.Color.Blue;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- serieFeb.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Get the count of the trendline
- Dim count As Integer = serieFeb.TrendLines.Count
- 'Get the trendline instance from collection
- Dim trendline As IOfficeChartTrendLine = serieFeb.TrendLines(0)
- 'Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide
- trendline.Border.LineColor = System.Drawing.Color.Blue
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- serieFeb.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Get the count of the trendline
- int count = serieFeb.TrendLines.Count;
- //Get the trendline instance from collection
- IOfficeChartTrendLine trendline = serieFeb.TrendLines[0];
- //Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide;
- trendline.Border.LineColor = System.Drawing.Color.Blue;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- serieFeb.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Get the count of the trendline
- Dim count As Integer = serieFeb.TrendLines.Count
- 'Get the trendline instance from collection
- Dim trendline As IOfficeChartTrendLine = serieFeb.TrendLines(0)
- 'Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide
- trendline.Border.LineColor = System.Drawing.Color.Blue
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial;
- //Set the intercept of trendline
- trendline.Intercept = 0.8;
- //Set the name for trendline
- trendline.Name = "Trendline";
- //Set the order
- trendline.Order = 3;
- //Clear the trendline formats
- trendline.ClearFormats();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial
- 'Set the intercept of trendline
- trendline.Intercept = 0.8
- 'Set the name for trendline
- trendline.Name = "Trendline"
- 'Set the order
- trendline.Order = 3
- 'Clear the trendline formats
- trendline.ClearFormats()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered;
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the line color of border
- trendline.Border.LineColor = System.Drawing.Color.Green;
- //Set the line weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the line color of border
- trendline.Border.LineColor = System.Drawing.Color.Green
- 'Set the line weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered;
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the backward
- trendline.Backward = 0.3;
- //Set the line color of border
- trendline.Border.LineColor = System.Drawing.Color.Green;
- //Set the line weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the backward
- trendline.Backward = 0.3
- 'Set the line color of border
- trendline.Border.LineColor = System.Drawing.Color.Green
- 'Set the line weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the intercept as auto
- trendline.InterceptIsAuto = true;
- //Set the name as auto
- trendline.NameIsAuto = true;
- //Set the forward
- trendline.Forward = 0.3;
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the intercept as auto
- trendline.InterceptIsAuto = True
- 'Set the name as auto
- trendline.NameIsAuto = True
- 'Set the forward
- trendline.Forward = 0.3
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the display equation
- trendline.DisplayEquation = true;
- //Set the display RSSquared
- trendline.DisplayRSquared = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the display equation
- trendline.DisplayEquation = True
- 'Set the display RSSquared
- trendline.DisplayRSquared = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the display equation
- trendline.DisplayEquation = true;
- //Set the display RSSquared
- trendline.DisplayRSquared = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the display equation
- trendline.DisplayEquation = True
- 'Set the display RSSquared
- trendline.DisplayRSquared = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial;
- //Set the intercept of trendline
- trendline.Intercept = 0.8;
- //Set the name for trendline
- trendline.Name = "Trendline";
- //Set the order
- trendline.Order = 3;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial
- 'Set the intercept of trendline
- trendline.Intercept = 0.8
- 'Set the name for trendline
- trendline.Name = "Trendline"
- 'Set the order
- trendline.Order = 3
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the intercept as auto
- trendline.InterceptIsAuto = true;
- //Set the name as auto
- trendline.NameIsAuto = true;
- //Set the forward
- trendline.Forward = 0.3;
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance///Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the intercept as auto
- trendline.InterceptIsAuto = True
- 'Set the name as auto
- trendline.NameIsAuto = True
- 'Set the forward
- trendline.Forward = 0.3
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the intercept as auto
- trendline.InterceptIsAuto = true;
- //Set the name as auto
- trendline.NameIsAuto = true;
- //Set the forward
- trendline.Forward = 0.3;
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the intercept as auto
- trendline.InterceptIsAuto = True
- 'Set the name as auto
- trendline.NameIsAuto = True
- 'Set the forward
- trendline.Forward = 0.3
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial;
- //Set the intercept of trendline
- trendline.Intercept = 0.8;
- //Set the name for trendline
- trendline.Name = "Trendline";
- //Set the order
- trendline.Order = 3;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial
- 'Set the intercept of trendline
- trendline.Intercept = 0.8
- 'Set the name for trendline
- trendline.Name = "Trendline"
- 'Set the order
- trendline.Order = 3
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the intercept as auto
- trendline.InterceptIsAuto = true;
- //Set the name as auto
- trendline.NameIsAuto = true;
- //Set the forward
- trendline.Forward = 0.3;
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the intercept as auto
- trendline.InterceptIsAuto = True
- 'Set the name as auto
- trendline.NameIsAuto = True
- 'Set the forward
- trendline.Forward = 0.3
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial;
- //Set the intercept of trendline
- trendline.Intercept = 0.8;
- //Set the name for trendline
- trendline.Name = "Trendline";
- //Set the order
- trendline.Order = 3;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial
- 'Set the intercept of trendline
- trendline.Intercept = 0.8
- 'Set the name for trendline
- trendline.Name = "Trendline"
- 'Set the order
- trendline.Order = 3
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered;
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the bold font style for data label
- trendline.DataLabel.Bold = true;
- //Set the color of data label
- trendline.DataLabel.Color = OfficeKnownColors.Red;
- //Set the font name
- trendline.DataLabel.FontName = "Helvetica";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the bold font style for data label
- trendline.DataLabel.Bold = True
- 'Set the color of data label
- trendline.DataLabel.Color = OfficeKnownColors.Red
- 'Set the font name
- trendline.DataLabel.FontName = "Helvetica"
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get a bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D;
- //Get the side wall of chart
- IOfficeChartWallOrFloor sideWall = chart.SideWall;
- //Set the picture unit of side wall
- sideWall.PictureUnit = OfficeChartPictureType.stretch;
- //Set the thickness
- sideWall.Thickness = 40;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get a bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D;
- //Get the side wall of chart
- IOfficeChartWallOrFloor sideWall = chart.SideWall;
- //Set the picture unit of side wall
- sideWall.PictureUnit = OfficeChartPictureType.stretch;
- //Set the thickness
- sideWall.Thickness = 40;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
- This is a memory efficient way to represent a table where values can remain empty. Only rows - that actually contain data will allocate an SFArrayList and the array only holds - as many objects as the specific row contains columns.
-When you access data that are out of range, an empty () object will be returned. - If you set data that are out of range, an exception will be thrown. If you set data for - a row that is empty, the row will be allocated before the value is stored.
-SFTable provides methods that let you insert, remove or rearrange columns or m_arrRows - in the table.
-This is a memory efficient way to represent a table where values can remain empty. Only rows - that actually contain data will allocate an SFArrayList and the array only holds - as many objects as the specific row contains columns.
-When you access data that are out of range, an empty () object will be returned. - If you set data that are out of range, an exception will be thrown. If you set data for - a row that is empty, the row will be allocated before the value is stored.
-SFTable provides methods that let you insert, remove or rearrange columns or m_arrRows - in the table.
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel top
- format.BevelTop = Office2007ChartBevelProperties.CoolSlant;
- //Set the height of bevel top
- format.BevelTopHeight = 300;
- //Set the width of bevel top
- format.BevelTopWidth = 320;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel bottom
- format.BevelBottom = Office2007ChartBevelProperties.Angle;
- //Set the height of bevel bottom
- format.BevelBottomHeight = 100;
- //Set the width of bevel bottom
- format.BevelBottomWidth = 120;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the 3D lightning
- format.Lighting = Office2007ChartLightingProperties.Chilly;
- //Set the 3D material
- format.Material = Office2007ChartMaterialProperties.DarkEdge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the 3D lightning
- format.Lighting = Office2007ChartLightingProperties.Chilly;
- //Set the 3D material
- format.Material = Office2007ChartMaterialProperties.DarkEdge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel top
- format.BevelTop = Office2007ChartBevelProperties.CoolSlant;
- //Set the height of bevel top
- format.BevelTopHeight = 300;
- //Set the width of bevel top
- format.BevelTopWidth = 320;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel top
- format.BevelTop = Office2007ChartBevelProperties.CoolSlant;
- //Set the height of bevel top
- format.BevelTopHeight = 300;
- //Set the width of bevel top
- format.BevelTopWidth = 320;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel bottom
- format.BevelBottom = Office2007ChartBevelProperties.Angle;
- //Set the height of bevel bottom
- format.BevelBottomHeight = 100;
- //Set the width of bevel bottom
- format.BevelBottomWidth = 120;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel bottom
- format.BevelBottom = Office2007ChartBevelProperties.Angle;
- //Set the height of bevel bottom
- format.BevelBottomHeight = 100;
- //Set the width of bevel bottom
- format.BevelBottomWidth = 120;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Open a PowerPoint presentation file
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Create an instance of ChartToImageConverter
- presentation.ChartToImageConverter = new ChartToImageConverter();
- //Set the scaling mode as best
- presentation.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Best;
- //Convert the first slide into image
- System.Drawing.Image image = presentation.Slides[0].ConvertToImage(Syncfusion.Drawing.ImageType.Metafile);
- //Save the image as file
- image.Save("slide1.png");
- //close the presentation instance
- presentation.Close();
-
-
- 'Open a PowerPoint presentation file
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Create an instance of ChartToImageConverter
- presentation__1.ChartToImageConverter = New ChartToImageConverter()
- 'Set the scaling mode as best
- presentation__1.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Best
- 'Convert the first slide into image
- Dim image As System.Drawing.Image = presentation__1.Slides(0).ConvertToImage(Syncfusion.Drawing.ImageType.Metafile)
- 'Save the image as file
- image.Save("slide1.png")
- 'close the presentation instance
- presentation__1.Close()
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCodabarBarcode.
- PdfCodabarBarcode codaBarcode = new PdfCodabarBarcode();
- //Sets the barcode text.
- codaBarcode.Text = "0123";
- //Draws a barcode on the new Page.
- codaBarcode.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCodabarBarcode.
- Dim codaBarcode As PdfCodabarBarcode = New PdfCodabarBarcode()
- 'Sets the barcode text.
- codaBarcode.Text = "0123"
- 'Draws a barcode on the new Page.
- codaBarcode.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCodabarBarcode.
- PdfCodabarBarcode codaBarcode = new PdfCodabarBarcode();
- //Sets the barcode text.
- codaBarcode.Text = "0123";
- //Draws a barcode on the new Page.
- codaBarcode.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCodabarBarcode.
- Dim codaBarcode As PdfCodabarBarcode = New PdfCodabarBarcode()
- 'Sets the barcode text.
- codaBarcode.Text = "0123"
- 'Draws a barcode on the new Page.
- codaBarcode.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCodabarBarcode.
- PdfCodabarBarcode codaBarcode = new PdfCodabarBarcode("0123");
- //Draws a barcode on the new Page.
- codaBarcode.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCodabarBarcode.
- Dim codaBarcode As PdfCodabarBarcode = New PdfCodabarBarcode("0123")
- 'Draws a barcode on the new Page.
- codaBarcode.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Sets the barcode back color.
- code93.BackColor = new PdfColor(Color.Green);
- //Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Sets the barcode back color.
- code93.BackColor = new PdfColor(Color.Green)
- 'Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Sets the barcode color.
- code93.BarColor = new PdfColor(Color.Green);
- //Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Sets the barcode color.
- code93.BarColor = new PdfColor(Color.Green)
- 'Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Sets the barcode text color.
- code93.TextColor = new PdfColor(Color.Green);
- //Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Sets the barcode text color.
- code93.TextColor = new PdfColor(Color.Green)
- 'Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Sets the barcode narrow width.
- code93.NarrowBarWidth =1f;
- //Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Sets the barcode narrow width.
- code93.NarrowBarWidth = 1f
- 'Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode();
- //Sets the barcode text.
- code93.Text ="CODE93";
- //Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode()
- 'Sets the barcode back color.
- code93.Text ="CODE93"
- 'Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Sets the barcode location.
- code93.Location = new PointF(50, 50);
- //Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code93 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Sets the barcode location.
- code93.Location = new PointF(50, 50)
- 'Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones();
- quietZones.All = 0f;
- //Sets the barcode quiet zone.
- code93QuietZone = quietZones;
- //Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones()
- quietZones.All = 0f
- 'Sets the barcode quiet zone.
- code93QuietZone = quietZones
- 'Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Sets the barcode height.
- code93.BarHeight = 50f;
- //Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Sets the barcode height.
- code93.BarHeight = 50f
- 'Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Sets the barcode size
- SizeF size=code93.Size;
- //Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Get the barcode size.
- SizeF size=code93.Size
- 'Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Sets the barcode bounds.
- RectangleF bounds=code39.Bounds;
- //Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("PdfBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Get the barcode bounds.
- RectangleF bounds=code39.Bounds
- 'Draws a barcode on the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save document to disk.
- document.Save("PdfBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones();
- quietZones.All = 0f;
- //Set the barcode quiet zone.
- code93.QuietZone = quietZones;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("code93.pdf");
-
-
- ' Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones()
- quietZones.All = 0f;
- 'Set the barcode quiet zone.
- code93.QuietZone = quietZones
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones();
- quietZones.Right = 0f;
- //Set the barcode quiet zone.
- code93.QuietZone = quietZones;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("code93.pdf");
-
-
- ' Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones()
- quietZones.Right = 0f;
- 'Set the barcode quiet zone.
- code93.QuietZone = quietZones
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones();
- quietZones.Top = 0f;
- //Set the barcode quiet zone.
- code93.QuietZone = quietZones;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("code93.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones()
- quietZones.Top = 0f;
- 'Set the barcode quiet zone.
- code93.QuietZone = quietZones
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones();
- quietZones.Left = 0f;
- //Set the barcode quiet zone.
- code93.QuietZone = quietZones;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("code93.pdf");
-
-
- ' Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones()
- quietZones.Left = 0f;
- 'Set the barcode quiet zone.
- code93.QuietZone = quietZones
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones();
- quietZones.Bottom = 0f;
- //Set the barcode quiet zone.
- code93.QuietZone = quietZones;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("code93.pdf");
-
-
- ' Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones()
- quietZones.Bottom = 0f;
- 'Set the barcode quiet zone.
- code93.QuietZone = quietZones
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones();
- quietZones.All = 0f;
- //Set the barcode quiet zone.
- code93.QuietZone = quietZones;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("code93.pdf");
-
-
- ' Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones()
- quietZones.All = 0f;
- 'Set the barcode quiet zone.
- code93.QuietZone = quietZones
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones();
- quietZones.All = 0f;
- //Set the barcode quiet zone.
- code93.QuietZone = quietZones;
- bool isAll=code93.QuietZone.IsAll;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("code93.pdf");
-
-
- ' Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Creates a new PdfBarcodeQuietZones.
- PdfBarcodeQuietZones quietZones = new PdfBarcodeQuietZones()
- quietZones.All = 0f
- code39.QuietZone=quietZones
- Dim isAll As bool = code39.QuietZone.IsAll
- 'Set the barcode quiet zone.
- code93.QuietZone = quietZones
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCodabarBarcode.
- PdfCodabarBarcode codaBarcode = new PdfCodabarBarcode();
- //Set the font to codabarcode.
- codaBarcode.Font = font;
- //Set the barcode text.
- codaBarcode.Text = "0123";
- //Draw a barcode in the new Page.
- codaBarcode.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("CodaBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCodabarBarcode.
- Dim codaBarcode As PdfCodabarBarcode = New PdfCodabarBarcode()
- 'Set the font..
- codaBarcode.Font = font
- 'Set the barcode text.
- codaBarcode.Text = "0123"
- 'Draw a barcode in the new Page.
- codaBarcode.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("CodaBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode11Barcode.
- PdfCode11Barcode code11 = new PdfCode11Barcode();
- //Set the font to code11.
- code11.Font = font;
- //Set the barcode text.
- code11.Text = "012345678";
- //Draw a barcode in the new Page.
- code11.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code11.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode11Barcode.
- Dim code11 As PdfCode11Barcode = New PdfCode11Barcode()
- 'Set the font to code11.
- code11.Font = font
- 'Set the barcode text.
- code11.Text = "012345678"
- 'Draw a barcode in the new Page.
- code11.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code11.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode11Barcode.
- PdfCode11Barcode code11 = new PdfCode11Barcode();
- //Set the font to code11.
- code11.Font = font;
- //Set the barcode text.
- code11.Text = "012345678";
- code11.Location = new PointF(100,100);
- //Draw a barcode in the new Page.
- code11.Draw(page);
- //Save the document to disk.
- document.Save("Code11.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode11Barcode.
- Dim code11 As PdfCode11Barcode = New PdfCode11Barcode()
- 'Set the font to code11.
- code11.Font = font
- 'Set the barcode text.
- code11.Text = "012345678"
- code11.Location = new PointF(100,100);
- 'Draw a barcode in the new Page.
- code11.Draw(page)
- 'Save the document to disk.
- document.Save("Code11.pdf")
-
-
- //Creates a new PdfCode11Barcode.
- PdfCode11Barcode code11 = new PdfCode11Barcode();
- //Set the barcode text.
- code11.Text = "012345678";
- //Get the image for Code32 Barcode.
- Image image= code32.ToImage();
- //Save the image into Disk
- image.Save("Code32.png", ImageFormat.Png);
-
-
- 'Creates a new PdfCode11Barcode.
- Dim code11 As PdfCode11Barcode = New PdfCode11Barcode()
- 'Set the barcode text.
- code11.Text = "012345678"
- 'Get the image for Code32 Barcode.
- Image image= code32.ToImage()
- 'Save the image into Disk
- image.Save("Code32.png", ImageFormat.Png)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Set the barcode font.
- code93.Font = font;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code93.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code93 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Set the barcode font.
- code93.Font = font
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Set the barcode text display location.
- code93.TextDisplayLocation = TextLocation.Bottom;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code93.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code93 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Set the barcode text display location.
- code93.TextDisplayLocation = TextLocation.Bottom
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCodabarBarcode.
- PdfCodabarBarcode codaBarcode = new PdfCodabarBarcode();
- //Set the font to codabarcode.
- codaBarcode.Font = font;
- //Set the barcode text.
- codaBarcode.Text = "0123";
- //Draw a barcode in the new Page.
- codaBarcode.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("CodaBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCodabarBarcode.
- Dim codaBarcode As PdfCodabarBarcode = New PdfCodabarBarcode()
- 'Set the font..
- codaBarcode.Font = font
- 'Set the barcode text.
- codaBarcode.Text = "0123"
- 'Draw a barcode in the new Page.
- codaBarcode.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("CodaBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCodabarBarcode.
- PdfCodabarBarcode codaBarcode = new PdfCodabarBarcode("0123");
- //Set the font to codabarcode.
- codaBarcode.Font = font;
- //Draw a barcode in the new Page.
- codaBarcode.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("CodaBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCodabarBarcode.
- Dim codaBarcode As PdfCodabarBarcode = New PdfCodabarBarcode("0123")
- 'Set the font..
- codaBarcode.Font = font
- 'Draw a barcode in the new Page.
- codaBarcode.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("CodaBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create pdfFont and pdfFont style.
- PdfFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode11Barcode.
- PdfCode11Barcode code11 = new PdfCode11Barcode();
- //Set the pdffont to code11 barcode.
- code11.Font = pdfFont;
- //Set the barcode text.
- code11.Text = "012345678";
- //Draw a barcode in the new Page.
- code11.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code11.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create pdfFont and pdfFont style.
- Dim pdfFont As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode11Barcode.
- Dim code11 As PdfCode11Barcode = New PdfCode11Barcode()
- 'Set the pdffont to code11 barcode.
- code11.Font = pdfFont;
- 'Set the barcode text.
- code11.Text = "012345678"
- 'Draw a barcode in the new Page.
- code11.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code11.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create pdfFont and pdfFont style.
- PdfFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode11Barcode.
- PdfCode11Barcode code11 = new PdfCode11Barcode();
- //Set the pdffont to code11 barcode.
- code11.Font = pdfFont;
- //Set the barcode text.
- code11.Text = "012345678";
- //Draw a barcode in the new Page.
- code11.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code11.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create pdfFont and pdfFont style.
- Dim pdfFont As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode11Barcode.
- Dim code11 As PdfCode11Barcode = New PdfCode11Barcode()
- 'Set the pdffont to code11 barcode.
- code11.Font = pdfFont;
- 'Set the barcode text.
- code11.Text = "012345678"
- 'Draw a barcode in the new Page.
- code11.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code11.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create pdfFont and pdfFont style.
- PdfFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode11Barcode.
- PdfCode11Barcode code11 = new PdfCode11Barcode("012345678");
- //Set the pdffont to code11 barcode.
- code11.Font = pdfFont;
- //Draw a barcode in the new Page.
- code11.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code11.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create pdfFont and pdfFont style.
- Dim pdfFont As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode11Barcode.
- Dim code11 As PdfCode11Barcode = New PdfCode11Barcode("012345678")
- 'Set the pdffont to code11 barcode.
- code11.Font = pdfFont
- 'Draw a barcode in the new Page.
- code11.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code11.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128ABarcode.
- PdfCode128ABarcode code128A = new PdfCode128ABarcode();
- //Set the font to code128A.
- code128A.Font = font;
- //Set the barcode text.
- code128A.Text = "CODE128A";
- //Draw a barcode in the new Page.
- code128A.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128A.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128ABarcode.
- Dim code32 As PdfCode128ABarcode = New PdfCode128ABarcode()
- 'Set the font to code128A.
- code128A.Font = font
- 'Set the barcode text.
- code128A.Text = "Code128A"
- 'Draw a barcode in the new Page.
- code128A.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128A.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128ABarcode.
- PdfCode128ABarcode code128A = new PdfCode128ABarcode();
- //Set the font to code128A.
- code128A.Font = font;
- //Set the barcode text.
- code128A.Text = "CODE128A";
- //Draw a barcode in the new Page.
- code128A.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128A.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128ABarcode.
- Dim code32 As PdfCode128ABarcode = New PdfCode128ABarcode()
- 'Set the font to code128A.
- code128A.Font = font
- 'Set the barcode text.
- code128A.Text = "Code128A"
- 'Draw a barcode in the new Page.
- code128A.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128A.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128ABarcode.
- PdfCode128ABarcode code128A = new PdfCode128ABarcode("Code128A");
- //Set the font to code128A.
- code128A.Font = font;
- //Draw a barcode in the new Page.
- code128A.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128A.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128ABarcode.
- Dim code32 As PdfCode128ABarcode = New PdfCode128ABarcode("Code128A")
- 'Set the font to code128A.
- code128A.Font = font
- 'Draw a barcode in the new Page.
- code128A.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128A.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128CBarcode.
- PdfCode128CBarcode code128C = new PdfCode128CBarcode();
- //Set the font to code128C.
- code128C.Font = font;
- //Set the barcode text.
- code128C.Text = "Code128C";
- //Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128C.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128CBarcode.
- Dim code128C As PdfCode128CBarcode = New PdfCode128CBarcode()
- 'Set the font to code128C.
- code128C.Font = font
- 'Set the barcode text.
- code128C.Text = "Code128C"
- 'Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128C.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128CBarcode.
- PdfCode128CBarcode code128C = new PdfCode128CBarcode();
- //Set the font to code128C.
- code128C.Font = font;
- //Set the barcode text.
- code128C.Text = "Code128C";
- //Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128C.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128CBarcode.
- Dim code128C As PdfCode128CBarcode = New PdfCode128CBarcode()
- 'Set the font to code128C.
- code128C.Font = font
- 'Set the barcode text.
- code128C.Text = "Code128C"
- 'Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128C.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128CBarcode.
- PdfCode128CBarcode code128C = new PdfCode128CBarcode("Code128C");
- //Set the font to code128C.
- code128C.Font = font;
- //Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128C.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128CBarcode.
- Dim code128C As PdfCode128CBarcode = New PdfCode128CBarcode("Code128C")
- 'Set the font to code128C.
- code128C.Font = font
- 'Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128C.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128BBarcode.
- PdfCode128BBarcode code128B = new PdfCode128BBarcode();
- //Set the font to code128B.
- code128B.Font = font;
- //Set the barcode text.
- code128B.Text = "CODE128B";
- //Draw a barcode in the new Page.
- code128B.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128B.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128BBarcode.
- Dim code32 As PdfCode128BBarcode = New PdfCode128BBarcode()
- 'Set the font to code128B.
- code128B.Font = font;
- 'Set the barcode text.
- code128B.Text = "Code128B"
- 'Draw a barcode in the new Page.
- code128B.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128B.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128BBarcode.
- PdfCode128BBarcode code128B = new PdfCode128BBarcode();
- //Set the font to code128B.
- code128B.Font = font;
- //Set the barcode text.
- code128B.Text = "CODE128B";
- //Draw a barcode in the new Page.
- code128B.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128B.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128BBarcode.
- Dim code32 As PdfCode128BBarcode = New PdfCode128BBarcode()
- 'Set the font to code128B.
- code128B.Font = font;
- 'Set the barcode text.
- code128B.Text = "Code128B"
- 'Draw a barcode in the new Page.
- code128B.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128B.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128BBarcode.
- PdfCode128BBarcode code128B = new PdfCode128BBarcode("Code128B");
- //Set the font to code128B.
- code128B.Font = font;
- //Draw a barcode in the new Page.
- code128B.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128B.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128BBarcode.
- Dim code32 As PdfCode128BBarcode = New PdfCode128BBarcode("Code128B")
- 'Set the font to code128B.
- code128B.Font = font;
- 'Draw a barcode in the new Page.
- code128B.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128B.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128CBarcode.
- PdfCode128CBarcode code128C = new PdfCode128CBarcode();
- //Set the font to code128C.
- code128C.Font = font;
- //Set the barcode text.
- code128C.Text = "Code128C";
- //Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128C.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128CBarcode.
- Dim code128C As PdfCode128CBarcode = New PdfCode128CBarcode()
- 'Set the font to code128C.
- code128C.Font = font
- 'Set the barcode text.
- code128C.Text = "Code128C"
- 'Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128C.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128CBarcode.
- PdfCode128CBarcode code128C = new PdfCode128CBarcode();
- //Set the font to code128C.
- code128C.Font = font;
- //Set the barcode text.
- code128C.Text = "Code128C";
- //Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128C.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128CBarcode.
- Dim code128C As PdfCode128CBarcode = New PdfCode128CBarcode()
- 'Set the font to code128C.
- code128C.Font = font
- 'Set the barcode text.
- code128C.Text = "Code128C"
- 'Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128C.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128CBarcode.
- PdfCode128CBarcode code128C = new PdfCode128CBarcode("Code128C");
- //Set the font to code128C.
- code128C.Font = font;
- //Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128C.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128CBarcode.
- Dim code128C As PdfCode128CBarcode = New PdfCode128CBarcode("Code128C")
- 'Set the font to code128C.
- code128C.Font = font
- 'Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128C.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode32Barcode.
- PdfCode32Barcode code32 = new PdfCode32Barcode();
- //Set the font to code32.
- code32.Font = font;
- //Set the barcode text.
- code32.Text = "01234567";
- //Draw a barcode in the new Page.
- code32.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code32.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode32Barcode.
- Dim code32 As PdfCode32Barcode = New PdfCode32Barcode()
- 'Set the font to code32.
- code32.Font = font
- 'Set the barcode text.
- code32.Text = "01234567"
- 'Draw a barcode in the new Page.
- code32.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code32.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode39Barcode.
- PdfCode39Barcode code39 = new PdfCode39Barcode();
- //Set the font to code39.
- code32.Font = font;
- //Set the barcode text.
- code39.Text = "CODE39";
- //Draw a barcode in the new Page.
- code39.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code39.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode39Barcode.
- Dim code39 As PdfCode39Barcode = New PdfCode39Barcode()
- 'Set the font to code39.
- code39.Font = font
- 'Set the barcode text.
- code39.Text = "CODE39"
- 'Draw a barcode in the new Page.
- code39.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code39.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode39Barcode.
- PdfCode39Barcode code39 = new PdfCode39Barcode();
- //Set the font to code39.
- code32.Font = font;
- //Set the barcode text.
- code39.Text = "CODE39";
- //Draw a barcode in the new Page.
- code39.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code39.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode39Barcode.
- Dim code39 As PdfCode39Barcode = New PdfCode39Barcode()
- 'Set the font to code39.
- code39.Font = font
- 'Set the barcode text.
- code39.Text = "CODE39"
- 'Draw a barcode in the new Page.
- code39.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code39.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode39Barcode.
- PdfCode39Barcode code39 = new PdfCode39Barcode("CODE39");
- //Set the font to code39.
- code32.Font = font;
- //Draw a barcode in the new Page.
- code39.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code39.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode39Barcode.
- Dim code39 As PdfCode39Barcode = New PdfCode39Barcode("CODE39")
- 'Set the font to code39.
- code39.Font = font
- 'Draw a barcode in the new Page.
- code39.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code39.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode32Barcode.
- PdfCode32Barcode code32 = new PdfCode32Barcode();
- //Set the font to code32.
- code32.Font = font;
- //Set the barcode text.
- code32.Text = "01234567";
- //Draw a barcode in the new Page.
- code32.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code32.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode32Barcode.
- Dim code32 As PdfCode32Barcode = New PdfCode32Barcode()
- 'Set the font to code32.
- code32.Font = font
- 'Set the barcode text.
- code32.Text = "01234567"
- 'Draw a barcode in the new Page.
- code32.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code32.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode32Barcode.
- PdfCode32Barcode code32 = new PdfCode32Barcode("01234567");
- //Set the font to code32.
- code32.Font = font;
- //Draw a barcode in the new Page.
- code32.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code32.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode32Barcode.
- Dim code32 As PdfCode32Barcode = New PdfCode32Barcode("01234567")
- 'Set the font to code32.
- code32.Font = font
- 'Draw a barcode in the new Page.
- code32.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code32.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode39ExtendedBarcode.
- PdfCode39ExtendedBarcode code39Ext = new PdfCode39ExtendedBarcode();
- //Set the font to code39Ext.
- code39Ext.Font = font;
- //Set the barcode text.
- code39Ext.Text = "Code39Ext";
- //Draw a barcode in the new Page.
- code39Ext.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code39Ext.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode39ExtendedBarcode.
- Dim code39Ext As PdfCode39ExtendedBarcode = New PdfCode39ExtendedBarcode()
- 'Set the font to code39Ext.
- code39Ext.Font = font
- 'Set the barcode text.
- code39Ext.Text = "Code39Ext"
- 'Draw a barcode in the new Page.
- code39Ext.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code39Ext.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode39ExtendedBarcode.
- PdfCode39ExtendedBarcode code39Ext = new PdfCode39ExtendedBarcode();
- //Set the font to code39Ext.
- code39Ext.Font = font;
- //Set the barcode text.
- code39Ext.Text = "Code39Ext";
- //Draw a barcode in the new Page.
- code39Ext.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code39Ext.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode39ExtendedBarcode.
- Dim code39Ext As PdfCode39ExtendedBarcode = New PdfCode39ExtendedBarcode()
- 'Set the font to code39Ext.
- code39Ext.Font = font
- 'Set the barcode text.
- code39Ext.Text = "Code39Ext"
- 'Draw a barcode in the new Page.
- code39Ext.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code39Ext.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode39ExtendedBarcode.
- PdfCode39ExtendedBarcode code39Ext = new PdfCode39ExtendedBarcode("Code39Ext");
- //Set the font to code39Ext.
- code39Ext.Font = font;
- //Draw a barcode in the new Page.
- code39Ext.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code39Ext.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode39ExtendedBarcode.
- Dim code39Ext As PdfCode39ExtendedBarcode = New PdfCode39ExtendedBarcode("Code39Ext")
- 'Set the font to code39Ext.
- code39Ext.Font = font
- 'Draw a barcode in the new Page.
- code39Ext.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code39Ext.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode();
- //Set the font to code93.
- code93.Font = font;
- //Set the barcode text.
- code93.Text = "CODE93";
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code93.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode()
- 'Set the font to code93.
- code93.Font = font
- 'Set the barcode text.
- code93.Text = "CODE93"
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode();
- //Set the font to code93.
- code93.Font = font;
- //Set the barcode text.
- code93.Text = "CODE93";
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code93.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode()
- 'Set the font to code93.
- code93.Font = font
- 'Set the barcode text.
- code93.Text = "CODE93"
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
- //Set the font to code93.
- code93.Font = font;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code93.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
- 'Set the font to code93.
- code93.Font = font
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("code93.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode93ExtendedBarcode.
- PdfCode93ExtendedBarcode code93 = new PdfCode93ExtendedBarcode();
- //Set the font to code93Ext.
- code93Ext.Font = font;
- //Set the barcode text.
- code93Ext.Text = "CODE39Ext";
- //Draw a barcode in the new Page.
- code93Ext.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code93Ext.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode93ExtendedBarcode.
- Dim code93Ext As PdfCode93ExtendedBarcode = New PdfCode93ExtendedBarcode()
- 'Set the font to code93Ext.
- code93Ext.Font = font
- 'Set the barcode text.
- code93Ext.Text = "CODE39Ext"
- 'Draw a barcode in the new Page.
- code93Ext.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code93Ext.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode93ExtendedBarcode.
- PdfCode93ExtendedBarcode code93 = new PdfCode93ExtendedBarcode();
- //Set the font to code93Ext.
- code93Ext.Font = font;
- //Set the barcode text.
- code93Ext.Text = "CODE39Ext";
- //Draw a barcode in the new Page.
- code93Ext.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code93Ext.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode93ExtendedBarcode.
- Dim code93Ext As PdfCode93ExtendedBarcode = New PdfCode93ExtendedBarcode()
- 'Set the font to code93Ext.
- code93Ext.Font = font
- 'Set the barcode text.
- code93Ext.Text = "CODE39Ext"
- 'Draw a barcode in the new Page.
- code93Ext.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code93Ext.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode93ExtendedBarcode.
- PdfCode93ExtendedBarcode code93 = new PdfCode93ExtendedBarcode("Code93Ext");
- //Set the font to code93Ext.
- code93Ext.Font = font;
- //Draw a barcode in the new Page.
- code93Ext.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code93Ext.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode93ExtendedBarcode.
- Dim code93Ext As PdfCode93ExtendedBarcode = New PdfCode93ExtendedBarcode("Code93Ext")
- 'Set the font to code93Ext.
- code93Ext.Font = font
- 'Draw a barcode in the new Page.
- code93Ext.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code93Ext.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCodeUpcBarcode.
- PdfCodeUpcBarcode upcbarcode = new PdfCodeUpcBarcode();
- //Set the font to upc.
- upcbarcode.Font = font;
- //Set the barcode text.
- upcbarcode.Text = "UPC";
- //Draw a barcode in the new Page.
- upcbarcode.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("UPC.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCodeUpcBarcode.
- Dim code32 As PdfCodeUpcBarcode = New PdfCodeUpcBarcode()
- 'Set the font to upc.
- upcbarcode.Font = font;
- 'Set the barcode text.
- upcbarcode.Text = "UPC"
- 'Draw a barcode in the new Page.
- upcbarcode.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("UPC.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCodeUPCBarcode.
- PdfCodeUpcBarcode upcbarcode = new PdfCodeUpcBarcode();
- //Set the font to upc.
- upcbarcode.Font = font;
- //Set the barcode text.
- upcbarcode.Text = "UPC";
- //Draw a barcode in the new Page.
- upcbarcode.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("UPC.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCodeUPCBarcode.
- Dim code32 As PdfCodeUpcBarcode = New PdfCodeUpcBarcode()
- 'Set the font to upc.
- upcbarcode.Font = font;
- 'Set the barcode text.
- upcbarcode.Text = "UPC"
- 'Draw a barcode in the new Page.
- upcbarcode.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("UPC.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCodeUPCBarcode.
- PdfCodeUpcBarcode upcbarcode = new PdfCodeUpcBarcode("UPC");
- //Set the font to upc.
- upcbarcode.Font = font;
- //Draw a barcode in the new Page.
- upcbarcode.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("UPC.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCodeUPCBarcode.
- Dim code32 As PdfCodeUpcBarcode = New PdfCodeUpcBarcode("UPC")
- 'Set the font to upc.
- upcbarcode.Font = font;
- 'Draw a barcode in the new Page.
- upcbarcode.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("UPC.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128CBarcode.
- PdfCode128CBarcode code128C = new PdfCode128CBarcode();
- //Set the font to code128C.
- code128C.Font = font;
- //Set the barcode text.
- code128C.Text = "Code128C";
- //Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128C.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128CBarcode.
- Dim code128C As PdfCode128CBarcode = New PdfCode128CBarcode()
- 'Set the font to code128C.
- code128C.Font = font
- 'Set the barcode text.
- code128C.Text = "Code128C"
- 'Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128C.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128CBarcode.
- PdfCode128CBarcode code128C = new PdfCode128CBarcode();
- //Set the font to code128C.
- code128C.Font = font;
- //Set the barcode text.
- code128C.Text = "Code128C";
- //Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128C.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128CBarcode.
- Dim code128C As PdfCode128CBarcode = New PdfCode128CBarcode()
- 'Set the font to code128C.
- code128C.Font = font
- 'Set the barcode text.
- code128C.Text = "Code128C"
- 'Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128C.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfCode128CBarcode.
- PdfCode128CBarcode code128C = new PdfCode128CBarcode("Code128C");
- //Set the font to code128C.
- code128C.Font = font;
- //Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("Code128C.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Creates a new PdfCode128CBarcode.
- Dim code128C As PdfCode128CBarcode = New PdfCode128CBarcode("Code128C")
- 'Set the font to code128C.
- code128C.Font = font
- 'Draw a barcode in the new Page.
- code128C.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("Code128C.pdf")
-
-
- //Creates a new PdfQRBarcode.
- PdfQRBarcode qrCode = new PdfQRBarcode();
- //Set the barcode text.
- qrCode.Text = "012345678";
- //Get the image for QR Barcode.
- Image image= qrCode.ToImage();
- //Save the image into Disk
- image.Save("QRCode.png", ImageFormat.Png);
-
-
- 'Creates a new PdfQRBarcode.
- Dim qrCode As PdfQRBarcode = New PdfQRBarcode()
- 'Set the barcode text.
- qrCode.Text = "012345678"
- 'Get the image for Code32 Barcode.
- Image image= qrCode.ToImage()
- 'Save the image into Disk
- image.Save("QRCode.png", ImageFormat.Png)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfQRBarcode.
- PdfQRBarcode qrCode = new PdfQRBarcode();
- //Set the barcode text.
- qrCode.Text = "012345678";
- //Draw a barcode in the new Page.
- qrCode.Draw(page, new PointF(25, 500));
- //Save the document to disk.
- document.Save("QRBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfQRBarcode.
- Dim qrCode As PdfQRBarcode = New PdfQRBarcode()
- 'Set the barcode text.
- qrCode.Text = "012345678"
- 'Draw a barcode in the new Page.
- qrCode.Draw(page, new PointF(25, 500))
- 'Save the document to disk.
- document.Save("QRBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Creates a new PdfQRBarcode.
- PdfQRBarcode qrCode = new PdfQRBarcode();
- //Set the barcode text.
- qrCode.Text = "012345678";
- qrCode.Location = new PointF(100,100);
- //Draw a barcode in the new Page.
- qrCode.Draw(page);
- //Save the document to disk.
- document.Save("QRBarcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfQRBarcode.
- Dim qrCode As PdfQRBarcode = New PdfQRBarcode()
- 'Set the barcode text.
- qrCode.Text = "012345678"
- qrCode.Location = new PointF(100,100);
- 'Draw a barcode in the new Page.
- qrCode.Draw(page)
- 'Save the document to disk.
- document.Save("QRBarcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode();
- //Set the barcode text location.
- code93.TextDisplayLocation = TextLocation.Bottom;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("Barcode.pdf");
-
-
- ' Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode()
- 'Set the barcode text location.
- code93.TextDisplayLocation = TextLocation.Bottom
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document.
- document.Save("Barcode.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Creates a new PdfCode93Barcode.
- PdfCode93Barcode code93 = new PdfCode93Barcode();
- //Set the barcode text alignment
- code93.TextAlignment = PdfBarcodeTextAlignment.Center;
- //Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500));
- //Save document to disk.
- document.Save("Barcode.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new PdfCode93Barcode.
- Dim code39 As PdfCode93Barcode = New PdfCode93Barcode()
- 'Set the barcode text alignment
- code93.TextAlignment = PdfBarcodeTextAlignment.Center
- 'Draw a barcode in the new Page.
- code93.Draw(page, new PointF(25, 500))
- 'Save the document.
- document.Save("Barcode.pdf")
-
-
- public static GridModel LoadSoap(Stream s)
- {
- try
- {
- AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(GridAssembly.AssemblyResolver);
- SoapFormatter b = new SoapFormatter();
- b.AssemblyFormat = FormatterAssemblyStyle.Simple;
- GridModel t = b.Deserialize(s) as GridModel;
- t.Modified = false;
- return t;
- }
- finally
- {
- AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(GridAssembly.AssemblyResolver);
- }
- }
-
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Font = font;
- submitButton.Text = "Goto";
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new page and adds it as the last page of the document
- PdfPage pdfPages = document.Pages.Add();
- //Create a new PdfGoToAction
- PdfGoToAction gotoAction = new PdfGoToAction(pdfPages);
- //Add the gotoAction
- submitButton.Actions.GotFocus = gotoAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("GoToAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F, PdfFontStyle.Bold)
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Font = font
- submitButton.Text = "Goto"
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new page and adds it as the last page of the document
- Dim pdfPages As PdfPage = document.Pages.Add()
- 'Create a new PdfGoToAction
- Dim gotoAction As New PdfGoToAction(pdfPages)
- 'Add the gotoAction
- submitButton.Actions.GotFocus = gotoAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("GoToAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Create a new PdfButtonField.
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- //Set the bounds
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- //Set the submitButton Font.
- submitButton.Font = font;
- //Set the submit button text
- submitButton.Text = "Apply";
- //Set the submit button back color
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new PdfFormAction.
- PdfFormAction formAction = new PdfFormAction();
- formAction.Include = true;
- //Set the submit button action.
- submitButton.Actions.GotFocus = formAction;
- //Add the submit button to the new document.
- document.Form.Fields.Add(submitButton);
- //Save and close the document
- document.Save("FormAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F, PdfFontStyle.Bold)
- 'Create a new PdfButtonField.
- Dim submitButton As New PdfButtonField(page, "submitButton")
- 'Set the bounds
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- 'Set the submitButton Font.
- submitButton.Font = font
- 'Set the submit button text
- submitButton.Text = "Apply"
- 'Set the submit button back color
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new PdfFormAction.
- Dim formAction As New PdfFormAction()
- formAction.Include = True
- 'Set the submit button action.
- submitButton.Actions.GotFocus = formAction
- 'Add the submit button to the new document.
- document.Form.Fields.Add(submitButton)
- 'Save and close the document
- document.Save("FormAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Create a new PdfButtonField.
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- //Set the bounds
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- //Set the submitButton Font.
- submitButton.Font = font;
- //Set the submit button text
- submitButton.Text = "Apply";
- //Set the submit button back color
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new PdfFormAction.
- PdfFormAction formAction = new PdfFormAction();
- formAction.Include = true;
- //Set the submit button action.
- submitButton.Actions.GotFocus = formAction;
- //Add the submit button to the new document.
- document.Form.Fields.Add(submitButton);
- //Save and close the document
- document.Save("FormAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F, PdfFontStyle.Bold)
- 'Create a new PdfButtonField.
- Dim submitButton As New PdfButtonField(page, "submitButton")
- 'Set the bounds
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- 'Set the submitButton Font.
- submitButton.Font = font
- 'Set the submit button text
- submitButton.Text = "Apply"
- 'Set the submit button back color
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new PdfFormAction.
- Dim formAction As New PdfFormAction()
- formAction.Include = True
- 'Set the submit button action.
- submitButton.Actions.GotFocus = formAction
- 'Add the submit button to the new document.
- document.Form.Fields.Add(submitButton)
- 'Save and close the document
- document.Save("FormAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Create a new PdfButtonField.
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- //Set the bounds
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- //Set the submitButton Font.
- submitButton.Font = font;
- //Set the submit button text
- submitButton.Text = "Apply";
- //Set the submit button back color
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new PdfFormAction.
- PdfFormAction formAction = new PdfFormAction();
- formAction.Include = true;
- //Set the submit button action.
- submitButton.Actions.GotFocus = formAction;
- //Add the submit button to the new document.
- document.Form.Fields.Add(submitButton);
- //Save and close the document
- document.Save("FormAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F, PdfFontStyle.Bold)
- 'Create a new PdfButtonField.
- Dim submitButton As New PdfButtonField(page, "submitButton")
- 'Set the bounds
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- 'Set the submitButton Font.
- submitButton.Font = font
- 'Set the submit button text
- submitButton.Text = "Apply"
- 'Set the submit button back color
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new PdfFormAction.
- Dim formAction As New PdfFormAction()
- formAction.Include = True
- 'Set the submit button action.
- submitButton.Actions.GotFocus = formAction
- 'Add the submit button to the new document.
- document.Form.Fields.Add(submitButton)
- 'Save and close the document
- document.Save("FormAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField.
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- //Set the submitButton Bounds.
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- //Create a new PdfFormAction.
- PdfFormAction formAction = new PdfFormAction();
- //Gets the FieldCollection from formAction
- PdfFieldCollection fields = formAction.Fields;
- //Set actions to submit button
- submitButton.Actions.GotFocus = formAction;
- //Add the submit button to the new document.
- document.Form.Fields.Add(submitButton);
- //Add the submit button to the new document.
- document.Form.Fields.Add(submitButton);
- //Save document
- document.Save("FormAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField.
- Dim submitButton As New PdfButtonField(page, "submitButton")
- 'Set the submitButton Bounds.
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- 'Create a new PdfFormAction.
- Dim formAction As New PdfFormAction()
- 'Gets the FieldCollection from formAction
- Dim fields As PdfFieldCollection = formAction.Fields
- 'Set actions to submit button
- submitButton.Actions.GotFocus = formAction
- 'Add the submit button to the new document.
- document.Form.Fields.Add(submitButton)
- 'Add the submit button to the new document.
- document.Form.Fields.Add(submitButton)
- 'Save document
- document.Save("FormAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Font = font;
- submitButton.Text = "Goto";
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new page and adds it as the last page of the document
- PdfPage pdfPages = document.Pages.Add();
- //Create a new PdfGoToAction
- PdfGoToAction gotoAction = new PdfGoToAction(pdfPages);
- //Add the gotoAction
- submitButton.Actions.GotFocus = gotoAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("GoToAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F, PdfFontStyle.Bold)
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Font = font
- submitButton.Text = "Goto"
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new page and adds it as the last page of the document
- Dim pdfPages As PdfPage = document.Pages.Add()
- 'Create a new PdfGoToAction
- Dim gotoAction As New PdfGoToAction(pdfPages)
- 'Add the gotoAction
- submitButton.Actions.GotFocus = gotoAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("GoToAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Font = font;
- submitButton.Text = "Goto";
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new page and adds it as the last page of the document
- PdfPage pdfPages = document.Pages.Add();
- //Create a new PdfDestination
- PdfDestination destination = new PdfDestination(pdfPages);
- //Set the PdfDestinationMode
- destination.Mode = PdfDestinationMode.FitToPage;
- //Create a new PdfGoToAction
- PdfGoToAction gotoAction = new PdfGoToAction(destination);
- //Add the gotoAction
- submitButton.Actions.GotFocus = gotoAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("GoToAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F, PdfFontStyle.Bold)
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Font = font
- submitButton.Text = "Goto"
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new page and adds it as the last page of the document
- Dim pdfPages As PdfPage = document.Pages.Add()
- 'Create a new PdfDestination
- Dim destination As New PdfDestination(pdfPages)
- 'Set the PdfDestinationMode
- destination.Mode = PdfDestinationMode.FitToPage
- 'Create a new PdfGoToAction
- Dim gotoAction As New PdfGoToAction(destination)
- 'Add the gotoAction
- submitButton.Actions.GotFocus = gotoAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("GoToAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Font = font;
- submitButton.Text = "Goto";
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new page and adds it as the last page of the document
- PdfPage pdfPages = document.Pages.Add();
- //Create a new PdfGoToAction
- PdfGoToAction gotoAction = new PdfGoToAction(pdfPages);
- //Add the gotoAction
- submitButton.Actions.GotFocus = gotoAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("GoToAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F, PdfFontStyle.Bold)
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Font = font
- submitButton.Text = "Goto"
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new page and adds it as the last page of the document
- Dim pdfPages As PdfPage = document.Pages.Add()
- 'Create a new PdfGoToAction
- Dim gotoAction As New PdfGoToAction(pdfPages)
- 'Add the gotoAction
- submitButton.Actions.GotFocus = gotoAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("GoToAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Font = font;
- submitButton.Text = "Goto";
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new page and adds it as the last page of the document
- PdfPage pdfPages = document.Pages.Add();
- //Create a new PdfDestination
- PdfDestination destination = new PdfDestination(pdfPages);
- //Set the PdfDestinationMode
- destination.Mode = PdfDestinationMode.FitToPage;
- //Create a new PdfGoToAction
- PdfGoToAction gotoAction = new PdfGoToAction(pdfPages);
- //Set the destination
- gotoAction.Destination = destination;
- //Add the gotoAction
- submitButton.Actions.GotFocus = gotoAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("GoToAction.pdf");
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F, PdfFontStyle.Bold)
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Font = font
- submitButton.Text = "Goto"
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new page and adds it as the last page of the document
- Dim pdfPages As PdfPage = document.Pages.Add()
- 'Create a new PdfDestination
- Dim destination As New PdfDestination(pdfPages)
- 'Set the PdfDestinationMode
- destination.Mode = PdfDestinationMode.FitToPage
- 'Create a new PdfGoToAction
- Dim gotoAction As New PdfGoToAction(pdfPages)
- 'Set the destination
- gotoAction.Destination = destination
- 'Add the gotoAction
- submitButton.Actions.GotFocus = gotoAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("GoToAction.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create JavaScript action
- PdfJavaScriptAction javaScriptAction = new PdfJavaScriptAction("app.alert(\"Hello World!!!\")");
- //Add the JavaScript action
- document.Actions.AfterOpen = javaScriptAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create JavaScript action
- Dim javaScriptAction As New PdfJavaScriptAction("app.alert(""Hello World!!!"")")
- 'Add the JavaScript action
- document.Actions.AfterOpen = javaScriptAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create JavaScript action
- PdfJavaScriptAction javaScriptAction = new PdfJavaScriptAction("app.alert(\"Hello World!!!\")");
- //Add the JavaScript action
- document.Actions.AfterOpen = javaScriptAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create JavaScript action
- Dim javaScriptAction As New PdfJavaScriptAction("app.alert(""Hello World!!!"")")
- 'Add the JavaScript action
- document.Actions.AfterOpen = javaScriptAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create JavaScript action
- PdfJavaScriptAction javaScriptAction = new PdfJavaScriptAction("app.alert(\"Hello World!!!\")");
- //Get the javascript code.
- string javascriptcode = javaScriptAction.JavaScript;
- //Add the JavaScript action
- document.Actions.AfterOpen = javaScriptAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create JavaScript action
- Dim javaScriptAction As New PdfJavaScriptAction("app.alert(""Hello World!!!"")")
- 'Get the javascript code.
- Dim javascriptcode As String = javaScriptAction.JavaScript
- 'Add the JavaScript action
- document.Actions.AfterOpen = javaScriptAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create and add new launch Action to the document
- PdfLaunchAction action = new PdfLaunchAction("logo.png");
- document.Actions.AfterOpen = action;
- //Save the document
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Create and add new launch Action to the document
- Dim action As New PdfLaunchAction("logo.png")
- document.Actions.AfterOpen = action
- 'Save the document
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create and add new launch Action to the document
- PdfLaunchAction action = new PdfLaunchAction("logo.png");
- document.Actions.AfterOpen = action;
- //Save the document
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Create and add new launch Action to the document
- Dim action As New PdfLaunchAction("logo.png")
- document.Actions.AfterOpen = action
- 'Save the document
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create and add new launch Action to the document
- PdfLaunchAction action = new PdfLaunchAction("../../Data/logo.png",PdfFilePathType.Absolute);
- document.Actions.AfterOpen = action;
- //Save the document
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Create and add new launch Action to the document
- Dim action As New PdfLaunchAction("../../Data/logo.png",PdfFilePathType.Absolute)
- document.Actions.AfterOpen = action
- 'Save the document
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create and add new launch Action to the document
- PdfLaunchAction action = new PdfLaunchAction("logo.png");
- //Get file name
- string fileName = action.FileName;
- document.Actions.AfterOpen = action;
- //Save the document
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Create and add new launch Action to the document
- Dim action As New PdfLaunchAction("logo.png")
- 'Get file name
- Dim fileName As String = action.FileName
- document.Actions.AfterOpen = action
- 'Save the document
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- document.Pages.Add();
- document.Pages.Add();
- //Create a named action
- PdfNamedAction namedAction = new PdfNamedAction(PdfActionDestination.LastPage);
- //Add the named action
- document.Actions.AfterOpen = namedAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- document.Pages.Add()
- document.Pages.Add()
- 'Create a named action
- Dim namedAction As New PdfNamedAction(PdfActionDestination.LastPage)
- 'Add the named action
- document.Actions.AfterOpen = namedAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- document.Pages.Add();
- document.Pages.Add();
- //Create a named action
- PdfNamedAction namedAction = new PdfNamedAction(PdfActionDestination.LastPage);
- //Set the destination
- namedAction.Destination = PdfActionDestination.NextPage;
- //Add the named action
- document.Actions.AfterOpen = namedAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- document.Pages.Add()
- document.Pages.Add()
- 'Create a named action
- Dim namedAction As New PdfNamedAction(PdfActionDestination.LastPage)
- 'Set the destination
- namedAction.Destination = PdfActionDestination.NextPage
- 'Add the named action
- document.Actions.AfterOpen = namedAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- document.Pages.Add();
- document.Pages.Add();
- //Create a named action
- PdfNamedAction namedAction = new PdfNamedAction(PdfActionDestination.LastPage);
- //Set the destination
- namedAction.Destination = PdfActionDestination.NextPage;
- //Add the named action
- document.Actions.AfterOpen = namedAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- document.Pages.Add()
- document.Pages.Add()
- 'Create a named action
- Dim namedAction As New PdfNamedAction(PdfActionDestination.LastPage)
- 'Set the destination
- namedAction.Destination = PdfActionDestination.NextPage
- 'Add the named action
- document.Actions.AfterOpen = namedAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"Input.txt");
- //Set the launch action to submit button
- submitButton.Actions.MouseLeave = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("Input.txt")
- 'Set the launch action to submit button
- submitButton.Actions.MouseLeave = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("Output.pdf")
- document.Close(True)
-
-
- PdfAnnotationActions annotationActions = new PdfAnnotationActions();
- //Create a new PdfJavaScriptAction
- PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
- annotationActions.MouseEnter = javaAction;
-
-
- Dim annotationActions As PdfAnnotationActions = New PdfAnnotationActions()
- 'Create a new PdfJavaScriptAction.
- Dim javaAction As PdfJavaScriptAction = New PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")")
- annotationActions.MouseEnter = javaAction
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.MouseEnter = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.MouseEnter = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.MouseLeave = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.MouseLeave = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.MouseDown = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.MouseDown = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.MouseUp = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.MouseUp = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.GotFocus = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.GotFocus = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.LostFocus = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Creata a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.LostFocus = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create and add new launch action to the document
- PdfLaunchAction action = new PdfLaunchAction("logo.png");
- document.Actions.AfterOpen = action;
- //Save the document
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Create and add new launch action to the document
- Dim action As New PdfLaunchAction("logo.png")
- document.Actions.AfterOpen = action
- 'Save the document
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create and add new launch action to the document
- PdfLaunchAction action = new PdfLaunchAction("logo.png");
- document.Actions.AfterOpen = action;
- //Save the document
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Create and add new launch action to the document
- Dim action As New PdfLaunchAction("logo.png")
- document.Actions.AfterOpen = action
- 'Save the document
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create JavaScript action
- PdfJavaScriptAction javaScriptAction = new PdfJavaScriptAction("app.alert(\"Hello World!!!\")");
- //Add the JavaScript action
- document.Actions.BeforeClose = javaScriptAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create JavaScript action
- Dim javaScriptAction As New PdfJavaScriptAction("app.alert(""Hello World!!!"")")
- 'Add the JavaScript action
- document.Actions.BeforeClose = javaScriptAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create JavaScript action
- PdfJavaScriptAction javaScriptAction = new PdfJavaScriptAction("app.alert(\"Hello World!!!\")");
- //Add the JavaScript action
- document.Actions.BeforeSave = javaScriptAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create JavaScript action
- Dim javaScriptAction As New PdfJavaScriptAction("app.alert(""Hello World!!!"")")
- 'Add the JavaScript action
- document.Actions.BeforeSave = javaScriptAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create JavaScript action
- PdfJavaScriptAction javaScriptAction = new PdfJavaScriptAction("app.alert(\"Hello World!!!\")");
- //Add the JavaScript action
- document.Actions.AfterSave = javaScriptAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create JavaScript action
- Dim javaScriptAction As New PdfJavaScriptAction("app.alert(""Hello World!!!"")")
- 'Add the JavaScript action
- document.Actions.AfterSave = javaScriptAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create JavaScript action
- PdfJavaScriptAction javaScriptAction = new PdfJavaScriptAction("app.alert(\"Hello World!!!\")");
- //Add the JavaScript action
- document.Actions.BeforePrint = javaScriptAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create JavaScript action
- Dim javaScriptAction As New PdfJavaScriptAction("app.alert(""Hello World!!!"")")
- 'Add the JavaScript action
- document.Actions.BeforePrint = javaScriptAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create JavaScript action
- PdfJavaScriptAction javaScriptAction = new PdfJavaScriptAction("app.alert(\"Hello World!!!\")");
- //Add the JavaScript action
- document.Actions.AfterPrint = javaScriptAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create JavaScript action
- Dim javaScriptAction As New PdfJavaScriptAction("app.alert(""Hello World!!!"")")
- 'Add the JavaScript action
- document.Actions.AfterPrint = javaScriptAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.MouseLeave = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.MouseLeave = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Apply";
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new PdfJavaScriptAction
- PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
- //Set the javaAction to submitButton
- submitButton.Actions.KeyPressed = javaAction;
- //Add the submit button to the new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("JavaScriptAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Apply"
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new PdfJavaScriptAction
- Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
- 'Set the javaAction to submitButton
- submitButton.Actions.KeyPressed = javaAction
- 'Add the submit button to the new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("JavaScriptAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Apply";
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new PdfJavaScriptAction
- PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
- //Set the javaAction to submitButton
- submitButton.Actions.Format = javaAction;
- //Add the submit button to the new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("JavaScriptAction.pdf");
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Apply"
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new PdfJavaScriptAction
- Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
- 'Set the javaAction to submitButton
- submitButton.Actions.Format = javaAction
- 'Add the submit button to the new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("JavaScriptAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Apply";
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new PdfJavaScriptAction
- PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
- //Set the javaAction to submitButton
- submitButton.Actions.Validate = javaAction;
- //Add the submit button to the new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("JavaScriptAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Apply"
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new PdfJavaScriptAction
- Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
- 'Set the javaAction to submitButton
- submitButton.Actions.Validate = javaAction
- 'Add the submit button to the new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("JavaScriptAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Apply";
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new PdfJavaScriptAction
- PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
- //Set the javaAction to submitButton
- submitButton.Actions.Calculate = javaAction;
- //Add the submit button to the new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("JavaScriptAction.pdf");
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Apply"
- submitButton.BackColor = New PdfColor(181, 191, 203)
- 'Create a new PdfJavaScriptAction
- Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
- 'Set the javaAction to submitButton
- submitButton.Actions.Calculate = javaAction
- 'Add the submit button to the new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("JavaScriptAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.MouseEnter = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.MouseEnter = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.MouseLeave = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.MouseLeave = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.MouseUp = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.MouseUp = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.MouseDown = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.MouseDown = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.GotFocus = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.GotFocus = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt");
- //Set the launch action to submit button
- submitButton.Actions.LostFocus = launchAction;
- //Add the submit button to a new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("LaunchAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction
- Dim launchAction As New PdfLaunchAction("..\..\Data\Sample.txt")
- 'Set the launch action to submit button
- submitButton.Actions.LostFocus = launchAction
- 'Add the submit button to a new document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("LaunchAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Apply";
- //Create a new PdfResetAction
- PdfResetAction resetAction = new PdfResetAction();
- //Set the resetAction to submitButton
- submitButton.Actions.GotFocus = resetAction;
- //Add the submit button to a document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("ResetAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Apply"
- 'Create a new PdfResetAction
- Dim resetAction As New PdfResetAction()
- 'Set the resetAction to submitButton
- submitButton.Actions.GotFocus = resetAction
- 'Add the submit button to a document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("ResetAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Apply";
- //Create a new PdfResetAction
- PdfResetAction resetAction = new PdfResetAction();
- //Set the resetAction to submitButton
- submitButton.Actions.GotFocus = resetAction;
- //Add the submit button to a document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("ResetAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Apply"
- 'Create a new PdfResetAction
- Dim resetAction As New PdfResetAction()
- 'Set the resetAction to submitButton
- submitButton.Actions.GotFocus = resetAction
- 'Add the submit button to a document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("ResetAction.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a PdfButtonField
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- submitButton.Text = "Apply";
- //Create a new PdfResetAction
- PdfResetAction resetAction = new PdfResetAction();
- resetAction.Include=true;
- //Set the resetAction to submitButton
- submitButton.Actions.GotFocus = resetAction;
- //Add the submit button to a document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("ResetAction.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a PdfButtonField
- Dim submitButton As New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- submitButton.Text = "Apply"
- 'Create a new PdfResetAction
- Dim resetAction As New PdfResetAction()
- resetAction.Include=True
- 'Set the resetAction to submitButton
- submitButton.Actions.GotFocus = resetAction
- 'Add the submit button to a document.
- document.Form.Fields.Add(submitButton)
- 'Save document to disk.
- document.Save("ResetAction.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create a sound action
- PdfSoundAction soundAction = new PdfSoundAction("../../Data/Startup.wav");
- soundAction.Sound.Bits = 16;
- soundAction.Sound.Channels = PdfSoundChannels.Stereo;
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAction.Volume = 0.9f;
- //Set the sound action
- document.Actions.AfterOpen = soundAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a sound action
- Dim soundAction As New PdfSoundAction("../../Data/Startup.wav")
- soundAction.Sound.Bits = 16
- soundAction.Sound.Channels = PdfSoundChannels.Stereo
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed
- soundAction.Volume = 0.9F
- 'Set the sound action
- document.Actions.AfterOpen = soundAction
- 'Save and close the PDF
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create a sound action
- PdfSoundAction soundAction = new PdfSoundAction("../../Data/Startup.wav");
- soundAction.Sound.Bits = 16;
- soundAction.Sound.Channels = PdfSoundChannels.Stereo;
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAction.Volume = 0.9f;
- //Set the sound action
- document.Actions.AfterOpen = soundAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a sound action
- Dim soundAction As New PdfSoundAction("../../Data/Startup.wav")
- soundAction.Sound.Bits = 16
- soundAction.Sound.Channels = PdfSoundChannels.Stereo
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed
- soundAction.Volume = 0.9F
- 'Set the sound action
- document.Actions.AfterOpen = soundAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create a sound action
- PdfSoundAction soundAction = new PdfSoundAction("../../Data/Startup.wav");
- soundAction.Sound.Bits = 16;
- soundAction.Sound.Channels = PdfSoundChannels.Stereo;
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAction.Volume = 0.9f;
- //Set the sound action
- document.Actions.AfterOpen = soundAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a sound action
- Dim soundAction As New PdfSoundAction("../../Data/Startup.wav")
- soundAction.Sound.Bits = 16
- soundAction.Sound.Channels = PdfSoundChannels.Stereo
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed
- soundAction.Volume = 0.9F
- 'Set the sound action
- document.Actions.AfterOpen = soundAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create a sound action
- PdfSoundAction soundAction = new PdfSoundAction("../../Data/Startup.wav");
- soundAction.Sound.Bits = 16;
- soundAction.Sound.Channels = PdfSoundChannels.Stereo;
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAction.Volume = 0.9f;
- //Get the fileName form soundAction
- string fileName=soundAction.FileName;
- //Set the sound action
- document.Actions.AfterOpen = soundAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a sound action
- Dim soundAction As New PdfSoundAction("../../Data/Startup.wav")
- soundAction.Sound.Bits = 16
- soundAction.Sound.Channels = PdfSoundChannels.Stereo
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed
- soundAction.Volume = 0.9F
- 'Get the fileName form soundAction
- Dim fileName as string =soundAction.FileName;
- 'Set the sound action
- document.Actions.AfterOpen = soundAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create a sound action
- PdfSoundAction soundAction = new PdfSoundAction("../../Data/Startup.wav");
- soundAction.Sound.Bits = 16;
- soundAction.Sound.Channels = PdfSoundChannels.Stereo;
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAction.Volume = 0.9f;
- //Set the sound action
- document.Actions.AfterOpen = soundAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a sound action
- Dim soundAction As New PdfSoundAction("../../Data/Startup.wav")
- soundAction.Sound.Bits = 16
- soundAction.Sound.Channels = PdfSoundChannels.Stereo
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed
- soundAction.Volume = 0.9F
- 'Set the sound action
- document.Actions.AfterOpen = soundAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create a sound action
- PdfSoundAction soundAction = new PdfSoundAction("../../Data/Startup.wav");
- soundAction.Sound.Bits = 16;
- soundAction.Sound.Channels = PdfSoundChannels.Stereo;
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAction.Volume = 0.9f;
- soundAction.Synchronous = true;
- //Set the sound action
- document.Actions.AfterOpen = soundAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a sound action
- Dim soundAction As New PdfSoundAction("../../Data/Startup.wav")
- soundAction.Sound.Bits = 16
- soundAction.Sound.Channels = PdfSoundChannels.Stereo
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed
- soundAction.Volume = 0.9F
- soundAction.Synchronous = True
- 'Set the sound action
- document.Actions.AfterOpen = soundAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create a sound action
- PdfSoundAction soundAction = new PdfSoundAction("../../Data/Startup.wav");
- soundAction.Sound.Bits = 16;
- soundAction.Sound.Channels = PdfSoundChannels.Stereo;
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAction.Volume = 0.9f;
- soundAction.Repeat = true;
- //Set the sound action
- document.Actions.AfterOpen = soundAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a sound action
- Dim soundAction As New PdfSoundAction("../../Data/Startup.wav")
- soundAction.Sound.Bits = 16
- soundAction.Sound.Channels = PdfSoundChannels.Stereo
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed
- soundAction.Volume = 0.9F
- soundAction.Repeat = True
- 'Set the sound action
- document.Actions.AfterOpen = soundAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create a sound action
- PdfSoundAction soundAction = new PdfSoundAction("../../Data/Startup.wav");
- soundAction.Sound.Bits = 16;
- soundAction.Sound.Channels = PdfSoundChannels.Stereo;
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAction.Volume = 0.9f;
- soundAction.Mix = true;
- //Set the sound action
- document.Actions.AfterOpen = soundAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a sound action
- Dim soundAction As New PdfSoundAction("../../Data/Startup.wav")
- soundAction.Sound.Bits = 16
- soundAction.Sound.Channels = PdfSoundChannels.Stereo
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed
- soundAction.Volume = 0.9F
- soundAction.Mix = True
- 'Set the sound action
- document.Actions.AfterOpen = soundAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- // Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- // Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
- submitAction.DataFormat = SubmitDataFormat.Html;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- ' Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- submitAction.DataFormat = SubmitDataFormat.Html
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- // Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- // Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction(""http://www.example.com/Submit.aspx"");
- submitAction.DataFormat = SubmitDataFormat.Html;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- ' Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- submitAction.DataFormat = SubmitDataFormat.Html
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- // Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- // Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction(""http://www.example.com/Submit.aspx"");
- submitAction.DataFormat = SubmitDataFormat.Html;
- string url=submitAction.Url;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- ' Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Gets the url form the submit action
- Dim url As String=submitAction.Url
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- //Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- //Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction(""http://www.example.com/Submit.aspx"");
- submitAction.DataFormat = SubmitDataFormat.Html;
- //Set the HttpMethod to submit action
- submitAction.HttpMethod=HttpMethod.Post;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- 'Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- 'Set the HttpMethod to submit action
- submitAction.HttpMethod=HttpMethod.Post
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- // Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- // Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
- submitAction.DataFormat = SubmitDataFormat.Html;
- //Sets the CanonicalDateTimeFormat to submit action
- submitAction.CanonicalDateTimeFormat=true;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- ' Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Sets the CanonicalDateTimeFormat to submit action
- submitAction.CanonicalDateTimeFormat=True
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- // Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- // Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
- submitAction.DataFormat = SubmitDataFormat.Html;
- 'Sets the SubmitCoordinates to submit action
- submitAction.SubmitCoordinates=true;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- ' Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Sets the SubmitCoordinates to submit action
- submitAction.SubmitCoordinates=True
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- // Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- // Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
- submitAction.DataFormat = SubmitDataFormat.Html;
- //Sets the IncludeNoValueFields to submit action
- submitAction.IncludeNoValueFields=true;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- ' Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Sets the IncludeNoValueFields to submit action
- submitAction.IncludeNoValueFields=true
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- // Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- // Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
- submitAction.DataFormat = SubmitDataFormat.Html;
- //Set the IncludeIncrementalUpdates to submit action
- submitAction.IncludeIncrementalUpdates=true;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- ' Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Sets the IncludeIncrementalUpdates to submit action
- submitAction.IncludeIncrementalUpdates=True
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- // Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- // Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
- submitAction.DataFormat = SubmitDataFormat.Html;
- //Sets the IncludeAnnotations to submit action
- submitAction.IncludeAnnotations=true;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- ' Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Sets the IncludeAnnotations to submit action
- submitAction.IncludeAnnotations=True
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- // Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- // Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
- submitAction.DataFormat = SubmitDataFormat.Html;
- //Set the ExcludeNonUserAnnotations to submit action
- submitAction.ExcludeNonUserAnnotations=true;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- ' Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Set the ExcludeNonUserAnnotations to submit action
- submitAction.ExcludeNonUserAnnotations=True
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- // Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- // Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
- submitAction.DataFormat = SubmitDataFormat.Html;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- ' Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- submitAction.DataFormat = SubmitDataFormat.Html
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add a new page
- PdfPage page = document.Pages.Add();
- // Create a Button field.
- PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
- submitButton.Bounds = new RectangleF(100, 60, 50, 20);
- submitButton.ToolTip = "Submit";
- document.Form.Fields.Add(submitButton);
- // Create a submit action. It submit the data of the form fields to the mentioned URL
- PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
- submitAction.DataFormat = SubmitDataFormat.Html;
- //Sets the Include option to submit action
- submitAction.Include=true;
- submitButton.Actions.GotFocus = submitAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a Button field.
- Dim submitButton As New PdfButtonField(page, "Submit data")
- submitButton.Bounds = New RectangleF(100, 60, 50, 20)
- submitButton.ToolTip = "Submit"
- document.Form.Fields.Add(submitButton)
- ' Create a submit action. It submit the data of the form fields to the mentioned URL
- Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Sets the Include option to submit action
- submitAction.Include=True
- submitButton.Actions.GotFocus = submitAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document with PDF/A standard.
- PdfDocument document = new PdfDocument();
- //Create a Uri action
- PdfUriAction uriAction = new PdfUriAction("http://www.google.com");
- //Add the action to the document
- document.Actions.AfterOpen = uriAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document with PDF/A standard.
- Dim document As New PdfDocument()
- 'Create a Uri action
- Dim uriAction As New PdfUriAction("http://www.google.com")
- 'Add the action to the document
- document.Actions.AfterOpen = uriAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document with PDF/A standard.
- PdfDocument document = new PdfDocument();
- //Create a Uri action
- PdfUriAction uriAction = new PdfUriAction();
- //Add the action to the document
- document.Actions.AfterOpen = uriAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document with PDF/A standard.
- Dim document As New PdfDocument()
- 'Create a Uri action
- Dim uriAction As New PdfUriAction()
- 'Add the action to the document
- document.Actions.AfterOpen = uriAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document with PDF/A standard.
- PdfDocument document = new PdfDocument();
- //Create a Uri action
- PdfUriAction uriAction = new PdfUriAction("http://www.google.com");
- //Add the action to the document
- document.Actions.AfterOpen = uriAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document with PDF/A standard.
- Dim document As New PdfDocument()
- 'Create a Uri action
- Dim uriAction As New PdfUriAction("http://www.google.com")
- 'Add the action to the document
- document.Actions.AfterOpen = uriAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document with PDF/A standard.
- PdfDocument document = new PdfDocument();
- //Create a Uri action
- PdfUriAction uriAction = new PdfUriAction();
- uriAction.Uri="http://www.google.com";
- //Add the action to the document
- document.Actions.AfterOpen = uriAction;
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document with PDF/A standard.
- Dim document As New PdfDocument()
- 'Create a Uri action
- Dim uriAction As New PdfUriAction()
- uriAction.Uri="http://www.google.com";
- 'Add the action to the document
- document.Actions.AfterOpen = uriAction
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new PdfButtonField.
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- //Set the bounds to submitButton.
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- //Set the submit button text.
- submitButton.Text = "Launch";
- //Create a new PdfLaunchAction and set the PdfFilePathType.
- PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt",PdfFilePathType.Absolute);
- //Set the actions to submit button.
- submitButton.Actions.GotFocus = launchAction;
- //Save document to disk.
- document.Save("ActionDestination.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new PdfButtonField.
- Dim submitButton As PdfButtonField = New PdfButtonField(page, "submitButton")
- 'Set the bounds to submit button.
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- 'Set the submit button text.
- submitButton.Text = "Launch"
- 'Create a new PdfLaunchAction and set the PdfFilePathType.
- Dim launchAction As PdfLaunchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt",PdfFilePathType.Absolute)
- 'Set the actions to submit button.
- submitButton.Actions.GotFocus = launchAction
- 'Save document to disk.
- document.Save("ActionDestination.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page
- PdfPage page = document.Pages.Add();
- //Creates a new page
- page = document.Pages.Add();
- //Creates a new page
- page = document.Pages.Add();
- //Creates a new page
- page = document.Pages.Add();
- //Creates a new page
- page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Create a new PdfButtonField.
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- //Set the bounds to submitButton.
- submitButton.Bounds = new RectangleF(25, 160, 100, 20);
- //Set the font to submitButton.
- submitButton.Font = font;
- //Sets the submit button text.
- submitButton.Text = "First Page";
- //Set the back color to submit button.
- submitButton.BackColor = new PdfColor(181, 191, 203);
- //Create a new PdfNamedAction.
- PdfNamedAction namedAction = new PdfNamedAction(PdfActionDestination.FirstPage);
- //Set the named action destination.
- namedAction.Destination=PdfActionDestination.PrevPage;
- //Set the Actions to namedAction.
- submitButton.Actions.GotFocus = namedAction;
- //Add the submitButton to the new document.
- document.Form.Fields.Add(submitButton);
- //Save document to disk.
- document.Save("ActionDestination.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Creates a new page
- page = document.Pages.Add()
- 'Creates a new page
- page = document.Pages.Add()
- 'Creates a new page
- page = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Create a new PdfButtonField
- Dim submitButton As PdfButtonField = New PdfButtonField(page, "submitButton")
- 'Set the bounds to submit button.
- submitButton.Bounds = New RectangleF(25, 160, 100, 20)
- 'Set the font to submitButton.
- submitButton.Font = font
- 'Sets the submit button text.
- submitButton.Text = "First Page"
- 'Set the back color to submit button.
- submitButton.BackColor = new PdfColor(181, 191, 203)
- 'Create a new PdfNamedAction
- Dim namedAction As PdfNamedAction = new PdfNamedAction(PdfActionDestination.FirstPage)
- 'Set the named action.
- namedAction.Destination=PdfActionDestination.PrevPage
- 'Set the Actions to namedAction.
- submitButton.Actions.GotFocus = namedAction
- 'Add the submitButton to the new document.
- document.Form.Fields.Add(gotoAction)
- 'Save document to disk.
- document.Save("ActionDestination.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DActivation.
- Pdf3DActivation activation = new Pdf3DActivation();
- annotation.Activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation;
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DActivation.
- Dim activation As New Pdf3DActivation()
- annotation.Activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DActivation
- Pdf3DActivation activation = new Pdf3DActivation();
- activation.ShowUI = false;
- annotation.Activation = activation;
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DActivation
- Dim activation As New Pdf3DActivation()
- activation.ShowUI = False
- annotation.Activation = activation
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DActivation.
- Pdf3DActivation activation = new Pdf3DActivation();
- annotation.Activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation;
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DActivation.
- Dim activation As New Pdf3DActivation()
- annotation.Activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DActivation.
- Pdf3DActivation activation = new Pdf3DActivation();
- //Sets the DeactivationState.
- activation.DeactivationMode = Pdf3DDeactivationMode.PageClose;
- activation.ShowToolbar = false;
- annotation.Activation = activation;
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DActivation.
- Dim activation As New Pdf3DActivation()
- 'Sets the DeactivationState.
- activation.DeactivationMode = Pdf3DDeactivationMode.PageClose
- activation.ShowToolbar = False
- annotation.Activation = activation
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @”Input.u3d");
- //Create a new Pdf3DActivation.
- Pdf3DActivation activation = new Pdf3DActivation();
- annotation.Activation.ActivationState = Pdf3DActivationState.Live;
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150),”Input.u3d")
- 'Create a new Pdf3DActivation.
- Dim activation As New Pdf3DActivation()
- annotation.Activation.ActivationState = Pdf3DActivationState.Live
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DActivation
- Pdf3DActivation activation = new Pdf3DActivation();
- activation.ShowToolbar = false;
- annotation.Activation = activation;
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DActivation
- Dim activation As New Pdf3DActivation()
- activation.ShowToolbar = False
- annotation.Activation = activation
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DActivation
- Pdf3DActivation activation = new Pdf3DActivation();
- activation.ShowUI = false;
- annotation.Activation = activation;
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DActivation
- Dim activation As New Pdf3DActivation()
- activation.ShowUI = False
- annotation.Activation = activation
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new Pdf3DAnimation
- Pdf3DAnimation animation = new Pdf3DAnimation(PDF3DAnimationType.Linear);
- animation.Type = PDF3DAnimationType.Linear;
-
-
- 'Create a new Pdf3DAnimation
- Dim animation As Pdf3DAnimation = New Pdf3DAnimation(PDF3DAnimationType.Linear)
- animation.Type = PDF3DAnimationType.Linear;
-
-
- //Create a new Pdf3DAnimation
- Pdf3DAnimation animation = new Pdf3DAnimation();
- animation.Type = PDF3DAnimationType.Linear;
-
-
- 'Create a new Pdf3DAnimation
- Dim animation As Pdf3DAnimation = New Pdf3DAnimation()
- animation.Type = PDF3DAnimationType.Linear
-
-
- //Create a new Pdf3DAnimation
- Pdf3DAnimation animation = new Pdf3DAnimation(PDF3DAnimationType.Linear);
- animation.Type = PDF3DAnimationType.Linear;
-
-
- 'Create a new Pdf3DAnimation
- Dim animation As Pdf3DAnimation = New Pdf3DAnimation(PDF3DAnimationType.Linear)
- animation.Type = PDF3DAnimationType.Linear
-
-
- //Create a new Pdf3DAnimation
- Pdf3DAnimation animation = new Pdf3DAnimation(PDF3DAnimationType.Linear);
- animation.Type = PDF3DAnimationType.Linear;
-
-
- 'Create a new Pdf3DAnimation
- Dim animation As Pdf3DAnimation = New Pdf3DAnimation(PDF3DAnimationType.Linear)
- animation.Type = PDF3DAnimationType.Linear
-
-
- //Create a new Pdf3DAnimation
- Pdf3DAnimation animation = new Pdf3DAnimation(PDF3DAnimationType.Linear);
- animation.PlayCount =10;
-
-
- 'Create a new Pdf3DAnimation
- Dim animation As Pdf3DAnimation = New Pdf3DAnimation(PDF3DAnimationType.Linear)
- animation.PlayCount =10
-
-
- //Create a new Pdf3DAnimation
- Pdf3DAnimation animation = new Pdf3DAnimation(PDF3DAnimationType.Linear);
- animation.Type = 10f;
-
-
- 'Create a new Pdf3DAnimation
- Dim animation As Pdf3DAnimation = New Pdf3DAnimation(PDF3DAnimationType.Linear)
- animation.Type = 10f
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- PdfColor color = new PdfColor(Color.Silver);
- //Create a new Pdf3DBackground
- Pdf3DBackground background = new Pdf3DBackground();
- background.ApplyToEntireAnnotation = true;
- background.Color = color;
- //Create a view
- Pdf3DView view = new Pdf3DView();
- view.Background = background;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- Dim color As New PdfColor(Color.Silver)
- 'Create a new Pdf3DBackground
- Dim background As New Pdf3DBackground()
- background.ApplyToEntireAnnotation = True
- background.Color = color
- 'Create a view
- Dim view As New Pdf3DView()
- view.Background = background
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- PdfColor color = new PdfColor(Color.Silver);
- //Create a new Pdf3DBackground.
- Pdf3DBackground background = new Pdf3DBackground();
- background.ApplyToEntireAnnotation = true;
- background.Color = color;
- //Create a view
- Pdf3DView view = new Pdf3DView();
- view.Background = background;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- Dim color As New PdfColor(Color.Silver)
- 'Create a new Pdf3DBackground
- Dim background As New Pdf3DBackground()
- background.ApplyToEntireAnnotation = True
- background.Color = color
- 'Create a view
- Dim view As New Pdf3DView()
- view.Background = background
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- PdfColor color = new PdfColor(Color.Silver);
- //Create a new Pdf3DBackground
- Pdf3DBackground background = new Pdf3DBackground(color);
- background.ApplyToEntireAnnotation = true;
- //Create a view
- Pdf3DView view = new Pdf3DView();
- view.Background = background;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- Dim color As New PdfColor(Color.Silver)
- 'Create a new Pdf3DBackground
- Dim background As New Pdf3DBackground(color)
- background.ApplyToEntireAnnotation = True
- 'Create a view
- Dim view As New Pdf3DView()
- view.Background = background
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- PdfColor color = new PdfColor(Color.Silver);
- //Create a new Pdf3DBackground
- Pdf3DBackground background = new Pdf3DBackground();
- background.ApplyToEntireAnnotation = true;
- background.Color = color;
- //Create a view
- Pdf3DView view = new Pdf3DView();
- view.Background = background;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- Dim color As New PdfColor(Color.Silver)
- 'Create a new Pdf3DBackground
- Dim background As New Pdf3DBackground()
- background.ApplyToEntireAnnotation = True
- background.Color = color
- 'Create a view
- Dim view As New Pdf3DView()
- view.Background = background
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- PdfColor color = new PdfColor(Color.Silver);
- //Create a new Pdf3DBackground
- Pdf3DBackground background = new Pdf3DBackground();
- background.ApplyToEntireAnnotation = true;
- background.Color = color;
- //Create a view
- Pdf3DView view = new Pdf3DView();
- view.Background = background;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- Dim color As New PdfColor(Color.Silver)
- 'Create a new Pdf3DBackground
- Dim background As New Pdf3DBackground()
- background.ApplyToEntireAnnotation = True
- background.Color = color
- 'Create a view
- Dim view As New Pdf3DView()
- view.Background = background
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Color = new PdfColor(Color.Blue);
- crossSection.IntersectionIsVisible = true;
- crossSection.IntersectionColor = new PdfColor(Color.Red);
- crossSection.Opacity = 100;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.CrossSections.Add(crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Color = New PdfColor(Color.Blue)
- crossSection.IntersectionIsVisible = True
- crossSection.IntersectionColor = New PdfColor(Color.Red)
- crossSection.Opacity = 100
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.CrossSections.Add(crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Color = new PdfColor(Color.Blue);
- crossSection.IntersectionIsVisible = true;
- crossSection.IntersectionColor = new PdfColor(Color.Red);
- crossSection.Opacity = 100;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.CrossSections.Add(crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Color = New PdfColor(Color.Blue)
- crossSection.IntersectionIsVisible = True
- crossSection.IntersectionColor = New PdfColor(Color.Red)
- crossSection.Opacity = 100
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.CrossSections.Add(crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Center = new float[] { 40, 40, 40 };
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.CrossSections.Add(crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Center = New Single() { 40, 40, 40 }
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.CrossSections.Add(crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Color = new PdfColor(Color.Blue);
- crossSection.IntersectionIsVisible = true;
- crossSection.IntersectionColor = new PdfColor(Color.Red);
- crossSection.Opacity = 100;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.CrossSections.Add(crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Color = New PdfColor(Color.Blue)
- crossSection.IntersectionIsVisible = True
- crossSection.IntersectionColor = New PdfColor(Color.Red)
- crossSection.Opacity = 100
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.CrossSections.Add(crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Color = new PdfColor(Color.Blue);
- crossSection.IntersectionIsVisible = true;
- crossSection.IntersectionColor = new PdfColor(Color.Red);
- crossSection.Opacity = 100;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.CrossSections.Add(crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Color = New PdfColor(Color.Blue)
- crossSection.IntersectionIsVisible = True
- crossSection.IntersectionColor = New PdfColor(Color.Red)
- crossSection.Opacity = 100
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.CrossSections.Add(crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Color = new PdfColor(Color.Blue);
- crossSection.IntersectionIsVisible = true;
- crossSection.IntersectionColor = new PdfColor(Color.Red);
- crossSection.Opacity = 100;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.CrossSections.Add(crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Color = New PdfColor(Color.Blue)
- crossSection.IntersectionIsVisible = True
- crossSection.IntersectionColor = New PdfColor(Color.Red)
- crossSection.Opacity = 100
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.CrossSections.Add(crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Color = new PdfColor(Color.Blue);
- crossSection.IntersectionIsVisible = true;
- crossSection.IntersectionColor = new PdfColor(Color.Red);
- crossSection.Opacity = 100;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.CrossSections.Add(crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Color = New PdfColor(Color.Blue)
- crossSection.IntersectionIsVisible = True
- crossSection.IntersectionColor = New PdfColor(Color.Red)
- crossSection.Opacity = 100
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.CrossSections.Add(crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Create a new Pdf3DCrossSectionCollection.
- Pdf3DCrossSectionCollection crossSectionCollection = view.CrossSections;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Create a new Pdf3DCrossSectionCollection.
- Dim crossSectionCollection As Pdf3DCrossSectionCollection = view.CrossSections
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Color = new PdfColor(Color.Blue);
- crossSection.IntersectionIsVisible = true;
- crossSection.IntersectionColor = new PdfColor(Color.Red);
- crossSection.Opacity = 100;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.CrossSections.Add(crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Color = New PdfColor(Color.Blue)
- crossSection.IntersectionIsVisible = True
- crossSection.IntersectionColor = New PdfColor(Color.Red)
- crossSection.Opacity = 100
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.CrossSections.Add(crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Color = new PdfColor(Color.Blue);
- crossSection.IntersectionIsVisible = true;
- crossSection.IntersectionColor = new PdfColor(Color.Red);
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- bool isExist = view.CrossSections.Contains(crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Color = New PdfColor(Color.Blue)
- crossSection.IntersectionIsVisible = True
- crossSection.IntersectionColor = New PdfColor(Color.Red)
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- Dim isExist As Boolean = view.CrossSections.Contains(crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Color = new PdfColor(Color.Blue);
- crossSection.IntersectionIsVisible = true;
- crossSection.IntersectionColor = new PdfColor(Color.Red);
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Add the cross section
- view.CrossSections.Add(crossSection);
- //Get the index of specified crossSection
- int index = view.CrossSections.IndexOf(crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Color = New PdfColor(Color.Blue)
- crossSection.IntersectionIsVisible = True
- crossSection.IntersectionColor = New PdfColor(Color.Red)
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Add the cross section
- view.CrossSections.Add(crossSection)
- 'Get the index of specified crossSection
- Dim index As Integer = view.CrossSections.IndexOf(crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Color = new PdfColor(Color.Blue);
- crossSection.IntersectionIsVisible = true;
- crossSection.IntersectionColor = new PdfColor(Color.Red);
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Insert the cross section at specified index
- view.CrossSections.Insert(0,crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Color = New PdfColor(Color.Blue)
- crossSection.IntersectionIsVisible = True
- crossSection.IntersectionColor = New PdfColor(Color.Red)
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Insert the cross section at specified index
- view.CrossSections.Insert(0,crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DCrossSection.
- Pdf3DCrossSection crossSection = new Pdf3DCrossSection();
- crossSection.Color = new PdfColor(Color.Blue);
- crossSection.IntersectionIsVisible = true;
- crossSection.IntersectionColor = new PdfColor(Color.Red);
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.CrossSections.Add(crossSection);
- //Remove the cross section
- view.CrossSections.Remove(crossSection);
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DCrossSection.
- Dim crossSection As New Pdf3DCrossSection()
- crossSection.Color = New PdfColor(Color.Blue)
- crossSection.IntersectionIsVisible = True
- crossSection.IntersectionColor = New PdfColor(Color.Red)
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.CrossSections.Add(crossSection)
- 'Remove the cross section
- view.CrossSections.Remove(crossSection)
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Create a new Pdf3DCrossSectionCollection.
- Pdf3DCrossSectionCollection crossSectionCollection = view.CrossSections;
- Pdf3DCrossSection crosssection =view.CrossSections[0];
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Create a new Pdf3DCrossSectionCollection.
- Dim crossSectionCollection As Pdf3DCrossSectionCollection = view.CrossSections
- Dim crosssection As Pdf3DCrossSection=view.CrossSections[0]
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DLighting.
- Pdf3DLighting lighting = new Pdf3DLighting();
- lighting.Style = Pdf3DLightingStyle.CAD;
- //Create a new Pdf3DView.
- Pdf3DView view = new Pdf3DView();
- view.LightingScheme = lighting;
- annot.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DLighting.
- Dim lighting As New Pdf3DLighting()
- lighting.Style = Pdf3DLightingStyle.CAD
- 'Create a new Pdf3DView.
- Dim view As New Pdf3DView()
- view.LightingScheme = lighting
- annot.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DLighting.
- Pdf3DLighting lighting = new Pdf3DLighting();
- lighting.Style = Pdf3DLightingStyle.CAD;
- //Create a new Pdf3DView.
- Pdf3DView view = new Pdf3DView();
- view.LightingScheme = lighting;
- annot.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DLighting.
- Dim lighting As New Pdf3DLighting()
- lighting.Style = Pdf3DLightingStyle.CAD
- 'Create a new Pdf3DView.
- Dim view As New Pdf3DView()
- view.LightingScheme = lighting
- annot.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DLighting.
- Pdf3DLighting lighting = new Pdf3DLighting(Pdf3DLightingStyle.CAD);
- //Create a new Pdf3DView.
- Pdf3DView view = new Pdf3DView();
- view.LightingScheme = lighting;
- annot.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annot As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DLighting.
- Dim lighting As New Pdf3DLighting(Pdf3DLightingStyle.CAD)
- 'Create a new Pdf3DView.
- Dim view As New Pdf3DView()
- view.LightingScheme = lighting
- annot.Views.Add(view)
- page.Annotations.Add(annot)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DLighting.
- Pdf3DLighting lighting = new Pdf3DLighting();
- lighting.Style = Pdf3DLightingStyle.CAD;
- //Create a new Pdf3DView.
- Pdf3DView view = new Pdf3DView();
- view.LightingScheme = lighting;
- annot.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DLighting.
- Dim lighting As New Pdf3DLighting()
- lighting.Style = Pdf3DLightingStyle.CAD
- 'Create a new Pdf3DView.
- Dim view As New Pdf3DView()
- view.LightingScheme = lighting
- annot.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- node.Name = "node";
- node.Opacity = 1000f;
- view.Nodes.Add(node);
- //Add a pdf3d view.
- annotation.Views.Add(view);
- //Add a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- node.Name = "node"
- node.Opacity = 1000f
- view.Nodes.Add(node)
- 'Add a pdf3d view.
- annotation.Views.Add(view)
- 'Add a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- view.Nodes.Add(node);
- //Add a pdf3d view.
- annotation.Views.Add(view);
- //Add a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- view.Nodes.Add(node)
- 'Add a pdf3d view.
- annotation.Views.Add(view)
- 'Add a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- node.Name = "node";
- node.Opacity = 1000f;
- view.Nodes.Add(node);
- //Add a pdf3d view.
- annotation.Views.Add(view);
- //Add a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- node.Name = "node"
- node.Opacity = 1000f
- view.Nodes.Add(node)
- 'Add a pdf3d view.
- annotation.Views.Add(view)
- 'Add a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- node.Name = "node";
- node.Opacity = 1000f;
- view.Nodes.Add(node);
- //Add a pdf3d view.
- annotation.Views.Add(view);
- //Add a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- node.Name = "node"
- node.Opacity = 1000f
- view.Nodes.Add(node)
- 'Add a pdf3d view.
- annotation.Views.Add(view)
- 'Add a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- node.Name = "node";
- node.Opacity = 1000f;
- view.Nodes.Add(node);
- //Add a pdf3d view.
- annotation.Views.Add(view);
- //Add a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- node.Name = "node"
- node.Opacity = 1000f
- view.Nodes.Add(node)
- 'Add a pdf3d view.
- annotation.Views.Add(view)
- 'Add a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Matrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- view.Nodes.Add(node);
- //Add a pdf3d view.
- annotation.Views.Add(view);
- //Add a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Matrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- view.Nodes.Add(node)
- 'Add a pdf3d view.
- annotation.Views.Add(view)
- 'Add a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- view.Nodes.Add(node);
- //Adds a pdf3d view.
- annotation.Views.Add(view);
- //Adds a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- view.Nodes.Add(node)
- 'Adds a pdf3d view.
- annotation.Views.Add(view)
- 'Adds a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- view.Nodes.Add(node);
- //Add a pdf3d view.
- annotation.Views.Add(view);
- //Add a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- view.Nodes.Add(node)
- 'Add a pdf3d view.
- annotation.Views.Add(view)
- 'Add a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- node.Name = "Near View";
- node.Opacity = 100;
- node.Matrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- //create the node collection
- Pdf3DNodeCollection nodecollection = new Pdf3DNodeCollection();
- nodecollection.Add(node);
- bool exist = nodecollection.Contains(node);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- node.Name = "Near View"
- node.Opacity = 100
- node.Matrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- 'create the node collection
- Dim nodecollection As New Pdf3DNodeCollection()
- nodecollection.Add(node)
- Dim exist As Boolean = nodecollection.Contains(node)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- node.Name = "Near View";
- node.Opacity = 100;
- node.Matrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- //create the node collection
- Pdf3DNodeCollection nodecollection = new Pdf3DNodeCollection();
- nodecollection.Add(node);
- //Search the index of the node
- int index = nodecollection.IndexOf(node);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- node.Name = "Near View"
- node.Opacity = 100
- node.Matrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- 'create the node collection
- Dim nodecollection As New Pdf3DNodeCollection()
- nodecollection.Add(node)
- 'Search the index of the node
- Dim index As Integer = nodecollection.IndexOf(node)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- node.Name = "Near View";
- node.Opacity = 100;
- node.Matrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- //create the node collection
- Pdf3DNodeCollection nodecollection = new Pdf3DNodeCollection();
- nodecollection.Add(node);
- //insert the node
- nodecollection.Insert(0, node);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- node.Name = "Near View"
- node.Opacity = 100
- node.Matrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- 'create the node collection
- Dim nodecollection As New Pdf3DNodeCollection()
- nodecollection.Add(node)
- 'insert the node
- nodecollection.Insert(0, node)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- node.Name = "Near View";
- node.Opacity = 100;
- node.Matrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- //create the node collection
- Pdf3DNodeCollection nodecollection = new Pdf3DNodeCollection();
- nodecollection.Add(node);
- //Remove the node
- nodecollection.Remove(node);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- node.Name = "Near View"
- node.Opacity = 100
- node.Matrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- 'create the node collection
- Dim nodecollection As New Pdf3DNodeCollection()
- nodecollection.Add(node)
- 'Remove the node
- nodecollection.Remove(node)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- //Create a new Pdf3DNode.
- Pdf3DNode node = new Pdf3DNode();
- node.Visible = true;
- view.Nodes.Add(node);
- //Adds a pdf3d view.
- annotation.Views.Add(view);
- //Adds a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- 'Create a new Pdf3DNode.
- Dim node As New Pdf3DNode()
- node.Visible = True
- view.Nodes.Add(node)
- 'Adds a pdf3d view.
- annotation.Views.Add(view)
- 'Adds a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.NearClipDistance = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.NearClipDistance = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.FarClipDistance = 10;
- projection.Scaling = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.FarClipDistance = 10
- projection.Scaling = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.NearClipDistance = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.NearClipDistance = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.NearClipDistance = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.NearClipDistance = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.NearClipDistance = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.NearClipDistance = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.FarClipDistance = 10;
- projection.Scaling = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.FarClipDistance = 10
- projection.Scaling = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.NearClipDistance = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.NearClipDistance = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.NearClipDistance = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.NearClipDistance = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.FarClipDistance = 10;
- projection.Scaling = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.FarClipDistance = 10
- projection.Scaling = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DRendermode.
- Pdf3DRendermode renderMode = new Pdf3DRendermode();
- renderMode.Style = Pdf3DRenderStyle.Solid;
- renderMode.AuxilaryColor = new PdfColor(Color.Green);
- renderMode.FaceColor = new PdfColor(Color.Black);
- renderMode.CreaseValue = 10f;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.RenderMode = renderMode;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DRendermode.
- Dim renderMode As New Pdf3DRendermode()
- renderMode.Style = Pdf3DRenderStyle.Solid
- renderMode.AuxilaryColor = New PdfColor(Color.Green)
- renderMode.FaceColor = New PdfColor(Color.Black)
- renderMode.CreaseValue = 10.0F
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.RenderMode = renderMode
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DRendermode.
- Pdf3DRendermode renderMode = new Pdf3DRendermode(Pdf3DRenderStyle.Solid);
- renderMode.AuxilaryColor = new PdfColor(Color.Green);
- renderMode.FaceColor = new PdfColor(Color.Black);
- renderMode.Opacity = 100f;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.RenderMode = renderMode;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DRendermode.
- Dim renderMode As New Pdf3DRendermode(Pdf3DRenderStyle.Solid)
- renderMode.AuxilaryColor = New PdfColor(Color.Green)
- renderMode.FaceColor = New PdfColor(Color.Black)
- renderMode.Opacity = 100.0F
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.RenderMode = renderMode
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DRendermode.
- Pdf3DRendermode renderMode = new Pdf3DRendermode();
- renderMode.Style = Pdf3DRenderStyle.Solid;
- renderMode.AuxilaryColor = new PdfColor(Color.Green);
- renderMode.FaceColor = new PdfColor(Color.Black);
- renderMode.CreaseValue = 10f;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.RenderMode = renderMode;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DRendermode.
- Dim renderMode As New Pdf3DRendermode()
- renderMode.Style = Pdf3DRenderStyle.Solid
- renderMode.AuxilaryColor = New PdfColor(Color.Green)
- renderMode.FaceColor = New PdfColor(Color.Black)
- renderMode.CreaseValue = 10.0F
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.RenderMode = renderMode
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DRendermode.
- Pdf3DRendermode renderMode = new Pdf3DRendermode();
- renderMode.Style = Pdf3DRenderStyle.Solid;
- renderMode.AuxilaryColor = new PdfColor(Color.Green);
- renderMode.FaceColor = new PdfColor(Color.Black);
- renderMode.CreaseValue = 10f;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.RenderMode = renderMode;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DRendermode.
- Dim renderMode As New Pdf3DRendermode()
- renderMode.Style = Pdf3DRenderStyle.Solid
- renderMode.AuxilaryColor = New PdfColor(Color.Green)
- renderMode.FaceColor = New PdfColor(Color.Black)
- renderMode.CreaseValue = 10.0F
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.RenderMode = renderMode
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DRendermode.
- Pdf3DRendermode renderMode = new Pdf3DRendermode();
- renderMode.Style = Pdf3DRenderStyle.Solid;
- renderMode.AuxilaryColor = new PdfColor(Color.Green);
- renderMode.FaceColor = new PdfColor(Color.Black);
- renderMode.CreaseValue = 10f;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.RenderMode = renderMode;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DRendermode.
- Dim renderMode As New Pdf3DRendermode()
- renderMode.Style = Pdf3DRenderStyle.Solid
- renderMode.AuxilaryColor = New PdfColor(Color.Green)
- renderMode.FaceColor = New PdfColor(Color.Black)
- renderMode.CreaseValue = 10.0F
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.RenderMode = renderMode
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DRendermode.
- Pdf3DRendermode renderMode = new Pdf3DRendermode();
- renderMode.Style = Pdf3DRenderStyle.Solid;
- renderMode.AuxilaryColor = new PdfColor(Color.Green);
- renderMode.FaceColor = new PdfColor(Color.Black);
- renderMode.CreaseValue = 10f;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.RenderMode = renderMode;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DRendermode.
- Dim renderMode As New Pdf3DRendermode()
- renderMode.Style = Pdf3DRenderStyle.Solid
- renderMode.AuxilaryColor = New PdfColor(Color.Green)
- renderMode.FaceColor = New PdfColor(Color.Black)
- renderMode.CreaseValue = 10.0F
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.RenderMode = renderMode
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DRendermode.
- Pdf3DRendermode renderMode = new Pdf3DRendermode(Pdf3DRenderStyle.Solid);
- renderMode.AuxilaryColor = new PdfColor(Color.Green);
- renderMode.FaceColor = new PdfColor(Color.Black);
- renderMode.Opacity = 100f;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.RenderMode = renderMode;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DRendermode.
- Dim renderMode As New Pdf3DRendermode(Pdf3DRenderStyle.Solid)
- renderMode.AuxilaryColor = New PdfColor(Color.Green)
- renderMode.FaceColor = New PdfColor(Color.Black)
- renderMode.Opacity = 100.0F
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.RenderMode = renderMode
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DRendermode
- Pdf3DRendermode rendermode = new Pdf3DRendermode();
- rendermode.Style = Pdf3DRenderStyle.Solid;
- rendermode.AuxilaryColor = new PdfColor(Color.Green);
- rendermode.FaceColor = new PdfColor(Color.Black);
- PdfColor color = new PdfColor(Color.Silver);
- //Create a new Pdf3DBackground
- Pdf3DBackground background = new Pdf3DBackground();
- background.ApplyToEntireAnnotation = true;
- background.Color = color;
- //Creates a new Pdf3DLighting
- Pdf3DLighting lighting = new Pdf3DLighting();
- lighting.Style = Pdf3DLightingStyle.CAD;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Background = background;
- view.LightingScheme = lighting;
- view.RenderMode = rendermode;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DRendermode
- Dim rendermode As New Pdf3DRendermode()
- rendermode.Style = Pdf3DRenderStyle.Solid
- rendermode.AuxilaryColor = New PdfColor(Color.Green)
- rendermode.FaceColor = New PdfColor(Color.Black)
- Dim color As New PdfColor(Color.Silver)
- 'Create a new Pdf3DBackground
- Dim background As New Pdf3DBackground()
- background.ApplyToEntireAnnotation = True
- background.Color = color
- 'Creates a new Pdf3DLighting
- Dim lighting As New Pdf3DLighting()
- lighting.Style = Pdf3DLightingStyle.CAD
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Background = background
- view.LightingScheme = lighting
- view.RenderMode = rendermode
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- PdfColor color = new PdfColor(Color.Silver);
- //Create a new Pdf3DBackground
- Pdf3DBackground background = new Pdf3DBackground();
- background.ApplyToEntireAnnotation = true;
- background.Color = color;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Background = background;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- Dim color As New PdfColor(Color.Silver)
- 'Create a new Pdf3DBackground
- Dim background As New Pdf3DBackground()
- background.ApplyToEntireAnnotation = True
- background.Color = color
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Background = background
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Creates a new Pdf3DBackground
- Pdf3DBackground background = new Pdf3DBackground();
- background.ApplyToEntireAnnotation = true;
- background.Color =new PdfColor(Color.Blue);
- float[] matrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -300.669f, -112.432f, 45.6829f };
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.CameraToWorldMatrix = matrix;
- view.Background = background;
- view.CenterOfOrbit = 10f;
- view.ExternalName = "Near View";
- //Adds a pdf3d view.
- annotation.Views.Add(view);
- //Adds a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Creates a new Pdf3DBackground
- Dim background As New Pdf3DBackground()
- background.ApplyToEntireAnnotation = True
- background.Color = New PdfColor(Color.Blue)
- Dim matrix() As Single = { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -300.669f, -112.432f, 45.6829f }
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.CameraToWorldMatrix = matrix
- view.Background = background
- view.CenterOfOrbit = 10f
- view.ExternalName = "Near View"
- 'Adds a pdf3d view.
- annotation.Views.Add(view)
- 'Adds a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.CenterOfOrbit = 10f;
- //Add a pdf3d view.
- annotation.Views.Add(view);
- //Add a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As Pdf3DAnnotation = New Pdf3DAnnotation(New RectangleF(10, 300, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As Pdf3DView = New Pdf3DView()
- view.CenterOfOrbit = 10f
- 'Adds a pdf3d view
- annotation.Views.Add(view)
- 'Draw a annotation into the new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- Pdf3DCrossSectionCollection crossSectionCollection = view.CrossSections;
- //Adds a pdf3d view.
- annotation.Views.Add(view);
- //Adds a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- Dim crossSectionCollection As Pdf3DCrossSectionCollection = view.CrossSections
- 'Adds a pdf3d view.
- annotation.Views.Add(view)
- 'Adds a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.ExternalName = "Near View";
- //Add a pdf3d view.
- annotation.Views.Add(view);
- //Add a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.ExternalName = "Near View"
- 'Adds a pdf3d view.
- annotation.Views.Add(view)
- 'Adds a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.InternalName = Guid.NewGuid().ToString("N");
- //Adds a pdf3d view.
- annotation.Views.Add(view);
- //Adds a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.InternalName = Guid.NewGuid().ToString("N")
- 'Adds a pdf3d view.
- annotation.Views.Add(view)
- 'Adds a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DRendermode
- Pdf3DRendermode rendermode = new Pdf3DRendermode();
- rendermode.Style = Pdf3DRenderStyle.Solid;
- rendermode.AuxilaryColor = new PdfColor(Color.Green);
- rendermode.FaceColor = new PdfColor(Color.Black);
- PdfColor color = new PdfColor(Color.Silver);
- //Create a new Pdf3DBackground
- Pdf3DBackground background = new Pdf3DBackground();
- background.ApplyToEntireAnnotation = true;
- background.Color = color;
- //Creates a new Pdf3DLighting
- Pdf3DLighting lighting = new Pdf3DLighting();
- lighting.Style = Pdf3DLightingStyle.CAD;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Background = background;
- view.LightingScheme = lighting;
- view.RenderMode = rendermode;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DRendermode
- Dim rendermode As New Pdf3DRendermode()
- rendermode.Style = Pdf3DRenderStyle.Solid
- rendermode.AuxilaryColor = New PdfColor(Color.Green)
- rendermode.FaceColor = New PdfColor(Color.Black)
- Dim color As New PdfColor(Color.Silver)
- 'Create a new Pdf3DBackground
- Dim background As New Pdf3DBackground()
- background.ApplyToEntireAnnotation = True
- background.Color = color
- 'Creates a new Pdf3DLighting
- Dim lighting As New Pdf3DLighting()
- lighting.Style = Pdf3DLightingStyle.CAD
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Background = background
- view.LightingScheme = lighting
- view.RenderMode = rendermode
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.ResetNodesState = true;
- Pdf3DNodeCollection nodes = view.Nodes;
- //Adds a pdf3d view.
- annotation.Views.Add(view);
- //Adds a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.ResetNodesState = True
- Dim nodes As Pdf3DNodeCollection = view.Nodes
- 'Adds a pdf3d view.
- annotation.Views.Add(view)
- 'Adds a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection(Pdf3DProjectionType.Perspective);
- projection.FieldOfView = 10;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.FarClipDistance = 10;
- projection.Scaling = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Add the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection(Pdf3DProjectionType.Perspective)
- projection.FieldOfView = 10
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.FarClipDistance = 10
- projection.Scaling = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Add the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DRendermode.
- Pdf3DRendermode renderMode = new Pdf3DRendermode();
- renderMode.Style = Pdf3DRenderStyle.Solid;
- renderMode.AuxilaryColor = new PdfColor(Color.Green);
- renderMode.FaceColor = new PdfColor(Color.Black);
- renderMode.CreaseValue = 10f;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.RenderMode = renderMode;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DRendermode.
- Dim renderMode As New Pdf3DRendermode()
- renderMode.Style = Pdf3DRenderStyle.Solid
- renderMode.AuxilaryColor = New PdfColor(Color.Green)
- renderMode.FaceColor = New PdfColor(Color.Black)
- renderMode.CreaseValue = 10f
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.RenderMode = renderMode
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.ResetNodesState = true;
- //Adds a pdf3d view.
- annotation.Views.Add(view);
- //Adds a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.ResetNodesState = True
- 'Adds a pdf3d view.
- annotation.Views.Add(view)
- 'Adds a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- string name = view.ViewNodeName;
- //Add a pdf3d view.
- annotation.Views.Add(view);
- //Add a annotation.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- Dim name As String = view.ViewNodeName
- 'Add a pdf3d view.
- annotation.Views.Add(view)
- 'Add a annotation.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Creates a new Pdf3DView
- Pdf3DView defaultView = new Pdf3DView();
- defaultView.ExternalName="Near View";
- defaultView.CameraToWorldMatrix=new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- defaultView.CenterOfOrbit=131.695f;
- annotation.Views.Add(defaultView);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Creates a new Pdf3DView
- Dim defaultView As New Pdf3DView()
- defaultView.ExternalName="Near View"
- defaultView.CameraToWorldMatrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- defaultView.CenterOfOrbit=131.695f
- annotation.Views.Add(defaultView)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Creates a new Pdf3DView
- Pdf3DView defaultView = new Pdf3DView();
- defaultView.ExternalName="Near View";
- defaultView.CameraToWorldMatrix=new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- defaultView.CenterOfOrbit=131.695f;
- annotation.Views.Add(defaultView);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Creates a new Pdf3DView
- Dim defaultView As New Pdf3DView()
- defaultView.ExternalName="Near View"
- defaultView.CameraToWorldMatrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- defaultView.CenterOfOrbit=131.695f
- annotation.Views.Add(defaultView)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create the view
- Pdf3DView defaultView = new Pdf3DView();
- defaultView.ExternalName="Near View";
- defaultView.CameraToWorldMatrix=new Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- defaultView.CenterOfOrbit=131.695f;
- annotation.Views.Add(defaultView);
- //check the specified view exists in the list or not
- bool exist=annotation.Views.Contains(defaultView);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create the view
- Dim defaultView As New Pdf3DView()
- defaultView.ExternalName="Near View"
- defaultView.CameraToWorldMatrix = New Single() With { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- defaultView.CenterOfOrbit=131.695f
- annotation.Views.Add(defaultView)
- 'check the specified view exists in the list or not
- Dim exist As Boolean=annotation.Views.Contains(defaultView)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create the view
- Pdf3DView defaultView = new Pdf3DView();
- defaultView.ExternalName = "Near View";
- defaultView.CameraToWorldMatrix = new Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- defaultView.CenterOfOrbit = 131.695f;
- annotation.Views.Add(defaultView);
- //Get the index of specified view
- int index = annotation.Views.IndexOf(defaultView);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create the view
- Dim defaultView As New Pdf3DView()
- defaultView.ExternalName = "Near View"
- defaultView.CameraToWorldMatrix = New Single() With { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- defaultView.CenterOfOrbit = 131.695f
- annotation.Views.Add(defaultView)
- 'Get the index of specified view
- Dim index As Integer = annotation.Views.IndexOf(defaultView)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create the view
- Pdf3DView defaultView = new Pdf3DView();
- defaultView.ExternalName = "Near View";
- defaultView.CameraToWorldMatrix = new Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- defaultView.CenterOfOrbit = 131.695f;
- //Insert the view at specified index
- annotation.Views.Insert(1,defaultView);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create the view
- Dim defaultView As New Pdf3DView()
- defaultView.ExternalName = "Near View"
- defaultView.CameraToWorldMatrix = New Single() With { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- defaultView.CenterOfOrbit = 131.695f
- 'Insert the view at specified index
- annotation.Views.Insert(1,defaultView)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create the view
- Pdf3DView defaultView = new Pdf3DView();
- defaultView.ExternalName = "Near View";
- defaultView.CameraToWorldMatrix = new Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- defaultView.CenterOfOrbit = 131.695f;
- annotation.Views.Add(defaultView);
- //Remove the specified view
- annotation.Views.Remove(defaultView);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create the view
- Dim defaultView As New Pdf3DView()
- defaultView.ExternalName = "Near View"
- defaultView.CameraToWorldMatrix = New Single() With { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- defaultView.CenterOfOrbit = 131.695f
- annotation.Views.Add(defaultView)
- 'Remove the specified view
- annotation.Views.Remove(defaultView)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a Pdf3DView
- Pdf3DView defaultView = new Pdf3DView();
- defaultView.ExternalName="Near View";
- defaultView.CameraToWorldMatrix= new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- defaultView.CenterOfOrbit = 131.695f;
- annotation.Views.Add(defaultView);
- page.Annotations.Add(annotation);
- Pdf3DView view=annotation.Views[0] as Pdf3DView;
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a Pdf3DView
- Dim defaultView As New Pdf3DView()
- defaultView.ExternalName="Near View"
- defaultView.CameraToWorldMatrix= New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- defaultView.CenterOfOrbit = 131.695f
- annotation.Views.Add(defaultView)
- page.Annotations.Add(annotation)
- Dim view As Pdf3DView=TryCast(annotation.Views(0), Pdf3DView)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @”Input.u3d");
- //Create a new Pdf3DActivation.
- Pdf3DActivation activation = new Pdf3DActivation();
- annotation.Activation.ActivationState = Pdf3DActivationState.Live;
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150),”Input.u3d")
- 'Create a new Pdf3DActivation.
- Dim activation As New Pdf3DActivation()
- annotation.Activation.ActivationState = Pdf3DActivationState.Live
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DActivation.
- Pdf3DActivation activation = new Pdf3DActivation();
- annotation.Activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation;
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DActivation.
- Dim activation As New Pdf3DActivation()
- annotation.Activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DActivation.
- Pdf3DActivation activation = new Pdf3DActivation();
- //Sets the DeactivationState.
- activation.DeactivationMode = Pdf3DDeactivationMode.PageClose;
- activation.ShowToolbar = false;
- annotation.Activation = activation;
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DActivation.
- Dim activation As New Pdf3DActivation()
- 'Sets the DeactivationState.
- activation.DeactivationMode = Pdf3DDeactivationMode.PageClose
- activation.ShowToolbar = False
- annotation.Activation = activation
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DActivation.
- Pdf3DActivation activation = new Pdf3DActivation();
- annotation.Activation.DeactivationState = Pdf3DDeactivationState.Uninstantiated;
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DActivation.
- Dim activation As New Pdf3DActivation()
- annotation.Activation.DeactivationState = Pdf3DDeactivationState.Uninstantiated
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection(Pdf3DProjectionType.Perspective);
- projection.FieldOfView = 10;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.FarClipDistance = 10;
- projection.Scaling = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Add the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection(Pdf3DProjectionType.Perspective)
- projection.FieldOfView = 10
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.FarClipDistance = 10
- projection.Scaling = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Add the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.NearClipDistance = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.NearClipDistance = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.NearClipDistance = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.NearClipDistance = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Pdf3DAnnotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DProjection.
- Pdf3DProjection projection = new Pdf3DProjection();
- projection.ProjectionType = Pdf3DProjectionType.Perspective;
- projection.FieldOfView = 10;
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width;
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar;
- projection.NearClipDistance = 10;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.Projection = projection;
- annotation.Views.Add(view);
- //Adds the annotation in a new page.
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Pdf3DAnnotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DProjection.
- Dim projection As New Pdf3DProjection()
- projection.ProjectionType = Pdf3DProjectionType.Perspective
- projection.FieldOfView = 10
- projection.OrthoScaleMode = Pdf3DProjectionOrthoScaleMode.Width
- projection.ClipStyle = Pdf3DProjectionClipStyle.ExplicitNearFar
- projection.NearClipDistance = 10
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.Projection = projection
- annotation.Views.Add(view)
- 'Adds the annotation in a new page.
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new Pdf3D Annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new Pdf3DRendermode.
- Pdf3DRendermode renderMode = new Pdf3DRendermode();
- renderMode.Style = Pdf3DRenderStyle.Solid;
- renderMode.AuxilaryColor = new PdfColor(Color.Green);
- renderMode.FaceColor = new PdfColor(Color.Black);
- renderMode.CreaseValue = 10f;
- //Create a new Pdf3DView
- Pdf3DView view = new Pdf3DView();
- view.RenderMode = renderMode;
- annotation.Views.Add(view);
- page.Annotations.Add(annotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new Pdf3D Annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new Pdf3DRendermode.
- Dim renderMode As New Pdf3DRendermode()
- renderMode.Style = Pdf3DRenderStyle.Solid
- renderMode.AuxilaryColor = New PdfColor(Color.Green)
- renderMode.FaceColor = New PdfColor(Color.Black)
- renderMode.CreaseValue = 10f
- 'Create a new Pdf3DView
- Dim view As New Pdf3DView()
- view.RenderMode = renderMode
- annotation.Views.Add(view)
- page.Annotations.Add(annotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new Pdf3DAnimation
- Pdf3DAnimation animation = new Pdf3DAnimation(PDF3DAnimationType.Linear);
- animation.Type = PDF3DAnimationType.Linear;
-
-
- 'Create a new Pdf3DAnimation
- Dim animation As Pdf3DAnimation = New Pdf3DAnimation(PDF3DAnimationType.Linear)
- animation.Type = PDF3DAnimationType.Linear
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new file link annotation.
- PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(rectangle, @"Input.png");
- //Set a action to file link annotation.
- PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
- fileLinkAnnotation.Action = javaAction;
- //Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new file link annotation.
- Dim fileLinkAnnotation As New PdfFileLinkAnnotation(rectangle, "Input.png")
- 'Set a action to file link annotation.
- Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
- fileLinkAnnotation.Action = javaAction
- 'Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle.
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"input.wav");
- //Set the color.
- soundAnnotation.Color = new PdfColor(Color.Red);
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a a new rectangle.
- Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30);
- 'Create a new sound annotation.
- Dim soundAnnotation As PdfSoundAnnotation = New PdfSoundAnnotation(rectangle, "input.wav")
- 'Set the color.
- soundAnnotation.Color = New PdfColor(Color.Red)
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle.
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"input.wav");
- //Assign the border to sound annotation.
- soundAnnotation.Border = new PdfAnnotationBorder(5);
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As PdfSoundAnnotation = New PdfSoundAnnotation(rectangle, "input.wav")
- 'Assign the border to sound annotation.
- soundAnnotation.Border = New PdfAnnotationBorder(5)
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle.
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"input.wav");
- //Assign the bounds to sound annotation.
- soundAnnotation.Bounds=new RectangleF(50, 100, 30, 30);
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle.
- Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As PdfSoundAnnotation = New PdfSoundAnnotation(rectangle, "input.wav")
- 'Assign the bounds to sound annotation.
- soundAnnotation.Bounds=New RectangleF(50, 100, 30, 30)
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"input.wav");
- //Assign the location to sound annotation.
- soundAnnotation.Location=new PointF(50, 100);
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As PdfSoundAnnotation = New PdfSoundAnnotation(rectangle, "input.wav")
- 'Assign the location to sound annotation.
- soundAnnotation.Location=New PointF(50, 100)
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"input.wav");
- //Assign the size to sound annotation.
- soundAnnotation.Size=new SizeF(50, 50);
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As PdfSoundAnnotation = New PdfSoundAnnotation(rectangle, "input.wav")
- 'Assign the size to sound annotation.
- soundAnnotation.Size=New SizeF(50, 50)
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"input.wav");
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Gets the page.
- PdfPage pdfPage=soundAnnotation.Page;
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As PdfSoundAnnotation = New PdfSoundAnnotation(rectangle, "input.wav")
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Gets the page.
- Dim pdfPage As PdfPage =soundAnnotation.Page
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"input.wav");
- //Set the text to sound annotation.
- soundAnnotation.Text="Sound Annotation";
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As PdfSoundAnnotation = New PdfSoundAnnotation(rectangle, "input.wav")
- 'Set the text to sound annotation.
- soundAnnotation.Text="Sound Annotation"
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"input.wav");
- //Set the annotation flags to sound annotation.
- soundAnnotation.AnnotationFlags = PdfAnnotationFlags.Print;
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle.
- Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As PdfSoundAnnotation = New PdfSoundAnnotation(rectangle, "input.wav")
- 'Set the annotation flags to sound annotation.
- soundAnnotation.AnnotationFlags = PdfAnnotationFlags.Print
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new file link annotation.
- PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(rectangle, "input.png");
- //Set a action to file link annotation.
- PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
- fileLinkAnnotation.Action = javaAction;
- //Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new file link annotation.
- Dim fileLinkAnnotation As New PdfFileLinkAnnotation(rectangle, "input.png")
- 'Set a action to file link annotation.
- Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
- fileLinkAnnotation.Action = javaAction
- 'Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF bounds = new RectangleF(10, 40, 30, 30);
- //Create a new file link annotation.
- PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(bounds, "Input.png");
- //Set a action to file link annotation.
- PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
- fileLinkAnnotation.Action = javaAction;
- //Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new file link annotation.
- Dim fileLinkAnnotation As New PdfFileLinkAnnotation(rectangle, "Input.png")
- 'Set a action to file link annotation.
- Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
- fileLinkAnnotation.Action = javaAction
- 'Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new file link annotation.
- PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(rectangle, @"Input.png");
- //Set a action to file link annotation.
- PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
- fileLinkAnnotation.Action = javaAction;
- //Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new file link annotation.
- Dim fileLinkAnnotation As New PdfFileLinkAnnotation(rectangle, "Input.png")
- 'Set a action to file link annotation.
- Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
- fileLinkAnnotation.Action = javaAction
- 'Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF actionAnnotationBounds = new RectangleF(10, 40, 100, 30);
- //Set the go to action
- PdfGoToAction gotoAction = new PdfGoToAction(page);
- //Set destination location
- gotoAction.Destination = new PdfDestination(page, new PointF(0, 100));
- //Create Action annotation
- PdfActionAnnotation actionAnnotation = new PdfActionAnnotation(actionAnnotationBounds, gotoAction);
- //Set the text and font
- actionAnnotation.Color = new PdfColor(Color.Red);
- //Add this annotation to a new page.
- page.Annotations.Add(actionAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim actionAnnotationBounds As New RectangleF(10, 40, 100, 30)
- 'Set the go to action
- Dim gotoAction As New PdfGoToAction(page)
- 'Set destination location
- gotoAction.Destination = New PdfDestination(page, New PointF(0, 100))
- 'Create Action annotation
- Dim actionAnnotation As New PdfActionAnnotation(actionAnnotationBounds, gotoAction)
- 'Set the text and font
- actionAnnotation.Color = New PdfColor(Color.Red)
- 'Add this annotation to a new page.
- page.Annotations.Add(actionAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
- //Set the annotation border to popup annotation.
- popupAnnotation.Border = new PdfAnnotationBorder(4, 0, 0);
- //Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
- 'Set the annotation border to popup annotation.
- popupAnnotation.Border = New PdfAnnotationBorder(4, 0, 0)
- 'Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
- //Set the annotation border.
- popupAnnotation.Border = new PdfAnnotationBorder();
- //Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
- 'Set the annotation border.
- popupAnnotation.Border = New PdfAnnotationBorder()
- 'Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
- //Set the annotation border.
- popupAnnotation.Border = new PdfAnnotationBorder(4);
- //Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
- 'Set the annotation border.
- popupAnnotation.Border = New PdfAnnotationBorder(4)
- 'Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("AnnotationBorder.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
- //Set the annotation border.
- popupAnnotation.Border = new PdfAnnotationBorder(4, 0, 0);
- //Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
- 'Set the annotation border.
- popupAnnotation.Border = New PdfAnnotationBorder(4, 0, 0)
- 'Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
- //Set the horizontal radius to popup annotation border.
- popupAnnotation.Border.HorizontalRadius = 0;
- //Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
- 'Set the horizontal radius to popup annotation border.
- popupAnnotation.Border.HorizontalRadius = 0
- 'Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
- //Set the vertical radius to popup annotation border.
- popupAnnotation.Border.VerticalRadius = 0;
- //Add popup annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
- 'Set the vertical radius to popup annotation border.
- popupAnnotation.Border.VerticalRadius = 0
- 'Add popup annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF popupAnnotationBounds = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationBounds, "Test popup annotation");
- //Set the width to popup annotation border.
- popupAnnotation.Border.Width = 4;
- //Add popup annotation annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim popupAnnotationBounds As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationBounds, "Test popup annotation")
- 'Set the width to popup annotation border.
- popupAnnotation.Border.Width = 4
- 'Add popup annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- //Add this annotation to a new page.
- PdfAnnotationCollection annotationCollection = page.Annotations;
- annotationCollection.Add(soundAnnotation);
- PdfAnnotation annotation = annotationCollection[0] as PdfAnnotation;
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Add this annotation to a new page.
- Dim annotationCollection As PdfAnnotationCollection = page.Annotations
- annotationCollection.Add(soundAnnotation)
- Dim annotation As PdfAnnotation = TryCast(annotationCollection(0), PdfAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle.
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- //Add this annotation to a new page.
- PdfAnnotationCollection annotationCollection = page.Annotations;
- annotationCollection.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle.
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Add this annotation to a new page.
- Dim annotationCollection As PdfAnnotationCollection = page.Annotations
- annotationCollection.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- //Add this annotation to a new page.
- PdfAnnotationCollection annotationCollection = page.Annotations;
- annotationCollection.Add(soundAnnotation);
- //Clear the annotation collection.
- annotationCollection.Clear();
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Add this annotation to a new page.
- Dim annotationCollection As PdfAnnotationCollection = page.Annotations
- annotationCollection.Add(soundAnnotation)
- 'Clear the annotation collection.
- annotationCollection.Clear()
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- //Add this annotation to a new page.
- PdfAnnotationCollection annotationCollection = page.Annotations;
- //Add the sound annotation to annotation collection.
- annotationCollection.Add(soundAnnotation);
- bool exist = annotationCollection.Contains(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Add this annotation to a new page.
- Dim annotationCollection As PdfAnnotationCollection = page.Annotations
- 'Add the sound annotation to annotation collection.
- annotationCollection.Add(soundAnnotation)
- Dim exist As Boolean = annotationCollection.Contains(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- //Add this annotation to a new page.
- PdfAnnotationCollection annotationCollection = page.Annotations;
- annotationCollection.Add(soundAnnotation);
- //Get the index
- int index = annotationCollection.IndexOf(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Add this annotation to a new page.
- Dim annotationCollection As PdfAnnotationCollection = page.Annotations
- annotationCollection.Add(soundAnnotation)
- 'Get the index
- Dim index As Integer = annotationCollection.IndexOf(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- //Add this annotation to a new page.
- PdfAnnotationCollection annotationCollection = page.Annotations;
- annotationCollection.Insert(1, soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Add this annotation to a new page.
- Dim annotationCollection As PdfAnnotationCollection = page.Annotations
- annotationCollection.Insert(1, soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- //Add this annotation to a new page.
- PdfAnnotationCollection annotationCollection = page.Annotations;
- annotationCollection.Add(soundAnnotation);
- //Removes a sound annotation at specified index
- annotationCollection.RemoveAt(0);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Add this annotation to a new page.
- Dim annotationCollection As PdfAnnotationCollection = page.Annotations
- annotationCollection.Add(soundAnnotation)
- 'Removes a sound annotation at specified index
- annotationCollection.RemoveAt(0)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- //Add this annotation to a new page.
- PdfAnnotationCollection annotationCollection = page.Annotations;
- annotationCollection.Add(soundAnnotation);
- //Remove a sound annotation.
- annotationCollection.Remove(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Add this annotation to a new page.
- Dim annotationCollection As PdfAnnotationCollection = page.Annotations
- annotationCollection.Add(soundAnnotation)
- 'Remove a sound annotation.
- annotationCollection.Remove(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- //Add this annotation to a new page.
- PdfAnnotationCollection annotationCollection = page.Annotations;
- annotationCollection.Add(soundAnnotation);
- PdfAnnotation annotation = annotationCollection[0] as PdfAnnotation;
- //Save the document to disk.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Add this annotation to a new page.
- Dim annotationCollection As PdfAnnotationCollection = page.Annotations
- annotationCollection.Add(soundAnnotation)
- Dim annotation As PdfAnnotation = TryCast(annotationCollection(0), PdfAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create the PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 10);
- //Create a brush
- PdfBrush brush = PdfBrushes.Blue;
- //Create a new pdf3d annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new pdf appearance
- annot.Appearance = new PdfAppearance(annotation);
- annot.Appearance.Normal.Graphics.DrawString("Click to activate", font, brush, new PointF(40, 40));
- //Add this annotation to a new page
- annot.Appearance.Normal.Draw(page, new PointF(annot.Location.X, annot.Location.Y));
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create the PDF document
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 10)
- 'Create a brush
- Dim brush As PdfBrush = PdfBrushes.Blue
- 'Create a new pdf3d annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new pdf appearance
- annot.Appearance = New PdfAppearance(annotation)
- annot.Appearance.Normal.Graphics.DrawString("Click to activate", font, brush, New PointF(40, 40))
- 'Add this annotation to a new page
- annot.Appearance.Normal.Draw(page, New PointF(annot.Location.X, annot.Location.Y))
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create the PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 10);
- //Create a brush
- PdfBrush brush = PdfBrushes.Blue;
- //Create a new pdf3d annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new pdf appearance
- annot.Appearance = new PdfAppearance(annotation);
- annot.Appearance.Normal.Graphics.DrawString("Click to activate", font, brush, new PointF(40, 40));
- //Add this annotation to a new page
- annot.Appearance.Normal.Draw(page, new PointF(annot.Location.X, annot.Location.Y));
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create the PDF document
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 10)
- 'Create a brush
- Dim brush As PdfBrush = PdfBrushes.Blue
- 'Create a new pdf3d annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new pdf appearance
- annot.Appearance = New PdfAppearance(annotation)
- annot.Appearance.Normal.Graphics.DrawString("Click to activate", font, brush, New PointF(40, 40))
- 'Add this annotation to a new page
- annot.Appearance.Normal.Draw(page, New PointF(annot.Location.X, annot.Location.Y))
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create the PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 10);
- //Create a brush
- PdfBrush brush = PdfBrushes.Blue;
- //Create a new pdf3d annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new pdf appearance
- annot.Appearance = new PdfAppearance(annotation);
- annot.Appearance.Normal.Graphics.DrawString("Click to activate", font, brush, new PointF(40, 40));
- //Add this annotation to a new page
- annot.Appearance.Normal.Draw(page, new PointF(annot.Location.X, annot.Location.Y));
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create the PDF document
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 10)
- 'Create a brush
- Dim brush As PdfBrush = PdfBrushes.Blue
- 'Create a new pdf3d annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new pdf appearance
- annot.Appearance = New PdfAppearance(annotation)
- annot.Appearance.Normal.Graphics.DrawString("Click to activate", font, brush, New PointF(40, 40))
- 'Add this annotation to a new page
- annot.Appearance.Normal.Draw(page, New PointF(annot.Location.X, annot.Location.Y))
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create the PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 10);
- //Create a brush
- PdfBrush brush = PdfBrushes.Blue;
- //Create a new pdf3d annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new pdf appearance
- annot.Appearance = new PdfAppearance(annotation);
- annot.Appearance.MouseHover.Graphics.DrawString("Click to activate", font, brush, new PointF(40, 40));
- //Add this annotation to a new page
- annot.Appearance.MouseHover.Draw(page, new PointF(annot.Location.X, annot.Location.Y));
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create the PDF document
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 10)
- 'Create a brush
- Dim brush As PdfBrush = PdfBrushes.Blue
- 'Create a new pdf3d annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new pdf appearance
- annot.Appearance = New PdfAppearance(annotation)
- annot.Appearance.MouseHover.Graphics.DrawString("Click to activate", font, brush, New PointF(40, 40))
- 'Add this annotation to a new page
- annot.Appearance.MouseHover.Draw(page, New PointF(annot.Location.X, annot.Location.Y))
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create the PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 10);
- //Create a brush
- PdfBrush brush = PdfBrushes.Blue;
- //Create a new pdf3d annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new pdf appearance
- annot.Appearance = new PdfAppearance(annotation);
- annot.Appearance.Pressed.Graphics.DrawString("Click to activate", font, brush, new PointF(40, 40));
- //Add this annotation to a new page
- annot.Appearance.Pressed.Draw(page, new PointF(annot.Location.X, annot.Location.Y));
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create the PDF document
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 10)
- 'Create a brush
- Dim brush As PdfBrush = PdfBrushes.Blue
- 'Create a new pdf3d annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new pdf appearance
- annot.Appearance = New PdfAppearance(annotation)
- annot.Appearance.Pressed.Graphics.DrawString("Click to activate", font, brush, New PointF(40, 40))
- 'Add this annotation to a new page
- annot.Appearance.Pressed.Draw(page, New PointF(annot.Location.X, annot.Location.Y))
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF attachmentRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new attachment annotation.
- PdfAttachmentAnnotation attachmentAnnotation = new PdfAttachmentAnnotation(attachmentRectangle, @"Input.png");
- //Set the attachment icon to attachment annotation.
- attachmentAnnotation.Icon = PdfAttachmentIcon.PushPin;
- //Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim attachmentRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new attachment annotation.
- Dim attachmentAnnotation As New PdfAttachmentAnnotation(attachmentRectangle, "Input.png")
- 'Set the attachment icon to attachment annotation.
- attachmentAnnotation.Icon = PdfAttachmentIcon.PushPin
- 'Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create the PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 10);
- //Create a brush
- PdfBrush brush = PdfBrushes.Blue;
- //Create a new pdf3d annotation.
- Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create a new pdf appearance
- annot.Appearance = new PdfAppearance(annotation);
- annot.Appearance.Normal.Graphics.DrawString("Click to activate", font, brush, new PointF(40, 40));
- //Add this annotation to a new page
- annot.Appearance.Normal.Draw(page, new PointF(annot.Location.X, annot.Location.Y));
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create the PDF document
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 10)
- 'Create a brush
- Dim brush As PdfBrush = PdfBrushes.Blue
- 'Create a new pdf3d annotation.
- Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create a new PDF appearance.
- annot.Appearance = New PdfAppearance(annotation)
- annot.Appearance.Normal.Graphics.DrawString("Click to activate", font, brush, New PointF(40, 40))
- 'Add this annotation to a new page
- annot.Appearance.Normal.Draw(page, New PointF(annot.Location.X, annot.Location.Y))
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF attachmentBounds = new RectangleF(10, 40, 30, 30);
- //Create a new attachment annotation.
- PdfAttachmentAnnotation attachmentAnnotation = new PdfAttachmentAnnotation(attachmentBounds, @"Input.jpg");
- //Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim attachmentBounds As New RectangleF(10, 40, 30, 30)
- 'Create a new attachment annotation.
- Dim attachmentAnnotation As New PdfAttachmentAnnotation(attachmentBounds, "Input.jpg")
- 'Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF attachmentBounds = new RectangleF(10, 40, 30, 30);
- //Load the image as bytes
- byte[] iamgeBytes = File.ReadAllBytes("Input.jpg");
- //Create a new attachment annotation.
- PdfAttachmentAnnotation attachmentAnnotation = new PdfAttachmentAnnotation(attachmentBounds, @"Input.jpg", iamgeBytes);
- //Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim attachmentBounds As New RectangleF(10, 40, 30, 30)
- 'Load the image as bytes
- Dim iamgeBytes() As Byte = File.ReadAllBytes("Input.jpg")
- 'Create a new attachment annotation.
- Dim attachmentAnnotation As New PdfAttachmentAnnotation(attachmentBounds, "Input.jpg", iamgeBytes)
- 'Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF attachmentBounds = new RectangleF(10, 40, 30, 30);
- //Load the image as stream
- FileStream stream = new FileStream(@"Input.jpg", FileMode.Open);
- //Create a new attachment annotation.
- PdfAttachmentAnnotation attachmentAnnotation = new PdfAttachmentAnnotation(attachmentBounds, "Input.jpg", stream);
- //Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim attachmentBounds As New RectangleF(10, 40, 30, 30)
- 'Load the image as stream
- Dim stream As New FileStream("Input.jpg", FileMode.Open)
- 'Create a new attachment annotation.
- Dim attachmentAnnotation As New PdfAttachmentAnnotation(attachmentBounds, "Input.jpg", stream)
- 'Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF attachmentRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new attachment annotation.
- PdfAttachmentAnnotation attachmentAnnotation = new PdfAttachmentAnnotation(attachmentRectangle, @"Input.png");
- //Set the attachment icon to attachment annotation.
- attachmentAnnotation.Icon = PdfAttachmentIcon.PushPin;
- //Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim attachmentRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new attachment annotation.
- Dim attachmentAnnotation As New PdfAttachmentAnnotation(attachmentRectangle, "Input.png")
- 'Set the attachment icon to attachment annotation.
- attachmentAnnotation.Icon = PdfAttachmentIcon.PushPin
- 'Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF Document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF attachmentBounds = new RectangleF(10, 40, 30, 30);
- //Create a new attachment annotation.
- PdfAttachmentAnnotation attachmentAnnotation = new PdfAttachmentAnnotation(attachmentBounds, @"Input.wav");
- //Set the file name.
- attachmentAnnotation.FileName = "input.wav";
- //Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF Document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim attachmentRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new attachment annotation.
- Dim attachmentAnnotation As New PdfAttachmentAnnotation(attachmentRectangle, "Input.png")
- 'Set the file name.
- attachmentAnnotation.FileName = "input.wav"
- 'Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create the PDF Document
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF docLinkAnnotationRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new document link annotation.
- PdfDocumentLinkAnnotation documentAnnotation = new PdfDocumentLinkAnnotation(docLinkAnnotationRectangle);
- //Create a new page .
- PdfPage page2 = document.Pages.Add();
- //Set the pdf destination.
- documentAnnotation.Destination = new PdfDestination(page2);
- //Set the pdf destination location.
- documentAnnotation.Destination.Location = new Point(10, 0);
- //Add this annotation to a new page.
- page.Annotations.Add(documentAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create the PDF Document
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim docLinkAnnotationRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new document link annotation.
- Dim documentAnnotation As New PdfDocumentLinkAnnotation(docLinkAnnotationRectangle)
- 'Create a new page .
- Dim page2 As PdfPage = document.Pages.Add()
- 'Set the pdf destination.
- documentAnnotation.Destination = New PdfDestination(page2)
- 'Set the pdf destination location.
- documentAnnotation.Destination.Location = New Point(10, 0)
- 'Add this annotation to a new page.
- page.Annotations.Add(documentAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create the PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF docLinkAnnotationRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new document link annotation.
- PdfDocumentLinkAnnotation documentAnnotation = new PdfDocumentLinkAnnotation(docLinkAnnotationRectangle);
- //Create a new page .
- PdfPage page2 = document.Pages.Add();
- //Set the pdf destination.
- documentAnnotation.Destination = new PdfDestination(page2);
- //Set the pdf destination location.
- documentAnnotation.Destination.Location = new Point(10, 0);
- //Add this annotation to a new page.
- page.Annotations.Add(documentAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create the PDF document
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim docLinkAnnotationRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new document link annotation.
- Dim documentAnnotation As New PdfDocumentLinkAnnotation(docLinkAnnotationRectangle)
- 'Create a new page .
- Dim page2 As PdfPage = document.Pages.Add()
- 'Set the pdf destination.
- documentAnnotation.Destination = New PdfDestination(page2)
- 'Set the pdf destination location.
- documentAnnotation.Destination.Location = New Point(10, 0)
- 'Add this annotation to a new page.
- page.Annotations.Add(documentAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create the PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF docLinkAnnotationRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new page .
- PdfPage page2 = document.Pages.Add();
- //Create a new pdf destination.
- PdfDestination destination = new PdfDestination(page2);
- //Create a new document link annotation.
- PdfDocumentLinkAnnotation documentAnnotation = new PdfDocumentLinkAnnotation(docLinkAnnotationRectangle, destination);
- //Set the annotation text.
- documentAnnotation.Text = "Document link annotation";
- //Add this annotation to a new page.
- page.Annotations.Add(documentAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create the PDF document
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim docLinkAnnotationRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new page .
- Dim page2 As PdfPage = document.Pages.Add()
- 'Create a new pdf destination.
- Dim destination As New PdfDestination(page2)
- 'Create a new document link annotation.
- Dim documentAnnotation As New PdfDocumentLinkAnnotation(docLinkAnnotationRectangle, destination)
- 'Set the annotation text.
- documentAnnotation.Text = "Document link annotation"
- 'Add this annotation to a new page.
- page.Annotations.Add(documentAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new PDF file link annotation.
- PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(rectangle, @"Input.png");
- //Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new PDF file link annotation.
- Dim fileLinkAnnotation As New PdfFileLinkAnnotation(rectangle, "Input.png")
- 'Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new pdf file link annotation.
- PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(rectangle, @"Input.png");
- //Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new pdf file link annotation.
- Dim fileLinkAnnotation As New PdfFileLinkAnnotation(rectangle, "Input.png")
- 'Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new PDF file link annotation.
- PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(rectangle, @"Input.png");
- //Get the file name.
- string fileName = fileLinkAnnotation.FileName;
- //Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
- 'Create a new PDF file link annotation.
- Dim fileLinkAnnotation As PdfFileLinkAnnotation = New PdfFileLinkAnnotation(rectangle, "Input.png")
- 'Gets the file name.
- Dim fileName As String=fileLinkAnnotation.FileName
- 'Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(true);
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new file link annotation.
- PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(rectangle, "input.png");
- //Set an action to file link annotation.
- PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
- fileLinkAnnotation.Action = javaAction;
- //Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new file link annotation.
- Dim fileLinkAnnotation As New PdfFileLinkAnnotation(rectangle, "input.png")
- 'Set an action to file link annotation.
- Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
- fileLinkAnnotation.Action = javaAction
- 'Add this annotation to a new page.
- page.Annotations.Add(fileLinkAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //set the points
- List(float) linePoints = new List(float) { 40, 300, 60, 100, 40, 50, 40, 300 };
- //Create a new ink annotation
- RectangleF rectangle = new RectangleF(0, 0, 300, 400);
- //Create a inkAnnotation and set the properties
- PdfInkAnnotation inkAnnotation = new PdfInkAnnotation(rectangle, linePoints);
- inkAnnotation.Color = new PdfColor(Color.Red);
- inkAnnotation.BorderWidth = 4;
- inkAnnotation.BorderStyle = PdfLineBorderStyle.Beveled;
- //Add annotation to the page
- page.Annotations.Add(inkAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'set the points
- Dim linePoints As New List(Of Single) (New Single() {40, 300, 60, 100, 40, 50, 40, 300})
- 'Create a new ink annotation
- Dim rectangle As New RectangleF(0, 0, 300, 400)
- 'Create a inkAnnotation and set the properties
- Dim inkAnnotation As New PdfInkAnnotation(rectangle, linePoints)
- inkAnnotation.Color = New PdfColor(Color.Red)
- inkAnnotation.BorderWidth = 4
- inkAnnotation.BorderStyle = PdfLineBorderStyle.Beveled
- 'Add annotation to the page
- page.Annotations.Add(inkAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annotation");
- //Create PDF line border
- LineBorder lineBorder = new LineBorder();
- lineBorder.BorderStyle = PdfBorderStyle.Solid;
- lineBorder.BorderWidth = 1;
- lineAnnotation.lineBorder = lineBorder;
- lineAnnotation.LineIntent = PdfLineIntent.LineDimension;
- //Assign the line ending style
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt;
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond;
- lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default;
- //Assign the line color
- lineAnnotation.InnerLineColor = new PdfColor(Color.Green);
- lineAnnotation.BackColor = new PdfColor(Color.Green);
- //Assign the leader line
- lineAnnotation.LeaderLineExt = 0;
- lineAnnotation.LeaderLine = 0;
- //Assign the Line caption type
- lineAnnotation.LineCaption = true;
- lineAnnotation.CaptionType = PdfLineCaptionType.Inline;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Create PDF line border
- Dim lineBorder As New LineBorder()
- lineBorder.BorderStyle = PdfBorderStyle.Solid
- lineBorder.BorderWidth = 1
- lineAnnotation.lineBorder = lineBorder
- lineAnnotation.LineIntent = PdfLineIntent.LineDimension
- 'Assign the line ending style
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond
- lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default
- 'Assign the line color
- lineAnnotation.InnerLineColor = New PdfColor(Color.Green)
- lineAnnotation.BackColor = New PdfColor(Color.Green)
- 'Assign the leader line
- lineAnnotation.LeaderLineExt = 0
- lineAnnotation.LeaderLine = 0
- 'Assign the Line caption type
- lineAnnotation.LineCaption = True
- lineAnnotation.CaptionType = PdfLineCaptionType.Inline
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation and set properties.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points);
- lineAnnotation.Text = "Line Annotation";
- //Create pdf line border
- LineBorder lineBorder = new LineBorder();
- lineBorder.BorderStyle = PdfBorderStyle.Solid;
- lineBorder.BorderWidth = 1;
- lineAnnotation.lineBorder = lineBorder;
- lineAnnotation.LineIntent = PdfLineIntent.LineDimension;
- //Assign the line ending style
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt;
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond;
- lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default;
- //Assign the line color
- lineAnnotation.InnerLineColor = new PdfColor(Color.Green);
- lineAnnotation.BackColor = new PdfColor(Color.Green);
- //Assign the leader line
- lineAnnotation.LeaderLineExt = 0;
- lineAnnotation.LeaderLine = 0;
- //Assign the Line caption type
- lineAnnotation.LineCaption = true;
- lineAnnotation.CaptionType = PdfLineCaptionType.Inline;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation and set properties.
- Dim lineAnnotation As New PdfLineAnnotation(points)
- lineAnnotation.Text = "Line Annotation"
- 'Create pdf line border
- Dim lineBorder As New LineBorder()
- lineBorder.BorderStyle = PdfBorderStyle.Solid
- lineBorder.BorderWidth = 1
- lineAnnotation.lineBorder = lineBorder
- lineAnnotation.LineIntent = PdfLineIntent.LineDimension
- 'Assign the line ending style
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond
- lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default
- 'Assign the line color
- lineAnnotation.InnerLineColor = New PdfColor(Color.Green)
- lineAnnotation.BackColor = New PdfColor(Color.Green)
- 'Assign the leader line
- lineAnnotation.LeaderLineExt = 0
- lineAnnotation.LeaderLine = 0
- 'Assign the Line caption type
- lineAnnotation.LineCaption = True
- lineAnnotation.CaptionType = PdfLineCaptionType.Inline
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new pag .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Create pdf line border
- LineBorder lineBorder = new LineBorder();
- lineBorder.DashArray = 1;
- lineAnnotation.lineBorder = lineBorder;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new pag .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Create pdf line border
- Dim lineBorder As New LineBorder()
- lineBorder.DashArray = 1
- lineAnnotation.lineBorder = lineBorder
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation and set properties.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(new RectangleF(80, 420, 150, 420));
- lineAnnotation.Text = "Line Annotation";
- lineAnnotation.LinePoints = points;
- //Create pdf line border
- LineBorder lineBorder = new LineBorder();
- lineBorder.BorderStyle = PdfBorderStyle.Solid;
- lineBorder.BorderWidth = 1;
- lineAnnotation.lineBorder = lineBorder;
- lineAnnotation.LineIntent = PdfLineIntent.LineDimension;
- //Assign the line ending style
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt;
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond;
- lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default;
- //Assign the line color
- lineAnnotation.InnerLineColor = new PdfColor(Color.Green);
- lineAnnotation.BackColor = new PdfColor(Color.Green);
- //Assign the leader line
- lineAnnotation.LeaderLineExt = 0;
- lineAnnotation.LeaderLine = 0;
- //Assign the Line caption type
- lineAnnotation.LineCaption = true;
- lineAnnotation.CaptionType = PdfLineCaptionType.Inline;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation and set properties.
- Dim lineAnnotation As New PdfLineAnnotation(New RectangleF(80, 420, 150, 420))
- lineAnnotation.Text = "Line Annotation"
- lineAnnotation.LinePoints = points
- 'Create pdf line border
- Dim lineBorder As New LineBorder()
- lineBorder.BorderStyle = PdfBorderStyle.Solid
- lineBorder.BorderWidth = 1
- lineAnnotation.lineBorder = lineBorder
- lineAnnotation.LineIntent = PdfLineIntent.LineDimension
- 'Assign the line ending style
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond
- lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default
- 'Assign the line color
- lineAnnotation.InnerLineColor = New PdfColor(Color.Green)
- lineAnnotation.BackColor = New PdfColor(Color.Green)
- 'Assign the leader line
- lineAnnotation.LeaderLineExt = 0
- lineAnnotation.LeaderLine = 0
- 'Assign the Line caption type
- lineAnnotation.LineCaption = True
- lineAnnotation.CaptionType = PdfLineCaptionType.Inline
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Set the line caption.
- lineAnnotation.LineCaption = true;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Set the line caption.
- lineAnnotation.LineCaption = True
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Set the leader line.
- lineAnnotation.LeaderLine = 10;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Set the leader line.
- lineAnnotation.LeaderLine = 10
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Set the leader line.
- lineAnnotation.LeaderLine = 10;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Set the leader line.
- lineAnnotation.LeaderLine = 10
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Set the leader line extension.
- lineAnnotation.LeaderLineExt = 10
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Create pdf line border
- Dim lineBorder As New LineBorder()
- lineBorder.BorderStyle = PdfBorderStyle.Solid
- lineBorder.BorderWidth = 1
- lineAnnotation.lineBorder = lineBorder
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Sets the begin line style.
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Sets the begin line style.
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Sets the line ending style.
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Sets the line ending style.
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Sets the line caption type.
- lineAnnotation.CaptionType = PdfLineCaptionType.Inline;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Sets the line caption type.
- lineAnnotation.CaptionType = PdfLineCaptionType.Inline
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Sets the line intent.
- lineAnnotation.LineIntent = PdfLineIntent.LineDimension;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Sets the line intent.
- lineAnnotation.LineIntent = PdfLineIntent.LineDimension
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Sets the inner line color.
- lineAnnotation.InnerLineColor = new PdfColor(Color.Green);
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Sets the inner line color.
- lineAnnotation.InnerLineColor = New PdfColor(Color.Green)
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Sets the line back color.
- lineAnnotation.BackColor = new PdfColor(Color.Green);
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Sets the line back color.
- lineAnnotation.BackColor = New PdfColor(Color.Green)
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(new RectangleF(100, 100, 100, 20));
- //Sets the LinePoints.
- lineAnnotation.LinePoints = points;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(New RectangleF(100, 100, 100, 20))
- 'Sets the LinePoints.
- lineAnnotation.LinePoints = points
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annotation");
- //Create pdf line border
- LineBorder lineBorder = new LineBorder();
- lineBorder.DashArray = 1;
- lineAnnotation.lineBorder = lineBorder;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = {80, 420, 150, 420}
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annotation")
- 'Create pdf line border
- Dim lineBorder As New LineBorder()
- lineBorder.DashArray = 1
- lineAnnotation.lineBorder = lineBorder
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annotation");
- //Create pdf line border
- LineBorder lineBorder = new LineBorder();
- lineBorder.BorderStyle = PdfBorderStyle.Solid;
- lineBorder.BorderWidth = 1;
- lineAnnotation.lineBorder = lineBorder;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annotation")
- 'Create pdf line border
- Dim lineBorder As New LineBorder()
- lineBorder.BorderStyle = PdfBorderStyle.Solid
- lineBorder.BorderWidth = 1
- lineAnnotation.lineBorder = lineBorder
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annotation");
- //Create pdf line border
- LineBorder lineBorder = new LineBorder();
- lineBorder.DashArray = 1;
- lineAnnotation.lineBorder = lineBorder;
- lineAnnotation.lineBorder.BorderWidth = 4;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = {80, 420, 150, 420}
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annotation")
- 'Create pdf line border
- Dim lineBorder As New LineBorder()
- lineBorder.DashArray = 1
- lineAnnotation.lineBorder = lineBorder
- lineAnnotation.lineBorder.BorderWidth = 4
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annotation");
- //Create pdf line border
- LineBorder lineBorder = new LineBorder();
- lineBorder.BorderStyle = PdfBorderStyle.Solid;
- lineBorder.BorderWidth = 1;
- lineAnnotation.lineBorder = lineBorder;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annotation")
- 'Create pdf line border
- Dim lineBorder As New LineBorder()
- lineBorder.BorderStyle = PdfBorderStyle.Solid
- lineBorder.BorderWidth = 1
- lineAnnotation.lineBorder = lineBorder
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annotation");
- //Create pdf line border
- LineBorder lineBorder = new LineBorder();
- lineBorder.BorderStyle = PdfBorderStyle.Solid;
- lineBorder.BorderWidth = 1;
- lineBorder.DashArray = 1;
- lineAnnotation.lineBorder = lineBorder;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annotation")
- 'Create pdf line border
- Dim lineBorder As New LineBorder()
- lineBorder.BorderStyle = PdfBorderStyle.Solid
- lineBorder.BorderWidth = 1
- lineBorder.DashArray = 1
- lineAnnotation.lineBorder = lineBorder
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf3d annotation.
- Pdf3DAnnotation pdf3dAnnotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Create pdfFont, pdfFont style and brush
- Font font = new Font("Calibri", 11, FontStyle.Regular);
- PdfFont pdfFont = new PdfTrueTypeFont(font, false);
- PdfBrush brush = new PdfSolidBrush(Color.DarkBlue);
- //Create 3D activation
- Pdf3DActivation activation = new Pdf3DActivation();
- activation.ActivationMode = Pdf3DActivationMode.PageVisible;
- activation.ShowToolbar = true;
- pdf3dAnnotation.Activation = activation;
- Pdf3DView defaultView = new Pdf3DView();
- defaultView.ExternalName = "Near View";
- defaultView.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- defaultView.CenterOfOrbit = 131.695f;
- //Set the 3D background
- Pdf3DBackground background=new Pdf3DBackground();
- background.Color=new PdfColor(Color.Blue);
- defaultView.Background = background;
- //Set the projection
- Pdf3DProjection projection = new Pdf3DProjection(Pdf3DProjectionType.Orthographic);
- defaultView.Projection = projection;
- //Set the render mode
- Pdf3DRendermode renderMode = new Pdf3DRendermode(Pdf3DRenderStyle.Solid);
- defaultView.RenderMode = renderMode;
- //Set the lighting scheme
- Pdf3DLighting lighting = new Pdf3DLighting(Pdf3DLightingStyle.Night);
- defaultView.LightingScheme = lighting;
- //Add the view
- pdf3dAnnotation.Views.Add(defaultView);
- pdf3dAnnotation.Appearance.Normal.Graphics.DrawString("Click to activate", pdfFont, brush, new PointF(40, 40));
- //Add this annotation to a new page
- pdf3dAnnotation.Appearance.Normal.Draw(page, new PointF(pdf3dAnnotation.Location.X, pdf3dAnnotation.Location.Y));
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf3d annotation.
- Dim pdf3dAnnotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Create pdfFont, pdfFont style and brush
- Dim font As New Font("Calibri", 11, FontStyle.Regular)
- Dim pdfFont As PdfFont = New PdfTrueTypeFont(font, False)
- Dim brush As PdfBrush = New PdfSolidBrush(Color.DarkBlue)
- Dim activation As New Pdf3DActivation()
- activation.ActivationMode = Pdf3DActivationMode.PageVisible
- activation.ShowToolbar = True
- pdf3dAnnotation.Activation = activation
- Dim defaultView As New Pdf3DView()
- defaultView.ExternalName = "Near View"
- defaultView.CameraToWorldMatrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- defaultView.CenterOfOrbit = 131.695f
- 'Set the 3D background
- Dim background As New Pdf3DBackground()
- background.Color = New PdfColor(Color.Blue)
- defaultView.Background = background
- 'Set the projection
- Dim projection As New Pdf3DProjection(Pdf3DProjectionType.Orthographic)
- defaultView.Projection = projection
- 'Set the render mode
- Dim renderMode As New Pdf3DRendermode(Pdf3DRenderStyle.Solid)
- defaultView.RenderMode = renderMode
- 'Set the lighting scheme
- Dim lighting As New Pdf3DLighting(Pdf3DLightingStyle.Night)
- defaultView.LightingScheme = lighting
- 'Add the view
- pdf3dAnnotation.Views.Add(defaultView)
- pdf3dAnnotation.Appearance.Normal.Graphics.DrawString("Click to activate", pdfFont, brush, New PointF(40, 40))
- 'Add this annotation to a new page
- pdf3dAnnotation.Appearance.Normal.Draw(page, New PointF(pdf3dAnnotation.Location.X, pdf3dAnnotation.Location.Y))
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf3d annotation.
- Pdf3DAnnotation pdf3dAnnotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150));
- //Adds the annotation.
- page.Annotations.Add(pdf3dAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf3d annotation.
- Dim pdf3dAnnotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150))
- 'Adds the annotation.
- page.Annotations.Add(pdf3dAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf3d annotation.
- Pdf3DAnnotation pdf3dAnnotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150));
- //Adds the annotation.
- page.Annotations.Add(pdf3dAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf3d annotation.
- Dim pdf3dAnnotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Adds the annotation on a page.
- page.Annotations.Add(pdf3dAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf3d annotation.
- Pdf3DAnnotation pdf3dAnnotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- Pdf3DView defaultView = new Pdf3DView();
- defaultView.ExternalName = "Near View";
- defaultView.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- defaultView.CenterOfOrbit = 131.695f;
- //Add views
- pdf3dAnnotation.Views.Add(defaultView);
- //Get the views
- Pdf3DViewCollection viewCollection = pdf3dAnnotation.Views;
- //Add the annotation
- page.Annotations.Add(pdf3dAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf3d annotation.
- Dim pdf3dAnnotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- Dim defaultView As New Pdf3DView()
- defaultView.ExternalName = "Near View"
- defaultView.CameraToWorldMatrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- defaultView.CenterOfOrbit = 131.695f
- 'Add views
- pdf3dAnnotation.Views.Add(defaultView)
- 'Get the views
- Dim viewCollection As Pdf3DViewCollection = pdf3dAnnotation.Views
- 'Add the annotation
- page.Annotations.Add(pdf3dAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf3d annotation.
- Pdf3DAnnotation pdf3dAnnotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- pdf3dAnnotation.DefaultView = 0;
- page.Annotations.Add(pdf3dAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf3d annotation.
- Dim pdf3dAnnotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- pdf3dAnnotation.DefaultView = 0
- page.Annotations.Add(pdf3dAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf3d annotation.
- Pdf3DAnnotation pdf3dAnnotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- pdf3dAnnotation.OnInstantiate = "Near View";
- //Create a pdf 3d view.
- Pdf3DView defaultView = new Pdf3DView();
- defaultView.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
- defaultView.CenterOfOrbit = 131.695f;
- pdf3dAnnotation.Views.Add(defaultView);
- //Adds the annotation.
- page.Annotations.Add(pdf3dAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf3d annotation.
- Dim pdf3dAnnotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- pdf3dAnnotation.OnInstantiate = "Near View"
- 'Create a pdf 3d view.
- Dim defaultView As New Pdf3DView()
- defaultView.CameraToWorldMatrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
- defaultView.CenterOfOrbit = 131.695f
- pdf3dAnnotation.Views.Add(defaultView)
- 'Adds the annotation.
- page.Annotations.Add(pdf3dAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf3d annotation.
- Pdf3DAnnotation pdf3dAnnotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Creates a new pdf3d activation.
- Pdf3DActivation activation = new Pdf3DActivation();
- activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation;
- activation.ShowToolbar = false;
- pdf3dAnnotation.Activation = activation;
- //Adds the annotation.
- page.Annotations.Add(pdf3dAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf3d annotation.
- Dim pdf3dAnnotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Creatas a new pdf3d actviation.
- Dim activation As New Pdf3DActivation()
- activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation
- activation.ShowToolbar = False
- pdf3dAnnotation.Activation = activation
- 'Adds the annotation.
- page.Annotations.Add(pdf3dAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf3d annotation.
- Pdf3DAnnotation pdf3dAnnotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
- //Gets the filename.
- string fileName = pdf3dAnnotation.FileName;
- //Adds the annotation.
- page.Annotations.Add(pdf3dAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf3d annotation.
- Dim pdf3dAnnotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
- 'Gets the filename.
- Dim fileName As String = pdf3dAnnotation.FileName
- 'Adds the annotation.
- page.Annotations.Add(pdf3dAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF textAnnotationBounds = new RectangleF(10, 40, 100, 30);
- //Create a new line annotation.
- PdfFreeTextAnnotation textAnnotation = new PdfFreeTextAnnotation(textAnnotationBounds);
- //Set the text and font
- textAnnotation.MarkupText = "Text Annotation";
- textAnnotation.Font = new PdfStandardFont(PdfFontFamily.Courier, 10);
- //Set the line caption type.
- textAnnotation.AnnotationIntent = PdfAnnotationIntent.FreeTextCallout;
- //Add this annotation to a new page.
- page.Annotations.Add(textAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim textAnnotationBounds As New RectangleF(10, 40, 100, 30)
- 'Create a new line annotation.
- Dim textAnnotation As New PdfFreeTextAnnotation(textAnnotationBounds)
- 'Set the text and font
- textAnnotation.MarkupText = "Text Annotation"
- textAnnotation.Font = New PdfStandardFont(PdfFontFamily.Courier, 10)
- 'Set the line caption type.
- textAnnotation.AnnotationIntent = PdfAnnotationIntent.FreeTextCallout
- 'Add this annotation to a new page.
- page.Annotations.Add(textAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create document named destinations.
- PdfNamedDestination namedDestination = new PdfNamedDestination("Page 1");
- //Set the destination page.
- namedDestination.Destination = new PdfDestination(page);
- //Set the destination location.
- namedDestination.Destination.Location = new PointF(20, 20);
- //Add the named destination.
- document.NamedDestinationCollection.Add(namedDestination);
- //Save and close the PDF document.
- document.Save("NamedDestination.pdf");
- document.Close(true);
-
-
- 'Create a new document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create document named destinations.
- Dim namedDestination As PdfNamedDestination = New PdfNamedDestination("Page 1")
- 'Set the destination page.
- namedDestination.Destination = New PdfDestination(page)
- 'Set the destination location.
- namedDestination.Destination.Location = New PointF(20, 20)
- 'Add the named destination.
- document.NamedDestinationCollection.Add(namedDestination)
- 'Save and close the PDF document.
- document.Save("NamedDestination.pdf")
- document.Close(True)
-
-
- //Create a new document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create document named destinations.
- PdfNamedDestination namedDestination = new PdfNamedDestination("Page 1");
- //Set the destination page.
- namedDestination.Destination = new PdfDestination(page);
- //check whether the specified named destination present in the collection
- document.NamedDestinationCollection.Contains(namedDestination);
- //Save and close the PDF document.
- document.Save("NamedDestination.pdf");
- document.Close(true);
-
-
- 'Create a new document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create document named destinations.
- Dim namedDestination As PdfNamedDestination = New PdfNamedDestination("Page 1")
- 'Set the destination page.
- namedDestination.Destination = New PdfDestination(page)
- 'Set the destination location.
- namedDestination.Destination.Location = New PointF(20, 20)
- 'check whether the specified named destination present in the collection
- Dim isNamedDestinationContained As Boolean = document.NamedDestinationCollection.Contains(namedDestination)
- 'Save and close the PDF document.
- document.Save("NamedDestination.pdf")
- document.Close(True)
-
-
- //Load the PDF document.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");
- //Get all the named destinations.
- PdfNamedDestinationCollection namedCollection = loadedDocument.NamedDestinationCollection;
- //Remove named destination by named destination name.
- namedCollection.Remove("Page 1");
- //Remove named destination by index.
- namedCollection.RemoveAt(1);
- //Save and close the document.
- loadedDocument.Save("NamedDestination.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document.
- Dim loadedDocument As New PdfLoadedDocument("input.pdf")
- 'Get all the named destinations.
- Dim namedCollection As PdfNamedDestinationCollection = loadedDocument.NamedDestinationCollection
- 'Remove named destination by named destination name.
- namedCollection.Remove("Page 1")
- 'Remove named destination by index.
- namedCollection.RemoveAt(1)
- 'Save and close the document.
- loadedDocument.Save("NamedDestination.pdf")
- loadedDocument.Close(True)
-
-
- //Load the PDF document.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");
- //Get all the named destinations.
- PdfNamedDestinationCollection namedCollection = loadedDocument.NamedDestinationCollection;
- //Remove named destination by named destination name.
- namedCollection.Remove("Page 1");
- //Remove named destination by index.
- namedCollection.RemoveAt(1);
- //Save and close the document.
- loadedDocument.Save("NamedDestination.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document.
- Dim loadedDocument As New PdfLoadedDocument("input.pdf")
- 'Get all the named destinations.
- Dim namedCollection As PdfNamedDestinationCollection = loadedDocument.NamedDestinationCollection
- 'Remove named destination by named destination name.
- namedCollection.Remove("Page 1")
- 'Remove named destination by index.
- namedCollection.RemoveAt(1)
- 'Save and close the document.
- loadedDocument.Save("NamedDestination.pdf")
- loadedDocument.Close(True)
-
-
- //Load the PDF document
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
- //Get the Named destinations
- PdfNamedDestinationCollection namedCollection = loadedDocument.NamedDestinationCollection;
- //Remove all the named destination form the collection
- namedCollection.Clear();
- //Save and close the PDF document
- loadedDocument.Save("NamedDestination.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document
- Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
- 'Get the Named destination
- Dim namedCollection As PdfNamedDestinationCollection = loadedDocument.NamedDestinationCollection
- 'Remove all the named destination form the collection
- namedCollection.Clear()
- 'Save and close the document
- loadedDocument.Save("NamedDestination.pdf")
- loadedDocument.Close(True)
-
-
- //Load the PDF document.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
- //Insert a new named destination in the existing named destinations.
- PdfNamedDestination namedDestination = new PdfNamedDestination("Page 2");
- //Set the destination page and location.
- namedDestination.Destination = new PdfDestination(loadedDocument.Pages[0]);
- namedDestination.Destination.Location = new PointF(0, 300);
- //Insert the named destination
- loadedDocument.NamedDestinationCollection.Insert(1, namedDestination);
- //Save and close the PDF document.
- loadedDocument.Save("NamedDestination.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document.
- Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
- 'Insert a new named destination in the existing named destinations.
- Dim namedDestination As PdfNamedDestination = New PdfNamedDestination("Page 2")
- 'Set the destination page and location.
- namedDestination.Destination = New PdfDestination(loadedDocument.Pages(0))
- namedDestination.Destination.Location = New PointF(0, 300)
- Insert the named destination
- loadedDocument.NamedDestinationCollection.Insert(1, namedDestination)
- 'Save and close the PDF document.
- loadedDocument.Save("NamedDestination.pdf")
- loadedDocument.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
- //Sets the annotation flags
- attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default;
- //Sets the file name.
- fileLinkAnnotation.FileName = @"..\..\Data\Manual.txt";
- // Set the file link annotation border.
- fileLinkAnnotation.Border=new PdfAnnotationBorder(4, 0, 0);
- //Set the file link annotation color.
- fileLinkAnnotation.Color=new PdfColor(Color.Blue);
- //Sets the file link annotation text.
- fileLinkAnnotation.Text = "File Link Annotation";
- //Save the document.
- document.Save("fileLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
- 'Sets the annotation flags
- attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default
- 'Sets the file name.
- fileLinkAnnotation.FileName = @"..\..\Data\Manual.txt"
- ' Set the file link annotation border.
- fileLinkAnnotation.Border=New PdfAnnotationBorder(4, 0, 0)
- 'Set the file link annotation color.
- fileLinkAnnotation.Color=New PdfColor(Color.Blue)
- 'Sets the file link annotation text.
- fileLinkAnnotation.Text = "File Link Annotation"
- 'Save the document.
- document.Save("fileLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedSoundAnnotation soundAnnotation = document.Pages[1].Annotations[5] as PdfLoadedSoundAnnotation;
- //Sets the annotation text.
- soundAnnotation.SetText("Sound Annotation");
- //Save the document.
- document.Save("SoundAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim soundAnnotation As PdfLoadedSoundAnnotation = document.Pages(1).Annotations(5) as PdfLoadedSoundAnnotation
- 'Sets the annotation text.
- soundAnnotation.SetText("Sound Annotation")
- 'Save the document.
- document.Save("SoundAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Get the annotation from loaded document.
- PdfLoadedSoundAnnotation soundAnnotation = document.Pages[1].Annotations[5] as PdfLoadedSoundAnnotation;
- //Get the page.
- PdfLoadedPage page =soundAnnotation.Page;
- //Save the document.
- document.Save("SoundAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim soundAnnotation As PdfLoadedSoundAnnotation = document.Pages(1).Annotations(5) as PdfLoadedSoundAnnotation
- 'Gets the page.
- Dim page As PdfLoadedPage=soundAnnotation.Page
- 'Save the document.
- document.Save("SoundAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
- //Set the file link annotation color.
- fileLinkAnnotation.Color=new PdfColor(Color.Blue);
- //Save the document.
- document.Save("fileLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
- 'Set the file link annotation color.
- fileLinkAnnotation.Color=New PdfColor(Color.Blue)
- 'Save the document.
- document.Save("fileLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
- //Sets the file link annotation text.
- fileLinkAnnotation.Text = "File Link Annotation";
- //Save the document.
- document.Save("fileLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
- 'Sets the file link annotation text.
- fileLinkAnnotation.Text = "File Link Annotation"
- 'Save the document.
- document.Save("fileLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
- 'Sets the file link annotation bounds.
- fileLinkAnnotation.Bounds = new RectangleF(100,100,50,50);
- //Save the document.
- document.Save("fileLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
- 'Sets the file link annotation bounds.
- fileLinkAnnotation.Bounds = New RectangleF(100,100,50,50)
- 'Save the document.
- document.Save("fileLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
- //Sets the annotation flags
- attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default;
- // Set the file link annotation border.
- fileLinkAnnotation.Border=new PdfAnnotationBorder(4, 0, 0);
- //Save the document.
- document.Save("fileLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
- ' Set the file link annotation border.
- fileLinkAnnotation.Border=New PdfAnnotationBorder(4, 0, 0)
- 'Save the document.
- document.Save("fileLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
- //Sets the file link Annotation location.
- fileLinkAnnotation.Location new PointF(100,100);
- //Save the document.
- document.Save("fileLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
- 'Sets the file link Annotation location
- fileLinkAnnotation.Location =New PointF(100,100)
- 'Save the document.
- document.Save("fileLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
- //Sets the size
- attchmentAnnotation.Size=new SizeF(100,50)
- //Save the document.
- document.Save("fileLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
- 'Sets the size
- attchmentAnnotation.Size=New SizeF(100,50)
- 'Save the document.
- document.Save("fileLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
- //Sets the annotation flags
- attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default;
- //Save the document.
- document.Save("fileLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
- 'Sets the annotation flags
- attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default
- 'Save the document.
- document.Save("fileLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create PDF font and PDF font style .
- Font font = new Font("Calibri", 10, FontStyle.Bold);
- PdfFont pdfFont = new PdfTrueTypeFont(font, false);
- //Create a new pdf brush.
- PdfBrush pdfBrush = new PdfSolidBrush(Color.Black);
- //Draw text in the new page.
- page.Graphics.DrawString("Text Markup Annotation Demo", pdfFont, pdfBrush, new PointF(150, 10));
- string markupText = "Text Markup";
- SizeF size = pdfFont.MeasureString(markupText);
- RectangleF rectangle = new RectangleF(175, 40, size.Width, size.Height);
- page.Graphics.DrawString(markupText, pdfFont, pdfBrush, rectangle);
- //Create a pdf text markup annotation .
- PdfTextMarkupAnnotation markupAnnotation = new PdfTextMarkupAnnotation("Markup annotation", "Markup annotation with highlight style", markupText, new PointF(175, 40), pdfFont);
- markupAnnotation.TextMarkupColor = new PdfColor(Color.BlueViolet);
- markupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight;
- //Add this annotation to a new page.
- page.Annotations.Add(markupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create pdf font and pdf font style .
- Dim font As New Font("Calibri", 10, FontStyle.Bold)
- Dim pdfFont As PdfFont = New PdfTrueTypeFont(font, False)
- 'Create a new PDF brush.
- Dim pdfBrush As PdfBrush = New PdfSolidBrush(Color.Black)
- 'Draw text in the new page.
- page.Graphics.DrawString("Text Markup Annotation Demo", pdfFont, pdfBrush, New PointF(150, 10))
- Dim markupText As String = "Text Markup"
- Dim size As SizeF = pdfFont.MeasureString(markupText)
- Dim rectangle As New RectangleF(175, 40, size.Width, size.Height)
- page.Graphics.DrawString(markupText, pdfFont, pdfBrush, rectangle)
- 'Create a pdf text markup annotation .
- Dim markupAnnotation As New PdfTextMarkupAnnotation("Markup annotation", "Markup annotation with highlight style", markupText, New PointF(175, 40), pdfFont)
- markupAnnotation.TextMarkupColor = New PdfColor(Color.BlueViolet)
- markupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight
- 'Add this annotation to a new page.
- page.Annotations.Add(markupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create PDF font and font style .
- Font font = new Font("Calibri", 10, FontStyle.Bold);
- PdfFont pdfFont = new PdfTrueTypeFont(font, false);
- //Create a new PDF brush.
- PdfBrush pdfBrush = new PdfSolidBrush(Color.Black);
- page.Graphics.DrawString("Text Markup Annotation Demo", pdfFont, pdfBrush, new PointF(150, 10));
- string markupText = "Text Markup";
- SizeF size = pdfFont.MeasureString(markupText);
- RectangleF rectangle = new RectangleF(175, 40, size.Width, size.Height);
- page.Graphics.DrawString(markupText, pdfFont, pdfBrush, rectangle);
- //Create a pdf text markup annotation .
- PdfTextMarkupAnnotation markupAnnotation = new PdfTextMarkupAnnotation();
- markupAnnotation.Text = "Text Markup annotation";
- markupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight;
- //Add this annotation to a new page.
- page.Annotations.Add(markupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create pdf font and font style .
- Dim font As New Font("Calibri", 10, FontStyle.Bold)
- Dim pdfFont As PdfFont = New PdfTrueTypeFont(font, False)
- 'Create a new PDF brush.
- Dim pdfBrush As PdfBrush = New PdfSolidBrush(Color.Black)
- page.Graphics.DrawString("Text Markup Annotation Demo", pdfFont, pdfBrush, New PointF(150, 10))
- Dim markupText As String = "Text Markup"
- Dim size As SizeF = pdfFont.MeasureString(markupText)
- Dim rectangle As New RectangleF(175, 40, size.Width, size.Height)
- page.Graphics.DrawString(markupText, pdfFont, pdfBrush, rectangle)
- 'Create a pdf text markup annotation .
- Dim markupAnnotation As New PdfTextMarkupAnnotation()
- markupAnnotation.Text = "Text Markup annotation"
- markupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight
- 'Add this annotation to a new page.
- page.Annotations.Add(markupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create PDF font and font style .
- Font font = new Font("Calibri", 10, FontStyle.Bold);
- PdfFont pdfFont = new PdfTrueTypeFont(font, false);
- //Create a new PDF brush.
- PdfBrush pdfBrush = new PdfSolidBrush(Color.Black);
- //Draw text in the new page.
- page.Graphics.DrawString("Text Markup Annotation Demo", pdfFont, pdfBrush, new PointF(150, 10));
- string markupText = "Text Markup";
- SizeF size = pdfFont.MeasureString(markupText);
- RectangleF rectangle = new RectangleF(175, 40, size.Width, size.Height);
- page.Graphics.DrawString(markupText, pdfFont, pdfBrush, rectangle);
- //Create a pdf text markup annotation.
- PdfTextMarkupAnnotation markupAnnotation = new PdfTextMarkupAnnotation("Markup annotation", "Markup annotation with highlight style", markupText, new PointF(175, 40), pdfFont);
- markupAnnotation.TextMarkupColor = new PdfColor(Color.BlueViolet);
- markupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight;
- //Add this annotation to a new page.
- page.Annotations.Add(markupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create PDF font and font style .
- Dim font As New Font("Calibri", 10, FontStyle.Bold)
- Dim pdfFont As PdfFont = New PdfTrueTypeFont(font, False)
- 'Create a new PDF brush.
- Dim pdfBrush As PdfBrush = New PdfSolidBrush(Color.Black)
- 'Draw text in the new page.
- page.Graphics.DrawString("Text Markup Annotation Demo", pdfFont, pdfBrush, New PointF(150, 10))
- Dim markupText As String = "Text Markup"
- Dim size As SizeF = pdfFont.MeasureString(markupText)
- Dim rectangle As New RectangleF(175, 40, size.Width, size.Height)
- page.Graphics.DrawString(markupText, pdfFont, pdfBrush, rectangle)
- 'Create a pdf text markup annotation.
- Dim markupAnnotation As New PdfTextMarkupAnnotation("Markup annotation", "Markup annotation with highlight style", markupText, New PointF(175, 40), pdfFont)
- markupAnnotation.TextMarkupColor = New PdfColor(Color.BlueViolet)
- markupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight
- 'Add this annotation to a new page.
- page.Annotations.Add(markupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create PDF font and font style .
- PdfFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize);
- //Create a new PDF brush.
- PdfBrush pdfBrush = new PdfSolidBrush(Color.Black);
- page.Graphics.DrawString("Text Markup Annotation Demo", pdfFont, pdfBrush, new PointF(150, 10));
- string markupText = "Text Markup";
- SizeF size = pdfFont.MeasureString(markupText);
- RectangleF rectangle = new RectangleF(175, 40, size.Width, size.Height);
- page.Graphics.DrawString(markupText, pdfFont, pdfBrush, rectangle);
- //Create a pdf text markup annotation .
- PdfTextMarkupAnnotation markupAnnotation = new PdfTextMarkupAnnotation(rectangle);
- markupAnnotation.TextMarkupColor = new PdfColor(Color.BlueViolet);
- markupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight;
- //Add this annotation to a new page.
- page.Annotations.Add(markupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create pdffont and pdffont style .
- Dim pdfFont As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, fontSize)
- 'Create a new pdfbrush .
- Dim pdfBrush As PdfBrush = New PdfSolidBrush(Color.Black)
- page.Graphics.DrawString("Text Markup Annotation Demo", pdfFont, pdfBrush, New PointF(150, 10))
- Dim markupText As String = "Text Markup"
- Dim size As SizeF = pdfFont.MeasureString(markupText)
- Dim rectangle As New RectangleF(175, 40, size.Width, size.Height)
- page.Graphics.DrawString(markupText, pdfFont, pdfBrush, rectangle)
- 'Create a pdf text markup annotation .
- Dim markupAnnotation As New PdfTextMarkupAnnotation(rectangle)
- markupAnnotation.TextMarkupColor = New PdfColor(Color.BlueViolet)
- markupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight
- 'Add this annotation to a new page.
- page.Annotations.Add(markupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create PDF font and font style .
- Font font = new Font("Calibri", 10, FontStyle.Bold);
- PdfFont pdfFont = new PdfTrueTypeFont(font, false);
- //Create a new PDF brush.
- PdfBrush pdfBrush = new PdfSolidBrush(Color.Black);
- //Draw text in the new page.
- page.Graphics.DrawString("Text Markup Annotation Demo", pdfFont, pdfBrush, new PointF(150, 10));
- string markupText = "Text Markup";
- SizeF size = pdfFont.MeasureString(markupText);
- RectangleF rectangle = new RectangleF(175, 40, size.Width, size.Height);
- page.Graphics.DrawString(markupText, pdfFont, pdfBrush, rectangle);
- //Create a PDF text markup annotation .
- PdfTextMarkupAnnotation markupAnnotation = new PdfTextMarkupAnnotation("Markup annotation", "Markup annotation with highlight style", markupText, new PointF(175, 40), pdfFont);
- markupAnnotation.TextMarkupColor = new PdfColor(Color.BlueViolet);
- markupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight;
- //Add this annotation to a new page.
- page.Annotations.Add(markupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create pdf font and pdf font style .
- Dim font As New Font("Calibri", 10, FontStyle.Bold)
- Dim pdfFont As PdfFont = New PdfTrueTypeFont(font, False)
- 'Create a new PdfBrush.
- Dim pdfBrush As PdfBrush = New PdfSolidBrush(Color.Black)
- 'Draw text in the new page.
- page.Graphics.DrawString("Text Markup Annotation Demo", pdfFont, pdfBrush, New PointF(150, 10))
- Dim markupText As String = "Text Markup"
- Dim size As SizeF = pdfFont.MeasureString(markupText)
- Dim rectangle As New RectangleF(175, 40, size.Width, size.Height)
- page.Graphics.DrawString(markupText, pdfFont, pdfBrush, rectangle)
- 'Create a pdf text markup annotation .
- Dim markupAnnotation As New PdfTextMarkupAnnotation("Markup annotation", "Markup annotation with highlight style", markupText, New PointF(175, 40), pdfFont)
- markupAnnotation.TextMarkupColor = New PdfColor(Color.BlueViolet)
- markupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight
- 'Add this annotation to a new page.
- page.Annotations.Add(markupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new solid brush
- PdfBrush brush = new PdfSolidBrush(Color.Black);
- //Set the font
- float fontSize = 10f;
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize);
- //Create a text web link annotation
- PdfTextWebLink webLinkAnnotation = new PdfTextWebLink();
- webLinkAnnotation.Url = "http://www.yahoo.com";
- webLinkAnnotation.Text = "Yahoo Mail";
- webLinkAnnotation.Brush = brush;
- webLinkAnnotation.Font = font;
- webLinkAnnotation.Pen = PdfPens.Brown;
- webLinkAnnotation.DrawTextWebLink(page, new PointF(50, 40));
- page.Graphics.DrawString("Go to Yahoo Web Site", font, brush, new PointF(110, 40));
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new solid brush
- Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
- 'Set the font
- Dim fontSize As Single = 10f
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, fontSize)
- 'Create a text web link annotation
- Dim webLinkAnnotation As New PdfTextWebLink()
- webLinkAnnotation.Url = "http://www.yahoo.com"
- webLinkAnnotation.Text = "Yahoo Mail"
- webLinkAnnotation.Brush = brush
- webLinkAnnotation.Font = font
- webLinkAnnotation.Pen = PdfPens.Brown
- webLinkAnnotation.DrawTextWebLink(page, New PointF(50, 40))
- page.Graphics.DrawString("Go to Yahoo Web Site", font, brush, New PointF(110, 40))
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page to the document.
- PdfPage page = document.Pages.Add();
- //Create PDF graphics for the page.
- PdfGraphics graphics = page.Graphics;
- //Use the font installed in the machine
- PdfFont font = new PdfTrueTypeFont(new Font("Arial", 14));
- //Create PDF text element
- PdfTextElement element = new PdfTextElement("Hello World!!!", font, PdfBrushes.Black);
- //Draw the text element.
- element.Draw(graphics);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = document.Pages.Add()
- 'Create PDF graphics for the page.
- Dim graphics As PdfGraphics = page.Graphics
- 'Use the font installed in the machine
- Dim font As PdfFont = New PdfTrueTypeFont(New Font("Arial", 14))
- 'Create PDF text element
- Dim element As New PdfTextElement("Hello World!!!", font, PdfBrushes.Black)
- 'Draw the text element.
- element.Draw(graphics)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page to the document.
- PdfPage page = document.Pages.Add();
- //Create PDF graphics for the page.
- PdfGraphics graphics = page.Graphics;
- //Use the font installed in the machine
- PdfFont font = new PdfTrueTypeFont(new Font("Arial", 14));
- //Create PDF text element
- PdfTextElement element = new PdfTextElement("Hello World!!!", font, PdfBrushes.Black);
- //Create layout format
- PdfLayoutFormat format=new PdfLayoutFormat();
- format.Layout=PdfLayoutType.Paginate;
- //Draw the text with layout format
- element.Draw(page, new RectangleF(0, 0, 200, 400), format);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = document.Pages.Add()
- 'Create PDF graphics for the page.
- Dim graphics As PdfGraphics = page.Graphics
- 'Use the font installed in the machine
- Dim font As PdfFont = New PdfTrueTypeFont(New Font("Arial", 14))
- 'Create PDF text element
- Dim element As New PdfTextElement("Hello World!!!", font, PdfBrushes.Black)
- 'Create layout format
- Dim format As New PdfLayoutFormat()
- format.Layout = PdfLayoutType.Paginate
- 'Draw the text with layout format
- element.Draw(page, New RectangleF(0, 0, 200, 400), format)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new solid brush
- PdfBrush brush = new PdfSolidBrush(Color.Black);
- //Set the font
- float fontSize = 10f;
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize);
- //Create a text web link annotation
- PdfTextWebLink webLinkAnnotation = new PdfTextWebLink();
- webLinkAnnotation.Url = "http://www.yahoo.com";
- webLinkAnnotation.Text = "Yahoo Mail";
- webLinkAnnotation.Brush = brush;
- webLinkAnnotation.Font = font;
- webLinkAnnotation.Pen = PdfPens.Brown;
- webLinkAnnotation.DrawTextWebLink(page, new PointF(50, 40));
- page.Graphics.DrawString("Go to Yahoo Web Site", font, brush, new PointF(110, 40));
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new solid brush
- Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
- 'Set the font
- Dim fontSize As Single = 10f
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, fontSize)
- 'Create a text web link annotation
- Dim webLinkAnnotation As New PdfTextWebLink()
- webLinkAnnotation.Url = "http://www.yahoo.com"
- webLinkAnnotation.Text = "Yahoo Mail"
- webLinkAnnotation.Brush = brush
- webLinkAnnotation.Font = font
- webLinkAnnotation.Pen = PdfPens.Brown
- webLinkAnnotation.DrawTextWebLink(page, New PointF(50, 40))
- page.Graphics.DrawString("Go to Yahoo Web Site", font, brush, New PointF(110, 40))
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new solid brush
- PdfBrush brush = new PdfSolidBrush(Color.Black);
- //Set the font
- float fontSize = 10f;
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize);
- //Create a text weblink annotation
- PdfTextWebLink webLinkAnnotation = new PdfTextWebLink();
- webLinkAnnotation.Url = "http://www.yahoo.com";
- webLinkAnnotation.Text = "Yagoo Mail";
- webLinkAnnotation.Brush = brush;
- webLinkAnnotation.Font = font;
- webLinkAnnotation.Pen = PdfPens.Brown;
- webLinkAnnotation.DrawTextWebLink(page, new PointF(50, 40));
- page.Graphics.DrawString("Go to Yahoo Web Site", font, brush, new PointF(110, 40));
- //Add this annotation to a new page.
- page.Annotations.Add(webLinkAnnotation);
- //Save the document to disk.
- document.Save("TextWebLink(.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new solid brush
- Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
- 'Set the font
- Dim fontSize As Single = 10f
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, fontSize)
- 'Create a text weblink annotation
- Dim webLinkAnnotation As PdfTextWebLink = New PdfTextWebLink()
- webLinkAnnotation.Url = "http://www.yahoo.com"
- webLinkAnnotation.Text = "Yagoo Mail"
- webLinkAnnotation.Brush = brush
- webLinkAnnotation.Font = font
- webLinkAnnotation.Pen = PdfPens.Brown
- webLinkAnnotation.DrawTextWebLink(page, new PointF(50, 40))
- page.Graphics.DrawString("Go to Yahoo Web Site", font, brush, new PointF(110, 40))
- 'Add this annotation to a new page.
- page.Annotations.Add(webLinkAnnotation)
- 'Save the document to disk.
- document.Save("TextWebLink(.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new solid brush
- PdfBrush brush = new PdfSolidBrush(Color.Black);
- //Set the font
- float fontSize = 10f;
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize);
- //Create a text weblink annotation
- PdfTextWebLink webLinkAnnotation = new PdfTextWebLink();
- webLinkAnnotation.Url = "http://www.yahoo.com";
- webLinkAnnotation.Text = "Yagoo Mail";
- webLinkAnnotation.Brush = brush;
- webLinkAnnotation.Font = font;
- webLinkAnnotation.Pen = PdfPens.Brown;
- webLinkAnnotation.DrawTextWebLink(page.Graphics, new PointF(50, 40));
- page.Graphics.DrawString("Go to Yahoo Web Site", font, brush, new PointF(110, 40));
- //Add this annotation to a new page.
- page.Annotations.Add(webLinkAnnotation);
- //Save the document to disk.
- document.Save("TextWebLink(.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new solid brush
- Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
- 'Set the font
- Dim fontSize As Single = 10f
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, fontSize)
- 'Create a text weblink annotation
- Dim webLinkAnnotation As PdfTextWebLink = New PdfTextWebLink()
- webLinkAnnotation.Url = "http://www.yahoo.com"
- webLinkAnnotation.Text = "Yagoo Mail"
- webLinkAnnotation.Brush = brush
- webLinkAnnotation.Font = font
- webLinkAnnotation.Pen = PdfPens.Brown
- webLinkAnnotation.DrawTextWebLink(page.Graphics, new PointF(50, 40))
- page.Graphics.DrawString("Go to Yahoo Web Site", font, brush, new PointF(110, 40))
- 'Add this annotation to a new page.
- page.Annotations.Add(webLinkAnnotation)
- 'Save the document to disk.
- document.Save("TextWebLink(.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new solid brush
- PdfBrush brush = new PdfSolidBrush(Color.Black);
- //Set the font
- float fontSize = 10f;
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize);
- //Create a text web link annotation
- PdfTextWebLink webLinkAnnotation = new PdfTextWebLink();
- webLinkAnnotation.Url = "http://www.yahoo.com";
- webLinkAnnotation.Text = "Yahoo Mail";
- webLinkAnnotation.Brush = brush;
- webLinkAnnotation.Font = font;
- webLinkAnnotation.Pen = PdfPens.Brown;
- webLinkAnnotation.DrawTextWebLink(page, new PointF(50, 40));
- page.Graphics.DrawString("Go to Yahoo Web Site", font, brush, new PointF(110, 40));
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new solid brush
- Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
- 'Set the font
- Dim fontSize As Single = 10f
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, fontSize)
- 'Create a text weblink annotation
- Dim webLinkAnnotation As New PdfTextWebLink()
- webLinkAnnotation.Url = "http://www.yahoo.com"
- webLinkAnnotation.Text = "Yagoo Mail"
- webLinkAnnotation.Brush = brush
- webLinkAnnotation.Font = font
- webLinkAnnotation.Pen = PdfPens.Brown
- webLinkAnnotation.DrawTextWebLink(page, New PointF(50, 40))
- page.Graphics.DrawString("Go to Yahoo Web Site", font, brush, New PointF(110, 40))
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(rectangle, "Test popup annotation");
- popupAnnotation.Border.Width = 4;
- popupAnnotation.Border.HorizontalRadius = 20;
- popupAnnotation.Border.VerticalRadius = 30;
- //Set the pdf popup icon.
- popupAnnotation.Icon = PdfPopupIcon.NewParagraph;
- //Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(rectangle, "Test popup annotation")
- popupAnnotation.Border.Width = 4
- popupAnnotation.Border.HorizontalRadius = 20
- popupAnnotation.Border.VerticalRadius = 30
- 'Set the pdf popup icon.
- popupAnnotation.Icon = PdfPopupIcon.NewParagraph
- 'Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation();
- popupAnnotation.Text = "Test popup annotation";
- popupAnnotation.Bounds = rectangle;
- popupAnnotation.Border.Width = 4;
- popupAnnotation.Border.HorizontalRadius = 20;
- popupAnnotation.Border.VerticalRadius = 30;
- //Set the pdf popup icon.
- popupAnnotation.Icon = PdfPopupIcon.NewParagraph;
- //Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation()
- popupAnnotation.Text = "Test popup annotation"
- popupAnnotation.Bounds = rectangle
- popupAnnotation.Border.Width = 4
- popupAnnotation.Border.HorizontalRadius = 20
- popupAnnotation.Border.VerticalRadius = 30
- 'Set the pdf popup icon.
- popupAnnotation.Icon = PdfPopupIcon.NewParagraph
- 'Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(rectangle);
- popupAnnotation.Text = "Test popup annotation";
- popupAnnotation.Border.Width = 4;
- popupAnnotation.Border.HorizontalRadius = 20;
- popupAnnotation.Border.VerticalRadius = 30;
- //Set the pdf popup icon.
- popupAnnotation.Icon = PdfPopupIcon.NewParagraph;
- //Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(rectangle)
- popupAnnotation.Text = "Test popup annotation"
- popupAnnotation.Border.Width = 4
- popupAnnotation.Border.HorizontalRadius = 20
- popupAnnotation.Border.VerticalRadius = 30
- 'Set the pdf popup icon.
- popupAnnotation.Icon = PdfPopupIcon.NewParagraph
- 'Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(rectangle, "Test popup annotation");
- popupAnnotation.Border.Width = 4;
- popupAnnotation.Border.HorizontalRadius = 20;
- popupAnnotation.Border.VerticalRadius = 30;
- //Set the pdf popup icon.
- popupAnnotation.Icon = PdfPopupIcon.NewParagraph;
- //Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(rectangle, "Test popup annotation")
- popupAnnotation.Border.Width = 4
- popupAnnotation.Border.HorizontalRadius = 20
- popupAnnotation.Border.VerticalRadius = 30
- 'Set the pdf popup icon.
- popupAnnotation.Icon = PdfPopupIcon.NewParagraph
- 'Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(rectangle, "Test popup annotation");
- //Set the Open to popupAnnotation.
- popupAnnotation.Open = true;
- //Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(rectangle, "Test popup annotation")
- 'Set the Open to popupAnnotation.
- popupAnnotation.Open = True
- 'Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf rubber stamp annotation.
- RectangleF rectangle = new RectangleF(40, 60, 80, 20);
- PdfRubberStampAnnotation rubberstampAnnotation = new PdfRubberStampAnnotation(rectangle, " Text Rubber Stamp Annotation");
- rubberstampAnnotation.Icon = PdfRubberStampAnnotationIcon.Draft;
- rubberstampAnnotation.Text = "Text Properties Rubber Stamp Annotation";
- page.Annotations.Add(rubberstampAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf rubber stamp annotation.
- Dim rectangle As New RectangleF(40, 60, 80, 20)
- Dim rubberstampAnnotation As New PdfRubberStampAnnotation(rectangle, " Text Rubber Stamp Annotation")
- rubberstampAnnotation.Icon = PdfRubberStampAnnotationIcon.Draft
- rubberstampAnnotation.Text = "Text Properties Rubber Stamp Annotation"
- page.Annotations.Add(rubberstampAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new pdf rubber stamp annotation.
- PdfRubberStampAnnotation rubberstampAnnotation = new PdfRubberStampAnnotation();
- rubberstampAnnotation.Icon = PdfRubberStampAnnotationIcon.Draft;
- rubberstampAnnotation.Text = "Text Properties Rubber Stamp Annotation";
- page.Annotations.Add(rubberstampAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf rubber stamp annotation.
- Dim rubberstampAnnotation As New PdfRubberStampAnnotation()
- rubberstampAnnotation.Icon = PdfRubberStampAnnotationIcon.Draft
- rubberstampAnnotation.Text = "Text Properties Rubber Stamp Annotation"
- page.Annotations.Add(rubberstampAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf rubber stamp annotation.
- RectangleF rubberStampAnnotationBounds = new RectangleF(40, 60, 80, 20);
- PdfRubberStampAnnotation rubberstampAnnotation = new PdfRubberStampAnnotation(rubberStampAnnotationBounds);
- rubberstampAnnotation.Icon = PdfRubberStampAnnotationIcon.Draft;
- rubberstampAnnotation.Text = "Text Properties Rubber Stamp Annotation";
- page.Annotations.Add(rubberstampAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf rubber stamp annotation.
- Dim rubberStampAnnotationBounds As New RectangleF(40, 60, 80, 20)
- Dim rubberStampAnnotation As New PdfRubberStampAnnotation(rubberStampAnnotationBounds)
- rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Draft
- rubberStampAnnotation.Text = "Text Properties Rubber Stamp Annotation"
- page.Annotations.Add(rubberStampAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf rubber stamp annotation.
- RectangleF rubberStampAnnotationBounds = new RectangleF(40, 60, 80, 20);
- PdfRubberStampAnnotation rubberStampAnnotation = new PdfRubberStampAnnotation(rubberStampAnnotationBounds, " Text Rubber Stamp Annotation");
- //Sets the PDF appearance.
- rubberStampAnnotation.Appearance = new PdfAppearance(rubberstampAnnotation);
- rubberStampAnnotation.Appearance.Normal.Draw(page, new PointF(rubberStampAnnotation.Location.X, rubberStampAnnotation.Location.Y));
- page.Annotations.Add(rubberStampAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf rubber stamp annotation.
- Dim rubberStampAnnotationBounds As New RectangleF(40, 60, 80, 20)
- Dim rubberStampAnnotation As New PdfRubberStampAnnotation(rubberStampAnnotationBounds, " Text Rubber Stamp Annotation")
- 'Sets the PDF appearance.
- rubberStampAnnotation.Appearance = New PdfAppearance(rubberstampAnnotation)
- rubberStampAnnotation.Appearance.Normal.Draw(page, New PointF(rubberStampAnnotation.Location.X, rubberStampAnnotation.Location.Y))
- page.Annotations.Add(rubberStampAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new pdf rubber stamp annotation.
- RectangleF rectangle = new RectangleF(40, 60, 80, 20);
- PdfRubberStampAnnotation rubberStampAnnotation = new PdfRubberStampAnnotation(rectangle, " Text Rubber Stamp Annotation");
- rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Draft;
- rubberStampAnnotation.Text = "Text Properties Rubber Stamp Annotation";
- page.Annotations.Add(rubberStampAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new pdf rubber stamp annotation.
- Dim rectangle As New RectangleF(40, 60, 80, 20)
- Dim rubberStampAnnotation As New PdfRubberStampAnnotation(rectangle, " Text Rubber Stamp Annotation")
- rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Draft
- rubberStampAnnotation.Text = "Text Properties Rubber Stamp Annotation"
- page.Annotations.Add(rubberStampAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- soundAnnotation.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAnnotation.Sound.Channels = PdfSoundChannels.Stereo;
- soundAnnotation.Sound.Bits = 16;
- soundAnnotation.Color = new PdfColor(Color.Red);
- //Sets the pdf sound icon.
- soundAnnotation.Icon = PdfSoundIcon.Speaker;
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- soundAnnotation.Sound.Encoding = PdfSoundEncoding.Signed
- soundAnnotation.Sound.Channels = PdfSoundChannels.Stereo
- soundAnnotation.Sound.Bits = 16
- soundAnnotation.Color = New PdfColor(Color.Red)
- 'Sets the pdf sound icon.
- soundAnnotation.Icon = PdfSoundIcon.Speaker
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- soundAnnotation.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAnnotation.Sound.Channels = PdfSoundChannels.Stereo;
- soundAnnotation.Sound.Bits = 16;
- soundAnnotation.Color = new PdfColor(Color.Red);
- //Sets the pdf sound icon.
- soundAnnotation.Icon = PdfSoundIcon.Speaker;
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Set the pdf sound
- soundAnnotation.Sound = New PdfSound("Input.wav")
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- soundAnnotation.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAnnotation.Sound.Channels = PdfSoundChannels.Stereo;
- soundAnnotation.Sound.Bits = 16;
- soundAnnotation.Color = new PdfColor(Color.Red);
- //Sets the pdf sound icon.
- soundAnnotation.Icon = PdfSoundIcon.Speaker;
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- soundAnnotation.Sound.Encoding = PdfSoundEncoding.Signed
- soundAnnotation.Sound.Channels = PdfSoundChannels.Stereo
- soundAnnotation.Sound.Bits = 16
- soundAnnotation.Color = New PdfColor(Color.Red)
- 'Sets the pdf sound icon.
- soundAnnotation.Icon = PdfSoundIcon.Speaker
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- soundAnnotation.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAnnotation.Sound.Channels = PdfSoundChannels.Stereo;
- soundAnnotation.Sound.Bits = 16;
- soundAnnotation.Color = new PdfColor(Color.Red);
- //Sets the pdf sound icon.
- soundAnnotation.Icon = PdfSoundIcon.Speaker;
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Set the pdf sound
- soundAnnotation.Sound = New PdfSound("Input.wav")
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page .
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- //Gets the file name.
- string fileName = soundAnnotation.FileName;
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page .
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Gets the file name.
- Dim fileName As String = soundAnnotation.FileName
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Uri Annotation.
- PdfUriAnnotation uriAnnotation = new PdfUriAnnotation(rectangle, "http://www.google.com");
- //Set Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation";
- //Add this annotation to a new page.
- page.Annotations.Add(uriAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Uri Annotation.
- Dim uriAnnotation As New PdfUriAnnotation(rectangle, "http://www.google.com")
- 'Set Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation"
- 'Add this annotation to a new page.
- page.Annotations.Add(uriAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Uri Annotation.
- PdfUriAnnotation uriAnnotation = new PdfUriAnnotation(rectangle);
- //Set Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation";
- // Set Uri to uriAnnotation
- uriAnnotation.Uri = "http://www.google.com";
- //Add this annotation to a new page.
- page.Annotations.Add(uriAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Uri Annotation.
- Dim uriAnnotation As New PdfUriAnnotation(rectangle)
- 'Set Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation"
- ' Set Uri to uriAnnotation
- uriAnnotation.Uri = "http://www.google.com"
- 'Add this annotation to a new page.
- page.Annotations.Add(uriAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Uri Annotation.
- PdfUriAnnotation uriAnnotation = new PdfUriAnnotation(rectangle, "http://www.google.com");
- //Set Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation";
- //Add this annotation to a new page.
- page.Annotations.Add(uriAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Creates a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Uri Annotation.
- Dim uriAnnotation As New PdfUriAnnotation(rectangle, "http://www.google.com")
- 'Set Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation"
- 'Add this annotation to a new page.
- page.Annotations.Add(uriAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Uri Annotation.
- PdfUriAnnotation uriAnnotation = new PdfUriAnnotation(rectangle, "http://www.google.com");
- //Set Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation";
- //Add this annotation to a new page.
- page.Annotations.Add(uriAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Uri Annotation.
- Dim uriAnnotation As New PdfUriAnnotation(rectangle, "http://www.google.com")
- 'Set Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation"
- 'Add this annotation to a new page.
- page.Annotations.Add(uriAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Uri Annotation.
- PdfUriAnnotation uriAnnotation = new PdfUriAnnotation(rectangle);
- //Set Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation";
- // Set Uri to uriAnnotation
- uriAnnotation.Uri = "http://www.google.com";
- //Creates a new Sound action
- PdfSoundAction soundAction = new PdfSoundAction(@"Input.wav");
- soundAction.Sound.Bits = 16;
- soundAction.Sound.Channels = PdfSoundChannels.Stereo;
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
- soundAction.Volume = 0.9f;
- uriAnnotation.Action = soundAction;
- //Add this annotation to a new page.
- page.Annotations.Add(uriAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new Uri Annotation.
- Dim uriAnnotation As New PdfUriAnnotation(rectangle)
- 'Set Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation"
- ' Set Uri to uriAnnotation
- uriAnnotation.Uri = "http://www.google.com"
- 'Creates a new Sound action
- Dim soundAction As New PdfSoundAction("Input.wav")
- soundAction.Sound.Bits = 16
- soundAction.Sound.Channels = PdfSoundChannels.Stereo
- soundAction.Sound.Encoding = PdfSoundEncoding.Signed
- soundAction.Volume = 0.9f
- uriAnnotation.Action = soundAction
- 'Add this annotation to a new page.
- page.Annotations.Add(uriAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new sound annotation.
- PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
- //Sets the sound icon
- soundAnnotation.Icon = PdfSoundIcon.Speaker;
- //Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim rectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new sound annotation.
- Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
- 'Sets the sound icon
- soundAnnotation.Icon = PdfSoundIcon.Speaker
- 'Add this annotation to a new page.
- page.Annotations.Add(soundAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF attachmentRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new attachment annotation.
- PdfAttachmentAnnotation attachmentAnnotation = new PdfAttachmentAnnotation(attachmentRectangle, @"Input.jpg");
- //Set the Attachment icon to attachment annotation.
- attachmentAnnotation.Icon = PdfAttachmentIcon.PushPin;
- //Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim attachmentRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new attachment annotation.
- Dim attachmentAnnotation As New PdfAttachmentAnnotation(attachmentRectangle, "Input.jpg")
- 'Set the Attachment icon to attachment annotation.
- attachmentAnnotation.Icon = PdfAttachmentIcon.PushPin
- 'Add this annotation to a new page.
- page.Annotations.Add(attachmentAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF docLinkAnnotationRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new document link annotation.
- PdfDocumentLinkAnnotation documentAnnotation = new PdfDocumentLinkAnnotation(docLinkAnnotationRectangle);
- //Set the annotation flags to document annotation.
- documentAnnotation.AnnotationFlags = PdfAnnotationFlags.NoRotate;
- //Add this annotation to a new page.
- page.Annotations.Add(documentAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim docLinkAnnotationRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new document link annotation.
- Dim documentAnnotation As New PdfDocumentLinkAnnotation(docLinkAnnotationRectangle)
- 'Set the annotation flags to document annotation.
- documentAnnotation.AnnotationFlags = PdfAnnotationFlags.NoRotate
- 'Add this annotation to a new page.
- page.Annotations.Add(documentAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
- //Create a new popup annotation.
- PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
- //Set the popup icon.
- popupAnnotation.Icon = PdfPopupIcon.NewParagraph;
- //Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
- 'Create a new popup annotation.
- Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
- 'Set the popup icon.
- popupAnnotation.Icon = PdfPopupIcon.NewParagraph
- 'Add this annotation to a new page.
- page.Annotations.Add(popupAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.Pdf");
- //Gets the annotation from loaded document.
- PdfLoadedRubberStampAnnotation rubberStampAnnotation = loadedDocument.Pages[1].Annotations[5] as PdfLoadedRubberStampAnnotation;
- //Set the icon
- rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Approved;
- //Save the document.
- loadedDocument.Save("Output.pdf");
- //close the document
- loadedDocument.Close(true);
-
-
- 'Load an existing document.
- Dim loadedDocument As New PdfLoadedDocument("Input.Pdf")
- 'Gets the annotation from loaded document.
- Dim rubberStampAnnotation As PdfLoadedRubberStampAnnotation = TryCast(loadedDocument.Pages(1).Annotations(5), PdfLoadedRubberStampAnnotation)
- 'Set the icon
- rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Approved
- 'Save the document.
- loadedDocument.Save("Output.pdf")
- 'close the document
- loadedDocument.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation linkAnnotation = new PdfLineAnnotation(points, "Line Annotation");
- linkannotation.EndLineStyle = PdfLineEndingStyle.Diamond;
- //Add this annotation to a new page.
- page.Annotations.Add(linkAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim linkAnnotation As New PdfLineAnnotation(points, "Line Annotation")
- linkannotation.EndLineStyle = PdfLineEndingStyle.Diamond
- 'Add this annotation to a new page.
- page.Annotations.Add(linkAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF inkAnnotationBounds = new RectangleF(10, 40, 30, 30);
- //To specify the line points
- List(float) points = new List(float) { 50, 50, 30, 30, 40, 40 };
- //Create a new line annotation.
- PdfInkAnnotation inkAnnotation = new PdfInkAnnotation(inkAnnotationBounds, points);
- inkAnnotation.Color = new PdfColor(Color.Red);
- //Set the line border style.
- inkAnnotation.BorderStyle = PdfLineBorderStyle.Dashed;
- //Add this annotation to a new page.
- page.Annotations.Add(inkAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim inkAnnotationBounds As New RectangleF(10, 40, 30, 30)
- 'To specify the line points
- Dim points As New List(Of Single) (New Single() {50, 50, 30, 30, 40, 40})
- 'Create a new line annotation.
- Dim inkAnnotation As New PdfInkAnnotation(inkAnnotationBounds, points)
- inkAnnotation.Color = New PdfColor(Color.Red)
- 'Set the line border style.
- inkAnnotation.BorderStyle = PdfLineBorderStyle.Dashed
- 'Add this annotation to a new page.
- page.Annotations.Add(inkAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Set the pdf line indent.
- lineAnnotation.LineIntent = PdfLineIntent.LineArrow;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Set the pdf line indent.
- lineAnnotation.LineIntent = PdfLineIntent.LineArrow
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //To specify the line end points
- int[] points = new int[] { 80, 420, 150, 420 };
- //Create a new line annotation.
- PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
- //Set the line caption type.
- lineAnnotation.CaptionType = PdfLineCaptionType.Inline;
- //Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'To specify the line end points
- Dim points() As Integer = { 80, 420, 150, 420 }
- 'Create a new line annotation.
- Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
- 'Set the line caption type.
- lineAnnotation.CaptionType = PdfLineCaptionType.Inline
- 'Add this annotation to a new page.
- page.Annotations.Add(lineAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedTextMarkupAnnotation textMarkupAnnotation = loadedDocument.Pages[1].Annotations[5] as PdfLoadedTextMarkupAnnotation;
- //Sets the pdf text markup annotation type
- textMarkupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight;
- //Save the document.
- loadedDocument.Save("Output.pdf");
- //close the document
- loadedDocument.Close(true);
-
-
- 'Load an existing document.
- Dim loadedDocument As New PdfLoadedDocument("input.pdf")
- 'Gets the annotation from loaded document.
- Dim textMarkupAnnotation As PdfLoadedTextMarkupAnnotation = TryCast(loadedDocument.Pages(1).Annotations(5), PdfLoadedTextMarkupAnnotation)
- 'Sets the pdf text markup annotation type
- textMarkupAnnotation.TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight
- 'Save the document.
- loadedDocument.Save("Output.pdf")
- 'close the document
- loadedDocument.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Create a new page.
- PdfPage page = document.Pages.Add();
- //Create a new rectangle
- RectangleF textAnnotationBounds = new RectangleF(10, 40, 100, 30);
- //Create a new line annotation.
- PdfFreeTextAnnotation actionAnnotation = new PdfFreeTextAnnotation(textAnnotationBounds);
- //Set the text and font
- actionAnnotation.MarkupText = "Text Annotation";
- actionAnnotation.Font = new PdfStandardFont(PdfFontFamily.Courier, 10);
- //Set the line caption type.
- actionAnnotation.AnnotationIntent = PdfAnnotationIntent.FreeTextCallout;
- //Add this annotation to a new page.
- page.Annotations.Add(actionAnnotation);
- //Save the document to disk.
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Create a new page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create a new rectangle
- Dim textAnnotationBounds As New RectangleF(10, 40, 100, 30)
- 'Create a new line annotation.
- Dim actionAnnotation As New PdfFreeTextAnnotation(textAnnotationBounds)
- 'Set the text and font
- actionAnnotation.MarkupText = "Text Annotation"
- actionAnnotation.Font = New PdfStandardFont(PdfFontFamily.Courier, 10)
- 'Set the line caption type.
- actionAnnotation.AnnotationIntent = PdfAnnotationIntent.FreeTextCallout
- 'Add this annotation to a new page.
- page.Annotations.Add(actionAnnotation)
- 'Save the document to disk.
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document.
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 100, 50);
- // Create Gray ColorSpace
- PdfCalGrayColorSpace calGrayCS = new PdfCalGrayColorSpace();
- // Create new instance for PdfCalGrayColor
- PdfCalGrayColor gray = new PdfCalGrayColor(calGrayCS);
- gray.Gray = 0.2;
- PdfPen pen = new PdfPen(gray);
- PdfBrush brush = new PdfSolidBrush(gray);
- // Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalGrayColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(20, 70, 100, 50)
- ' Creates GrayColorSpace
- Dim calGrayCS As PdfCalGrayColorSpace = New PdfCalGrayColorSpace()
- ' Create new instance for PdfCalGrayColor
- Dim gray As PdfCalGrayColor = New PdfCalGrayColor(calGrayCS)
- gray.Gray = 0.2
- Dim pen As PdfPen = New PdfPen(gray)
- Dim brush As PdfBrush = New PdfSolidBrush(gray)
- ' Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalGrayColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document.
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- RectangleF rect = new RectangleF(20, 70, 100, 50);
- // Create Gray ColorSpace
- PdfCalGrayColorSpace calGrayCS = new PdfCalGrayColorSpace();
- // Create new instance for PdfCalGrayColor
- PdfCalGrayColor gray = new PdfCalGrayColor(calGrayCS);
- gray.Gray = 0.2;
- PdfPen pen = new PdfPen(gray);
- PdfBrush brush = new PdfSolidBrush(gray);
- // Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalGrayColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page.
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(20, 70, 100, 50)
- ' Create Gray ColorSpace
- Dim calGrayCS As PdfCalGrayColorSpace = New PdfCalGrayColorSpace()
- ' Create new instance for PdfCalGrayColor
- Dim gray As PdfCalGrayColor = New PdfCalGrayColor(calGrayCS)
- gray.Gray = 0.2
- Dim pen As PdfPen = New PdfPen(gray)
- Dim brush As PdfBrush = New PdfSolidBrush(gray)
- ' Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalGrayColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Gets the graphics object.
- PdfGraphics g = page.Graphics;
- // Created font object
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- RectangleF rect = new RectangleF(20, 70, 100, 50);
- // Creates GrayColorSpace
- PdfCalGrayColorSpace calGrayCS = new PdfCalGrayColorSpace();
- // Create new instance for PdfCalGrayColor
- PdfCalGrayColor red = new PdfCalGrayColor(calGrayCS);
- red.Gray = 0.2;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draw the rectangle
- g.DrawRectangle(pen, rect);
- doc.Save("CalGrayColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Gets the graphics object.
- Dim g As PdfGraphics = page.Graphics
- ' Created font object
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- Dim rect As RectangleF = New RectangleF(20, 70, 100, 50)
- ' Creates GrayColorSpace
- Dim calGrayCS As PdfCalGrayColorSpace = New PdfCalGrayColorSpace()
- ' Create new instance for PdfCalGrayColor
- Dim red As PdfCalGrayColor = New PdfCalGrayColor(calGrayCS)
- red.Gray = 0.2
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draw the rectangle
- g.DrawRectangle(pen, rect)
- doc.Save("CalGrayColorSpace.pdf")
-
-
- // Create a new PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 100, 50);
- // Creates GrayColorSpace
- PdfCalGrayColorSpace calGrayCS = new PdfCalGrayColorSpace();
- // Create new instance for PdfCalGrayColor
- PdfCalGrayColor gray = new PdfCalGrayColor(calGrayCS);
- gray.Gray = 0.2;
- PdfPen pen = new PdfPen(gray);
- PdfBrush brush = new PdfSolidBrush(gray);
- // Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalGrayColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(20, 70, 100, 50)
- ' Creates GrayColorSpace
- Dim calGrayCS As PdfCalGrayColorSpace = New PdfCalGrayColorSpace()
- ' Create new instance for PdfCalGrayColor
- Dim gray As PdfCalGrayColor = New PdfCalGrayColor(calGrayCS)
- gray.Gray = 0.2
- Dim pen As PdfPen = New PdfPen(gray)
- Dim brush As PdfBrush = New PdfSolidBrush(gray)
- ' Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalGrayColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Set the document`s color spaces as GrayScale
- doc.ColorSpace = PdfColorSpace.GrayScale;
- PdfPen pen = new PdfPen(PdfBrushes.Red);
- // Draws the rectangle
- page.Graphics.DrawRectangle(pen, new RectangleF(0,0,100,200));
- doc.Save("ColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s color spaces as GrayScale
- doc.ColorSpace = PdfColorSpace.GrayScale
- Dim pen As PdfPen = New PdfPen(PdfBrushes.Red)
- ' Draws the rectangle
- page.Graphics.DrawRectangle(pen, New RectangleF(0,0,100,200))
- doc.Save("ColorSpace.pdf")
-
-
- // Create a new PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 100, 50);
- // Creates GrayColorSpace
- PdfCalGrayColorSpace calGrayCS = new PdfCalGrayColorSpace();
- // Create new instance for PdfCalGrayColor
- PdfCalGrayColor gray = new PdfCalGrayColor(calGrayCS);
- gray.Gray = 0.2;
- PdfPen pen = new PdfPen(gray);
- PdfBrush brush = new PdfSolidBrush(gray);
- // Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalGrayColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(20, 70, 100, 50)
- ' Creates GrayColorSpace
- Dim calGrayCS As PdfCalGrayColorSpace = New PdfCalGrayColorSpace()
- ' Create new instance for PdfCalGrayColor
- Dim gray As PdfCalGrayColor = New PdfCalGrayColor(calGrayCS)
- gray.Gray = 0.2
- Dim pen As PdfPen = New PdfPen(gray)
- Dim brush As PdfBrush = New PdfSolidBrush(gray)
- ' Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalGrayColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 100, 50);
- // Create CalGraycolor space
- PdfCalGrayColorSpace calGrayCS = new PdfCalGrayColorSpace();
- calGrayCS.BlackPoint = new double[] { 0.2, 0.3, 0.8 };
- // Create new instance for PdfCalGrayColor
- PdfCalGrayColor red = new PdfCalGrayColor(calGrayCS);
- red.Gray = 0.2;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalGrayColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(20, 70, 100, 50)
- ' Create CalGraycolor space
- Dim calGrayCS As PdfCalGrayColorSpace = New PdfCalGrayColorSpace()
- calGrayCS.BlackPoint = New Double() { 0.2, 0.3, 0.8 }
- ' Create new instance for PdfCalGrayColor
- Dim red As PdfCalGrayColor = New PdfCalGrayColor(calGrayCS)
- red.Gray = 0.2
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalGrayColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 100, 50);
- // Creates gray color space
- PdfCalGrayColorSpace calGrayCS = new PdfCalGrayColorSpace();
- // Update color values
- calGrayCS.Gamma = 0.7;
- // Create new instance for PdfCalGrayColor
- PdfCalGrayColor gray = new PdfCalGrayColor(calGrayCS);
- gray.Gray = 0.2;
- PdfPen pen = new PdfPen(gray);
- PdfBrush brush = new PdfSolidBrush(gray);
- // Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalGrayColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(20, 70, 100, 50)
- ' Creates gray color space
- Dim calGrayCS As PdfCalGrayColorSpace = New PdfCalGrayColorSpace()
- ' Update color values
- calGrayCS.Gamma = 0.7
- ' Create new instance for PdfCalGrayColor
- Dim gray As PdfCalGrayColor = New PdfCalGrayColor(calGrayCS)
- gray.Gray = 0.2
- Dim pen As PdfPen = New PdfPen(gray)
- Dim brush As PdfBrush = New PdfSolidBrush(gray)
- ' Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalGrayColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 100, 50);
- // Create CalGraycolor space
- PdfCalGrayColorSpace calGrayCS = new PdfCalGrayColorSpace();
- calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- // Create new instance for PdfCalGrayColor
- PdfCalGrayColor gray = new PdfCalGrayColor(calGrayCS);
- gray.Gray = 0.2;
- PdfPen pen = new PdfPen(gray);
- PdfBrush brush = new PdfSolidBrush(gray);
- // Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalGrayColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(20, 70, 100, 50)
- ' Create CalGraycolor space
- Dim calGrayCS As PdfCalGrayColorSpace = New PdfCalGrayColorSpace()
- calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- ' Create new instance for PdfCalGrayColor
- Dim gray As PdfCalGrayColor = New PdfCalGrayColor(calGrayCS)
- gray.Gray = 0.2
- Dim pen As PdfPen = New PdfPen(gray)
- Dim brush As PdfBrush = New PdfSolidBrush(gray)
- ' Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalGrayColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- // Creates RedColorSpace
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 1.6, 1.1, 2.5 };
- calRgbCS.Matrix = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
- calRgbCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
- red.Red = 0;
- red.Green = 1;
- red.Blue = 0;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalRedColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Gets the graphics object.
- Dim g As PdfGraphics = page.Graphics
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- ' Creates RedColorSpace
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 1.6, 1.1, 2.5 }
- calRgbCS.Matrix = New Double() { 1, 0, 0, 0, 1, 0, 0, 0, 1 }
- calRgbCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
- red.Red = 0
- red.Green = 1
- red.Blue = 0
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalRedColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- // Creates RedColorSpace
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 1.6, 1.1, 2.5 };
- calRgbCS.Matrix = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
- calRgbCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
- red.Red = 0;
- red.Green = 1;
- red.Blue = 0;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalRedColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Gets the graphics object.
- Dim g As PdfGraphics = page.Graphics
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- ' Creates RedColorSpace
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 1.6, 1.1, 2.5 }
- calRgbCS.Matrix = New Double() { 1, 0, 0, 0, 1, 0, 0, 0, 1 }
- calRgbCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
- red.Red = 0
- red.Green = 1
- red.Blue = 0
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalRedColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- // Creates RedColorSpace
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 1.6, 1.1, 2.5 };
- calRgbCS.Matrix = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
- calRgbCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
- red.Blue = 0;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalRedColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Gets the graphics object.
- Dim g As PdfGraphics = page.Graphics
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- ' Creates RedColorSpace
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 1.6, 1.1, 2.5 }
- calRgbCS.Matrix = New Double() { 1, 0, 0, 0, 1, 0, 0, 0, 1 }
- calRgbCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
- red.Green = 1
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalRedColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- // Creates RedColorSpace
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 1.6, 1.1, 2.5 };
- calRgbCS.Matrix = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
- calRgbCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
- red.Green = 1;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalRedColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Gets the graphics object.
- Dim g As PdfGraphics = page.Graphics
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- ' Creates RedColorSpace
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 1.6, 1.1, 2.5 }
- calRgbCS.Matrix = New Double() { 1, 0, 0, 0, 1, 0, 0, 0, 1 }
- calRgbCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
- red.Green = 1
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalRedColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- // Creates RedColorSpace
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 1.6, 1.1, 2.5 };
- calRgbCS.Matrix = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
- calRgbCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
- red.Red = 0;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalRedColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Gets the graphics object.
- Dim g As PdfGraphics = page.Graphics
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- ' Creates RedColorSpace
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 1.6, 1.1, 2.5 }
- calRgbCS.Matrix = New Double() { 1, 0, 0, 0, 1, 0, 0, 0, 1 }
- calRgbCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
- red.Red = 0
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalRedColorSpace.pdf")
-
-
- // Create a new PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- // Creates RedColorSpace
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 1.6, 1.1, 2.5 };
- calRgbCS.Matrix = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
- calRgbCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
- red.Red = 0;
- red.Green = 1;
- red.Blue = 0;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalRedColorSpace.pdf");
-
-
- ' Create a new PDF document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Gets the graphics object.
- Dim g As PdfGraphics = page.Graphics
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- ' Creates RedColorSpace
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 1.6, 1.1, 2.5 }
- calRgbCS.Matrix = New Double() { 1, 0, 0, 0, 1, 0, 0, 0, 1 }
- calRgbCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
- red.Red = 0
- red.Green = 1
- red.Blue = 0
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalRedColorSpace.pdf")
-
-
- // Create a new PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- // Creates RedColorSpace
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 1.6, 1.1, 2.5 };
- calRgbCS.Matrix = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
- calRgbCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
- red.Red = 0;
- red.Green = 1;
- red.Blue = 0;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalRedColorSpace.pdf");
-
-
- ' Create a new PDF document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Gets the graphics object.
- Dim g As PdfGraphics = page.Graphics
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- ' Creates RedColorSpace
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 1.6, 1.1, 2.5 }
- calRgbCS.Matrix = New Double() { 1, 0, 0, 0, 1, 0, 0, 0, 1 }
- calRgbCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
- red.Red = 0
- red.Green = 1
- red.Blue = 0
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalRedColorSpace.pdf")
-
-
- // Create a new PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- // Creates redColorSpace
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.BlackPoint = new double[] { 0.5, 1, 0.8 };
- PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
- red.Red = 0;
- red.Green = 1;
- red.Blue = 0;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalRedColorSpace.pdf");
-
-
- ' Create a new PDF document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Gets the graphics object.
- Dim g As PdfGraphics = page.Graphics
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- ' Creates redColorSpace
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.BlackPoint = New Double() { 0.5, 1, 0.8 }
- Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
- red.Red = 0
- red.Green = 1
- red.Blue = 0
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalRedColorSpace.pdf")
-
-
- // Create a new PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- // Creates redColorSpace
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 1.6, 1.1, 2.5 };
- PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
- red.Red = 0;
- red.Green = 1;
- red.Blue = 0;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalRedColorSpace.pdf");
-
-
- ' Create a new PDF document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Gets the graphics object.
- Dim g As PdfGraphics = page.Graphics
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- ' Creates redColorSpace
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 1.6, 1.1, 2.5 }
- Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
- red.Red = 0
- red.Green = 1
- red.Blue = 0
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draw the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalRedColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- // Creates redColorSpace
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Matrix = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
- PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
- red.Red = 0;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalRedColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- ' Creates redColorSpace
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Matrix = New Double() { 1, 0, 0, 0, 1, 0, 0, 0, 1 }
- Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
- red.Red = 0
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalRedColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- // Creates redColorSpace
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
- red.Red = 0;
- PdfPen pen = new PdfPen(red);
- PdfBrush brush = new PdfSolidBrush(red);
- // Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("CalRedColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- ' Creates redColorSpace
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
- red.Red = 0
- Dim pen As PdfPen = New PdfPen(red)
- Dim brush As PdfBrush = New PdfSolidBrush(red)
- ' Draws the rectangle
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("CalRedColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document.
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
- float[] numArray = new float[3];
- numArray[0] = 0.38f;
- numArray[1] = 0.88f;
- function.C1 = numArray;
- PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
- colorspace.AlternateColorSpaces = new PdfDeviceColorSpace(PdfColorSpace.RGB);
- colorspace.TintTransform = function;
- colorspace.Colorant = "PANTONE Orange 021 C";
- PdfSeparationColor color = new PdfSeparationColor(colorspace);
- color.Tint = 0.7;
- PdfBrush brush = new PdfSolidBrush(color);
- page.Graphics.DrawRectangle(brush, rect);
- doc.Save("DeviceColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page.
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
- Dim numArray() As Single = New Single(2){}
- numArray(0) = 0.38f
- numArray(1) = 0.88f
- [function].C1 = numArray
- Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
- colorspace.AlternateColorSpaces = New PdfDeviceColorSpace(PdfColorSpace.RGB)
- colorspace.TintTransform = [function]
- colorspace.Colorant = "PANTONE Orange 021 C"
- Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
- color.Tint = 0.7
- Dim brush As PdfBrush = New PdfSolidBrush(color)
- page.Graphics.DrawRectangle(brush, rect)
- doc.Save("DeviceColorSpace.pdf")
-
-
- // Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document.
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
- float[] numArray = new float[3];
- numArray[0] = 0.38f;
- numArray[1] = 0.88f;
- function.C1 = numArray;
- PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
- colorspace.AlternateColorSpaces = new PdfDeviceColorSpace(PdfColorSpace.RGB);
- colorspace.TintTransform = function;
- colorspace.Colorant = "PANTONE Orange 021 C";
- PdfSeparationColor color = new PdfSeparationColor(colorspace);
- color.Tint = 0.7;
- PdfBrush brush = new PdfSolidBrush(color);
- page.Graphics.DrawRectangle(brush, rect);
- doc.Save("DeviceColorSpace.pdf");
-
-
- ' Create a new PDF document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page.
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
- Dim numArray() As Single = New Single(2){}
- numArray(0) = 0.38f
- numArray(1) = 0.88f
- [function].C1 = numArray
- Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
- colorspace.AlternateColorSpaces = New PdfDeviceColorSpace(PdfColorSpace.RGB)
- colorspace.TintTransform = [function]
- colorspace.Colorant = "PANTONE Orange 021 C"
- Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
- color.Tint = 0.7
- Dim brush As PdfBrush = New PdfSolidBrush(color)
- page.Graphics.DrawRectangle(brush, rect)
- doc.Save("DeviceColorSpace.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
- float[] numArray = new float[1];
- numArray[0] = 0.38f;
- function.C1 = numArray;
- PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
- // Creates device color space
- PdfDeviceColorSpace deviceColorspace1 = new PdfDeviceColorSpace(PdfColorSpace.CMYK);
- deviceColorspace1.DeviceColorSpaceType = PdfColorSpace.GrayScale;
- // Set the device color space
- colorspace.AlternateColorSpaces = deviceColorspace1;
- colorspace.TintTransform = function;
- colorspace.Colorant = "PANTONE Orange 021 C";
- PdfSeparationColor color = new PdfSeparationColor(colorspace);
- color.Tint = 0.7;
- PdfBrush brush = new PdfSolidBrush(color);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(brush, rect);
- doc.Save("DeviceColorSpace.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
- Dim numArray() As Single = New Single(0){}
- numArray(0) = 0.38f
- [function].C1 = numArray
- Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
- ' Creates device color space
- Dim deviceColorspace1 As PdfDeviceColorSpace = New PdfDeviceColorSpace(PdfColorSpace.CMYK)
- deviceColorspace1.DeviceColorSpaceType = PdfColorSpace.GrayScale
- ' Set the device color space
- colorspace.AlternateColorSpaces = deviceColorspace1
- colorspace.TintTransform = [function]
- colorspace.Colorant = "PANTONE Orange 021 C"
- Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
- color.Tint = 0.7
- Dim brush As PdfBrush = New PdfSolidBrush(color)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(brush, rect)
- doc.Save("DeviceColorSpace.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Read the ICC profile from disk.
- FileStream fs = new FileStream("rgb.icc", FileMode.Open, FileAccess.Read);
- byte[] profileData = new byte[fs.Length];
- fs.Read(profileData, 0, profileData.Length);
- fs.Close();
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 7.6, 5.1, 8.5 };
- // Creating instance for ICCColorSpace
- PdfICCColorSpace IccBasedCS = new PdfICCColorSpace();
- IccBasedCS.ProfileData = profileData;
- IccBasedCS.AlternateColorSpace = calRgbCS;
- IccBasedCS.ColorComponents = 3;
- IccBasedCS.Range = new double[] { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 };
- PdfICCColor iccColorSpace = new PdfICCColor(IccBasedCS);
- iccColorSpace.ColorComponents = new double[] { 1, 0, 1 };
- PdfPen pen = new PdfPen(iccColorSpace);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("ICCColorCS.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Read the ICC profile from disk.
- Dim fs As FileStream = New FileStream("rgb.icc", FileMode.Open, FileAccess.Read)
- Dim profileData() As Byte = New Byte(fs.Length - 1){}
- fs.Read(profileData, 0, profileData.Length)
- fs.Close()
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 7.6, 5.1, 8.5 }
- ' Creating instance for ICCColorSpace
- Dim IccBasedCS As PdfICCColorSpace = New PdfICCColorSpace()
- IccBasedCS.ProfileData = profileData
- IccBasedCS.AlternateColorSpace = calRgbCS
- IccBasedCS.ColorComponents = 3
- IccBasedCS.Range = New Double() { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 }
- Dim iccColorSpace As PdfICCColor = New PdfICCColor(IccBasedCS)
- iccColorSpace.ColorComponents = New Double() { 1, 0, 1 }
- Dim pen As PdfPen = New PdfPen(iccColorSpace)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("ICCColorCS.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Read the ICC profile from disk.
- FileStream fs = new FileStream("rgb.icc", FileMode.Open, FileAccess.Read);
- byte[] profileData = new byte[fs.Length];
- fs.Read(profileData, 0, profileData.Length);
- fs.Close();
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 7.6, 5.1, 8.5 };
- // Creating instance for ICCColorSpace
- PdfICCColorSpace IccBasedCS = new PdfICCColorSpace();
- IccBasedCS.ProfileData = profileData;
- IccBasedCS.AlternateColorSpace = calRgbCS;
- IccBasedCS.ColorComponents = 3;
- IccBasedCS.Range = new double[] { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 };
- PdfICCColor iccColorSpace = new PdfICCColor(IccBasedCS);
- iccColorSpace.ColorComponents = new double[] { 1, 0, 1 };
- PdfPen pen = new PdfPen(iccColorSpace);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("ICCColorCS.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Read the ICC profile from disk.
- Dim fs As FileStream = New FileStream("rgb.icc", FileMode.Open, FileAccess.Read)
- Dim profileData() As Byte = New Byte(fs.Length - 1){}
- fs.Read(profileData, 0, profileData.Length)
- fs.Close()
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 7.6, 5.1, 8.5 }
- ' Creating instance for ICCColorSpace
- Dim IccBasedCS As PdfICCColorSpace = New PdfICCColorSpace()
- IccBasedCS.ProfileData = profileData
- IccBasedCS.AlternateColorSpace = calRgbCS
- IccBasedCS.ColorComponents = 3
- IccBasedCS.Range = New Double() { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 }
- Dim iccColorSpace As PdfICCColor = New PdfICCColor(IccBasedCS)
- iccColorSpace.ColorComponents = New Double() { 1, 0, 1 }
- Dim pen As PdfPen = New PdfPen(iccColorSpace)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("ICCColorCS.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Read the ICC profile from disk.
- FileStream fs = new FileStream("rgb.icc", FileMode.Open, FileAccess.Read);
- byte[] profileData = new byte[fs.Length];
- fs.Read(profileData, 0, profileData.Length);
- fs.Close();
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 7.6, 5.1, 8.5 };
- // Creating instance for ICCColorSpace
- PdfICCColorSpace IccBasedCS = new PdfICCColorSpace();
- IccBasedCS.ProfileData = profileData;
- IccBasedCS.AlternateColorSpace = calRgbCS;
- IccBasedCS.ColorComponents = 3;
- IccBasedCS.Range = new double[] { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 };
- PdfICCColor iccColorSpace = new PdfICCColor(IccBasedCS);
- iccColorSpace.ColorComponents = new double[] { 1, 0, 1 };
- PdfPen pen = new PdfPen(iccColorSpace);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("ICCColorCS.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Read the ICC profile from disk.
- Dim fs As FileStream = New FileStream("rgb.icc", FileMode.Open, FileAccess.Read)
- Dim profileData() As Byte = New Byte(fs.Length - 1){}
- fs.Read(profileData, 0, profileData.Length)
- fs.Close()
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 7.6, 5.1, 8.5 }
- ' Creating instance for ICCColorSpace
- Dim IccBasedCS As PdfICCColorSpace = New PdfICCColorSpace()
- IccBasedCS.ProfileData = profileData
- IccBasedCS.AlternateColorSpace = calRgbCS
- IccBasedCS.ColorComponents = 3
- IccBasedCS.Range = New Double() { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 }
- Dim iccColorSpace As PdfICCColor = New PdfICCColor(IccBasedCS)
- iccColorSpace.ColorComponents = New Double() { 1, 0, 1 }
- Dim pen As PdfPen = New PdfPen(iccColorSpace)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("ICCColorCS.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Read the ICC profile from disk.
- FileStream fs = new FileStream("rgb.icc", FileMode.Open, FileAccess.Read);
- byte[] profileData = new byte[fs.Length];
- fs.Read(profileData, 0, profileData.Length);
- fs.Close();
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 7.6, 5.1, 8.5 };
- // Creating instance for ICCColorSpace
- PdfICCColorSpace IccBasedCS = new PdfICCColorSpace();
- IccBasedCS.ProfileData = profileData;
- IccBasedCS.AlternateColorSpace = calRgbCS;
- IccBasedCS.ColorComponents = 3;
- IccBasedCS.Range = new double[] { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 };
- PdfICCColor iccColorSpace = new PdfICCColor(IccBasedCS);
- iccColorSpace.ColorComponents = new double[] { 1, 0, 1 };
- PdfPen pen = new PdfPen(iccColorSpace);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("ICCColorCS.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Read the ICC profile from disk.
- Dim fs As FileStream = New FileStream("rgb.icc", FileMode.Open, FileAccess.Read)
- Dim profileData() As Byte = New Byte(fs.Length - 1){}
- fs.Read(profileData, 0, profileData.Length)
- fs.Close()
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 7.6, 5.1, 8.5 }
- ' Creating instance for ICCColorSpace
- Dim IccBasedCS As PdfICCColorSpace = New PdfICCColorSpace()
- IccBasedCS.ProfileData = profileData
- IccBasedCS.AlternateColorSpace = calRgbCS
- IccBasedCS.ColorComponents = 3
- IccBasedCS.Range = New Double() { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 }
- Dim iccColorSpace As PdfICCColor = New PdfICCColor(IccBasedCS)
- iccColorSpace.ColorComponents = New Double() { 1, 0, 1 }
- Dim pen As PdfPen = New PdfPen(iccColorSpace)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("ICCColorCS.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Read the ICC profile from disk.
- FileStream fs = new FileStream("rgb.icc", FileMode.Open, FileAccess.Read);
- byte[] profileData = new byte[fs.Length];
- fs.Read(profileData, 0, profileData.Length);
- fs.Close();
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 7.6, 5.1, 8.5 };
- // Creating instance for ICCColorSpace
- PdfICCColorSpace IccBasedCS = new PdfICCColorSpace();
- IccBasedCS.ProfileData = profileData;
- IccBasedCS.AlternateColorSpace = calRgbCS;
- IccBasedCS.ColorComponents = 3;
- IccBasedCS.Range = new double[] { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 };
- PdfICCColor iccColorSpace = new PdfICCColor(IccBasedCS);
- iccColorSpace.ColorComponents = new double[] { 1, 0, 1 };
- PdfPen pen = new PdfPen(iccColorSpace);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("ICCColorCS.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Read the ICC profile from disk.
- Dim fs As FileStream = New FileStream("rgb.icc", FileMode.Open, FileAccess.Read)
- Dim profileData() As Byte = New Byte(fs.Length - 1){}
- fs.Read(profileData, 0, profileData.Length)
- fs.Close()
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 7.6, 5.1, 8.5 }
- ' Creating instance for ICCColorSpace
- Dim IccBasedCS As PdfICCColorSpace = New PdfICCColorSpace()
- IccBasedCS.ProfileData = profileData
- IccBasedCS.AlternateColorSpace = calRgbCS
- IccBasedCS.ColorComponents = 3
- IccBasedCS.Range = New Double() { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 }
- Dim iccColorSpace As PdfICCColor = New PdfICCColor(IccBasedCS)
- iccColorSpace.ColorComponents = New Double() { 1, 0, 1 }
- Dim pen As PdfPen = New PdfPen(iccColorSpace)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("ICCColorCS.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Read the ICC profile from disk.
- FileStream fs = new FileStream("rgb.icc", FileMode.Open, FileAccess.Read);
- byte[] profileData = new byte[fs.Length];
- fs.Read(profileData, 0, profileData.Length);
- fs.Close();
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 7.6, 5.1, 8.5 };
- // Creating instance for ICCColorSpace
- PdfICCColorSpace IccBasedCS = new PdfICCColorSpace();
- IccBasedCS.ProfileData = profileData;
- IccBasedCS.AlternateColorSpace = calRgbCS;
- IccBasedCS.ColorComponents = 3;
- IccBasedCS.Range = new double[] { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 };
- PdfICCColor iccColorSpace = new PdfICCColor(IccBasedCS);
- iccColorSpace.ColorComponents = new double[] { 1, 0, 1 };
- PdfPen pen = new PdfPen(iccColorSpace);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("ICCColorCS.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Read the ICC profile from disk.
- Dim fs As FileStream = New FileStream("rgb.icc", FileMode.Open, FileAccess.Read)
- Dim profileData() As Byte = New Byte(fs.Length - 1){}
- fs.Read(profileData, 0, profileData.Length)
- fs.Close()
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 7.6, 5.1, 8.5 }
- ' Creating instance for ICCColorSpace
- Dim IccBasedCS As PdfICCColorSpace = New PdfICCColorSpace()
- IccBasedCS.ProfileData = profileData
- IccBasedCS.AlternateColorSpace = calRgbCS
- IccBasedCS.ColorComponents = 3
- IccBasedCS.Range = New Double() { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 }
- Dim iccColorSpace As PdfICCColor = New PdfICCColor(IccBasedCS)
- iccColorSpace.ColorComponents = New Double() { 1, 0, 1 }
- Dim pen As PdfPen = New PdfPen(iccColorSpace)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("ICCColorCS.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Read the ICC profile from disk.
- FileStream fs = new FileStream("rgb.icc", FileMode.Open, FileAccess.Read);
- byte[] profileData = new byte[fs.Length];
- fs.Read(profileData, 0, profileData.Length);
- fs.Close();
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 7.6, 5.1, 8.5 };
- // Creating instance for ICCColorSpace
- PdfICCColorSpace IccBasedCS = new PdfICCColorSpace();
- IccBasedCS.ProfileData = profileData;
- IccBasedCS.AlternateColorSpace = calRgbCS;
- IccBasedCS.ColorComponents = 3;
- IccBasedCS.Range = new double[] { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 };
- PdfICCColor iccColorSpace = new PdfICCColor(IccBasedCS);
- iccColorSpace.ColorComponents = new double[] { 1, 0, 1 };
- PdfPen pen = new PdfPen(iccColorSpace);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("ICCColorCS.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Read the ICC profile from disk.
- Dim fs As FileStream = New FileStream("rgb.icc", FileMode.Open, FileAccess.Read)
- Dim profileData() As Byte = New Byte(fs.Length - 1){}
- fs.Read(profileData, 0, profileData.Length)
- fs.Close()
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 7.6, 5.1, 8.5 }
- ' Creating instance for ICCColorSpace
- Dim IccBasedCS As PdfICCColorSpace = New PdfICCColorSpace()
- IccBasedCS.ProfileData = profileData
- IccBasedCS.AlternateColorSpace = calRgbCS
- IccBasedCS.ColorComponents = 3
- IccBasedCS.Range = New Double() { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 }
- Dim iccColorSpace As PdfICCColor = New PdfICCColor(IccBasedCS)
- iccColorSpace.ColorComponents = New Double() { 1, 0, 1 }
- Dim pen As PdfPen = New PdfPen(iccColorSpace)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("ICCColorCS.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Read the ICC profile from disk.
- FileStream fs = new FileStream("rgb.icc", FileMode.Open, FileAccess.Read);
- byte[] profileData = new byte[fs.Length];
- fs.Read(profileData, 0, profileData.Length);
- fs.Close();
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 7.6, 5.1, 8.5 };
- // Creating instance for ICCColorSpace
- PdfICCColorSpace IccBasedCS = new PdfICCColorSpace();
- IccBasedCS.ProfileData = profileData;
- IccBasedCS.AlternateColorSpace = calRgbCS;
- IccBasedCS.ColorComponents = 3;
- IccBasedCS.Range = new double[] { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 };
- PdfICCColor iccColorSpace = new PdfICCColor(IccBasedCS);
- iccColorSpace.ColorComponents = new double[] { 1, 0, 1 };
- PdfPen pen = new PdfPen(iccColorSpace);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("ICCColorCS.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Read the ICC profile from disk.
- Dim fs As FileStream = New FileStream("rgb.icc", FileMode.Open, FileAccess.Read)
- Dim profileData() As Byte = New Byte(fs.Length - 1){}
- fs.Read(profileData, 0, profileData.Length)
- fs.Close()
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 7.6, 5.1, 8.5 }
- ' Creating instance for ICCColorSpace
- Dim IccBasedCS As PdfICCColorSpace = New PdfICCColorSpace()
- IccBasedCS.ProfileData = profileData
- IccBasedCS.AlternateColorSpace = calRgbCS
- IccBasedCS.ColorComponents = 3
- IccBasedCS.Range = New Double() { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 }
- Dim iccColorSpace As PdfICCColor = New PdfICCColor(IccBasedCS)
- iccColorSpace.ColorComponents = New Double() { 1, 0, 1 }
- Dim pen As PdfPen = New PdfPen(iccColorSpace)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("ICCColorCS.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Read the ICC profile from disk.
- FileStream fs = new FileStream("rgb.icc", FileMode.Open, FileAccess.Read);
- byte[] profileData = new byte[fs.Length];
- fs.Read(profileData, 0, profileData.Length);
- fs.Close();
- PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
- calRgbCS.Gamma = new double[] { 7.6, 5.1, 8.5 };
- // Creating instance for ICCColorSpace
- PdfICCColorSpace IccBasedCS = new PdfICCColorSpace();
- IccBasedCS.ProfileData = profileData;
- IccBasedCS.AlternateColorSpace = calRgbCS;
- IccBasedCS.ColorComponents = 3;
- IccBasedCS.Range = new double[] { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 };
- PdfICCColor iccColorSpace = new PdfICCColor(IccBasedCS);
- iccColorSpace.ColorComponents = new double[] { 1, 0, 1 };
- PdfPen pen = new PdfPen(iccColorSpace);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("ICCColorCS.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Read the ICC profile from disk.
- Dim fs As FileStream = New FileStream("rgb.icc", FileMode.Open, FileAccess.Read)
- Dim profileData() As Byte = New Byte(fs.Length - 1){}
- fs.Read(profileData, 0, profileData.Length)
- fs.Close()
- Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
- calRgbCS.Gamma = New Double() { 7.6, 5.1, 8.5 }
- ' Creating instance for ICCColorSpace
- Dim IccBasedCS As PdfICCColorSpace = New PdfICCColorSpace()
- IccBasedCS.ProfileData = profileData
- IccBasedCS.AlternateColorSpace = calRgbCS
- IccBasedCS.ColorComponents = 3
- IccBasedCS.Range = New Double() { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 }
- Dim iccColorSpace As PdfICCColor = New PdfICCColor(IccBasedCS)
- iccColorSpace.ColorComponents = New Double() { 1, 0, 1 }
- Dim pen As PdfPen = New PdfPen(iccColorSpace)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("ICCColorCS.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates indexed color space
- PdfIndexedColorSpace colorspace = new PdfIndexedColorSpace();
- colorspace.BaseColorSpace = new PdfDeviceColorSpace(PdfColorSpace.RGB);
- colorspace.MaxColorIndex = 3;
- colorspace.IndexedColorTable = new byte[] { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 };
- // Creates index color
- PdfIndexedColor color = new PdfIndexedColor(colorspace);
- color.SelectColorIndex = 3;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("IndexedColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates indexed color space
- Dim colorspace As PdfIndexedColorSpace = New PdfIndexedColorSpace()
- colorspace.BaseColorSpace = New PdfDeviceColorSpace(PdfColorSpace.RGB)
- colorspace.MaxColorIndex = 3
- colorspace.IndexedColorTable = New Byte() { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 }
- ' Creates index color
- Dim color As PdfIndexedColor = New PdfIndexedColor(colorspace)
- color.SelectColorIndex = 3
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("IndexedColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates indexed color space
- PdfIndexedColorSpace colorspace = new PdfIndexedColorSpace();
- colorspace.BaseColorSpace = new PdfDeviceColorSpace(PdfColorSpace.RGB);
- colorspace.MaxColorIndex = 3;
- colorspace.IndexedColorTable = new byte[] { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 };
- // Creates index color
- PdfIndexedColor color = new PdfIndexedColor(colorspace);
- color.SelectColorIndex = 3;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("IndexedColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates indexed color space
- Dim colorspace As PdfIndexedColorSpace = New PdfIndexedColorSpace()
- colorspace.BaseColorSpace = New PdfDeviceColorSpace(PdfColorSpace.RGB)
- colorspace.MaxColorIndex = 3
- colorspace.IndexedColorTable = New Byte() { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 }
- ' Creates index color
- Dim color As PdfIndexedColor = New PdfIndexedColor(colorspace)
- color.SelectColorIndex = 3
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("IndexedColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates indexed color space
- PdfIndexedColorSpace colorspace = new PdfIndexedColorSpace();
- colorspace.BaseColorSpace = new PdfDeviceColorSpace(PdfColorSpace.RGB);
- colorspace.MaxColorIndex = 3;
- colorspace.IndexedColorTable = new byte[] { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 };
- // Creates index color
- PdfIndexedColor color = new PdfIndexedColor(colorspace);
- color.SelectColorIndex = 3;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("IndexedColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates indexed color space
- Dim colorspace As PdfIndexedColorSpace = New PdfIndexedColorSpace()
- colorspace.BaseColorSpace = New PdfDeviceColorSpace(PdfColorSpace.RGB)
- colorspace.MaxColorIndex = 3
- colorspace.IndexedColorTable = New Byte() { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 }
- ' Creates index color
- Dim color As PdfIndexedColor = New PdfIndexedColor(colorspace)
- color.SelectColorIndex = 3
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("IndexedColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates indexed color space
- PdfIndexedColorSpace colorspace = new PdfIndexedColorSpace();
- colorspace.BaseColorSpace = new PdfDeviceColorSpace(PdfColorSpace.RGB);
- colorspace.MaxColorIndex = 3;
- colorspace.IndexedColorTable = new byte[] { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 };
- // Creates index color
- PdfIndexedColor color = new PdfIndexedColor(colorspace);
- color.SelectColorIndex = 3;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("IndexedColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates indexed color space
- Dim colorspace As PdfIndexedColorSpace = New PdfIndexedColorSpace()
- colorspace.BaseColorSpace = New PdfDeviceColorSpace(PdfColorSpace.RGB)
- colorspace.MaxColorIndex = 3
- colorspace.IndexedColorTable = New Byte() { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 }
- ' Creates index color
- Dim color As PdfIndexedColor = New PdfIndexedColor(colorspace)
- color.SelectColorIndex = 3
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("IndexedColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates indexed color space
- PdfIndexedColorSpace colorspace = new PdfIndexedColorSpace();
- colorspace.BaseColorSpace = new PdfDeviceColorSpace(PdfColorSpace.RGB);
- colorspace.MaxColorIndex = 3;
- colorspace.IndexedColorTable = new byte[] { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 };
- // Creates index color
- PdfIndexedColor color = new PdfIndexedColor(colorspace);
- color.SelectColorIndex = 3;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("IndexedColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates indexed color space
- Dim colorspace As PdfIndexedColorSpace = New PdfIndexedColorSpace()
- colorspace.BaseColorSpace = New PdfDeviceColorSpace(PdfColorSpace.RGB)
- colorspace.MaxColorIndex = 3
- colorspace.IndexedColorTable = New Byte() { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 }
- ' Creates index color
- Dim color As PdfIndexedColor = New PdfIndexedColor(colorspace)
- color.SelectColorIndex = 3
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("IndexedColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates indexed color space
- PdfIndexedColorSpace colorspace = new PdfIndexedColorSpace();
- colorspace.BaseColorSpace = new PdfDeviceColorSpace(PdfColorSpace.RGB);
- colorspace.MaxColorIndex = 3;
- colorspace.IndexedColorTable = new byte[] { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 };
- // Creates index color
- PdfIndexedColor color = new PdfIndexedColor(colorspace);
- color.SelectColorIndex = 3;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("IndexedColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates indexed color space
- Dim colorspace As PdfIndexedColorSpace = New PdfIndexedColorSpace()
- colorspace.BaseColorSpace = New PdfDeviceColorSpace(PdfColorSpace.RGB)
- colorspace.MaxColorIndex = 3
- colorspace.IndexedColorTable = New Byte() { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 }
- ' Creates index color
- Dim color As PdfIndexedColor = New PdfIndexedColor(colorspace)
- color.SelectColorIndex = 3
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("IndexedColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates indexed color space
- PdfIndexedColorSpace colorspace = new PdfIndexedColorSpace();
- colorspace.BaseColorSpace = new PdfDeviceColorSpace(PdfColorSpace.RGB);
- colorspace.MaxColorIndex = 3;
- colorspace.IndexedColorTable = new byte[] { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 };
- // Creates index color
- PdfIndexedColor color = new PdfIndexedColor(colorspace);
- color.SelectColorIndex = 3;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("IndexedColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates indexed color space
- Dim colorspace As PdfIndexedColorSpace = New PdfIndexedColorSpace()
- colorspace.BaseColorSpace = New PdfDeviceColorSpace(PdfColorSpace.RGB)
- colorspace.MaxColorIndex = 3
- colorspace.IndexedColorTable = New Byte() { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 }
- ' Creates index color
- Dim color As PdfIndexedColor = New PdfIndexedColor(colorspace)
- color.SelectColorIndex = 3
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("IndexedColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates indexed color space
- PdfIndexedColorSpace colorspace = new PdfIndexedColorSpace();
- colorspace.BaseColorSpace = new PdfDeviceColorSpace(PdfColorSpace.RGB);
- colorspace.MaxColorIndex = 3;
- colorspace.IndexedColorTable = new byte[] { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 };
- // Creates index color
- PdfIndexedColor color = new PdfIndexedColor(colorspace);
- color.SelectColorIndex = 3;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("IndexedColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates indexed color space
- Dim colorspace As PdfIndexedColorSpace = New PdfIndexedColorSpace()
- colorspace.BaseColorSpace = New PdfDeviceColorSpace(PdfColorSpace.RGB)
- colorspace.MaxColorIndex = 3
- colorspace.IndexedColorTable = New Byte() { 150, 0, 222, 255, 0, 0, 0, 255, 0, 0, 0, 255 }
- ' Creates index color
- Dim color As PdfIndexedColor = New PdfIndexedColor(colorspace)
- color.SelectColorIndex = 3
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("IndexedColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Create lab color space
- PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
- calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
- calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- // Create lab color
- PdfLabColor labColor = new PdfLabColor(calGrayCS);
- labColor.L = 90;
- labColor.A = 0.5;
- labColor.B = 20;
- PdfPen pen = new PdfPen(labColor);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("LabColor.pdf");
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates lab color space
- Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
- calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
- calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- ' Create lab color
- Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
- labColor.L = 90
- labColor.A = 0.5
- labColor.B = 20
- Dim pen As PdfPen = New PdfPen(labColor)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("LabColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Create lab color space
- PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
- calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
- calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- // Create lab color
- PdfLabColor labColor = new PdfLabColor(calGrayCS);
- labColor.L = 90;
- labColor.A = 0.5;
- labColor.B = 20;
- PdfPen pen = new PdfPen(labColor);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("LabColor.pdf");
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates lab color space
- Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
- calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
- calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- ' Create lab color
- Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
- labColor.L = 90
- labColor.A = 0.5
- labColor.B = 20
- Dim pen As PdfPen = New PdfPen(labColor)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("LabColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Create lab color space
- PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
- calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
- calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- // Create lab color
- PdfLabColor labColor = new PdfLabColor(calGrayCS);
- labColor.L = 90;
- labColor.A = 0.5;
- labColor.B = 20;
- PdfPen pen = new PdfPen(labColor);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("LabColor.pdf");
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates lab color space
- Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
- calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
- calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- ' Create lab color
- Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
- labColor.L = 90
- labColor.A = 0.5
- labColor.B = 20
- Dim pen As PdfPen = New PdfPen(labColor)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("LabColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Create lab color space
- PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
- calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
- calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- // Create lab color
- PdfLabColor labColor = new PdfLabColor(calGrayCS);
- labColor.L = 90;
- labColor.A = 0.5;
- labColor.B = 20;
- PdfPen pen = new PdfPen(labColor);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("LabColor.pdf");
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates lab color space
- Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
- calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
- calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- ' Create lab color
- Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
- labColor.L = 90
- labColor.A = 0.5
- labColor.B = 20
- Dim pen As PdfPen = New PdfPen(labColor)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("LabColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Create lab color space
- PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
- calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
- calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- // Create lab color
- PdfLabColor labColor = new PdfLabColor(calGrayCS);
- labColor.L = 90;
- labColor.A = 0.5;
- labColor.B = 20;
- PdfPen pen = new PdfPen(labColor);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("LabColor.pdf");
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates lab color space
- Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
- calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
- calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- ' Create lab color
- Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
- labColor.L = 90
- labColor.A = 0.5
- labColor.B = 20
- Dim pen As PdfPen = New PdfPen(labColor)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("LabColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Create lab color space
- PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
- calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
- calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- // Create lab color
- PdfLabColor labColor = new PdfLabColor(calGrayCS);
- labColor.L = 90;
- labColor.A = 0.5;
- labColor.B = 20;
- PdfPen pen = new PdfPen(labColor);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("LabColor.pdf");
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates lab color space
- Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
- calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
- calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- ' Create lab color
- Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
- labColor.L = 90
- labColor.A = 0.5
- labColor.B = 20
- Dim pen As PdfPen = New PdfPen(labColor)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("LabColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Create lab color space
- PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
- calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
- calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- // Create lab color
- PdfLabColor labColor = new PdfLabColor(calGrayCS);
- labColor.L = 90;
- labColor.A = 0.5;
- labColor.B = 20;
- PdfPen pen = new PdfPen(labColor);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("LabColor.pdf");
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates lab color space
- Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
- calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
- calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- ' Create lab color
- Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
- labColor.L = 90
- labColor.A = 0.5
- labColor.B = 20
- Dim pen As PdfPen = New PdfPen(labColor)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("LabColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Create lab color space
- PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
- calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
- calGrayCS.BlackPoint = new double[] { 0.2, 1, 0.8 };
- // Create lab color
- PdfLabColor labColor = new PdfLabColor(calGrayCS);
- labColor.L = 90;
- labColor.A = 0.5;
- labColor.B = 20;
- PdfPen pen = new PdfPen(labColor);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("LabColor.pdf");
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates lab color space
- Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
- calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
- calGrayCS.BlackPoint = New Double() { 0.2, 1, 0.8 }
- ' Create lab color
- Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
- labColor.L = 90
- labColor.A = 0.5
- labColor.B = 20
- Dim pen As PdfPen = New PdfPen(labColor)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("LabColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Create lab color space
- PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
- calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
- calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- // Create lab color
- PdfLabColor labColor = new PdfLabColor(calGrayCS);
- labColor.L = 90;
- labColor.A = 0.5;
- labColor.B = 20;
- PdfPen pen = new PdfPen(labColor);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("LabColor.pdf");
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates lab color space
- Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
- calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
- calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- ' Create lab color
- Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
- labColor.L = 90
- labColor.A = 0.5
- labColor.B = 20
- Dim pen As PdfPen = New PdfPen(labColor)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("LabColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Create lab color space
- PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
- calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
- calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
- // Create lab color
- PdfLabColor labColor = new PdfLabColor(calGrayCS);
- labColor.L = 90;
- labColor.A = 0.5;
- labColor.B = 20;
- PdfPen pen = new PdfPen(labColor);
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("LabColor.pdf");
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates lab color space
- Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
- calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
- calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
- ' Create lab color
- Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
- labColor.L = 90
- labColor.A = 0.5
- labColor.B = 20
- Dim pen As PdfPen = New PdfPen(labColor)
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("LabColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates ExponentialInterpolationFunction function
- PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
- float[] numArray = new float[4];
- numArray[0] = 0.38f;
- numArray[1] = 0.88f;
- function.C1 = numArray;
- // Creates SeparationColorSpace
- PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
- colorspace.TintTransform = function;
- colorspace.Colorant = "PANTONE Orange 021 C";
- PdfSeparationColor color = new PdfSeparationColor(colorspace);
- color.Tint = 0.7;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("SeparationColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates ExponentialInterpolationFunction function
- Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
- Dim numArray() As Single = New Single(3){}
- numArray(0) = 0.38f
- numArray(1) = 0.88f
- [function].C1 = numArray
- ' Creates SeparationColorSpace
- Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
- colorspace.TintTransform = [function]
- colorspace.Colorant = "PANTONE Orange 021 C"
- Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
- color.Tint = 0.7
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("SeparationColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates ExponentialInterpolationFunction function
- PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
- float[] numArray = new float[4];
- numArray[0] = 0.38f;
- numArray[1] = 0.88f;
- function.C1 = numArray;
- // Creates SeparationColorSpace
- PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
- colorspace.TintTransform = function;
- colorspace.Colorant = "PANTONE Orange 021 C";
- PdfSeparationColor color = new PdfSeparationColor(colorspace);
- color.Tint = 0.7;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("SeparationColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates ExponentialInterpolationFunction function
- Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
- Dim numArray() As Single = New Single(3){}
- numArray(0) = 0.38f
- numArray(1) = 0.88f
- [function].C1 = numArray
- ' Creates SeparationColorSpace
- Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
- colorspace.TintTransform = [function]
- colorspace.Colorant = "PANTONE Orange 021 C"
- Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
- color.Tint = 0.7
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("SeparationColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates ExponentialInterpolationFunction function
- PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
- float[] numArray = new float[4];
- numArray[0] = 0.38f;
- numArray[1] = 0.88f;
- function.C1 = numArray;
- // Creates SeparationColorSpace
- PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
- colorspace.TintTransform = function;
- colorspace.Colorant = "PANTONE Orange 021 C";
- PdfSeparationColor color = new PdfSeparationColor(colorspace);
- color.Tint = 0.7;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("SeparationColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates ExponentialInterpolationFunction function
- Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
- Dim numArray() As Single = New Single(3){}
- numArray(0) = 0.38f
- numArray(1) = 0.88f
- [function].C1 = numArray
- ' Creates SeparationColorSpace
- Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
- colorspace.TintTransform = [function]
- colorspace.Colorant = "PANTONE Orange 021 C"
- Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
- color.Tint = 0.7
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("SeparationColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates ExponentialInterpolationFunction function
- PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
- float[] numArray = new float[4];
- numArray[0] = 0.38f;
- numArray[1] = 0.88f;
- function.C1 = numArray;
- // Creates SeparationColorSpace
- PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
- colorspace.TintTransform = function;
- colorspace.Colorant = "PANTONE Orange 021 C";
- PdfSeparationColor color = new PdfSeparationColor(colorspace);
- color.Tint = 0.7;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("SeparationColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates ExponentialInterpolationFunction function
- Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
- Dim numArray() As Single = New Single(3){}
- numArray(0) = 0.38f
- numArray(1) = 0.88f
- [function].C1 = numArray
- ' Creates SeparationColorSpace
- Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
- colorspace.TintTransform = [function]
- colorspace.Colorant = "PANTONE Orange 021 C"
- Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
- color.Tint = 0.7
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("SeparationColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates ExponentialInterpolationFunction function
- PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
- float[] numArray = new float[4];
- numArray[0] = 0.38f;
- numArray[1] = 0.88f;
- function.C1 = numArray;
- // Creates SeparationColorSpace
- PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
- colorspace.TintTransform = function;
- colorspace.Colorant = "PANTONE Orange 021 C";
- PdfSeparationColor color = new PdfSeparationColor(colorspace);
- color.Tint = 0.7;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("SeparationColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates ExponentialInterpolationFunction function
- Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
- Dim numArray() As Single = New Single(3){}
- numArray(0) = 0.38f
- numArray(1) = 0.88f
- [function].C1 = numArray
- ' Creates SeparationColorSpace
- Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
- colorspace.TintTransform = [function]
- colorspace.Colorant = "PANTONE Orange 021 C"
- Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
- color.Tint = 0.7
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("SeparationColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates ExponentialInterpolationFunction function
- PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
- float[] numArray = new float[4];
- numArray[0] = 0.38f;
- numArray[1] = 0.88f;
- function.C1 = numArray;
- // Creates SeparationColorSpace
- PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
- colorspace.AlternateColorSpaces = new PdfDeviceColorSpace(PdfColorSpace.GrayScale);
- colorspace.TintTransform = function;
- colorspace.Colorant = "PANTONE Orange 021 C";
- PdfSeparationColor color = new PdfSeparationColor(colorspace);
- color.Tint = 0.7;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("SeparationColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates ExponentialInterpolationFunction function
- Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
- Dim numArray() As Single = New Single(3){}
- numArray(0) = 0.38f
- numArray(1) = 0.88f
- [function].C1 = numArray
- ' Creates SeparationColorSpace
- Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
- colorspace.AlternateColorSpaces = New PdfDeviceColorSpace(PdfColorSpace.GrayScale)
- colorspace.TintTransform = [function]
- colorspace.Colorant = "PANTONE Orange 021 C"
- Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
- color.Tint = 0.7
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("SeparationColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates ExponentialInterpolationFunction function
- PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
- float[] numArray = new float[4];
- numArray[0] = 0.38f;
- numArray[1] = 0.88f;
- function.C1 = numArray;
- // Creates SeparationColorSpace
- PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
- colorspace.AlternateColorSpaces = new PdfDeviceColorSpace(PdfColorSpace.GrayScale);
- colorspace.TintTransform = function;
- colorspace.Colorant = "PANTONE Orange 021 C";
- PdfSeparationColor color = new PdfSeparationColor(colorspace);
- color.Tint = 0.7;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("SeparationColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates ExponentialInterpolationFunction function
- Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
- Dim numArray() As Single = New Single(3){}
- numArray(0) = 0.38f
- numArray(1) = 0.88f
- [function].C1 = numArray
- ' Creates SeparationColorSpace
- Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
- colorspace.AlternateColorSpaces = New PdfDeviceColorSpace(PdfColorSpace.GrayScale)
- colorspace.TintTransform = [function]
- colorspace.Colorant = "PANTONE Orange 021 C"
- Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
- color.Tint = 0.7
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("SeparationColor.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates ExponentialInterpolationFunction function
- PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
- float[] numArray = new float[4];
- numArray[0] = 0.38f;
- numArray[1] = 0.88f;
- function.C1 = numArray;
- // Creates SeparationColorSpace
- PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
- colorspace.AlternateColorSpaces = new PdfDeviceColorSpace(PdfColorSpace.GrayScale);
- colorspace.TintTransform = function;
- colorspace.Colorant = "PANTONE Orange 021 C";
- PdfSeparationColor color = new PdfSeparationColor(colorspace);
- color.Tint = 0.7;
- RectangleF rect = new RectangleF(20, 70, 200, 100);
- PdfPen pen = new PdfPen(color);
- page.Graphics.DrawRectangle(pen, rect);
- doc.Save("SeparationColor.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates ExponentialInterpolationFunction function
- Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
- Dim numArray() As Single = New Single(3){}
- numArray(0) = 0.38f
- numArray(1) = 0.88f
- [function].C1 = numArray
- ' Creates SeparationColorSpace
- Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
- colorspace.AlternateColorSpaces = New PdfDeviceColorSpace(PdfColorSpace.GrayScale)
- colorspace.TintTransform = [function]
- colorspace.Colorant = "PANTONE Orange 021 C"
- Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
- color.Tint = 0.7
- Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
- Dim pen As PdfPen = New PdfPen(color)
- page.Graphics.DrawRectangle(pen, rect)
- doc.Save("SeparationColor.pdf")
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create an attachment
- PdfAttachment attachment = new PdfAttachment("Input.txt");
- attachment.Description = "Input.txt";
- attachment.MimeType = "application/txt";
- //Add the attachment to the document
- document.Attachments.Add(attachment);
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Create an attachment
- Dim attachment As New PdfAttachment("Input.txt")
- attachment.Description = "Input.txt"
- attachment.MimeType = "application/txt"
- 'Add the attachment to the document
- document.Attachments.Add(attachment)
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create an attachment
- PdfAttachment attachment = new PdfAttachment("Input.txt");
- attachment.Description = "Input.txt";
- attachment.MimeType = "application/txt";
- //Add the attachment to the document
- document.Attachments.Add(attachment);
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Create an attachment
- Dim attachment As New PdfAttachment("Input.txt")
- attachment.Description = "Input.txt"
- attachment.MimeType = "application/txt"
- 'Add the attachment to the document
- document.Attachments.Add(attachment)
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create an attachment
- PdfAttachment attachment = new PdfAttachment("Input.txt");
- attachment.Description = "Input.txt";
- attachment.MimeType = "application/txt";
- //insert the attachment at specified index
- document.Attachments.Insert(1, attachment);
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Create an attachment
- Dim attachment As New PdfAttachment("Input.txt")
- attachment.Description = "Input.txt"
- attachment.MimeType = "application/txt"
- 'insert the attachment at specified index
- document.Attachments.Insert(1, attachment)
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Load the PDF document
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
- //Load an attachment collection
- PdfAttachmentCollection attachments = loadedDocument.Attachments;
- //Remove attachment by attachment name.
- attachments.Remove(attachment);
- //Remove attachment by index
- attachments.RemoveAt(1);
- //Save and close the document
- loadedDocument.Save("Output.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document
- Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
- 'Load an attachment collection
- Dim attachments As PdfAttachmentCollection = loadedDocument.Attachments
- 'Remove attachment by attachment name.
- attachments.Remove(attachment)
- 'Remove attachment by index
- attachments.RemoveAt(1)
- 'Save and close the document
- loadedDocument.Save("Output.pdf")
- loadedDocument.Close(True)
-
-
- //Load the PDF document
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
- //Load an attachment collection
- PdfAttachmentCollection attachments = loadedDocument.Attachments;
- //Remove attachment by attachment name.
- attachments.Remove(attachment);
- //Remove attachment by index
- attachments.RemoveAt(1);
- //Save and close the document
- loadedDocument.Save("Output.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document
- Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
- 'Load an attachment collection
- Dim attachments As PdfAttachmentCollection = loadedDocument.Attachments
- 'Remove attachment by attachment name.
- attachments.Remove(attachment)
- 'Remove attachment by index
- attachments.RemoveAt(1)
- 'Save and close the document
- loadedDocument.Save("Output.pdf")
- loadedDocument.Close(True)
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create an attachment
- PdfAttachment attachment = new PdfAttachment("Input.txt");
- attachment.Description = "Input.txt";
- attachment.MimeType = "application/txt";
- //Add the attachment to the document
- document.Attachments.Add(attachment);
- //Get the index of attachment
- int index = document.Attachments.IndexOf(attachment);
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Create an attachment
- Dim attachment As New PdfAttachment("Input.txt")
- attachment.Description = "Input.txt"
- attachment.MimeType = "application/txt"
- 'Add the attachment to the document
- document.Attachments.Add(attachment)
- 'Get the index of attachment
- Dim index As Integer = document.Attachments.IndexOf(attachment)
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create an attachment
- PdfAttachment attachment = new PdfAttachment("Input.txt");
- attachment.Description = "Input.txt";
- attachment.MimeType = "application/txt";
- //Add the attachment to the document
- document.Attachments.Add(attachment);
- //check the collection contains the specified attachment.
- bool isAttachmentContained = document.Attachments.Contains(attachment);
- //Save and close the PDF document
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Create an attachment
- Dim attachment As New PdfAttachment("Input.txt")
- attachment.Description = "Input.txt"
- attachment.MimeType = "application/txt"
- 'Add the attachment to the document
- document.Attachments.Add(attachment)
- 'check the collection contains the specified attachment.
- Dim isAttachmentContained As Boolean = document.Attachments.Contains(attachment)
- 'Save and close the PDF document
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Load the PDF document
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
- //Get the attachments
- PdfBookmarkBase bookmarks = loadedDocument.Bookmarks;
- //Remove all the bookmarks form the collection
- bookmarks.Clear();
- //Save and close the PDF document
- loadedDocument.Save("Output.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document
- Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
- 'Get the attachments
- Dim attachments As PdfAttachmentCollection = loadedDocument.Attachments
- 'Remove all the bookmarks form the collection
- attachments.Clear()
- 'Save and close the document
- loadedDocument.Save("Output.pdf")
- loadedDocument.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- PdfBrush brush = PdfBrushes.Black;
- // Creates Date time field
- PdfCreationDateField dateTimeField = new PdfCreationDateField(font);
- for (int i = 0; i!=3; i++)
- {
- page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- //Save and close the document
- doc.Save("DateTimeField.pdf");
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F)
- Dim brush As PdfBrush = PdfBrushes.Black
- ' Creates Date time field
- Dim dateTimeField As New PdfCreationDateField(font)
- For i As Integer = 0 To 2
- page = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next
- 'Save and close the document
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- // Creates Date time field
- PdfCreationDateField dateTimeField = new PdfCreationDateField();
- for (int i = 0; i!=3; i++)
- {
- page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- //Save and close the document
- doc.Save("DateTimeField.pdf");
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates Date time field
- Dim dateTimeField As New PdfCreationDateField()
- For i As Integer = 0 To 2
- page = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next
- 'Save and close the document
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- PdfBrush brush = PdfBrushes.Black;
- // Creates Date time field
- PdfCreationDateField dateTimeField = new PdfCreationDateField(font);
- for (int i = 0; i!=3; i++)
- {
- page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- //Save and close the document
- doc.Save("DateTimeField.pdf");
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F)
- Dim brush As PdfBrush = PdfBrushes.Black
- ' Creates Date time field
- Dim dateTimeField As New PdfCreationDateField(font)
- For i As Integer = 0 To 2
- page = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next
- 'Save and close the document
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- PdfBrush brush = PdfBrushes.Black;
- // Creates Date time field
- PdfCreationDateField dateTimeField = new PdfCreationDateField(font,brush);
- for (int i = 0; i!=3; i++)
- {
- page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- //Save and close the document
- doc.Save("DateTimeField.pdf");
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F)
- Dim brush As PdfBrush = PdfBrushes.Black
- ' Creates Date time field
- Dim dateTimeField As New PdfCreationDateField(font,brush)
- For i As Integer = 0 To 2
- page = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next
- 'Save and close the document
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates Date time field
- PdfCreationDateField dateTimeField = new PdfCreationDateField(font, new RectangleF(new PointF(10,10), new SizeF(100,200)));
- for (int i = 0; i !=3; i++)
- {
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- doc.Save("DateTimeField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates Date time field
- Dim dateTimeField As PdfCreationDateField = New PdfCreationDateField(font, New RectangleF(New PointF(10,10), New SizeF(100,200)))
- For i As Integer = 0 To 2
- ' Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next i
- 'Save and close the document
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates Date time field
- PdfCreationDateField dateTimeField = new PdfCreationDateField(font, new RectangleF(new PointF(10,10), new SizeF(100,200)));
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy";
- for (int i = 0; i != 3; i++)
- {
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- doc.Save("DateTimeField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates Date time field
- Dim dateTimeField As PdfCreationDateField = New PdfCreationDateField(font, New RectangleF(New PointF(10,10), New SizeF(100,200)))
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy"
- For i As Integer = 0 To 2
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next i
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates DateTime field
- PdfDateTimeField dateTimeField = new PdfDateTimeField(font);
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy";
- for (int i = 0; i !=3; i++)
- {
- page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates DateTime field
- Dim dateTimeField As PdfDateTimeField = New PdfDateTimeField(font)
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy"
- For i As Integer = 0 To 2
- page = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next i
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Creates DateTime field
- PdfDateTimeField dateTimeField = new PdfDateTimeField();
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy";
- for (int i = 0; i!=3; i++)
- {
- page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Creates DateTime field
- Dim dateTimeField As PdfDateTimeField = New PdfDateTimeField()
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy"
- For i As Integer = 0 To 2
- page = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next i
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates DateTime field
- PdfDateTimeField dateTimeField = new PdfDateTimeField(font);
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy";
- for (int i = 0; i !=3; i++)
- {
- page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates DateTime field
- Dim dateTimeField As PdfDateTimeField = New PdfDateTimeField(font)
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy"
- For i As Integer = 0 To 2
- page = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next i
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates DateTime field
- PdfDateTimeField dateTimeField = new PdfDateTimeField(font, PdfBrushes.Aquamarine);
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy";
- for (int i = 0; i!=3; i++)
- {
- page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates DateTime field
- Dim dateTimeField As PdfDateTimeField = New PdfDateTimeField(font, PdfBrushes.Aquamarine)
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy"
- For i As Integer = 0 To 2
- page = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next i
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates DateTime field
- PdfDateTimeField dateTimeField = new PdfDateTimeField(font, new RectangleF(new PointF(10,10), new SizeF(100,200)));
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy";
- for (int i = 0; i!=3; i++)
- {
- page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates DateTime field
- Dim dateTimeField As PdfDateTimeField = New PdfDateTimeField(font, New RectangleF(New PointF(10,10), New SizeF(100,200)))
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy"
- For i As Integer = 0 To 2
- page = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next i
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates DateTime field
- PdfDateTimeField dateTimeField = new PdfDateTimeField(font, new RectangleF(new PointF(10,10), new SizeF(100,200)));
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy";
- for (int i = 0; i!=3; i++)
- {
- page = doc.Pages.Add();
- dateTimeField.Draw(page.Graphics);
- }
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates DateTime field
- Dim dateTimeField As PdfDateTimeField = New PdfDateTimeField(font, New RectangleF(New PointF(10,10), New SizeF(100,200)))
- dateTimeField.DateFormatString = "dd'/'MMMM'/'yyyy"
- For i As Integer = 0 To 2
- page = doc.Pages.Add()
- dateTimeField.Draw(page.Graphics)
- Next i
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates page number field
- PdfDestinationPageNumberField pageNumber = new PdfDestinationPageNumberField(font);
- for (int i = 0; i!=2; i++)
- {
- PdfPage page = doc.Pages.Add();
- // Draws the page number only on the second page
- if (i == 1)
- {
- pageNumber.Page = page;
- pageNumber.Draw(page.Graphics);
- }
- }
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates page number field
- Dim pageNumber As PdfDestinationPageNumberField = New PdfDestinationPageNumberField(font)
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- ' Draws the page number only on the second page
- If i = 1 Then
- pageNumber.Page = page
- pageNumber.Draw(page.Graphics)
- End If
- Next i
- doc.Save("DateTimeField.pdf")
- doc.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates page number field
- PdfPageNumberField pageNumber = new PdfPageNumberField(font);
- pageNumber.NumberStyle = PdfNumberStyle.UpperLatin;
- for (int i = 0; i != 2; i++)
- {
- PdfPage page = doc.Pages.Add();
- pageNumber.Draw(page.Graphics);
- }
- doc.Save("PageNumberField.pdf");
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates page number field
- Dim pageNumber As PdfPageNumberField = New PdfPageNumberField(font)
- pageNumber.NumberStyle = PdfNumberStyle.UpperLatin
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- pageNumber.Draw(page.Graphics)
- Next i
- doc.Save("PageNumberField.pdf")
- doc.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- // Creates page number field
- PdfPageNumberField pageNumber = new PdfPageNumberField();
- pageNumber.NumberStyle = PdfNumberStyle.UpperLatin;
- for (int i = 0; i != 2; i++)
- {
- PdfPage page = doc.Pages.Add();
- pageNumber.Draw(page.Graphics);
- }
- doc.Save("PageNumberField.pdf");
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Creates page number field
- Dim pageNumber As PdfPageNumberField = New PdfPageNumberField()
- pageNumber.NumberStyle = PdfNumberStyle.UpperLatin
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- pageNumber.Draw(page.Graphics)
- Next i
- doc.Save("PageNumberField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates page number field
- PdfPageNumberField pageNumber = new PdfPageNumberField(font);
- pageNumber.NumberStyle = PdfNumberStyle.UpperLatin;
- for (int i = 0; i != 2; i++)
- {
- PdfPage page = doc.Pages.Add();
- pageNumber.Draw(page.Graphics);
- }
- doc.Save("PageNumberField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates page number field
- Dim pageNumber As PdfPageNumberField = New PdfPageNumberField(font)
- pageNumber.NumberStyle = PdfNumberStyle.UpperLatin
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- pageNumber.Draw(page.Graphics)
- Next i
- doc.Save("PageNumberField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates page number field
- PdfPageNumberField pageNumber = new PdfPageNumberField(font, PdfBrushes.Beige);
- pageNumber.NumberStyle = PdfNumberStyle.UpperLatin;
- for (int i = 0; i!=2; i++)
- {
- PdfPage page = doc.Pages.Add();
- pageNumber.Draw(page.Graphics);
- }
- doc.Save("PageNumberField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates page number field
- Dim pageNumber As PdfPageNumberField = New PdfPageNumberField(font, PdfBrushes.Beige)
- pageNumber.NumberStyle = PdfNumberStyle.UpperLatin
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- pageNumber.Draw(page.Graphics)
- Next i
- doc.Save("PageNumberField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates page number field
- PdfPageNumberField pageNumber = new PdfPageNumberField(font, new RectangleF(10, 10, 100, 200));
- pageNumber.NumberStyle = PdfNumberStyle.UpperLatin;
- for (int i = 0; i != 2; i++)
- {
- PdfPage page = doc.Pages.Add();
- pageNumber.Draw(page.Graphics);
- }
- doc.Save("PageNumberField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates page number field
- PdfPageNumberField pageNumber = new PdfPageNumberField(font, new RectangleF(10, 10, 100, 200));
- pageNumber.NumberStyle = PdfNumberStyle.UpperLatin
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- pageNumber.Draw(page.Graphics)
- Next i
- doc.Save("PageNumberField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- // Creates page number field
- PdfDestinationPageNumberField pageNumber = new PdfDestinationPageNumberField();
- for (int i = 0; i !=2; i++)
- {
- PdfPage page = doc.Pages.Add();
- // Draws the page number only on the second page
- if (i == 1)
- {
- pageNumber.Page = page;
- pageNumber.Draw(page.Graphics);
- }
- }
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Creates page number field
- Dim pageNumber As PdfDestinationPageNumberField = New PdfDestinationPageNumberField()
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- ' Draws the page number only on the second page
- If i = 1 Then
- pageNumber.Page = page
- pageNumber.Draw(page.Graphics)
- End If
- Next i
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates page number field
- PdfDestinationPageNumberField pageNumber = new PdfDestinationPageNumberField(font);
- for (int i = 0; i!=2; i++)
- {
- PdfPage page = doc.Pages.Add();
- // Draws the page number only on the second page
- if (i == 1)
- {
- pageNumber.Page = page;
- pageNumber.Draw(page.Graphics);
- }
- }
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates page number field
- Dim pageNumber As PdfDestinationPageNumberField = New PdfDestinationPageNumberField(font)
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- ' Draws the page number only on the second page
- If i = 1 Then
- pageNumber.Page = page
- pageNumber.Draw(page.Graphics)
- End If
- Next i
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates page number field
- PdfDestinationPageNumberField pageNumber = new PdfDestinationPageNumberField(font, PdfBrushes.Azure);
- for (int i = 0; i!=2; i++)
- {
- PdfPage page = doc.Pages.Add();
- // Draws the page number only on the second page
- if (i == 1)
- {
- pageNumber.Page = page;
- pageNumber.Draw(page.Graphics);
- }
- }
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates page number field
- Dim pageNumber As PdfDestinationPageNumberField = New PdfDestinationPageNumberField(font, PdfBrushes.Azure)
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- ' Draws the page number only on the second page
- If i = 1 Then
- pageNumber.Page = page
- pageNumber.Draw(page.Graphics)
- End If
- Next i
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates page number field
- PdfDestinationPageNumberField pageNumber = new PdfDestinationPageNumberField(font, new RectangleF(10, 10, 100, 200));
- for (int i = 0; i!=2; i++)
- {
- PdfPage page = doc.Pages.Add();
- // Draws the page number only on the second page
- if (i == 1)
- {
- pageNumber.Page = page;
- pageNumber.Draw(page.Graphics);
- }
- }
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates page number field
- Dim pageNumber As PdfDestinationPageNumberField = New PdfDestinationPageNumberField(font, New RectangleF(10, 10,100,200))
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- ' Draws the page number only on the second page
- If i = 1 Then
- pageNumber.Page = page
- pageNumber.Draw(page.Graphics)
- End If
- Next i
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SrcDocument.pdf");
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates page number field
- PdfDestinationPageNumberField pageNumber = new PdfDestinationPageNumberField(font, new RectangleF(10, 10,100,200));
- for (int i = 0; i != doc.Pages.Count; i++)
- {
- // Draws the page number only on the second page
- if (i == 1)
- {
- pageNumber.LoadedPage = doc.Pages[1] as PdfLoadedPage;
- pageNumber.Draw(doc.Pages[1].Graphics);
- }
- }
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(true);
-
-
- ' Loads an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SrcDocument.pdf")
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates page number field
- Dim pageNumber As PdfDestinationPageNumberField = New PdfDestinationPageNumberField(font, New RectangleF(10, 10,100,200))
- For i As Integer = 0 To doc.Pages.Count - 1
- ' Draws the page number only on the second page
- If i = 1 Then
- pageNumber.LoadedPage = TryCast(doc.Pages(1), PdfLoadedPage)
- pageNumber.Draw(doc.Pages(1).Graphics)
- End If
- Next i
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Creates page number field
- PdfDestinationPageNumberField pageNumber = new PdfDestinationPageNumberField(font);
- for (int i = 0; i !=2; i++)
- {
- PdfPage page = doc.Pages.Add();
- // Draws the page number only on the second page
- if (i == 1)
- {
- pageNumber.Page = page;
- pageNumber.Draw(page.Graphics);
- }
- }
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- ' Creates page number field
- Dim pageNumber As PdfDestinationPageNumberField = New PdfDestinationPageNumberField(font)
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- ' Draws the page number only on the second page
- If i = 1 Then
- pageNumber.Page = page
- pageNumber.Draw(page.Graphics)
- End If
- Next i
- doc.Save("DestinationPageNumberField.pdf");
- doc.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- // Set the document`s information
- doc.DocumentInformation.Author = "Syncfusion";
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfDocumentAuthorField documentAuthorField = new PdfDocumentAuthorField(font);
- for (int i = 0; i!=2; i++)
- {
- PdfPage page = doc.Pages.Add();
- documentAuthorField.Draw(page.Graphics);
- }
- doc.Save("DocumentAuthorField.pdf");
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the document`s information
- doc.DocumentInformation.Author = "Syncfusion"
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim documentAuthorField As PdfDocumentAuthorField = New PdfDocumentAuthorField(font)
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- documentAuthorField.Draw(page.Graphics)
- Next i
- doc.Save("DocumentAuthorField.pdf")
- doc.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- // Set the document`s information
- doc.DocumentInformation.Author = "Syncfusion";
- PdfDocumentAuthorField documentAuthorField = new PdfDocumentAuthorField();
- for (int i = 0; i!=2; i++)
- {
- PdfPage page = doc.Pages.Add();
- documentAuthorField.Draw(page.Graphics);
- }
- doc.Save("DocumentAuthorField.pdf");
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the document`s information
- doc.DocumentInformation.Author = "Syncfusion"
- Dim documentAuthorField As PdfDocumentAuthorField = New PdfDocumentAuthorField()
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- documentAuthorField.Draw(page.Graphics)
- Next i
- doc.Save("DocumentAuthorField.pdf")
- doc.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- // Set the document`s information
- doc.DocumentInformation.Author = "Syncfusion";
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfDocumentAuthorField documentAuthorField = new PdfDocumentAuthorField(font);
- for (int i = 0; i!=2; i++)
- {
- PdfPage page = doc.Pages.Add();
- documentAuthorField.Draw(page.Graphics);
- }
- doc.Save("DocumentAuthorField.pdf");
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the document`s information
- doc.DocumentInformation.Author = "Syncfusion"
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim documentAuthorField As PdfDocumentAuthorField = New PdfDocumentAuthorField(font)
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- documentAuthorField.Draw(page.Graphics)
- Next i
- doc.Save("DocumentAuthorField.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- // Set the document`s information
- doc.DocumentInformation.Author = "Syncfusion";
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfDocumentAuthorField documentAuthorField = new PdfDocumentAuthorField(font, brush);
- for (int i = 0; i != 2; i++)
- {
- PdfPage page = doc.Pages.Add();
- documentAuthorField.Draw(page.Graphics);
- }
- doc.Save("DocumentAuthorField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the document`s information
- doc.DocumentInformation.Author = "Syncfusion"
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim documentAuthorField As PdfDocumentAuthorField = New PdfDocumentAuthorField(font, brush)
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- documentAuthorField.Draw(page.Graphics)
- Next i
- doc.Save("DocumentAuthorField.pdf")
- doc.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- // Set the document`s information
- doc.DocumentInformation.Author = "Syncfusion";
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfDocumentAuthorField documentAuthorField = new PdfDocumentAuthorField(font, new RectangleF(0, 0, 100, 200));
- for (int i = 0; i!= 2; i++)
- {
- PdfPage page = doc.Pages.Add();
- documentAuthorField.Draw(page.Graphics);
- }
- doc.Save("DocumentAuthorField.pdf");
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the document`s information
- doc.DocumentInformation.Author = "Syncfusion"
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim documentAuthorField As PdfDocumentAuthorField = New PdfDocumentAuthorField(font, New RectangleF(0,0,100,200))
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- documentAuthorField.Draw(page.Graphics)
- Next i
- doc.Save("DocumentAuthorField.pdf")
- doc.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- PdfBrush brush = PdfBrushes.Black;
- // Creates page count field
- PdfPageCountField pageCount = new PdfPageCountField(font);
- pageCount.NumberStyle = PdfNumberStyle.Numeric;
- for (int i = 0; i != 2; i++)
- {
- PdfPage page = doc.Pages.Add();
- pageCount.Draw(page.Graphics);
- }
- doc.Save("PageCountField.pdf");
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- ' Creates page count field
- Dim pageCount As PdfPageCountField = New PdfPageCountField(font)
- pageCount.NumberStyle = PdfNumberStyle.Numeric
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- pageCount.Draw(page.Graphics)
- Next i
- doc.Save("PageCountField.pdf")
- doc.Close(True);
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- PdfBrush brush = PdfBrushes.Black;
- // Creates page count field
- PdfPageCountField pageCount = new PdfPageCountField(font);
- pageCount.NumberStyle = PdfNumberStyle.Numeric;
- for (int i = 0; i != 2; i++)
- {
- PdfPage page = doc.Pages.Add();
- pageCount.Draw(page.Graphics);
- }
- doc.Save("PageCountField.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- ' Creates page count field
- Dim pageCount As PdfPageCountField = New PdfPageCountField(font)
- pageCount.NumberStyle = PdfNumberStyle.Numeric
- For i As Integer = 0 To 1
- Dim page As PdfPage = doc.Pages.Add()
- pageCount.Draw(page.Graphics)
- Next i
- doc.Save("PageCountField.pdf")
- doc.Close(True);
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Create a PDF font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f);
- // Create section page number field
- PdfSectionPageNumberField sectionPageNumber = new PdfSectionPageNumberField(font);
- sectionPageNumber.NumberStyle = PdfNumberStyle.LowerRoman;
- //Draw the sectionPageNumber in section
- for (int i = 0; i != 2; i++)
- {
- PdfPage page = section.Pages.Add();
- sectionPageNumber.Draw(page.Graphics);
- }
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Create a PDF font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12.0F)
- ' Create section page number field
- Dim sectionPageNumber As New PdfSectionPageNumberField(font)
- sectionPageNumber.NumberStyle = PdfNumberStyle.LowerRoman
- 'Draw the sectionPageNumber in section
- For i As Integer = 0 To 1
- Dim page As PdfPage = section.Pages.Add()
- sectionPageNumber.Draw(page.Graphics)
- Next i
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create document bookmarks.
- PdfBookmark bookmark = document.Bookmarks.Add("Page 1");
- //Set the destination page.
- bookmark.Destination = new PdfDestination(page);
- //Set the destination location.
- bookmark.Destination.Location = new PointF(20, 20);
- //Set the text style and color.
- bookmark.TextStyle = PdfTextStyle.Bold;
- bookmark.Color = Color.Red;
- //Save and close the PDF document.
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create document bookmarks.
- Dim bookmark As PdfBookmark = document.Bookmarks.Add("Page 1")
- 'Set the destination page.
- bookmark.Destination = New PdfDestination(page)
- 'Set the destination location.
- bookmark.Destination.Location = New PointF(20, 20)
- 'Set the text style and color.
- bookmark.TextStyle = PdfTextStyle.Bold
- bookmark.Color = Color.Red
- 'Save and close the PDF document.
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Create a new document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- //Create document bookmarks.
- PdfBookmark bookmark = document.Bookmarks.Add("Page 1");
- //Set the destination page.
- bookmark.Destination = new PdfDestination(page);
- //check whether the specified bookmark present in the collection
- document.Bookmarks.Contains(bookmark);
- //Save and close the PDF document.
- document.Save("Output.pdf");
- document.Close(true);
-
-
- 'Create a new document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- 'Create document bookmarks.
- Dim bookmark As PdfBookmark = document.Bookmarks.Add("Page 1")
- 'Set the destination page.
- bookmark.Destination = New PdfDestination(page)
- 'Set the destination location.
- bookmark.Destination.Location = New PointF(20, 20)
- 'check whether the specified bookmark present in the collection
- Dim isBookMarkContained As Boolean = document.Bookmarks.Contains(bookmark)
- 'Save and close the PDF document.
- document.Save("Output.pdf")
- document.Close(True)
-
-
- //Load the PDF document.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");
- //Get all the bookmarks.
- PdfBookmarkBase bookmarks = loadedDocument.Bookmarks;
- //Remove bookmark by bookmark name.
- bookmarks.Remove("Page 1");
- //Remove bookmark by index.
- bookmarks.RemoveAt(1);
- //Save and close the document.
- loadedDocument.Save("Output.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document.
- Dim loadedDocument As New PdfLoadedDocument("input.pdf")
- 'Get all the bookmarks.
- Dim bookmarks As PdfBookmarkBase = loadedDocument.Bookmarks
- 'Remove bookmark by bookmark name.
- bookmarks.Remove("Page 1")
- 'Remove bookmark by index.
- bookmarks.RemoveAt(1)
- 'Save and close the document.
- loadedDocument.Save("Output.pdf")
- loadedDocument.Close(True)
-
-
- //Load the PDF document.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");
- //Get all the bookmarks.
- PdfBookmarkBase bookmarks = loadedDocument.Bookmarks;
- //Remove bookmark by bookmark name.
- bookmarks.Remove("Page 1");
- //Remove bookmark by index.
- bookmarks.RemoveAt(1);
- //Save and close the document.
- loadedDocument.Save("Output.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document.
- Dim loadedDocument As New PdfLoadedDocument("input.pdf")
- 'Get all the bookmarks.
- Dim bookmarks As PdfBookmarkBase = loadedDocument.Bookmarks
- 'Remove bookmark by bookmark name.
- bookmarks.Remove("Page 1")
- 'Remove bookmark by index.
- bookmarks.RemoveAt(1)
- 'Save and close the document.
- loadedDocument.Save("Output.pdf")
- loadedDocument.Close(True)
-
-
- //Load the PDF document
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
- //Get the bookmarks
- PdfBookmarkBase bookmarks = loadedDocument.Bookmarks;
- //Remove all the bookmarks form the collection
- bookmarks.Clear();
- //Save and close the PDF document
- loadedDocument.Save("Output.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document
- Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
- 'Get the Bookmarks
- Dim Bookmarks As PdfAttachmentCollection = loadedDocument.Bookmarks
- 'Remove all the bookmarks form the collection
- Bookmarks.Clear()
- 'Save and close the document
- loadedDocument.Save("Output.pdf")
- loadedDocument.Close(True)
-
-
- //Create a new document.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
- //Insert a new bookmark in the existing bookmark collection.
- PdfBookmark bookmark = loadedDocument.Bookmarks.Insert(1, "New bookmark 2");
- //Set the destination page and location.
- bookmark.Destination = new PdfDestination(loadedDocument.Pages[1]);
- bookmark.Destination.Location = new PointF(0, 300);
- //Save and close the PDF document.
- loadedDocument.Save("Output.pdf");
- loadedDocument.Close(true);
-
-
- 'Create a new document.
- Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
- 'Insert a new bookmark in the existing bookmark collection.
- Dim bookmark As PdfBookmark = loadedDocument.Bookmarks.Insert(1, "New bookmark 2")
- 'Set the destination page and location.
- bookmark.Destination = New PdfDestination(loadedDocument.Pages(1))
- bookmark.Destination.Location = New PointF(0, 300)
- 'Save and close the PDF document.
- loadedDocument.Save("Output.pdf")
- loadedDocument.Close(True)
-
-
- //Load the PDF document.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
- //Get all the bookmarks.
- PdfBookmarkBase bookmarks = loadedDocument.Bookmarks;
- //get the bookmark count.
- int count = bookmarks.Count;
- //Save and close the document
- loadedDocument.Save("Output.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document.
- Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
- 'Get all the bookmarks.
- Dim bookmarks As PdfBookmarkBase = loadedDocument.Bookmarks
- 'get the bookmark count.
- Dim count As Integer = bookmarks.Count
- 'Save and close the document
- loadedDocument.Save("Output.pdf")
- loadedDocument.Close(True)
-
-
- //Load the PDF document.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
- //Get all the bookmarks.
- PdfBookmarkBase bookmarks = loadedDocument.Bookmarks;
- //Get the first bookmark and change the properties of the bookmark.
- PdfLoadedBookmark bookmark = bookmarks[0] as PdfLoadedBookmark;
- bookmark.Destination = new PdfDestination(loadedDocument.Pages[1]);
- bookmark.Color = Color.Green;
- bookmark.TextStyle = PdfTextStyle.Bold;
- bookmark.Title = "Changed title";
- //Save the document
- loadedDocument.Save("Output.pdf");
- //Close the document
- loadedDocument.Close(true);
-
-
- 'Load the PDF document.
- Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
- 'Get all the bookmarks.
- Dim bookmarks As PdfBookmarkBase = document.Bookmarks
- 'Get the first bookmark and change the properties of the bookmark.
- Dim bookmark As PdfLoadedBookmark = TryCast(bookmarks(0), PdfLoadedBookmark)
- bookmark.Destination = New PdfDestination(loadedDocument.Pages(1))
- bookmark.Color = Color.Green
- bookmark.TextStyle = PdfTextStyle.Bold
- bookmark.Title = "Changed title"
- 'Save the document
- loadedDocument.Save("Output.pdf")
- 'Close the document
- loadedDocument.Close(True)
-
-
- //Load the PDF document.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
- //Get all the bookmarks.
- PdfBookmarkBase bookmarks = loadedDocument.Bookmarks;
- //Get the first bookmark and set the properties of the bookmark.
- PdfLoadedBookmark bookmark = bookmarks[0] as PdfLoadedBookmark;
- bookmark.Destination = new PdfDestination(loadedDocument.Pages[1]);
- bookmark.Color = Color.Green;
- bookmark.TextStyle = PdfTextStyle.Bold;
- bookmark.Title = "Changed title";
- //Save the document
- loadedDocument.Save("Output.pdf");
- //Close the document
- loadedDocument.Close(true);
-
-
- 'Load the PDF document.
- Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
- 'Get all the bookmarks.
- Dim bookmarks As PdfBookmarkBase = document.Bookmarks
- 'Get the first bookmark and set the properties of the bookmark.
- Dim bookmark As PdfLoadedBookmark = TryCast(bookmarks(0), PdfLoadedBookmark)
- bookmark.Destination = New PdfDestination(loadedDocument.Pages(1))
- bookmark.Color = Color.Green
- bookmark.TextStyle = PdfTextStyle.Bold
- bookmark.Title = "Changed title"
- 'Save the document
- loadedDocument.Save("Output.pdf")
- 'Close the document
- loadedDocument.Close(True)
-
-
- //Load a PDF document
- PdfLoadedDocument ldoc = new PdfLoadedDocument("SourceDoc.pdf");
- // Creates a booklet from the given PDF document
- PdfDocument doc = PdfBookletCreator.CreateBooklet(ldoc, new SizeF(300, 500));
- //Save the document
- doc.Save("Booklet.pdf");
- doc.Close(true);
-
-
- 'Load a PDF document
- Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("SourceDoc.pdf")
- ' Creates a booklet from the given PDF document
- Dim doc As PdfDocument = PdfBookletCreator.CreateBooklet(ldoc, New SizeF(300, 500))
- 'Save the document
- doc.Save("Booklet.pdf")
- doc.Close(True);
-
-
- //Load a PDF document
- PdfLoadedDocument ldoc = new PdfLoadedDocument("SourceDoc.pdf");
- // Creates a booklet from the given PDF document
- PdfDocument doc = PdfBookletCreator.CreateBooklet(ldoc, new SizeF(300, 500));
- //Save the document
- doc.Save("Booklet.pdf");
- doc.Close(true);
- ldoc.Close(true);
-
-
- 'Load a PDF document
- Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("SourceDoc.pdf")
- ' Creates a booklet from the given PDF document
- Dim doc As PdfDocument = PdfBookletCreator.CreateBooklet(ldoc, New SizeF(300, 500))
- 'Save the document
- doc.Save("Booklet.pdf")
- doc.Close(True)
- ldoc.Close(True)
-
-
- //Create booklet with two sides
- PdfBookletCreator.CreateBooklet("SourceDocument.pdf","Booklet.pdf",new SizeF(300, 500), true);
-
-
- 'Create booklet with two sides
- PdfBookletCreator.CreateBooklet("SourceDocument.pdf","Booklet.pdf",New SizeF(300, 500), true)
-
-
- //Creates a booklet from the given PDF document
- PdfBookletCreator.CreateBooklet("SourceDocument.pdf","Booklet.pdf",new SizeF(300, 500));
-
-
- 'Creates a booklet from the given PDF document
- PdfBookletCreator.CreateBooklet("SourceDocument.pdf","Booklet.pdf",New SizeF(300, 500))
-
-
- //Load a PDF document
- PdfLoadedDocument ldoc = new PdfLoadedDocument("SourceDoc.pdf");
- //Creates a booklet from the given PDF document
- PdfDocument doc = PdfBookletCreator.CreateBooklet(ldoc, new SizeF(300, 500), false);
- //Save the document
- doc.Save("Booklet.pdf");
- doc.Close(true);
- ldoc.Close(true);
-
-
- 'Load a PDF document
- Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("SourceDoc.pdf")
- 'Creates a booklet from the given PDF document
- Dim doc As PdfDocument = PdfBookletCreator.CreateBooklet(ldoc, New SizeF(300, 500), False)
- 'Save the document
- doc.Save("Booklet.pdf")
- doc.Close(True)
- ldoc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument srcDoc = new PdfLoadedDocument("sourceDoc.pdf");
- // Specify the margin.
- PdfMargins margin = new PdfMargins();
- margin.All = 10;
- //Creates a booklet from the given PDF document
- PdfDocument doc = PdfBookletCreator.CreateBooklet(srcDoc,new SizeF(300, 500), false,margin);
- doc.Save("Booklet.pdf");
- doc.Close(true);
- srcDoc.Close(true);
-
-
- ' Loads an existing document
- Dim srcDoc As PdfLoadedDocument = New PdfLoadedDocument("sourceDoc.pdf")
- ' Specify the margin.
- Dim margin As PdfMargins = New PdfMargins()
- margin.All = 10
- 'Creates a booklet from the given PDF document
- Dim doc As PdfDocument = PdfBookletCreator.CreateBooklet(srcDoc,New SizeF(300, 500), False,margin)
- doc.Save("Booklet.pdf")
- doc.Close(True)
- srcDoc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Set the document`s viewer preference.
- doc.ViewerPreferences.PageMode = PdfPageMode.UseAttachments;
- doc.ViewerPreferences.PageScaling = PageScalingMode.None;
- doc.ViewerPreferences.FitWindow = true;
- doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage;
- // Save the document
- doc.Save("ViewerPreferences.pdf");
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s viewer preference
- doc.ViewerPreferences.PageMode = PdfPageMode.UseAttachments
- doc.ViewerPreferences.PageScaling = PageScalingMode.None
- doc.ViewerPreferences.FitWindow = True
- doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage
- ' Save the document
- doc.Save("ViewerPreferences.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- // Creates a form
- PdfForm form = document.Form;
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- listBox.HighlightMode = PdfHighlightMode.Outline;
- //Add the items to the list box
- listBox.Items.Add(new PdfListFieldItem("English", "English"));
- listBox.Items.Add(new PdfListFieldItem("French", "French"));
- listBox.Items.Add(new PdfListFieldItem("German", "German"));
- //Select the item
- listBox.SelectedIndex = 2;
- //Set the multiselect option
- listBox.MultiSelect = true;
- document.Save("Form.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- ' Creates a form
- Dim form As PdfForm = document.Form
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- listBox.HighlightMode = PdfHighlightMode.Outline
- 'Add the items to the list box
- listBox.Items.Add(New PdfListFieldItem("English", "English"))
- listBox.Items.Add(New PdfListFieldItem("French", "French"))
- listBox.Items.Add(New PdfListFieldItem("German", "German"))
- 'Select the item
- listBox.SelectedIndex = 2
- 'Set the multiselect option
- listBox.MultiSelect = True
- document.Save("Form.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font with Bold font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, new PointF(10, 10));
- //Save the document.
- document.Save("Document.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font with Bold font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, New PointF(10, 10))
- 'Save the document.
- document.Save("Document.pdf");
- 'Close the document
- document.Close(True)
-
-
- // Destination PDF document
- PdfDocument destDoc = new PdfDocument();
- // Source PDF documents
- string[] source = { "Src1.pdf", "Src2.pdf" };
- //Merge the source pdf document.
- PdfDocumentBase.Merge(destDoc, source);
- destDoc.Save("Merge.pdf");
-
-
- ' Destination PDF document
- Dim destDoc As PdfDocument = New PdfDocument()
- ' Source PDF documents
- Dim source() As String = { "Src1.pdf", "Src2.pdf" }
- 'Merge the source pdf document.
- PdfDocumentBase.Merge(destDoc, source)
- destDoc.Save("Merge.pdf")
-
-
- // Destination PDF document
- PdfDocument destDoc = new PdfDocument();
- // Source PDF documents
- string[] source = { "Src1.pdf", "Src2.pdf" };
- //Merge the source pdf document.
- destDoc = PdfDocument.Merge(source);
- destDoc.Save("Merge.pdf");
-
-
- ' Destination PDF document
- Dim destDoc As PdfDocument = New PdfDocument()
- ' Source PDF documents
- Dim source() As String = { "Src1.pdf", "Src2.pdf" }
- 'Merge the source pdf document.
- destDoc = PdfDocument.Merge(source)
- destDoc.Save("Merge.pdf")
-
-
- // Source document.
- PdfLoadedDocument srcDoc = new PdfLoadedDocument("Src1.pdf");
- // Destination PDF document
- PdfDocument destDoc = new PdfDocument();
- //Merge the source pdf document.
- PdfDocumentBase.Merge(destDoc, srcDoc);
- destDoc.Save("Merge.pdf");
-
-
- ' Source document.
- Dim srcDoc As PdfLoadedDocument = New PdfLoadedDocument("Src1.pdf")
- ' Destination PDF document
- Dim destDoc As PdfDocument = New PdfDocument()
- 'Merge the source pdf document.
- PdfDocumentBase.Merge(destDoc, srcDoc)
- destDoc.Save("Merge.pdf")
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- // Loads an Image
- Image img = Image.FromFile("input.png");
- PdfImage pdfImg = new PdfBitmap(img);
- //Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200);
- doc.Save("DisposeOnClose.pdf");
- // Dispose the Img object along with the document.
- doc.DisposeOnClose(img);
- //Close the document
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- 'Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- ' Loads an Image
- Dim img As Image = Image.FromFile("Logo.png")
- Dim pdfImg As PdfImage = New PdfBitmap(img)
- 'Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200)
- doc.Save("DisposeOnClose.pdf")
- ' Dispose the Img object along with the document.
- doc.DisposeOnClose(img)
- 'Close the document
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- // Loads an Image
- PdfImage pdfImg = new PdfBitmap(Image.FromFile("Logo.png"));
- //Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200);
- doc.Save("SaveExample.pdf");
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- 'Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- ' Loads an Image
- Dim pdfImg As PdfImage = New PdfBitmap(Image.FromFile("Logo.png"))
- 'Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200)
- doc.Save("SaveExample.pdf")
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- // Loads an Image
- PdfImage pdfImg = new PdfBitmap(Image.FromFile("Logo.png"));
- //Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200);
- doc.Save("SaveExample.pdf", Response, HttpReadType.Open);
- //Close the document
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- ' Loads an Image
- Dim pdfImg As PdfImage = New PdfBitmap(Image.FromFile("Logo.png"))
- 'Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200)
- doc.Save("SaveExample.pdf", Response, HttpReadType.Open)
- 'Close the document
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- // Loads an Image
- PdfImage pdfImg = new PdfBitmap(Image.FromFile("Logo.png"));
- //Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200);
- MemoryStream stream = new MemoryStream();
- // Save the document as a stream
- doc.Save(stream, Response);
- //Close the document
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- 'Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- ' Loads an Image
- Dim pdfImg As PdfImage = New PdfBitmap(Image.FromFile("Logo.png"))
- 'Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200)
- Dim stream As MemoryStream = New MemoryStream()
- ' Save the document as a stream
- doc.Save(stream, Response)
- 'Close the document
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- // Loads an Image
- PdfImage pdfImg = new PdfBitmap(Image.FromFile("Logo.png"));
- //Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200);
- //Save the document
- doc.Save("Close.pdf");
- // Closes the document
- doc.Close();
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- 'Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- ' Loads an Image
- Dim pdfImg As PdfImage = New PdfBitmap(Image.FromFile("Logo.png"))
- 'Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200)
- 'Save the document
- doc.Save("Close.pdf")
- ' Closes the document
- doc.Close()
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- // Loads an Image
- PdfImage pdfImg = new PdfBitmap(Image.FromFile("Logo.png"));
- //Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200);
- //Save the document
- doc.Save("Close.pdf");
- // Closes the document completely.
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- 'Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- ' Loads an Image
- Dim pdfImg As PdfImage = New PdfBitmap(Image.FromFile("Logo.png"))
- 'Draw the image
- g.DrawImage(pdfImg,20, 20, 100,200)
- 'Save the document
- doc.Save("Close.pdf")
- ' Closes the document completely.
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- // Loads an Image
- PdfImage pdfImg = new PdfBitmap(Image.FromFile("Logo.png"));
- //Draw the image
- g.DrawImage(pdfImg, 20, 20, 100, 200);
- // Save the document as a stream
- MemoryStream stream = new MemoryStream();
- doc.Save(stream);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- 'Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- ' Loads an Image
- Dim pdfImg As PdfImage = New PdfBitmap(Image.FromFile("Logo.png"))
- 'Draw the image
- g.DrawImage(pdfImg, 20, 20, 100, 200)
- ' Save the document as a stream
- Dim stream As MemoryStream = New MemoryStream()
- doc.Save(stream)
-
-
- // Source document
- PdfLoadedDocument srcDoc = new PdfLoadedDocument("SrcDocument.pdf");
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- // Importing pages from source document.
- doc.ImportPage(srcDoc, srcDoc.Pages[0]);
- doc.Save("ImportPages.pdf");
- //Close both the instance
- doc.Close(true);
- srcDoc.Close(true);
-
-
- ' Source document
- Dim srcDoc As PdfLoadedDocument = New PdfLoadedDocument("SrcDocument.pdf")
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Importing pages from source document.
- doc.ImportPage(srcDoc, srcDoc.Pages(0))
- doc.Save("ImportPages.pdf")
- 'Close both the instance
- doc.Close(True)
- srcDoc.Close(True)
-
-
- // Source document
- PdfLoadedDocument srcDoc = new PdfLoadedDocument("SrcDocument.pdf");
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- // Importing pages from source document.
- doc.ImportPage(srcDoc, 0);
- doc.Save("ImportPages.pdf");
- //Close both the instance
- doc.Close(true);
- srcDoc.Close(true);
-
-
- ' Source document
- Dim srcDoc As PdfLoadedDocument = New PdfLoadedDocument("SrcDocument.pdf")
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Importing pages from source document.
- doc.ImportPage(srcDoc, 0)
- doc.Save("ImportPages.pdf")
- 'Close both the instance
- doc.Close(True)
- srcDoc.Close(True)
-
-
- // Source document
- PdfLoadedDocument srcDoc = new PdfLoadedDocument("SrcDocument.pdf");
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- // Importing pages from source document.
- doc.ImportPageRange(srcDoc, 0, 2);
- doc.Save("ImportPages.pdf");
- //Close both the instance
- doc.Close(true);
- srcDoc.Close(true);
-
-
- ' Source document
- Dim srcDoc As PdfLoadedDocument = New PdfLoadedDocument("SrcDocument.pdf")
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Importing pages from source document.
- doc.ImportPageRange(srcDoc, 0, 2)
- doc.Save("ImportPages.pdf")
- 'Close both the instance
- doc.Close(True)
- srcDoc.Close(True)
-
-
- // Source document
- PdfLoadedDocument srcDoc = new PdfLoadedDocument("SrcDocument.pdf");
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- // Appending the document with source document.
- doc.Append(srcDoc);
- // Save the document.
- doc.Save("Append.pdf");
- //close both the instance
- doc.Close(true);
- srcDoc.Close(true);
-
-
- ' Source document
- Dim srcDoc As PdfLoadedDocument = New PdfLoadedDocument("SrcDocument.pdf")
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Appending the document with source document.
- doc.Append(srcDoc)
- ' Save the document.
- doc.Save("Append.pdf")
- 'Close bothe the instance
- doc.Close(True)
- srcDoc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Reading security settings of the document
- PdfSecurity security = doc.Security;
- doc.Save("Security.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Reading security settings of the document
- Dim security As PdfSecurity = doc.Security
- doc.Save("Security.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Set the document`s viewer preference
- doc.ViewerPreferences.PageLayout = PdfPageLayout.TwoPageLeft;
- doc.ViewerPreferences.PageScaling = PageScalingMode.AppDefault;
- doc.ViewerPreferences.PageMode = PdfPageMode.FullScreen;
- doc.Save("ViewerPreferences.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- 'Set the document`s viewer preference
- doc.ViewerPreferences.PageLayout = PdfPageLayout.TwoPageLeft
- doc.ViewerPreferences.PageScaling = PageScalingMode.AppDefault
- doc.ViewerPreferences.PageMode = PdfPageMode.FullScreen
- doc.Save("ViewerPreferences.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- // Set the document`s compression level
- doc.Compression = PdfCompressionLevel.Best;
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- doc.Save("Compression.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the document`s compression level
- doc.Compression = PdfCompressionLevel.Best
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- doc.Save("Compression.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Create a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Set the document`s cross reference Type
- doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream;
- // Set the pdf version
- doc.FileStructure.Version = PdfVersion.Version1_6;
- // Save the document
- doc.Save("FileStructure.pdf");
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s cross reference Type
- doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream
- ' set the pdf version
- doc.FileStructure.Version = PdfVersion.Version1_6
- ' Save the document
- doc.Save("FileStructure.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font with Bold font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
- //Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, new PointF(10, 10));
- //Save the document.
- document.Save("Document.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font with Bold font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, New PointF(10, 10))
- 'Save the document.
- document.Save("Document.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument(PdfConformanceLevel.Pdf_A1B);
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfTrueTypeFont(new Font(FontFamily.GenericMonospace, 12f, FontStyle.Bold));
- //Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, new PointF(10, 10));
- //Saves the document
- document.Save("Document.pdf");
- Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument(PdfConformanceLevel.Pdf_A1B)
- 'Creates a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Dim font As PdfFont = New PdfTrueTypeFont(New Font(FontFamily.GenericMonospace, 12f, FontStyle.Bold))
- 'Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, New PointF(10, 10))
- 'Saves the document
- document.Save("Document.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- // Loads an Image
- PdfImage pdfImg = new PdfBitmap(Image.FromFile("Logo.png"));
- //Draw the image
- g.DrawImage(pdfImg, 20, 20, 100, 200);
- // Save the document as a stream
- MemoryStream stream = new MemoryStream();
- doc.Save(stream);
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- 'Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- ' Loads an Image
- Dim pdfImg As PdfImage = New PdfBitmap(Image.FromFile("Logo.png"))
- 'Draw the image
- g.DrawImage(pdfImg, 20, 20, 100, 200)
- ' Save the document as a stream
- Dim stream As MemoryStream = New MemoryStream()
- doc.Save(stream)
- 'Close the document
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- //Create a solid brush
- PdfBrush brush = new PdfSolidBrush(Color.Black);
- float fontSize = 20f;
- //Set the font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize);
- //Draw the text
- g.DrawString("Hello world!", font, brush,new PointF(20,20));
- doc.Save("Sample.pdf");
- // Closes the document.
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- 'Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- 'Create a solid brush
- Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
- Dim fontSize As Single = 20f
- 'Set the font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, fontSize)
- 'Draw the text
- g.DrawString("Hello world!", font, brush,New PointF(20,20))
- doc.Save("Sample.pdf")
- ' Closes the document.
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- //Create a solid brush
- PdfBrush brush = new PdfSolidBrush(Color.Black);
- float fontSize = 20f;
- //Set the font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize);
- //Draw the text
- g.DrawString("Hello world!", font, brush,new PointF(20,20));
- // Cloning the document
- PdfDocument cloneDoc = doc.Clone() as PdfDocument;
- cloneDoc.Save("Clone.pdf");
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- 'Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- 'Create a solid brush
- Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
- Dim fontSize As Single = 20f
- 'Set the font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, fontSize)
- 'Draw the text
- g.DrawString("Hello world!", font, brush,New PointF(20,20))
- ' Cloning the document
- Dim cloneDoc As PdfDocument = TryCast(doc.Clone(), PdfDocument)
- cloneDoc.Save("Clone.pdf")
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add new pages to the document.
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, new PointF(10, 10));
- document.SaveProgress += new PdfDocument.ProgressEventHandler(document_SaveProgress);
- //Saves the document
- document.Save("Document.pdf");
- //Close the document
- document.Close(true);
- // Event handler for PageAdded event
- void document_SaveProgress(object sender, ProgressEventArgs arguments)
- {
- MessageBox.Show(String.Format("Current: {0}, Progress: {1}, Total {2}", arguments.Current, arguments.Progress, arguments.Total));
- }
-
-
- 'Create a new PDF document.
- Private document As PdfDocument = New PdfDocument()
- 'Add new pages to the document.
- Private page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Private font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, New PointF(10, 10))
- AddHandler document.SaveProgress, AddressOf document_SaveProgress
- 'Saves the document
- document.Save("Document.pdf")
- 'Close the document
- document.Close(True)
- ' Event handler for PageAdded event
- Private Sub document_SaveProgress(ByVal sender As Object, ByVal arguments As ProgressEventArgs)
- MessageBox.Show(String.Format("Current: {0}, Progress: {1}, Total {2}", arguments.Current, arguments.Progress, arguments.Total))
- End Sub
-
-
- //Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
- //Creates a new page and adds it as the last page of the document template
- PdfPageTemplateElement footer = new PdfPageTemplateElement(rect);
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- PdfSolidBrush brush = new PdfSolidBrush(Color.Gray);
- //Create page number field
- PdfPageNumberField pageNumber = new PdfPageNumberField(font, brush);
- //Create page count field
- PdfPageCountField count = new PdfPageCountField(font, brush);
- PdfCompositeField compositeField = new PdfCompositeField(font, brush, "Page {0} of {1}", pageNumber, count);
- compositeField.Bounds = footer.Bounds;
- compositeField.Draw(footer.Graphics, new PointF(40, footer.Height - 50));
- //Add the footer template at the bottom
- doc.Template.Bottom = footer;
- //Save the document
- doc.Save("Template.pdf");
- //Close the document
- doc.Close(true);
-
-
-
- 'Create a PDF document
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
- 'Create a page template
- Dim footer As PdfPageTemplateElement = New PdfPageTemplateElement(rect)
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- Dim brush As PdfSolidBrush = New PdfSolidBrush(Color.Gray)
- 'Create page number field
- Dim pageNumber As PdfPageNumberField = New PdfPageNumberField(font, brush)
- 'Create page count field
- Dim count As PdfPageCountField = New PdfPageCountField(font, brush)
- Dim compositeField As PdfCompositeField = New PdfCompositeField(font, brush, "Page {0} of {1}", pageNumber, count)
- compositeField.Bounds = footer.Bounds
- compositeField.Draw(footer.Graphics, New PointF(40, footer.Height - 50))
- 'Add the footer template at the bottom
- doc.Template.Bottom = footer
- doc.Save("Template.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Create and add new launch Action to the document
- PdfLaunchAction action = new PdfLaunchAction("input.txt", PdfFilePathType.Relative);
- document.Actions.AfterOpen = action;
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create and add new launch Action to the document.
- Dim action As PdfLaunchAction = New PdfLaunchAction("myAction.txt", PdfFilePathType.Relative)
- document.Actions.AfterOpen = action
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- // Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Page collection
- PdfDocumentPageCollection pageCollection = doc.Pages;
- PdfFont standardFont = new PdfStandardFont(PdfFontFamily.TimesRoman,10);
- // Drawing string on first page
- pageCollection[0].Graphics.DrawString("FirstPage", standardFont, PdfBrushes.Black, new PointF(10, 10));
- //Save the document
- doc.Save("Output.pdf");
- //Close the document
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- ' Page collection
- Dim pageCollection As PdfDocumentPageCollection = doc.Pages
- Dim standardFont As PdfFont = New PdfStandardFont(PdfFontFamily.TimesRoman,10)
- ' Drawing string on first page
- pageCollection(0).Graphics.DrawString("FirstPage", standardFont, PdfBrushes.Black, New PointF(10, 10))
- 'Save the document
- doc.Save("Output.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- //Create named destination
- PdfNamedDestination namedDestination = new PdfNamedDestination("Interactive Feature");
- namedDestination.Title = "Interactive Feature";
- namedDestination.Destination = new PdfDestination(page);
- doc.NamedDestinationCollection.Add(namedDestination);
- //Save the document
- doc.Save("NamedDestination.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- 'Create named destination
- Dim namedDestination As PdfNamedDestination = New PdfNamedDestination("Interactive Feature")
- namedDestination.Title = "Interactive Feature"
- namedDestination.Destination = New PdfDestination(page)
- doc.NamedDestinationCollection.Add(namedDestination)
- doc.Save("NamedDestination.pdf")
- //Close the document
- doc.Close(True)
-
-
- //Create a PDF document
- PdfDocument doc = new PdfDocument();
- // Create a new section
- PdfSection mySection = doc.Sections.Add();
- //Creates a new page
- mySection.Pages.Add();
- // Gets the section collection
- PdfSectionCollection sectionCollection = doc.Sections;
- // Gets the first page from first section
- PdfPage page = sectionCollection[0].Pages[0];
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
- // Draw the string in first page of the section
- page.Graphics.DrawString("Hello World", font, PdfBrushes.Black, new Point(100, 100));
- doc.Save("Sections.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a PDF document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a new section
- Dim mySection As PdfSection = doc.Sections.Add()
- 'Creates a new page
- mySection.Pages.Add()
- ' Gets the section collection
- Dim sectionCollection As PdfSectionCollection = doc.Sections
- ' Gets the first page from first section
- Dim page As PdfPage = sectionCollection(0).Pages(0)
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12)
- ' Draw the string in first page of the section
- page.Graphics.DrawString("Hello World", font, PdfBrushes.Black, New Point(100, 100))
- doc.Save("Sections.pdf")
- 'Close the document
- doc.Close(True)
-
-
- // Create a new document class object.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Set page size
- doc.PageSettings.Size = PdfPageSize.A6;
- //Set page orientation
- doc.PageSettings.Orientation = PdfPageOrientation.Landscape;
- doc.Save("PageSettings.pdf");
- //Close the document
- doc.Close(true);
-
-
- ' Create a new document class object.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- 'Set page size
- doc.PageSettings.Size = PdfPageSize.A6
- 'Set page orientation
- doc.PageSettings.Orientation = PdfPageOrientation.Landscape
- doc.Save("PageSettings.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- //Create outline
- PdfBookmark bookMark = doc.Bookmarks.Add("InteractiveFeature");
- bookMark.Color = Color.DarkBlue;
- bookMark.TextStyle = PdfTextStyle.Bold;
- bookMark.Title = "Interactive Feature";
- bookMark.Destination = new PdfDestination(page);
- //Save the document
- doc.Save("Output.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- 'Create outline
- Dim bookMark As PdfBookmark = document.Bookmarks.Add("InteractiveFeature")
- bookMark.Color = Color.DarkBlue
- bookMark.TextStyle = PdfTextStyle.Bold
- bookMark.Title = "Interactive Feature"
- bookMark.Destination = New PdfDestination(page)
- doc.Save("Bookmarks.pdf")
- //Close the document
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- // Creates a new page in document
- PdfPage page = doc.Pages.Add();
- // Adding an image as attachment
- PdfAttachment attachment = new PdfAttachment("Logo.jpg");
- attachment.Description = "Syncfusion Logo";
- attachment.MimeType = "application/jpeg";
- // Add the attachment in document
- doc.Attachments.Add(attachment);
- //Save the document
- doc.Save("Attachment.pdf");
- //Close the document
- doc.Close(true);
-
-
- ' Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- ' Creates a new page in document
- Dim page As PdfPage = doc.Pages.Add()
- ' Adding an image as attachment
- Dim attachment As PdfAttachment = New PdfAttachment("Logo.jpg")
- attachment.Description = "Syncfusion Logo"
- attachment.MimeType = "application/jpeg"
- ' Add the attachment in document
- doc.Attachments.Add(attachment)
- 'Save the document
- doc.Save("Attachment.pdf")
- 'Close the document
- doc.Close(True)
-
-
- // Create a document.
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 14);
- //Create a text box
- PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
- firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
- firstNameTextBox.Font = font;
- //Add the textbox in form
- document.Form.Fields.Add(firstNameTextBox);
- //Save the document
- document.Save("Form.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a document.
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a text box
- Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
- firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
- firstNameTextBox.Font = font
- 'Add the textbox in form
- document.Form.Fields.Add(firstNameTextBox)
- document.Save("Form.pdf")
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s color spaces as GrayScale
- doc.ColorSpace = PdfColorSpace.GrayScale;
- doc.Save("ColorSpace.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s color spaces as GrayScale
- doc.ColorSpace = PdfColorSpace.GrayScale
- doc.Save("ColorSpace.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument(PdfConformanceLevel.Pdf_A1B);
- //Creates a new page and adds it as the last page of the document to the document.
- PdfPage page = document.Pages.Add();
- // Create a 'Times New Roman' font
- Font font = new Font("Times New Roman", 10);
- // Create font with bold font style.
- PdfFont pdfFont = new PdfTrueTypeFont(font, false);
- //Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", pdfFont, PdfBrushes.Black, new PointF(10, 10));
- //Save document to disk.
- document.Save("ConformanceLevel.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument(PdfConformanceLevel.Pdf_A1B)
- ' Create a page to the document.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a 'Times New Roman' font
- Dim font As Font = New Font("Times New Roman", 10)
- ' Create font with bold font style.
- Dim pdfFont As PdfFont = New PdfTrueTypeFont(font, False)
- 'Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", pdfFont, PdfBrushes.Black, New PointF(10, 10))
- 'Save document to disk.
- document.Save("ConformanceLevel.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Diable the font cache
- PdfDocument.EnableCache = false;
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- //Create a solid brush
- PdfBrush brush = new PdfSolidBrush(Color.Black);
- float fontSize = 20f;
- //Set the font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize);
- //Draw the text
- g.DrawString("Hello world!", font, brush, new PointF(20, 20));
- doc.Save("Output.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As New PdfDocument()
- 'Diable the font cache
- PdfDocument.EnableCache = False
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- 'Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- 'Create a solid brush
- Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
- Dim fontSize As Single = 20.0F
- 'Set the font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, fontSize)
- 'Draw the text
- g.DrawString("Hello world!", font, brush, New PointF(20, 20))
- doc.Save("Output.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add new pages to the document.
- PdfPage page = document.Pages.Add();
- //Create font and font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, new PointF(10, 10));
- document.SaveProgress += new PdfDocument.ProgressEventHandler(document_SaveProgress);
- //Saves the document
- document.Save("Document.pdf");
- Close the document
- document.Close(true);
- // Handles the event
- void document_SaveProgress(object sender, ProgressEventArgs arguments)
- {
- MessageBox.Show(String.Format("Current: {0}, Progress: {1}, Total {2}", arguments.Current, arguments.Progress, arguments.Total));
- }
-
-
- 'Create a new PDF document.
- Private document As PdfDocument = New PdfDocument()
- 'Add new pages to the document.
- Private page As PdfPage = document.Pages.Add()
- 'Create font and font style.
- Private font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, New PointF(10, 10))
- AddHandler document.SaveProgress, AddressOf document_SaveProgress
- 'Saves the document
- document.Save("Document.pdf")
- 'Close the document
- document.Close(True)
- ' Handles the event
- Private Sub document_SaveProgress(ByVal sender As Object, ByVal arguments As ProgressEventArgs)
- MessageBox.Show(String.Format("Current: {0}, Progress: {1}, Total {2}", arguments.Current, arguments.Progress, arguments.Total))
- End Sub
-
-
- //Create a new document.
- PdfDocument pdfDoc= new PdfDocument();
- //Creates a new page
- PdfPage page = pdfDoc.Pages.Add();
- //Set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information";
- pdfDoc.DocumentInformation.Author = "Syncfusion";
- pdfDoc.DocumentInformation.Keywords = "PDF";
- pdfDoc.DocumentInformation.Subject = "PDF demo";
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
- //Save the document
- pdfDoc.Save("DocumentInformation.pdf");
- pdfDoc.Close(true);
-
-
- 'Create a new document.
- Dim pdfDoc As PdfDocument= New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = pdfDoc.Pages.Add()
- 'set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information"
- pdfDoc.DocumentInformation.Author = "Syncfusion"
- pdfDoc.DocumentInformation.Keywords = "PDF"
- pdfDoc.DocumentInformation.Subject = "PDF demo"
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now
- 'Save the document
- pdfDoc.Save("DocumentInformation.pdf")
- pdfDoc.Close(True)
-
-
- //Create a new document.
- PdfDocument pdfDoc= new PdfDocument();
- //Creates a new page
- PdfPage page = pdfDoc.Pages.Add();
- //Set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information";
- pdfDoc.DocumentInformation.Author = "Syncfusion";
- pdfDoc.DocumentInformation.Keywords = "PDF";
- pdfDoc.DocumentInformation.Subject = "PDF demo";
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
- //Save the document
- pdfDoc.Save("DocumentInformation.pdf");
- pdfDoc.Close(true);
-
-
- 'Create a new document.
- Dim pdfDoc As PdfDocument= New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = pdfDoc.Pages.Add()
- 'set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information"
- pdfDoc.DocumentInformation.Author = "Syncfusion"
- pdfDoc.DocumentInformation.Keywords = "PDF"
- pdfDoc.DocumentInformation.Subject = "PDF demo"
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now
- 'Save the document
- pdfDoc.Save("DocumentInformation.pdf")
- pdfDoc.Close(True)
-
-
- //Create a new document.
- PdfDocument pdfDoc= new PdfDocument();
- //Creates a new page
- PdfPage page = pdfDoc.Pages.Add();
- //Set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information";
- pdfDoc.DocumentInformation.Author = "Syncfusion";
- pdfDoc.DocumentInformation.Keywords = "PDF";
- pdfDoc.DocumentInformation.Subject = "PDF demo";
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
- //Sets the modification date
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
- //Save the document
- pdfDoc.Save("DocumentInformation.pdf");
- pdfDoc.Close(true);
-
-
- 'Create a new document.
- Dim pdfDoc As PdfDocument= New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = pdfDoc.Pages.Add()
- 'set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information"
- pdfDoc.DocumentInformation.Author = "Syncfusion"
- pdfDoc.DocumentInformation.Keywords = "PDF"
- pdfDoc.DocumentInformation.Subject = "PDF demo"
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now
- 'Sets the modification date
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
- 'Save the document
- pdfDoc.Save("DocumentInformation.pdf")
- pdfDoc.Close(True)
-
-
- //Create a new document.
- PdfDocument pdfDoc= new PdfDocument();
- //Creates a new page
- PdfPage page = pdfDoc.Pages.Add();
- //Set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information";
- pdfDoc.DocumentInformation.Author = "Syncfusion";
- pdfDoc.DocumentInformation.Keywords = "PDF";
- pdfDoc.DocumentInformation.Subject = "PDF demo";
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
- //Sets the modification date
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
- //Save the document
- pdfDoc.Save("DocumentInformation.pdf");
- pdfDoc.Close(true);
-
-
- 'Create a new document.
- Dim pdfDoc As PdfDocument= New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = pdfDoc.Pages.Add()
- 'set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information"
- pdfDoc.DocumentInformation.Author = "Syncfusion"
- pdfDoc.DocumentInformation.Keywords = "PDF"
- pdfDoc.DocumentInformation.Subject = "PDF demo"
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now
- 'Sets the modification date
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
- 'Save the document
- pdfDoc.Save("DocumentInformation.pdf")
- pdfDoc.Close(True)
-
-
- //Create a new document.
- PdfDocument pdfDoc= new PdfDocument();
- //Creates a new page
- PdfPage page = pdfDoc.Pages.Add();
- //Set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information";
- pdfDoc.DocumentInformation.Author = "Syncfusion";
- pdfDoc.DocumentInformation.Keywords = "PDF";
- pdfDoc.DocumentInformation.Subject = "PDF demo";
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
- //Sets the modification date
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
- //Save the document
- pdfDoc.Save("DocumentInformation.pdf");
- pdfDoc.Close(true);
-
-
- 'Create a new document.
- Dim pdfDoc As PdfDocument= New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = pdfDoc.Pages.Add()
- 'set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information"
- pdfDoc.DocumentInformation.Author = "Syncfusion"
- pdfDoc.DocumentInformation.Keywords = "PDF"
- pdfDoc.DocumentInformation.Subject = "PDF demo"
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now
- 'Sets the modification date
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
- 'Save the document
- pdfDoc.Save("DocumentInformation.pdf")
- pdfDoc.Close(True)
-
-
- //Create a new document.
- PdfDocument pdfDoc= new PdfDocument();
- //Creates a new page
- PdfPage page = pdfDoc.Pages.Add();
- //Set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information";
- pdfDoc.DocumentInformation.Author = "Syncfusion";
- pdfDoc.DocumentInformation.Keywords = "PDF";
- pdfDoc.DocumentInformation.Subject = "PDF demo";
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
- //Sets the modification date
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
- //Save the document
- pdfDoc.Save("DocumentInformation.pdf");
- pdfDoc.Close(true);
-
-
- 'Create a new document.
- Dim pdfDoc As PdfDocument= New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = pdfDoc.Pages.Add()
- 'set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information"
- pdfDoc.DocumentInformation.Author = "Syncfusion"
- pdfDoc.DocumentInformation.Keywords = "PDF"
- pdfDoc.DocumentInformation.Subject = "PDF demo"
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now
- 'Sets the modification date
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
- 'Save the document
- pdfDoc.Save("DocumentInformation.pdf")
- pdfDoc.Close(True)
-
-
- //Create a new document.
- PdfDocument pdfDoc= new PdfDocument();
- //Creates a new page
- PdfPage page = pdfDoc.Pages.Add();
- //Set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information";
- pdfDoc.DocumentInformation.Author = "Syncfusion";
- pdfDoc.DocumentInformation.Keywords = "PDF";
- pdfDoc.DocumentInformation.Subject = "PDF demo";
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
- //Sets the modification date
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
- //Save the document
- pdfDoc.Save("DocumentInformation.pdf");
- pdfDoc.Close(true);
-
-
- 'Create a new document.
- Dim pdfDoc As PdfDocument= New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = pdfDoc.Pages.Add()
- 'set the Document`s properties.
- pdfDoc.DocumentInformation.Title = "Document Properties Information"
- pdfDoc.DocumentInformation.Author = "Syncfusion"
- pdfDoc.DocumentInformation.Keywords = "PDF"
- pdfDoc.DocumentInformation.Subject = "PDF demo"
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now
- 'Sets the modification date
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
- 'Save the document
- pdfDoc.Save("DocumentInformation.pdf")
- pdfDoc.Close(True)
-
-
- //Create a new document
- PdfDocument pdfDoc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = pdfDoc.Pages.Add();
- //Set the document`s information
- pdfDoc.DocumentInformation.Title = "Document Properties Information";
- pdfDoc.DocumentInformation.Author = "Syncfusion";
- pdfDoc.DocumentInformation.Keywords = "PDF";
- pdfDoc.DocumentInformation.Subject = "PDF demo";
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
- // Sets the documents creator information
- pdfDoc.DocumentInformation.Creator = "Essential PDF";
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
- //Save the document
- pdfDoc.Save("DocumentInformation.pdf");
- pdfDoc.Close(true);
-
-
- 'Create a new document.
- Dim pdfDoc As PdfDocument = New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = pdfDoc.Pages.Add()
- 'Set the document`s information.
- pdfDoc.DocumentInformation.Title = "Document Properties Information"
- pdfDoc.DocumentInformation.Author = "Syncfusion"
- pdfDoc.DocumentInformation.Keywords = "PDF"
- pdfDoc.DocumentInformation.Subject = "PDF demo"
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
- ' Sets the documents creator information
- pdfDoc.DocumentInformation.Creator = "Essential PDF"
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
- 'Save the document
- pdfDoc.Save("DocumentInformation.pdf")
- pdfDoc.Close(True)
-
-
- //Create a new document
- PdfDocument pdfDoc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = pdfDoc.Pages.Add();
- //Set the document`s information
- pdfDoc.DocumentInformation.Title = "Document Properties Information";
- pdfDoc.DocumentInformation.Author = "Syncfusion";
- pdfDoc.DocumentInformation.Keywords = "PDF";
- pdfDoc.DocumentInformation.Subject = "PDF demo";
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
- // Sets the documents creator information
- pdfDoc.DocumentInformation.Creator = "Essential PDF";
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
- //Save the document
- pdfDoc.Save("DocumentInformation.pdf");
- pdfDoc.Close(true);
-
-
- 'Create a new document.
- Dim pdfDoc As PdfDocument = New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = pdfDoc.Pages.Add()
- 'Set the document`s information.
- pdfDoc.DocumentInformation.Title = "Document Properties Information"
- pdfDoc.DocumentInformation.Author = "Syncfusion"
- pdfDoc.DocumentInformation.Keywords = "PDF"
- pdfDoc.DocumentInformation.Subject = "PDF demo"
- pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
- ' Sets the documents creator information
- pdfDoc.DocumentInformation.Creator = "Essential PDF"
- pdfDoc.DocumentInformation.CreationDate = DateTime.Now
- pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
- 'Save the document
- pdfDoc.Save("DocumentInformation.pdf")
- pdfDoc.Close(True)
-
-
- PdfDocument pdfDoc = new PdfDocument();
- PdfPage page = pdfDoc.Pages.Add();
- // Get xmp object.
- XmpMetadata xmp = pdfDoc.DocumentInformation.XmpMetadata;
- // XMP Basic Schema.
- BasicSchema basic = xmp.BasicSchema;
- basic.Advisory.Add("advisory");
- basic.BaseURL = new Uri("http://google.com");
- basic.CreateDate = DateTime.Now;
- basic.CreatorTool = "creator tool";
- basic.Identifier.Add("identifier");
- basic.Label = "label";
- basic.MetadataDate = DateTime.Now;
- basic.ModifyDate = DateTime.Now;
- basic.Nickname = "nickname";
- basic.Rating.Add(-25);
- pdfDoc.Save("DocumentInformation.pdf");
- pdfDoc.Close(true);
-
-
- Dim pdfDoc As PdfDocument = New PdfDocument()
- Dim page As PdfPage = pdfDoc.Pages.Add()
- ' Get xmp object.
- Dim xmp As XmpMetadata = pdfDoc.DocumentInformation.XmpMetadata
- ' XMP Basic Schema.
- Dim basic As BasicSchema = xmp.BasicSchema
- basic.Advisory.Add("advisory")
- basic.BaseURL = New Uri("http://google.com")
- basic.CreateDate = DateTime.Now
- basic.CreatorTool = "creator tool"
- basic.Identifier.Add("identifier")
- basic.Label = "label"
- basic.MetadataDate = DateTime.Now
- basic.ModifyDate = DateTime.Now
- basic.Nickname = "nickname"
- basic.Rating.Add(-25)
- pdfDoc.Save("DocumentInformation.pdf")
- pdfDoc.Close(True)
-
-
- //Create a new document
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s cross reference type
- doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream;
- // Set the PDF version
- doc.FileStructure.Version = PdfVersion.Version1_6;
- // Save the document
- doc.Save("FileStructure.pdf");
- doc.Close(true);
-
-
- 'Create a new document
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s cross reference type
- doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream
- ' Set the PDF version
- doc.FileStructure.Version = PdfVersion.Version1_6
- ' Save the document
- doc.Save("FileStructure.pdf")
- doc.Close(True)
-
-
- //Create a new document
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s cross reference type
- doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream;
- // Set the PDF version
- doc.FileStructure.Version = PdfVersion.Version1_6;
- // Save the document
- doc.Save("FileStructure.pdf");
- doc.Close(true);
-
-
- 'Create a new document
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s cross reference type
- doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream
- ' Set the PDF version
- doc.FileStructure.Version = PdfVersion.Version1_6
- ' Save the document
- doc.Save("FileStructure.pdf")
- doc.Close(True)
-
-
- // Load an existing document
- PdfLoadedDocument lDoc = new PdfLoadedDocument("SourceDoc.pdf");
- // Sets the incremental update as True
- lDoc.FileStructure.IncrementalUpdate = true;
- //Create a new page
- lDoc.Pages.Add();
- // Saves the document
- lDoc.Save("FileStructure.pdf");
- lDoc.Close(true);
-
-
- ' Load an existing document
- Dim lDoc As New PdfLoadedDocument("SourceDoc.pdf")
- ' Sets the incremental update as True
- lDoc.FileStructure.IncrementalUpdate = True
- 'Create a new page
- lDoc.Pages.Add()
- ' Saves the document
- lDoc.Save("FileStructure.pdf")
- lDoc.Close(True)
-
-
- //Create a new document
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s cross reference type
- doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream;
- // Set the PDF version
- doc.FileStructure.Version = PdfVersion.Version1_6;
- // Save the document
- doc.Save("FileStructure.pdf");
- doc.Close(true);
-
-
- 'Create a new document
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s cross reference type
- doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream
- ' Set the PDF version
- doc.FileStructure.Version = PdfVersion.Version1_6
- ' Save the document
- doc.Save("FileStructure.pdf")
- doc.Close(True)
-
-
- //Create a new instance of PdfDocument class.
- PdfDocument document = new PdfDocument();
- //Create new portfolio.
- document.PortfolioInformation = new PdfPortfolioInformation();
- //Set the view mode of the portfolio.
- document.PortfolioInformation.ViewMode = PdfPortfolioViewMode.Details;
- //Create portfolio schema.
- PdfPortfolioSchema schema = new PdfPortfolioSchema();
- //Create portfolio schema field.
- PdfPortfolioSchemaField fromField = new PdfPortfolioSchemaField();
- fromField.Name = "From";
- fromField.Type = PdfPortfolioSchemaFieldType.String;
- fromField.Order = 1;
- fromField.Visible = true;
- fromField.Editable = false;
- schema.AddSchemaField(fromField);
- PdfPortfolioSchemaField toField = new PdfPortfolioSchemaField();
- toField.Name = "To";
- toField.Type = PdfPortfolioSchemaFieldType.String;
- toField.Order = 2;
- toField.Visible = true;
- toField.Editable = false;
- schema.AddSchemaField(toField);
- //Add schema to the portfolio.
- document.PortfolioInformation.Schema = schema;
- //Create attachment.
- PdfAttachment pdfFile = new PdfAttachment("CorporateBrochure.pdf");
- pdfFile.FileName = "CorporateBrochure.pdf";
- //Set schema field attributed.
- pdfFile.PortfolioAttributes = new PdfPortfolioAttributes();
- pdfFile.PortfolioAttributes.AddAttributes("From", "Steven");
- pdfFile.PortfolioAttributes.AddAttributes("To", "John");
- //Add attachment to document.
- document.Attachments.Add(pdfFile);
- //Add new page to document.
- document.Pages.Add();
- //Save and close the document.
- document.Save("Sample.pdf");
- document.Close(true);
-
-
- 'Create a new instance of PdfDocument class.
- Dim document As New PdfDocument()
- 'Create new portfolio.
- document.PortfolioInformation = New PdfPortfolioInformation()
- 'Set the view mode of the portfolio.
- document.PortfolioInformation.ViewMode = PdfPortfolioViewMode.Details
- 'Create portfolio schema.
- Dim schema As New PdfPortfolioSchema()
- 'Create portfolio schema field.
- Dim fromField As New PdfPortfolioSchemaField()
- fromField.Name = "From"
- fromField.Type = PdfPortfolioSchemaFieldType.[String]
- fromField.Order = 1
- fromField.Visible = True
- fromField.Editable = False
- schema.AddSchemaField(fromField)
- Dim toField As New PdfPortfolioSchemaField()
- toField.Name = "To"
- toField.Type = PdfPortfolioSchemaFieldType.[String]
- toField.Order = 2
- toField.Visible = True
- toField.Editable = False
- schema.AddSchemaField(toField)
- 'Add schema to the portfolio.
- document.PortfolioInformation.Schema = schema
- 'Create attachment.
- Dim pdfFile As New PdfAttachment("CorporateBrochure.pdf")
- pdfFile.FileName = "CorporateBrochure.pdf"
- 'Set schema field attributed.
- pdfFile.PortfolioAttributes = New PdfPortfolioAttributes()
- pdfFile.PortfolioAttributes.AddAttributes("From", "Steven")
- pdfFile.PortfolioAttributes.AddAttributes("To", "John")
- 'Add attachment to document.
- document.Attachments.Add(pdfFile)
- 'Add new page to document.
- document.Pages.Add()
- 'Save and close the document.
- document.Save("Sample.pdf")
- document.Close(True)
-
-
- //Create a new instance of PdfDocument class.
- PdfDocument document = new PdfDocument();
- //Create new portfolio.
- document.PortfolioInformation = new PdfPortfolioInformation();
- //Set the view mode of the portfolio.
- document.PortfolioInformation.ViewMode = PdfPortfolioViewMode.Details;
- //Create portfolio schema.
- PdfPortfolioSchema schema = new PdfPortfolioSchema();
- //Create portfolio schema field.
- PdfPortfolioSchemaField fromField = new PdfPortfolioSchemaField();
- fromField.Name = "From";
- fromField.Type = PdfPortfolioSchemaFieldType.String;
- fromField.Order = 1;
- fromField.Visible = true;
- fromField.Editable = false;
- schema.AddSchemaField(fromField);
- PdfPortfolioSchemaField toField = new PdfPortfolioSchemaField();
- toField.Name = "To";
- toField.Type = PdfPortfolioSchemaFieldType.String;
- toField.Order = 2;
- toField.Visible = true;
- toField.Editable = false;
- schema.AddSchemaField(toField);
- //Add schema to the portfolio.
- document.PortfolioInformation.Schema = schema;
- //Create attachment.
- PdfAttachment pdfFile = new PdfAttachment("CorporateBrochure.pdf");
- pdfFile.FileName = "CorporateBrochure.pdf";
- //Set schema field attributed.
- pdfFile.PortfolioAttributes = new PdfPortfolioAttributes();
- pdfFile.PortfolioAttributes.AddAttributes("From", "Steven");
- pdfFile.PortfolioAttributes.AddAttributes("To", "John");
- //Add attachment to document.
- document.Attachments.Add(pdfFile);
- //Add new page to document.
- document.Pages.Add();
- //Save and close the document.
- document.Save("Sample.pdf");
- document.Close(true);
-
-
- 'Create a new instance of PdfDocument class.
- Dim document As New PdfDocument()
- 'Create new portfolio.
- document.PortfolioInformation = New PdfPortfolioInformation()
- 'Set the view mode of the portfolio.
- document.PortfolioInformation.ViewMode = PdfPortfolioViewMode.Details
- 'Create portfolio schema.
- Dim schema As New PdfPortfolioSchema()
- 'Create portfolio schema field.
- Dim fromField As New PdfPortfolioSchemaField()
- fromField.Name = "From"
- fromField.Type = PdfPortfolioSchemaFieldType.[String]
- fromField.Order = 1
- fromField.Visible = True
- fromField.Editable = False
- schema.AddSchemaField(fromField)
- Dim toField As New PdfPortfolioSchemaField()
- toField.Name = "To"
- toField.Type = PdfPortfolioSchemaFieldType.[String]
- toField.Order = 2
- toField.Visible = True
- toField.Editable = False
- schema.AddSchemaField(toField)
- 'Add schema to the portfolio.
- document.PortfolioInformation.Schema = schema
- 'Create attachment.
- Dim pdfFile As New PdfAttachment("CorporateBrochure.pdf")
- pdfFile.FileName = "CorporateBrochure.pdf"
- 'Set schema field attributed.
- pdfFile.PortfolioAttributes = New PdfPortfolioAttributes()
- pdfFile.PortfolioAttributes.AddAttributes("From", "Steven")
- pdfFile.PortfolioAttributes.AddAttributes("To", "John")
- 'Add attachment to document.
- document.Attachments.Add(pdfFile)
- 'Add new page to document.
- document.Pages.Add()
- 'Save and close the document.
- document.Save("Sample.pdf")
- document.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s viewer preference
- doc.ViewerPreferences.PageMode = PdfPageMode.UseAttachments;
- doc.ViewerPreferences.PageScaling = PageScalingMode.None;
- doc.ViewerPreferences.FitWindow = true;
- doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage;
- // Save the document
- doc.Save("ViewerPreferences.pdf");
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s viewer preference
- doc.ViewerPreferences.PageMode = PdfPageMode.UseAttachments
- doc.ViewerPreferences.PageScaling = PageScalingMode.None
- doc.ViewerPreferences.FitWindow = True
- doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage
- ' Save the document
- doc.Save("ViewerPreferences.pdf")
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s viewer preference
- doc.ViewerPreferences.CenterWindow = true;
- doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage;
- // Save the document
- doc.Save("ViewerPreferences.pdf");
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s viewer preference
- doc.ViewerPreferences.CenterWindow = True
- doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage
- ' Save the document
- doc.Save("ViewerPreferences.pdf")
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s viewer preference
- doc.ViewerPreferences.CenterWindow = true;
- doc.ViewerPreferences.DisplayTitle = true;
- // Save the document
- doc.Save("ViewerPreferences.pdf");
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s viewer preference
- doc.ViewerPreferences.CenterWindow = True
- doc.ViewerPreferences.DisplayTitle = True
- ' Save the document
- doc.Save("ViewerPreferences.pdf")
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s viewer preference
- doc.ViewerPreferences.FitWindow = true;
- doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage;
- // Save the document
- doc.Save("ViewerPreferences.pdf");
- doc.Close(true);
-
-
- 'Create a new document.
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s viewer preference
- doc.ViewerPreferences.FitWindow = True
- doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage
- ' Save the document
- doc.Save("ViewerPreferences.pdf")
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- //Set the document`s viewer preference
- doc.ViewerPreferences.HideMenubar = true;
- //Save the document
- doc.Save("ViewerPreferences.pdf");
- doc.Close(true)
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s viewer preference
- doc.ViewerPreferences.HideMenubar = True
- ' Save the document
- doc.Save("ViewerPreferences.pdf")
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s viewer preference
- doc.ViewerPreferences.HideToolbar = true;
- // Save the document
- doc.Save("ViewerPreferences.pdf");
- doc.Close(true)
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s viewer preference
- doc.ViewerPreferences.HideToolbar = True
- ' Save the document
- doc.Save("ViewerPreferences.pdf")
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s viewer preference
- doc.ViewerPreferences.HideWindowUI = true;
- // Save the document
- doc.Save("ViewerPreferences.pdf");
- doc.Close(true)
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s viewer preference
- doc.ViewerPreferences.HideWindowUI = True
- ' Save the document
- doc.Save("ViewerPreferences.pdf")
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s viewer preference
- doc.ViewerPreferences.PageMode = PdfPageMode.UseAttachments;
- // Save the document
- doc.Save("ViewerPreferences.pdf");
- doc.Close(true)
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s viewer preference
- doc.ViewerPreferences.PageMode = PdfPageMode.UseAttachments
- ' Save the document
- doc.Save("ViewerPreferences.pdf")
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s viewer preference
- doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage;
- // Save the document
- doc.Save("ViewerPreferences.pdf");
- doc.Close(True)
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s viewer preference
- doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage
- ' Save the document
- doc.Save("ViewerPreferences.pdf")
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page
- PdfPage page = doc.Pages.Add();
- // Set the document`s viewer preference
- doc.ViewerPreferences.PageScaling = PageScalingMode.None;
- // Save the document
- doc.Save("ViewerPreferences.pdf");
- doc.Close(true)
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the document`s viewer preference
- doc.ViewerPreferences.PageScaling = PageScalingMode.None
- ' Save the document
- doc.Save("ViewerPreferences.pdf")
- doc.Close(True)
-
-
- //Create a new document.
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Load an existing image
- PdfBitmap bmp = new PdfBitmap("Logo.png");
- // Draw the image
- page.Graphics.DrawImage(bmp, 20, 20, 100, 200);
- doc.Save("Sample.pdf", Response, HttpReadType.Open);
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- ' Load an existing image
- Dim bmp As PdfBitmap = New PdfBitmap("Logo.png")
- ' Draw the image
- page.Graphics.DrawImage(bmp, 20, 20, 100, 200)
- doc.Save("Sample.pdf", Response, HttpReadType.Open)
-
-
- //Create a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- // Set the pdf version as Version1_7
- doc.FileStructure.Version = PdfVersion.Version1_7;
- // Save the document
- doc.Save("FileStructure.pdf");
-
-
- 'Create a new document.
- Dim doc As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the pdf version as Version1_7
- doc.FileStructure.Version = PdfVersion.Version1_7
- ' Save the document
- doc.Save("FileStructure.pdf")
-
-
- //Create a new document
- PdfDocument doc = new PdfDocument();
- // Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- //Set the CrossReferenceType as CrossReferenceStream
- doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream;
- // Save the document
- doc.Save("FileStructure.pdf");
-
-
- 'Create a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- ' Set the CrossReferenceType as CrossReferenceStream
- doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream
- ' Save the document
- doc.Save("FileStructure.pdf")
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument(PdfConformanceLevel.Pdf_A1B);
- //Creates a new page and adds it as the last page of the document to the document.
- PdfPage page = document.Pages.Add();
- // Create a 'Times New Roman' font
- Font font = new Font("Times New Roman", 10);
- // Create font with bold font style.
- PdfFont pdfFont = new PdfTrueTypeFont(font, false);
- //Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", pdfFont, PdfBrushes.Black, new PointF(10, 10));
- //Save document to disk.
- document.Save("ConformanceLevel.pdf");
-
-
- 'Create a new PDF document.
- Dim document As PdfDocument = New PdfDocument(PdfConformanceLevel.Pdf_A1B)
- ' Create a page to the document.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a 'Times New Roman' font
- Dim font As Font = New Font("Times New Roman", 10)
- ' Create font with bold font style.
- Dim pdfFont As PdfFont = New PdfTrueTypeFont(font, False)
- 'Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", pdfFont, PdfBrushes.Black, New PointF(10, 10))
- 'Save document to disk.
- document.Save("ConformanceLevel.pdf")
-
-
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- // Set AppDefault mode as page`s scaling mode
- document.ViewerPreferences.PageScaling = PageScalingMode.AppDefault;
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font with Bold font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, new PointF(10, 10));
- //Save documen to disk.
- document.Save("ScalingMode.pdf");
-
-
- 'Create a new PDF document
- Dim document As PdfDocument = New PdfDocument()
- 'Set AppDefault mode as page`s scaling mode
- document.ViewerPreferences.PageScaling = PageScalingMode.AppDefault
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font with Bold font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
- 'Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, New PointF(10, 10))
- 'Save documen to disk.
- document.Save("ScalingMode.pdf")
-
-
- //Load PDF document.
- PdfLoadedDocument document = new PdfLoadedDocument("Input.pdf");
- //Gets ImageInfo from the first page.
- PdfImageInfo[] imageInfo = document.Pages[0].ImagesInfo;
- //Gets the Image Boundary location.
- RectangleF imageBounds = imageInfo[0].Bounds;
- //Gets the Image.
- Image image = imageInfo[0].Image;
- //Gets the Image index.
- int imageIndex = imageInfo[0].Index;
- //Closing the PDF document.
- document.Close(true);
-
-
- 'Load PDF document.
- Dim document As New PdfLoadedDocument("Input.pdf")
- 'Gets ImageInfo from the first page.
- Dim imageInfo As PdfImageInfo() = document.Pages(0).ImagesInfo
- 'Gets the Image Boundary location.
- Dim imageBounds As RectangleF = imageInfo(0).Bounds
- 'Gets the Image.
- Dim image As Image = imageInfo(0).Image
- 'Gets the Image index.
- Dim imageIndex As Integer = imageInfo(0).Index
- 'Closing the PDF document.
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics graphics = page.Graphics;
- // Creating action
- PdfSubmitAction submitAction = new PdfSubmitAction("http://stevex.net/dump.php");
- submitAction.DataFormat = SubmitDataFormat.Html;
- //Create submit button to transfer the values in the form
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(100, 500, 90, 20);
- submitButton.Font = font;
- submitButton.Text = "Submit";
- submitButton.Actions.MouseUp = submitAction;
- document.Form.Fields.Add(submitButton);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim graphics As PdfGraphics = page.Graphics
- ' Creating action
- Dim submitAction As PdfSubmitAction = New PdfSubmitAction("http://stevex.net/dump.php")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Create submit button to transfer the values in the form
- Dim submitButton As PdfButtonField = New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(100, 500, 90, 20)
- submitButton.Font = font
- submitButton.Text = "Submit"
- submitButton.Actions.MouseUp = submitAction
- document.Form.Fields.Add(submitButton)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics graphics = page.Graphics;
- // Creating action
- PdfSubmitAction submitAction = new PdfSubmitAction("http://stevex.net/dump.php");
- submitAction.DataFormat = SubmitDataFormat.Html;
- //Create submit button to transfer the values in the form
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(100, 500, 90, 20);
- submitButton.Font = font;
- submitButton.Text = "Submit";
- submitButton.Actions.MouseUp = submitAction;
- document.Form.Fields.Add(submitButton);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim graphics As PdfGraphics = page.Graphics
- ' Creating action
- Dim submitAction As PdfSubmitAction = New PdfSubmitAction("http://stevex.net/dump.php")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Create submit button to transfer the values in the form
- Dim submitButton As PdfButtonField = New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(100, 500, 90, 20)
- submitButton.Font = font
- submitButton.Text = "Submit"
- submitButton.Actions.MouseUp = submitAction
- document.Form.Fields.Add(submitButton)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics graphics = page.Graphics;
- // Creating action
- PdfSubmitAction submitAction = new PdfSubmitAction("http://stevex.net/dump.php");
- submitAction.DataFormat = SubmitDataFormat.Html;
- //Create submit button to transfer the values in the form
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(100, 500, 90, 20);
- submitButton.Font = font;
- submitButton.Text = "Submit";
- // Subscribing print action
- submitButton.AddPrintAction();
- submitButton.Actions.MouseUp = submitAction;
- document.Form.Fields.Add(submitButton);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim graphics As PdfGraphics = page.Graphics
- ' Creating action
- Dim submitAction As PdfSubmitAction = New PdfSubmitAction("http://stevex.net/dump.php")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Create submit button to transfer the values in the form
- Dim submitButton As PdfButtonField = New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(100, 500, 90, 20)
- submitButton.Font = font
- submitButton.Text = "Submit"
- ' Subscribing print action
- submitButton.AddPrintAction()
- submitButton.Actions.MouseUp = submitAction
- document.Form.Fields.Add(submitButton)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics graphics = page.Graphics;
- // Creating action
- PdfSubmitAction submitAction = new PdfSubmitAction("http://stevex.net/dump.php");
- submitAction.DataFormat = SubmitDataFormat.Html;
- //Create submit button to transfer the values in the form
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(100, 500, 90, 20);
- submitButton.Font = font;
- submitButton.Text = "Submit";
- submitButton.Actions.MouseUp = submitAction;
- document.Form.Fields.Add(submitButton);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim graphics As PdfGraphics = page.Graphics
- ' Creating action
- Dim submitAction As PdfSubmitAction = New PdfSubmitAction("http://stevex.net/dump.php")
- submitAction.DataFormat = SubmitDataFormat.Html
- 'Create submit button to transfer the values in the form
- Dim submitButton As PdfButtonField = New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(100, 500, 90, 20)
- submitButton.Font = font
- submitButton.Text = "Submit"
- submitButton.Actions.MouseUp = submitAction
- document.Form.Fields.Add(submitButton)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics graphics = page.Graphics;
- //Create a check box
- PdfCheckBoxField checkBox = new PdfCheckBoxField(page, "C#.NET");
- checkBox.Bounds = new RectangleF(100, 290, 20, 20);
- document.Form.Fields.Add(checkBox);
- checkBox.HighlightMode = PdfHighlightMode.Push;
- checkBox.BorderStyle = PdfBorderStyle.Beveled;
- //Set the value for the check box
- checkBox.Checked = true;
- document.Form.Fields.Add(checkBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a check box
- Dim checkBox As PdfCheckBoxField = New PdfCheckBoxField(page, "C#.NET")
- checkBox.Bounds = New RectangleF(100, 290, 20, 20)
- document.Form.Fields.Add(checkBox)
- checkBox.HighlightMode = PdfHighlightMode.Push
- checkBox.BorderStyle = PdfBorderStyle.Beveled
- 'Set the value for the check box
- checkBox.Checked = True
- document.Form.Fields.Add(checkBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics graphics = page.Graphics;
- //Create a check box
- PdfCheckBoxField checkBox = new PdfCheckBoxField(page, "C#.NET");
- checkBox.Bounds = new RectangleF(100, 290, 20, 20);
- document.Form.Fields.Add(checkBox);
- checkBox.HighlightMode = PdfHighlightMode.Push;
- checkBox.BorderStyle = PdfBorderStyle.Beveled;
- //Set the value for the check box
- checkBox.Checked = true;
- document.Form.Fields.Add(checkBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a check box
- Dim checkBox As PdfCheckBoxField = New PdfCheckBoxField(page, "C#.NET")
- checkBox.Bounds = New RectangleF(100, 290, 20, 20)
- document.Form.Fields.Add(checkBox)
- checkBox.HighlightMode = PdfHighlightMode.Push
- checkBox.BorderStyle = PdfBorderStyle.Beveled
- 'Set the value for the check box
- checkBox.Checked = True
- document.Form.Fields.Add(checkBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics graphics = page.Graphics;
- //Create a check box
- PdfCheckBoxField checkBox = new PdfCheckBoxField(page, "C#.NET");
- checkBox.Bounds = new RectangleF(100, 290, 20, 20);
- document.Form.Fields.Add(checkBox);
- checkBox.HighlightMode = PdfHighlightMode.Push;
- checkBox.BorderStyle = PdfBorderStyle.Beveled;
- //Set the value for the check box
- checkBox.Checked = true;
- document.Form.Fields.Add(checkBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a check box
- Dim checkBox As PdfCheckBoxField = New PdfCheckBoxField(page, "C#.NET")
- checkBox.Bounds = New RectangleF(100, 290, 20, 20)
- document.Form.Fields.Add(checkBox)
- checkBox.HighlightMode = PdfHighlightMode.Push
- checkBox.BorderStyle = PdfBorderStyle.Beveled
- 'Set the value for the check box
- checkBox.Checked = True
- document.Form.Fields.Add(checkBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics graphics = page.Graphics;
- //Create a check box
- PdfCheckBoxField checkBox = new PdfCheckBoxField(page, "C#.NET");
- //Set the value for the check box
- checkBox.Style = PdfCheckBoxStyle.Circle;
- checkBox.Bounds = new RectangleF(100, 290, 20, 20);
- document.Form.Fields.Add(checkBox);
- checkBox.HighlightMode = PdfHighlightMode.Push;
- checkBox.BorderStyle = PdfBorderStyle.Beveled;
- //Set the value for the check box
- checkBox.Checked = true;
- document.Form.Fields.Add(checkBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a check box
- Dim checkBox As PdfCheckBoxField = New PdfCheckBoxField(page, "C#.NET")
- 'Set the value for the check box
- checkBox.Style = PdfCheckBoxStyle.Circle
- checkBox.Bounds = New RectangleF(100, 290, 20, 20)
- document.Form.Fields.Add(checkBox)
- checkBox.HighlightMode = PdfHighlightMode.Push
- checkBox.BorderStyle = PdfBorderStyle.Beveled
- 'Set the value for the check box
- checkBox.Checked = True
- document.Form.Fields.Add(checkBox);
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics graphics = page.Graphics;
- //Create a check box
- PdfCheckBoxField checkBox = new PdfCheckBoxField(page, "C#.NET");
- checkBox.Bounds = new RectangleF(100, 290, 20, 20);
- document.Form.Fields.Add(checkBox);
- checkBox.HighlightMode = PdfHighlightMode.Push;
- checkBox.BorderStyle = PdfBorderStyle.Beveled;
- //Set the value for the check box
- checkBox.Checked = true;
- document.Form.Fields.Add(checkBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a check box
- Dim checkBox As PdfCheckBoxField = New PdfCheckBoxField(page, "C#.NET")
- checkBox.Bounds = New RectangleF(100, 290, 20, 20)
- document.Form.Fields.Add(checkBox)
- checkBox.HighlightMode = PdfHighlightMode.Push
- checkBox.BorderStyle = PdfBorderStyle.Beveled
- 'Set the value for the check box
- checkBox.Checked = True
- document.Form.Fields.Add(checkBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics graphics = page.Graphics;
- //Create a check box
- PdfCheckBoxField checkBox = new PdfCheckBoxField(page, "C#.NET");
- //Set the value for the check box
- checkBox.Checked = true;
- checkBox.Bounds = new RectangleF(100, 290, 20, 20);
- document.Form.Fields.Add(checkBox);
- checkBox.HighlightMode = PdfHighlightMode.Push;
- checkBox.BorderStyle = PdfBorderStyle.Beveled;
- //Set the value for the check box
- checkBox.Checked = true;
- document.Form.Fields.Add(checkBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a check box
- Dim checkBox As PdfCheckBoxField = New PdfCheckBoxField(page, "C#.NET")
- 'Set the value for the check box
- checkBox.Checked = True
- checkBox.Bounds = New RectangleF(100, 290, 20, 20)
- document.Form.Fields.Add(checkBox)
- checkBox.HighlightMode = PdfHighlightMode.Push
- checkBox.BorderStyle = PdfBorderStyle.Beveled
- 'Set the value for the check box
- checkBox.Checked = True
- document.Form.Fields.Add(checkBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a combo box
- PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
- positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
- positionComboBox.Font = font;
- positionComboBox.Editable = true;
- //Add it to document
- document.Form.Fields.Add(positionComboBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a combo box
- Dim positionComboBox As PdfComboBoxField = New PdfComboBoxField(page, "positionComboBox")
- positionComboBox.Bounds = New RectangleF(100, 115, 200, 20)
- positionComboBox.Font = font
- positionComboBox.Editable = True
- 'Add it to document
- document.Form.Fields.Add(positionComboBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- itemCollection.Add(new PdfListFieldItem("English", "English"));
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
-
-
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- itemCollection.Add(New PdfListFieldItem("English", "English"))
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
-
-
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- itemCollection.Add(new PdfListFieldItem("English", "English"));
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
- //Select the item
- listBox.SelectedIndex = 2;
-
-
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- itemCollection.Add(New PdfListFieldItem("English", "English"))
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
- 'Select the item
- listBox.SelectedIndex = 2
-
-
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- itemCollection.Add(new PdfListFieldItem("English", "English"));
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
- //Select the item
- listBox.SelectedValue = "English";
-
-
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- itemCollection.Add(New PdfListFieldItem("English", "English"))
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
- 'Select the item
- listBox.SelectedValue = "English"
-
-
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- itemCollection.Add(new PdfListFieldItem("English", "English"));
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
- //Gets the selected item
- PdfListFieldItem selectedItem = listBox.SelectedItem;
-
-
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- itemCollection.Add(New PdfListFieldItem("English", "English"))
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
- 'Gets the selected item
- Dim selectedItem As PdfListFieldItem = listBox.SelectedItem
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a combo box
- PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
- positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
- positionComboBox.Font = font;
- positionComboBox.Editable = true;
- //Add it to document
- document.Form.Fields.Add(positionComboBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a combo box
- Dim positionComboBox As PdfComboBoxField = New PdfComboBoxField(page, "positionComboBox")
- positionComboBox.Bounds = New RectangleF(100, 115, 200, 20)
- positionComboBox.Font = font
- positionComboBox.Editable = True
- 'Add it to document
- document.Form.Fields.Add(positionComboBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a combo box
- PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
- positionComboBox.Editable = true
- positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
- positionComboBox.Font = font;
- positionComboBox.Editable = true;
- //Add it to document
- document.Form.Fields.Add(positionComboBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a combo box
- Dim positionComboBox As PdfComboBoxField = New PdfComboBoxField(page, "positionComboBox")
- positionComboBox.Editable = True
- positionComboBox.Bounds = New RectangleF(100, 115, 200, 20)
- positionComboBox.Font = font
- positionComboBox.Editable = True
- 'Add it to document
- document.Form.Fields.Add(positionComboBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a combo box
- PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
- positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
- positionComboBox.Font = font;
- positionComboBox.Editable = true;
- //Add it to document
- document.Form.Fields.Add(positionComboBox);
- PdfFieldCollection fieldCollection = document.Form.Fields;
- // Flatten the form collection
- for (int i = 0; i != fieldCollection.Count; i++)
- {
- fieldCollection[i].Flatten = true;
- }
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a combo box
- Dim positionComboBox As PdfComboBoxField = New PdfComboBoxField(page, "positionComboBox")
- positionComboBox.Bounds = New RectangleF(100, 115, 200, 20)
- positionComboBox.Font = font
- positionComboBox.Editable = True
- 'Add it to document
- document.Form.Fields.Add(positionComboBox)
- Dim fieldCollection As PdfFieldCollection = document.Form.Fields
- ' Flatten the form collection
- For i As Integer = 0 To fieldCollection.Count - 1
- fieldCollection(i).Flatten = True
- Next i
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfFieldCollection fieldCollection = document.Form.Fields;
- //Create a combo box
- PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
- positionComboBox.Editable = true;
- positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
- positionComboBox.Font = font;
- positionComboBox.Editable = true;
- fieldCollection.Add(positionComboBox as PdfField);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim fieldCollection As PdfFieldCollection = document.Form.Fields
- 'Create a combo box
- Dim positionComboBox As PdfComboBoxField = New PdfComboBoxField(page, "positionComboBox")
- positionComboBox.Editable = True
- positionComboBox.Bounds = New RectangleF(100, 115, 200, 20)
- positionComboBox.Font = font
- positionComboBox.Editable = True
- fieldCollection.Add(TryCast(positionComboBox, PdfField))
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a check box
- PdfCheckBoxField checkBox = new PdfCheckBoxField(page, "C#.NET");
- checkBox.Bounds = new RectangleF(100, 290, 20, 20);
- document.Form.Fields.Add(checkBox);
- checkBox.HighlightMode = PdfHighlightMode.Push;
- checkBox.BorderStyle = PdfBorderStyle.Beveled;
- //Set the value for the check box
- checkBox.Checked = true;
- document.Form.Fields.Add(checkBox);
- PdfFieldCollection fieldCollection = document.Form.Fields;
- //Create a combo box
- PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
- positionComboBox.Editable = true;
- positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
- positionComboBox.Font = font;
- positionComboBox.Editable = true;
- // Insert the field at first position in the collection
- fieldCollection.Insert(0, positionComboBox as PdfField);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a check box
- Dim checkBox As PdfCheckBoxField = New PdfCheckBoxField(page, "C#.NET")
- checkBox.Bounds = New RectangleF(100, 290, 20, 20)
- document.Form.Fields.Add(checkBox)
- checkBox.HighlightMode = PdfHighlightMode.Push
- checkBox.BorderStyle = PdfBorderStyle.Beveled
- 'Set the value for the check box
- checkBox.Checked = True
- document.Form.Fields.Add(checkBox)
- Dim fieldCollection As PdfFieldCollection = document.Form.Fields
- 'Create a combo box
- Dim positionComboBox As PdfComboBoxField = New PdfComboBoxField(page, "positionComboBox")
- positionComboBox.Editable = True
- positionComboBox.Bounds = New RectangleF(100, 115, 200, 20)
- positionComboBox.Font = font
- positionComboBox.Editable = True
- ' Insert the field at first position in the collection
- fieldCollection.Insert(0, TryCast(positionComboBox, PdfField))
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfFieldCollection fieldCollection = document.Form.Fields;
- //Create a combo box
- PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
- positionComboBox.Editable = true;
- positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
- positionComboBox.Font = font;
- positionComboBox.Editable = true;
- if (fieldCollection.Contains(positionComboBox as PdfField))
- MessageBox.Show("Already added field");
- else
- fieldCollection.Add(positionComboBox as PdfField);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim fieldCollection As PdfFieldCollection = document.Form.Fields
- 'Create a combo box
- Dim positionComboBox As PdfComboBoxField = New PdfComboBoxField(page, "positionComboBox")
- positionComboBox.Editable = True
- positionComboBox.Bounds = New RectangleF(100, 115, 200, 20)
- positionComboBox.Font = font
- positionComboBox.Editable = True
- If fieldCollection.Contains(TryCast(positionComboBox, PdfField)) Then
- MessageBox.Show("Already added field")
- Else
- fieldCollection.Add(TryCast(positionComboBox, PdfField))
- End If
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfFieldCollection fieldCollection = document.Form.Fields;
- //Create a combo box
- PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
- positionComboBox.Editable = true;
- positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
- positionComboBox.Font = font;
- positionComboBox.Editable = true;
- document.Form.Fields.Add(positionComboBox);
- int index = fieldCollection.IndexOf(positionComboBox as PdfField);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim fieldCollection As PdfFieldCollection = document.Form.Fields
- 'Create a combo box
- Dim positionComboBox As PdfComboBoxField = New PdfComboBoxField(page, "positionComboBox")
- positionComboBox.Editable = True
- positionComboBox.Bounds = New RectangleF(100, 115, 200, 20)
- positionComboBox.Font = font
- positionComboBox.Editable = True
- document.Form.Fields.Add(positionComboBox)
- Dim index As Integer = fieldCollection.IndexOf(TryCast(positionComboBox, PdfField))
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfFieldCollection fieldCollection = document.Form.Fields;
- //Create a combo box
- PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
- document.Form.Fields.Add(positionComboBox);
- positionComboBox.Editable = true;
- positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
- positionComboBox.Font = font;
- positionComboBox.Editable = true;
- fieldCollection.Remove(positionComboBox as PdfField);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim fieldCollection As PdfFieldCollection = document.Form.Fields
- 'Create a combo box
- Dim positionComboBox As PdfComboBoxField = New PdfComboBoxField(page, "positionComboBox")
- document.Form.Fields.Add(positionComboBox)
- positionComboBox.Editable = True
- positionComboBox.Bounds = New RectangleF(100, 115, 200, 20)
- positionComboBox.Font = font
- positionComboBox.Editable = True
- fieldCollection.Remove(TryCast(positionComboBox, PdfField))
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfFieldCollection fieldCollection = document.Form.Fields;
- //Create a combo box
- PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
- document.Form.Fields.Add(positionComboBox);
- positionComboBox.Editable = true;
- positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
- positionComboBox.Font = font;
- positionComboBox.Editable = true;
- // Remove the first element
- fieldCollection.RemoveAt(0);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim fieldCollection As PdfFieldCollection = document.Form.Fields
- 'Create a combo box
- Dim positionComboBox As PdfComboBoxField = New PdfComboBoxField(page, "positionComboBox")
- document.Form.Fields.Add(positionComboBox)
- positionComboBox.Editable = True
- positionComboBox.Bounds = New RectangleF(100, 115, 200, 20)
- positionComboBox.Font = font
- positionComboBox.Editable = True
- ' Remove the first element
- fieldCollection.RemoveAt(0)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- // Creates a form
- PdfForm form = document.Form;
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- listBox.HighlightMode = PdfHighlightMode.Outline;
- //Add the items to the list box
- listBox.Items.Add(new PdfListFieldItem("English", "English"));
- listBox.Items.Add(new PdfListFieldItem("French", "French"));
- listBox.Items.Add(new PdfListFieldItem("German", "German"));
- //Select the item
- listBox.SelectedIndex = 2;
- //Set the multi-select option
- listBox.MultiSelect = true;
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- ' Creates a form
- Dim form As PdfForm = document.Form
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- listBox.HighlightMode = PdfHighlightMode.Outline
- 'Add the items to the list box
- listBox.Items.Add(New PdfListFieldItem("English", "English"))
- listBox.Items.Add(New PdfListFieldItem("French", "French"))
- listBox.Items.Add(New PdfListFieldItem("German", "German"))
- 'Select the item
- listBox.SelectedIndex = 2
- 'Set the multi-select option
- listBox.MultiSelect = True
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a combo box
- PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
- positionComboBox.Editable = true;
- positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
- positionComboBox.Font = font;
- positionComboBox.Editable = true;
- //Add it to document
- document.Form.Fields.Add(positionComboBox);
- PdfFieldCollection fieldCollection = document.Form.Fields;
- // Flatten the form collection
- for (int i = 0; i != fieldCollection.Count; i++)
- {
- fieldCollection[i].Flatten = true;
- }
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12F)
- 'Create a combo box
- Dim positionComboBox As New PdfComboBoxField(page, "positionComboBox")
- positionComboBox.Editable = True
- positionComboBox.Bounds = New RectangleF(100, 115, 200, 20)
- positionComboBox.Font = font
- positionComboBox.Editable = True
- 'Add it to document
- document.Form.Fields.Add(positionComboBox)
- Dim fieldCollection As PdfFieldCollection = document.Form.Fields
- ' Flatten the form collection
- Dim i As Integer = 0
- While i != fieldCollection.Count
- fieldCollection(i).Flatten = True
- i += 1
- End While
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- document.Form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- listBox.HighlightMode = PdfHighlightMode.Outline;
- //Add the items to the list box
- listBox.Items.Add(new PdfListFieldItem("English", "English"));
- listBox.Items.Add(new PdfListFieldItem("French", "French"));
- listBox.Items.Add(new PdfListFieldItem("German", "German"));
- //Select the item
- listBox.SelectedIndex = 2;
- //Set the multiselect option
- listBox.MultiSelect = true;
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- document.Form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- listBox.HighlightMode = PdfHighlightMode.Outline
- 'Add the items to the list box
- listBox.Items.Add(New PdfListFieldItem("English", "English"))
- listBox.Items.Add(New PdfListFieldItem("French", "French"))
- listBox.Items.Add(New PdfListFieldItem("German", "German"))
- 'Select the item
- listBox.SelectedIndex = 2
- 'Set the multiselect option
- listBox.MultiSelect = True
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- document.Form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- listBox.HighlightMode = PdfHighlightMode.Outline;
- //Add the items to the list box
- listBox.Items.Add(new PdfListFieldItem("English", "English"));
- listBox.Items.Add(new PdfListFieldItem("French", "French"));
- listBox.Items.Add(new PdfListFieldItem("German", "German"));
- //Select the item
- listBox.SelectedIndex = 2;
- //Set the multiselect option
- listBox.MultiSelect = true;
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- document.Form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- listBox.HighlightMode = PdfHighlightMode.Outline
- 'Add the items to the list box
- listBox.Items.Add(New PdfListFieldItem("English", "English"))
- listBox.Items.Add(New PdfListFieldItem("French", "French"))
- listBox.Items.Add(New PdfListFieldItem("German", "German"))
- 'Select the item
- listBox.SelectedIndex = 2
- 'Set the multiselect option
- listBox.MultiSelect = True
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- document.Form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- listBox.HighlightMode = PdfHighlightMode.Outline;
- //Add the items to the list box
- listBox.Items.Add(new PdfListFieldItem("English", "English"));
- listBox.Items.Add(new PdfListFieldItem("French", "French"));
- listBox.Items.Add(new PdfListFieldItem("German", "German"));
- //Select the item
- listBox.SelectedIndex = 2;
- //Set the multiselect option
- listBox.MultiSelect = true;
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- document.Form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- listBox.HighlightMode = PdfHighlightMode.Outline
- 'Add the items to the list box
- listBox.Items.Add(New PdfListFieldItem("English", "English"))
- listBox.Items.Add(New PdfListFieldItem("French", "French"))
- listBox.Items.Add(New PdfListFieldItem("German", "German"))
- 'Select the item
- listBox.SelectedIndex = 2
- 'Set the multiselect option
- listBox.MultiSelect = True
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- document.Form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- listBox.HighlightMode = PdfHighlightMode.Outline;
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- itemCollection.Add(new PdfListFieldItem("English", "English"));
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
- listBox.SelectedIndex = 0;
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- document.Form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- listBox.HighlightMode = PdfHighlightMode.Outline
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- itemCollection.Add(New PdfListFieldItem("English", "English"))
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
- listBox.SelectedIndex = 0
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- document.Form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- listBox.HighlightMode = PdfHighlightMode.Outline;
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- itemCollection.Add(new PdfListFieldItem("English", "English"));
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
- PdfListFieldItem item = new PdfListFieldItem("Arabic", "Arabic");
- // Inserting an item at second position
- itemCollection.Insert(1, item);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- document.Form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- listBox.HighlightMode = PdfHighlightMode.Outline
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- itemCollection.Add(New PdfListFieldItem("English", "English"))
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
- Dim item As PdfListFieldItem = New PdfListFieldItem("Arabic", "Arabic")
- ' Inserting an item at second position
- itemCollection.Insert(1, item)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- document.Form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- PdfListFieldItem item = new PdfListFieldItem("English", "English");
- itemCollection.Add(item);
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
- // Remove an item from collection
- itemCollection.Remove(item);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- document.Form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- Dim item As PdfListFieldItem = New PdfListFieldItem("English", "English")
- itemCollection.Add(item)
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
- ' Remove an item from collection
- itemCollection.Remove(item)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- document.Form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- PdfListFieldItem item = new PdfListFieldItem("English", "English");
- itemCollection.Add(item);
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
- // Remove an item from collection
- itemCollection.RemoveAt(1);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- document.Form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- Dim item As PdfListFieldItem = New PdfListFieldItem("English", "English")
- itemCollection.Add(item)
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
- ' Remove an item from collection
- itemCollection.RemoveAt(1)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- document.Form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- PdfListFieldItem item = new PdfListFieldItem("English", "English");
- itemCollection.Add(item);
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
- if (itemCollection.Contains(item))
- MessageBox.Show("Already, item has added!");
- else
- itemCollection.Add(item);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- document.Form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- Dim item As PdfListFieldItem = New PdfListFieldItem("English", "English")
- itemCollection.Add(item)
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
- If itemCollection.Contains(item) Then
- MessageBox.Show("Already, item has added!")
- Else
- itemCollection.Add(item)
- End If
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- document.Form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- PdfListFieldItem item = new PdfListFieldItem("English", "English");
- itemCollection.Add(item);
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
- // Gets the index of an item
- int index = itemCollection.IndexOf(item);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- document.Form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- Dim item As PdfListFieldItem = New PdfListFieldItem("English", "English")
- itemCollection.Add(item)
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
- ' Gets the index of an item
- Dim index As Integer = itemCollection.IndexOf(item)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- document.Form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- PdfListFieldItem item = new PdfListFieldItem("English", "English");
- itemCollection.Add(item);
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
- // Clear the collection
- itemCollection.Clear();
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- document.Form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- Dim item As PdfListFieldItem = New PdfListFieldItem("English", "English")
- itemCollection.Add(item)
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
- ' Clear the collection
- itemCollection.Clear()
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create list box
- PdfListBoxField listBox = new PdfListBoxField(page, "list1");
- //Add the field to listbox.
- document.Form.Fields.Add(listBox);
- //Set the properties.
- listBox.Bounds = new RectangleF(100, 350, 100, 50);
- listBox.HighlightMode = PdfHighlightMode.Outline;
- // Creates list items
- PdfListFieldItemCollection itemCollection = listBox.Items;
- //Add the items to the list box
- itemCollection.Add(new PdfListFieldItem("English", "English"));
- itemCollection.Add(new PdfListFieldItem("French", "French"));
- itemCollection.Add(new PdfListFieldItem("German", "German"));
- // Reading the second item in the collection and assigning new values
- PdfListFieldItem item = itemCollection[1];
- item.Text = "Arabic";
- item.Value = "Arabic";
- listBox.SelectedIndex = 0;
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create list box
- Dim listBox As PdfListBoxField = New PdfListBoxField(page, "list1")
- 'Add the field to listbox.
- document.Form.Fields.Add(listBox)
- 'Set the properties.
- listBox.Bounds = New RectangleF(100, 350, 100, 50)
- listBox.HighlightMode = PdfHighlightMode.Outline
- ' Creates list items
- Dim itemCollection As PdfListFieldItemCollection = listBox.Items
- 'Add the items to the list box
- itemCollection.Add(New PdfListFieldItem("English", "English"))
- itemCollection.Add(New PdfListFieldItem("French", "French"))
- itemCollection.Add(New PdfListFieldItem("German", "German"))
- ' Reading the second item in the collection and assigning new values
- Dim item As PdfListFieldItem = itemCollection(1)
- item.Text = "Arabic"
- item.Value = "Arabic"
- listBox.SelectedIndex = 0
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics g = page.Graphics;
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- g.DrawString("10-49", font, brush, new RectangleF(150, 175, 180, 20));
- PdfRadioButtonListItem radioItem3 = new PdfRadioButtonListItem("50-99");
- radioItem3.Bounds = new RectangleF(100, 200, 20, 20);
- g.DrawString("50-99", font, brush, new RectangleF(150, 205, 180, 20));
- PdfRadioButtonListItem radioItem4 = new PdfRadioButtonListItem("100-499");
- radioItem4.Bounds = new RectangleF(100, 230, 20, 20);
- g.DrawString("100-499", font, brush, new RectangleF(150, 235, 180, 20));
- PdfRadioButtonListItem radioItem5 = new PdfRadioButtonListItem("500-more");
- radioItem5.Bounds = new RectangleF(100, 260, 20, 20);
- g.DrawString("500-more", font, brush, new RectangleF(150, 265, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- employeesRadioList.Items.Add(radioItem2);
- employeesRadioList.Items.Add(radioItem3);
- employeesRadioList.Items.Add(radioItem4);
- employeesRadioList.Items.Add(radioItem5);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim g As PdfGraphics = page.Graphics
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- g.DrawString("10-49", font, brush, New RectangleF(150, 175, 180, 20))
- Dim radioItem3 As PdfRadioButtonListItem = New PdfRadioButtonListItem("50-99")
- radioItem3.Bounds = New RectangleF(100, 200, 20, 20)
- g.DrawString("50-99", font, brush, New RectangleF(150, 205, 180, 20))
- Dim radioItem4 As PdfRadioButtonListItem = New PdfRadioButtonListItem("100-499")
- radioItem4.Bounds = New RectangleF(100, 230, 20, 20)
- g.DrawString("100-499", font, brush, New RectangleF(150, 235, 180, 20))
- Dim radioItem5 As PdfRadioButtonListItem = New PdfRadioButtonListItem("500-more")
- radioItem5.Bounds = New RectangleF(100, 260, 20, 20)
- g.DrawString("500-more", font, brush, New RectangleF(150, 265, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- employeesRadioList.Items.Add(radioItem2)
- employeesRadioList.Items.Add(radioItem3)
- employeesRadioList.Items.Add(radioItem4)
- employeesRadioList.Items.Add(radioItem5)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- // Insert the item as first item
- employeesRadioList.Items.Insert(0, radioItem2);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- ' Insert the item as first item
- employeesRadioList.Items.Insert(0, radioItem2)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- // Insert the item as first item
- employeesRadioList.Items.Add(radioItem2);
- // Remove the item
- employeesRadioList.Items.Remove(radioItem1);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- ' Insert the item as first item
- employeesRadioList.Items.Add(radioItem2)
- ' Remove the item
- employeesRadioList.Items.Remove(radioItem1)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- // Insert the item as first item
- employeesRadioList.Items.Add(radioItem2);
- // Remove the item
- employeesRadioList.Items.RemoveAt(0);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- ' Insert the item as first item
- employeesRadioList.Items.Add(radioItem2)
- ' Remove the item
- employeesRadioList.Items.RemoveAt(0)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- // Insert the item as first item
- employeesRadioList.Items.Add(radioItem2);
- // Find the index
- int index = employeesRadioList.Items.IndexOf(radioItem1);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'Add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- ' Insert the item as first item
- employeesRadioList.Items.Add(radioItem2)
- ' Find the index
- Dim index As Integer = employeesRadioList.Items.IndexOf(radioItem1)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- // Insert the item as first item
- employeesRadioList.Items.Add(radioItem2);
- // Check whether the specified item is in Collection
- if (employeesRadioList.Items.Contains(radioItem1))
- MessageBox.Show("Item already added in the collection");
- else
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- ' Insert the item as first item
- employeesRadioList.Items.Add(radioItem2)
- ' Check whether the specified item is in Collection
- If employeesRadioList.Items.Contains(radioItem1) Then
- MessageBox.Show("Item already added in the collection")
- Else
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- End If
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- // Insert the item as first item
- employeesRadioList.Items.Add(radioItem2);
- // Clears the item
- employeesRadioList.Items.Clear();
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- ' Insert the item as first item
- employeesRadioList.Items.Add(radioItem2)
- ' Clears the item
- employeesRadioList.Items.Clear()
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- // Insert the item as first item
- employeesRadioList.Items.Add(radioItem2);
- // Gets the first item from the collection
- PdfRadioButtonListItem item = employeesRadioList.Items[0];
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- ' Insert the item as first item
- employeesRadioList.Items.Add(radioItem2)
- ' Gets the first item from the collection
- Dim item As PdfRadioButtonListItem = employeesRadioList.Items(0)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics g = page.Graphics;
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- g.DrawString("10-49", font, brush, new RectangleF(150, 175, 180, 20));
- PdfRadioButtonListItem radioItem3 = new PdfRadioButtonListItem("50-99");
- radioItem3.Bounds = new RectangleF(100, 200, 20, 20);
- g.DrawString("50-99", font, brush, new RectangleF(150, 205, 180, 20));
- PdfRadioButtonListItem radioItem4 = new PdfRadioButtonListItem("100-499");
- radioItem4.Bounds = new RectangleF(100, 230, 20, 20);
- g.DrawString("100-499", font, brush, new RectangleF(150, 235, 180, 20));
- PdfRadioButtonListItem radioItem5 = new PdfRadioButtonListItem("500-more");
- radioItem5.Bounds = new RectangleF(100, 260, 20, 20);
- g.DrawString("500-more", font, brush, new RectangleF(150, 265, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- employeesRadioList.Items.Add(radioItem2);
- employeesRadioList.Items.Add(radioItem3);
- employeesRadioList.Items.Add(radioItem4);
- employeesRadioList.Items.Add(radioItem5);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim g As PdfGraphics = page.Graphics
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- g.DrawString("10-49", font, brush, New RectangleF(150, 175, 180, 20))
- Dim radioItem3 As PdfRadioButtonListItem = New PdfRadioButtonListItem("50-99")
- radioItem3.Bounds = New RectangleF(100, 200, 20, 20)
- g.DrawString("50-99", font, brush, New RectangleF(150, 205, 180, 20))
- Dim radioItem4 As PdfRadioButtonListItem = New PdfRadioButtonListItem("100-499")
- radioItem4.Bounds = New RectangleF(100, 230, 20, 20)
- g.DrawString("100-499", font, brush, New RectangleF(150, 235, 180, 20))
- Dim radioItem5 As PdfRadioButtonListItem = New PdfRadioButtonListItem("500-more")
- radioItem5.Bounds = New RectangleF(100, 260, 20, 20)
- g.DrawString("500-more", font, brush, New RectangleF(150, 265, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- employeesRadioList.Items.Add(radioItem2)
- employeesRadioList.Items.Add(radioItem3)
- employeesRadioList.Items.Add(radioItem4)
- employeesRadioList.Items.Add(radioItem5)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics g = page.Graphics;
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- g.DrawString("10-49", font, brush, new RectangleF(150, 175, 180, 20));
- PdfRadioButtonListItem radioItem3 = new PdfRadioButtonListItem("50-99");
- radioItem3.Bounds = new RectangleF(100, 200, 20, 20);
- g.DrawString("50-99", font, brush, new RectangleF(150, 205, 180, 20));
- PdfRadioButtonListItem radioItem4 = new PdfRadioButtonListItem("100-499");
- radioItem4.Bounds = new RectangleF(100, 230, 20, 20);
- g.DrawString("100-499", font, brush, new RectangleF(150, 235, 180, 20));
- PdfRadioButtonListItem radioItem5 = new PdfRadioButtonListItem("500-more");
- radioItem5.Bounds = new RectangleF(100, 260, 20, 20);
- g.DrawString("500-more", font, brush, new RectangleF(150, 265, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- employeesRadioList.Items.Add(radioItem2);
- employeesRadioList.Items.Add(radioItem3);
- employeesRadioList.Items.Add(radioItem4);
- employeesRadioList.Items.Add(radioItem5);
- document.Save("Form.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim g As PdfGraphics = page.Graphics
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- g.DrawString("10-49", font, brush, New RectangleF(150, 175, 180, 20))
- Dim radioItem3 As PdfRadioButtonListItem = New PdfRadioButtonListItem("50-99")
- radioItem3.Bounds = New RectangleF(100, 200, 20, 20)
- g.DrawString("50-99", font, brush, New RectangleF(150, 205, 180, 20))
- Dim radioItem4 As PdfRadioButtonListItem = New PdfRadioButtonListItem("100-499")
- radioItem4.Bounds = New RectangleF(100, 230, 20, 20)
- g.DrawString("100-499", font, brush, New RectangleF(150, 235, 180, 20))
- Dim radioItem5 As PdfRadioButtonListItem = New PdfRadioButtonListItem("500-more")
- radioItem5.Bounds = New RectangleF(100, 260, 20, 20)
- g.DrawString("500-more", font, brush, New RectangleF(150, 265, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- employeesRadioList.Items.Add(radioItem2)
- employeesRadioList.Items.Add(radioItem3)
- employeesRadioList.Items.Add(radioItem4)
- employeesRadioList.Items.Add(radioItem5)
- document.Save("Form.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics g = page.Graphics;
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- // Set the selected item index index
- employeesRadioList.SelectedIndex = 0;
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim g As PdfGraphics = page.Graphics
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- ' Set the selected item index index
- employeesRadioList.SelectedIndex = 0
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics g = page.Graphics;
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- // Insert the item as first item
- employeesRadioList.Items.Add(radioItem2);
- // Set the selected item value
- employeesRadioList.SelectedValue = "1-9";
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim g As PdfGraphics = page.Graphics
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- ' Insert the item as first item
- employeesRadioList.Items.Add(radioItem2)
- ' Set the selected item value
- employeesRadioList.SelectedValue = "1-9"
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics g = page.Graphics;
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- // Insert the item as first item
- employeesRadioList.Items.Add(radioItem2);
- // Set the selected item
- employeesRadioList.SelectedItem = radioItem1;
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim g As PdfGraphics = page.Graphics
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- ' Insert the item as first item
- employeesRadioList.Items.Add(radioItem2)
- ' Set the selected item
- employeesRadioList.SelectedItem = radioItem1
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics g = page.Graphics;
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- // Insert the item as first item
- employeesRadioList.Items.Add(radioItem2);
- // Set the selected item value
- employeesRadioList.SelectedValue = "1-9";
- // Getting item collection
- PdfRadioButtonItemCollection itemCollection = employeesRadioList.Items;
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim g As PdfGraphics = page.Graphics
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- ' Insert the item as first item employeesRadioList.Items.Add(radioItem2)
- ' Set the selected item value
- employeesRadioList.SelectedValue = "1-9"
- ' Getting item collection
- Dim itemCollection As PdfRadioButtonItemCollection = employeesRadioList.Items
- document.Save("Form.pdf");
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- PdfBrush brush = PdfBrushes.Black;
- PdfGraphics g = page.Graphics;
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
- PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
- radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
- g.DrawString("10-49", font, brush, new RectangleF(150, 175, 180, 20));
- PdfRadioButtonListItem radioItem3 = new PdfRadioButtonListItem("50-99");
- radioItem3.Bounds = new RectangleF(100, 200, 20, 20);
- g.DrawString("50-99", font, brush, new RectangleF(150, 205, 180, 20));
- PdfRadioButtonListItem radioItem4 = new PdfRadioButtonListItem("100-499");
- radioItem4.Bounds = new RectangleF(100, 230, 20, 20);
- g.DrawString("100-499", font, brush, new RectangleF(150, 235, 180, 20));
- PdfRadioButtonListItem radioItem5 = new PdfRadioButtonListItem("500-more");
- radioItem5.Bounds = new RectangleF(100, 260, 20, 20);
- g.DrawString("500-more", font, brush, new RectangleF(150, 265, 180, 20));
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- employeesRadioList.Items.Add(radioItem2);
- employeesRadioList.Items.Add(radioItem3);
- employeesRadioList.Items.Add(radioItem4);
- employeesRadioList.Items.Add(radioItem5);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- Dim brush As PdfBrush = PdfBrushes.Black
- Dim g As PdfGraphics = page.Graphics
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
- Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
- radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
- g.DrawString("10-49", font, brush, New RectangleF(150, 175, 180, 20))
- Dim radioItem3 As PdfRadioButtonListItem = New PdfRadioButtonListItem("50-99")
- radioItem3.Bounds = New RectangleF(100, 200, 20, 20)
- g.DrawString("50-99", font, brush, New RectangleF(150, 205, 180, 20))
- Dim radioItem4 As PdfRadioButtonListItem = New PdfRadioButtonListItem("100-499")
- radioItem4.Bounds = New RectangleF(100, 230, 20, 20)
- g.DrawString("100-499", font, brush, New RectangleF(150, 235, 180, 20))
- Dim radioItem5 As PdfRadioButtonListItem = New PdfRadioButtonListItem("500-more")
- radioItem5.Bounds = New RectangleF(100, 260, 20, 20)
- g.DrawString("500-more", font, brush, New RectangleF(150, 265, 180, 20))
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- employeesRadioList.Items.Add(radioItem2)
- employeesRadioList.Items.Add(radioItem3)
- employeesRadioList.Items.Add(radioItem4)
- employeesRadioList.Items.Add(radioItem5)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a Radiobutton
- PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
- //Add to document
- document.Form.Fields.Add(employeesRadioList);
- //Create radiobutton items
- PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem();
- radioItem1.Value = "1-9";
- radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
- //add the items to radio button group
- employeesRadioList.Items.Add(radioItem1);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create a Radiobutton
- Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
- 'Add to document
- document.Form.Fields.Add(employeesRadioList)
- 'Create radiobutton items
- Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem()
- radioItem1.Value = "1-9"
- radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
- 'add the items to radio button group
- employeesRadioList.Items.Add(radioItem1)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create signature field
- PdfSignatureField sign = new PdfSignatureField(page, "sign1");
- sign.Bounds = new RectangleF(100, 420, 100, 50);
- document.Form.Fields.Add(sign);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create signature field
- Dim sign As PdfSignatureField = New PdfSignatureField(page, "sign1")
- sign.Bounds = New RectangleF(100, 420, 100, 50)
- document.Form.Fields.Add(sign)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create signature field
- PdfSignatureField sign = new PdfSignatureField(page, "sign1");
- sign.Bounds = new RectangleF(100, 420, 100, 50);
- document.Form.Fields.Add(sign);
- document.Save("Form.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create signature field
- Dim sign As PdfSignatureField = New PdfSignatureField(page, "sign1")
- sign.Bounds = New RectangleF(100, 420, 100, 50)
- document.Form.Fields.Add(sign)
- document.Save("Form.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create signature field
- PdfSignatureField sign = new PdfSignatureField(page, "sign1");
- sign.Bounds = new RectangleF(100, 420, 100, 50);
- // Gets the signature appearance
- PdfAppearance appearance = sign.Appearance;
- document.Form.Fields.Add(sign);
- document.Save("Form.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create signature field
- Dim sign As PdfSignatureField = New PdfSignatureField(page, "sign1")
- ' Gets the signature appearance
- Dim appearance As PdfAppearance = sign.Appearance
- sign.Bounds = New RectangleF(100, 420, 100, 50)
- document.Form.Fields.Add(sign)
- document.Save("Form.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create signature field
- PdfSignatureField sign = new PdfSignatureField(page, "sign1");
- sign.Signature = new PdfSignature(page, new PdfCertificate("PDF.pfx", "Syncfusion"), "Signature");
- sign.Bounds = new RectangleF(100, 420, 100, 50);
- // Gets the signature appearance
- PdfAppearance appearance = sign.Appearance;
- document.Form.Fields.Add(sign);
- document.Save("Form.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create signature field
- Dim sign As PdfSignatureField = New PdfSignatureField(page, "sign1")
- sign.Signature = New PdfSignature(page, New PdfCertificate("PDF.pfx", "Syncfusion"), "Signature")
- sign.Bounds = New RectangleF(100, 420, 100, 50)
- document.Form.Fields.Add(sign)
- document.Save("Form.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a text box
- PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
- firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
- firstNameTextBox.Font = font;
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55);
- //Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a text box
- Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
- firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
- firstNameTextBox.Font = font
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55)
- 'Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a text box
- PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
- firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
- firstNameTextBox.Font = font;
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55);
- //Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox);
- document.Save("Form.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a text box
- Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
- firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
- firstNameTextBox.Font = font
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55)
- 'Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox)
- document.Save("Form.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a text box
- PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
- firstNameTextBox.Text = "Cris";
- firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
- firstNameTextBox.Font = font;
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55);
- //Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a text box
- Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
- firstNameTextBox.Text = "Cris"
- firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
- firstNameTextBox.Font = font
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55)
- 'Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a text box
- PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
- firstNameTextBox.DefaultValue = "Cris";
- firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
- firstNameTextBox.Font = font;
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55);
- //Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a text box
- Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
- firstNameTextBox.DefaultValue = "Cris"
- firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
- firstNameTextBox.Font = font
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55)
- 'Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a text box
- PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
- firstNameTextBox.SpellCheck = true;
- firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
- firstNameTextBox.Font = font;
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55);
- //Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a text box
- Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
- firstNameTextBox.SpellCheck = True
- firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
- firstNameTextBox.Font = font
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55)
- 'Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a text box
- PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
- firstNameTextBox.InsertSpaces = true;
- firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
- firstNameTextBox.Font = font;
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55);
- //Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a text box
- Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
- firstNameTextBox.InsertSpaces = True
- firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
- firstNameTextBox.Font = font
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55)
- 'Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a text box
- PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
- firstNameTextBox.Multiline = true;
- firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
- firstNameTextBox.Font = font;
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55);
- //Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a text box
- Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
- firstNameTextBox.Multiline = True
- firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
- firstNameTextBox.Font = font
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55)
- 'Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a text box
- PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
- firstNameTextBox.Password = true;
- firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
- firstNameTextBox.Font = font;
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55);
- //Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a text box
- Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
- firstNameTextBox.Password = True
- firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
- firstNameTextBox.Font = font
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55)
- 'Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a text box
- PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
- firstNameTextBox.Scrollable = true;
- firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
- firstNameTextBox.Font = font;
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55);
- //Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a text box
- Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
- firstNameTextBox.Scrollable = True
- firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
- firstNameTextBox.Font = font
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55)
- 'Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
- //Create a text box
- PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
- firstNameTextBox.MaxLength = 8;
- firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
- firstNameTextBox.Font = font;
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55);
- //Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
- 'Create a text box
- Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
- firstNameTextBox.MaxLength = 8
- firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
- firstNameTextBox.Font = font
- page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55)
- 'Add the textbox in document
- document.Form.Fields.Add(firstNameTextBox)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- // Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create submit button
- PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
- submitButton.Bounds = new RectangleF(100, 500, 90, 20);
- submitButton.Font = font;
- submitButton.Text = "Submit";
- // Set the border style for the button field
- submitButton.BorderStyle = PdfBorderStyle.Dashed;
- document.Form.Fields.Add(submitButton);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- ' Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create submit button
- Dim submitButton As PdfButtonField = New PdfButtonField(page, "submitButton")
- submitButton.Bounds = New RectangleF(100, 500, 90, 20)
- submitButton.Font = font
- submitButton.Text = "Submit"
- ' Set the border style for the button field
- submitButton.BorderStyle = PdfBorderStyle.Dashed
- document.Form.Fields.Add(submitButton)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- // Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create the signature field
- PdfSignatureField sign = new PdfSignatureField(page, "sign1");
- sign.Bounds = new RectangleF(100, 420, 100, 50);
- // Set the high light mode for a signature field
- sign.HighlightMode = PdfHighlightMode.Push;
- document.Form.Fields.Add(sign);
- document.Save("Form.pdf");
- document.Close(true);
-
-
- ' Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create the signature field
- Dim sign As PdfSignatureField = New PdfSignatureField(page, "sign1")
- sign.Bounds = New RectangleF(100, 420, 100, 50)
- ' Set the high light mode for a signature field
- sign.HighlightMode = PdfHighlightMode.Push
- document.Form.Fields.Add(sign)
- document.Save("Form.pdf")
- document.Close(True)
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create a check box
- PdfCheckBoxField checkBox = new PdfCheckBoxField(page, "C#.NET");
- checkBox.Bounds = new RectangleF(100, 290, 20, 20);
- // Add the check box field in form`s field collection
- document.Form.Fields.Add(checkBox);
- checkBox.HighlightMode = PdfHighlightMode.Push;
- checkBox.BorderStyle = PdfBorderStyle.Beveled;
- // Set the check style
- checkBox.Style = PdfCheckBoxStyle.Star;
- checkBox.Checked = true;
- document.Save("Form.pdf");
- document.Close(true);
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create a check box
- Dim checkBox As PdfCheckBoxField = New PdfCheckBoxField(page, "C#.NET")
- checkBox.Bounds = New RectangleF(100, 290, 20, 20)
- ' Add the check box field in form`s field collection
- document.Form.Fields.Add(checkBox)
- checkBox.HighlightMode = PdfHighlightMode.Push
- checkBox.BorderStyle = PdfBorderStyle.Beveled
- ' Set the check style
- checkBox.Style = PdfCheckBoxStyle.Star
- checkBox.Checked = True
- document.Save("Form.pdf")
- document.Close(True)
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //Begin Page Layout Event Handler
- private void BeginPageLayout2(object sender, BeginPageLayoutEventArgs e)
- {
- e.Cancel=true;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- End Sub
- 'Begin Page Layout Event Handler
- Private Sub BeginPageLayout2(ByVal sender As object, ByVal e As BeginPageLayoutEventArgs)
- e.Cancel=True
- End Sub
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- bounds = column;
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //Begin Page Layout Event Handler
- private void BeginPageLayout2(object sender, BeginPageLayoutEventArgs e)
- {
- e.Cancel=true;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As New RectangleF(0, 0, page.GetClientSize().Width, 50)
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- End Sub
- 'Begin Page Layout Event Handler
- Private Sub BeginPageLayout2(ByVal sender As object, ByVal e As BeginPageLayoutEventArgs)
- e.Cancel=True
- End Sub
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- private bool m_paginateStart = true;
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //Begin Page Layout Event Handler
- private void BeginPageLayout2(object sender, BeginPageLayoutEventArgs e)
- {
- RectangleF bounds = e.Bounds;
- // First column.
- if (!m_paginateStart)
- {
- bounds.X = bounds.Width + 20f;
- bounds.Y = 10f;
- }
- e.Bounds = bounds;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim m_paginateStart As Bool= True
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- 'Begin Page Layout Event Handler
- Private Sub BeginPageLayout2(ByVal sender As object, ByVal e As BeginPageLayoutEventArgs)
- Dim bounds As RectangleF = e.Bounds
- ' First column.
- If (Not m_paginateStart) Then
- bounds.X = bounds.Width + 20f
- bounds.Y = 10f
- End If
- e.Bounds = bounds
- End Sub
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- private bool m_paginateStart = true;
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //Begin Page Layout Event Handler
- private void BeginPageLayout2(object sender, BeginPageLayoutEventArgs e)
- {
- RectangleF bounds = e.Bounds;
- // First column.
- if (!m_paginateStart)
- {
- bounds.X = bounds.Width + 20f;
- bounds.Y = 10f;
- }
- e.Bounds = bounds;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim m_paginateStart As Bool= True
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- 'Begin Page Layout Event Handler
- Private Sub BeginPageLayout2(ByVal sender As object, ByVal e As BeginPageLayoutEventArgs)
- Dim bounds As RectangleF = e.Bounds
- ' First column.
- If (Not m_paginateStart) Then
- bounds.X = bounds.Width + 20f
- bounds.Y = 10f
- End If
- e.Bounds = bounds
- End Sub
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- private bool m_paginateStart = true;
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //Begin Page Layout Event Handler
- private void BeginPageLayout2(object sender, BeginPageLayoutEventArgs e)
- {
- PdfPage page = e.pAGE;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim m_paginateStart As Bool= True
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- 'Begin Page Layout Event Handler
- Private Sub BeginPageLayout2(ByVal sender As object, ByVal e As BeginPageLayoutEventArgs)
- Dim page As PdfPage = e.Page
- End Sub
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- private bool m_paginateStart = true;
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- m_columnBounds = column;
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //End Page Layout Event Handler
- private void EndPageLayout2(object sender, EndPageLayoutEventArgs e)
- {
- EndTextPageLayoutEventArgs args = (EndTextPageLayoutEventArgs)e;
- PdfTextLayoutResult tlr = args.Result;
- RectangleF bounds = tlr.Bounds;
- args.NextPage = tlr.Page;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim m_paginateStart As Bool= True
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- 'End Page Layout Event Handler
- Private Sub EndPageLayout2(ByVal sender As object, ByVal e As EndPageLayoutEventArgs)
- Dim args As EndTextPageLayoutEventArgs = CType(e, EndTextPageLayoutEventArgs)
- Dim tlr As PdfTextLayoutResult = args.Result
- Dim bounds As RectangleF = tlr.Bounds
- args.NextPage = tlr.Page
- End Sub
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- private bool m_paginateStart = true;
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //End Page Layout Event Handler
- private void EndPageLayout2(object sender, EndPageLayoutEventArgs e)
- {
- EndTextPageLayoutEventArgs args = (EndTextPageLayoutEventArgs)e;
- PdfTextLayoutResult tlr = args.Result;
- RectangleF bounds = tlr.Bounds;
- args.NextPage = tlr.Page;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim m_paginateStart As Bool= True
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- 'End Page Layout Event Handler
- Private Sub EndPageLayout2(ByVal sender As object, ByVal e As EndPageLayoutEventArgs)
- Dim args As EndTextPageLayoutEventArgs = CType(e, EndTextPageLayoutEventArgs)
- Dim tlr As PdfTextLayoutResult = args.Result
- Dim bounds As RectangleF = tlr.Bounds
- args.NextPage = tlr.Page
- End Sub
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- private bool m_paginateStart = true;
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //End Page Layout Event Handler
- private void EndPageLayout2(object sender, EndPageLayoutEventArgs e)
- {
- EndTextPageLayoutEventArgs args = (EndTextPageLayoutEventArgs)e;
- PdfTextLayoutResult tlr = args.Result;
- args.NextPage = tlr.Page;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim m_paginateStart As Bool= True
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- 'End Page Layout Event Handler.
- Private Sub EndPageLayout2(ByVal sender As object, ByVal e As EndPageLayoutEventArgs)
- Dim tlr As PdfTextLayoutResult = args.Result
- args.NextPage = tlr.Page
- End Sub
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- private bool m_paginateStart = true;
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //End Text Page Layout Event
- private void EndPageLayout2(object sender, EndPageLayoutEventArgs e)
- {
- EndTextPageLayoutEventArgs args = (EndTextPageLayoutEventArgs)e;
- PdfTextLayoutResult tlr = args.Result;
- RectangleF bounds = tlr.Bounds;
- args.NextPage = tlr.Page;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim m_paginateStart As Bool= True
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- 'End Text Page Layout Event
- Private Sub EndPageLayout2(ByVal sender As object, ByVal e As EndPageLayoutEventArgs)
- Dim args As EndTextPageLayoutEventArgs = CType(e, EndTextPageLayoutEventArgs)
- Dim tlr As PdfTextLayoutResult = args.Result
- Dim bounds As RectangleF = tlr.Bounds
- args.NextPage = tlr.Page
- End Sub
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- private bool m_paginateStart = true;
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //End Text Page Layout Event
- private void EndPageLayout2(object sender, EndPageLayoutEventArgs e)
- {
- EndTextPageLayoutEventArgs args = (EndTextPageLayoutEventArgs)e;
- PdfTextLayoutResult tlr = args.Result;
- RectangleF bounds = tlr.Bounds;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim m_paginateStart As Bool= True
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- 'End Text Page Layout Event
- Private Sub EndPageLayout2(ByVal sender As object, ByVal e As EndPageLayoutEventArgs)
- Dim args As EndTextPageLayoutEventArgs = CType(e, EndTextPageLayoutEventArgs)
- Dim tlr As PdfTextLayoutResult = args.Result
- Dim bounds As RectangleF = tlr.Bounds
- End Sub
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- private bool m_paginateStart = true;
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //End Page Layout Event Handler
- private void EndPageLayout2(object sender, EndPageLayoutEventArgs e)
- {
- EndTextPageLayoutEventArgs args = (EndTextPageLayoutEventArgs)e;
- PdfTextLayoutResult tlr = args.Result;
- RectangleF bounds = tlr.Bounds;
- args.NextPage = tlr.Page;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim m_paginateStart As Bool= True
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- 'End Page Layout Event Handler
- Private Sub EndPageLayout2(ByVal sender As object, ByVal e As EndPageLayoutEventArgs)
- Dim args As EndTextPageLayoutEventArgs = CType(e, EndTextPageLayoutEventArgs)
- Dim tlr As PdfTextLayoutResult = args.Result
- Dim bounds As RectangleF = tlr.Bounds
- args.NextPage = tlr.Page
- End Sub
-
-
- // Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- private bool m_paginateStart = true;
- PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
- PdfPen pen = new PdfPen(Color.Black, 1f);
- //Creates a new pdf font
- PdfStandardFont pdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 11.5f);
- Font font = new Font("Calibri", 14f, FontStyle.Bold);
- PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font, true);
- string path = @"..\..\Data\Essential studio.txt";
- StreamReader reader = new StreamReader(path, Encoding.ASCII);
- string text = reader.ReadToEnd();
- reader.Close();
- RectangleF column = new RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height);
- //Create text element
- PdfTextElement element = new PdfTextElement(text, pdfFont);
- element.Brush = new PdfSolidBrush(Color.Black);
- PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Raise the event when the text flows to next page.
- element.BeginPageLayout += new BeginPageLayoutEventHandler(BeginPageLayout2);
- //Get the remaining text that flows beyond the boundary.
- PdfTextLayoutResult result = element.Draw(page, column, layoutFormat);
- //Saves the document.
- doc.Save("Sample.pdf");
- //End Text Page Layout Event Handler
- private void EndPageLayout2(object sender, EndPageLayoutEventArgs e)
- {
- EndTextPageLayoutEventArgs args = (EndTextPageLayoutEventArgs)e;
- PdfTextLayoutResult tlr = args.Result;
- RectangleF bounds = tlr.Bounds;
- args.NextPage = tlr.Page;
- }
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim m_paginateStart As Bool= True
- Dim brush As New PdfSolidBrush(Color.Black)
- Dim pen As New PdfPen(Color.Black, 1f)
- 'Creates a new pdf font
- Dim pdfFont As New PdfStandardFont(PdfFontFamily.Helvetica, 11.5f)
- Dim font As New Font("Calibri", 14f, FontStyle.Bold)
- Dim trueTypeFont As New PdfTrueTypeFont(font, True)
- Dim path As string = "..\..\..\..\..\..\..\..\..\Common\Data\PDF\Essential studio.txt"
- Dim reader As New StreamReader(path, Encoding.ASCII)
- Dim text As string = reader.ReadToEnd()
- reader.Close()
- Dim column As New RectangleF(0, 20, page.Graphics.ClientSize.Width / 2f - 10f, page.Graphics.ClientSize.Height)
- 'Create text element
- Dim element As New PdfTextElement(text, pdfFont)
- element.Brush = New PdfSolidBrush(Color.Black)
- Dim layoutFormat As New PdfLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Raise the event when the text flows to next page.
- element.BeginPageLayout += New BeginPageLayoutEventHandler(BeginPageLayout2)
- 'Get the remaining text that flows beyond the boundary.
- Dim result As PdfTextLayoutResult = element.Draw(page, column, layoutFormat)
- 'Saves the document.
- doc.Save("Sample.pdf")
- 'End Text Page Layout Event Handler
- Private Sub EndPageLayout2(ByVal sender As object, ByVal e As EndPageLayoutEventArgs)
- Dim args As EndTextPageLayoutEventArgs = CType(e, EndTextPageLayoutEventArgs)
- Dim tlr As PdfTextLayoutResult = args.Result
- Dim bounds As RectangleF = tlr.Bounds
- args.NextPage = tlr.Page
- End Sub
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page to the document.
- PdfPage page = document.Pages.Add();
- //Create PDF graphics for the page.
- PdfGraphics graphics = page.Graphics;
- //Use the font installed in the machine
- PdfFont font = new PdfTrueTypeFont(new Font("Arial", 14));
- //Create PDF text element
- PdfTextElement element = new PdfTextElement("Hello World!!!", font, PdfBrushes.Black);
- //Create layout format
- PdfLayoutFormat format=new PdfLayoutFormat();
- format.Layout=PdfLayoutType.Paginate;
- //Draw the text with layout format
- element.Draw(page, new RectangleF(0, 0, 200, 400), format);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = document.Pages.Add()
- 'Create PDF graphics for the page.
- Dim graphics As PdfGraphics = page.Graphics
- 'Use the font installed in the machine
- Dim font As PdfFont = New PdfTrueTypeFont(New Font("Arial", 14))
- 'Create PDF text element
- Dim element As New PdfTextElement("Hello World!!!", font, PdfBrushes.Black)
- 'Create layout format
- Dim format As New PdfLayoutFormat()
- format.Layout = PdfLayoutType.Paginate
- 'Draw the text with layout format
- element.Draw(page, New RectangleF(0, 0, 200, 400), format)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page to the document.
- PdfPage page = document.Pages.Add();
- //Create PDF graphics for the page.
- PdfGraphics graphics = page.Graphics;
- //Create a truetype font
- PdfFont font = new PdfTrueTypeFont(new Font("Arial", 14),true);
- //Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = document.Pages.Add()
- 'Create PDF graphics for the page.
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a truetype font
- Dim font As PdfFont = New PdfTrueTypeFont(New Font("Arial", 14), True)
- 'Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page to the document.
- PdfPage page = document.Pages.Add();
- //Create PDF graphics for the page.
- PdfGraphics graphics = page.Graphics;
- //Create a truetype font
- PdfFont font = new PdfTrueTypeFont(new Font("Arial", 14),12,true);
- //Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = document.Pages.Add()
- 'Create PDF graphics for the page.
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a truetype font
- Dim font As PdfFont = New PdfTrueTypeFont(New Font("Arial", 14), 12, True)
- 'Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page to the document.
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load the image from the disk.
- PdfBitmap image = new PdfBitmap("Autumn Leaves.jpg");
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document.
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load the image from the disk.
- Dim image As New PdfBitmap("Autumn Leaves.jpg")
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document.
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page to the document.
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load the image from the disk.
- PdfImage image = PdfImage.FromFile("Autumn Leaves.jpg");
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document.
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load the image from the disk.
- Dim image As PdfImage = PdfImage.FromFile("Autumn Leaves.jpg")
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document.
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page to the document.
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load the image from the disk.
- PdfImage image = PdfImage.FromFile("Autumn Leaves.jpg");
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document.
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load the image from the disk.
- Dim image As PdfImage = PdfImage.FromFile("Autumn Leaves.jpg")
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document.
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page to the document.
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load the image from the disk.
- PdfImage image = PdfImage.FromStream(File.OpenRead("Autumn Leaves.jpg"));
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document.
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load the image from the disk.
- Dim image As PdfImage = PdfImage.FromStream(File.OpenRead("Autumn Leaves.jpg"))
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document.
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page to the document.
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load image from file
- Image picture = Image.FromFile("Autumn Leaves.jpg");
- //Load the image from the Image object
- PdfImage image = PdfImage.FromImage(picture);
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document.
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load image from file
- Dim picture As Image = Image.FromFile("Autumn Leaves.jpg")
- 'Load the image from the Image object
- Dim image As PdfImage = PdfImage.FromImage(picture)
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document.
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page to the document.
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load image from file
- Image picture = Image.FromFile("Autumn Leaves.jpg");
- //Load the image from the Image object
- PdfBitmap image = new PdfBitmap(picture);
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document.
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load image from file
- Dim picture As Image = Image.FromFile("Autumn Leaves.jpg")
- 'Load the image from the Image object
- Dim image As New PdfBitmap(picture)
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document.
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page to the document.
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load the image from the disk.
- PdfBitmap image = new PdfBitmap("Autumn Leaves.jpg");
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document.
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load the image from the disk.
- Dim image As New PdfBitmap("Autumn Leaves.jpg")
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document.
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page to the document.
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load the image from the stream
- PdfBitmap image = new PdfBitmap(File.OpenRead("Autumn Leaves.jpg"));
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document.
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load the image from the stream
- Dim image As New PdfBitmap(File.OpenRead("Autumn Leaves.jpg"))
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document.
- doc.Close(True)
-
-
- //Create a PDF document
- PdfDocument pdfDocument = new PdfDocument();
- //Add a section to the PDF document
- PdfSection section = pdfDocument.Sections.Add();
- //Declare the PDF page
- PdfPage page;
- //Declare PDF page graphics
- PdfGraphics graphics;
- //Load multi frame Tiff image
- PdfBitmap tiffImage = new PdfBitmap("image.tiff");
- //Get the frame count
- int frameCount = tiffImage.FrameCount;
-
- //Access each frame draw into the page
- for (int i = 0; i!=frameCount-1; i++)
- {
- page = section.Pages.Add();
- section.PageSettings.Margins.All = 0;
- graphics = page.Graphics;
- tiffImage.ActiveFrame = i;
- graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
- }
- //Save and close the document
- pdfDocument.Save("Sample.pdf");
- pdfDocument.Close(true);
-
-
- 'Create a PDF document///Dim pdfDocument As New PdfDocument()
- 'Add a section to the PDF document
- Dim section As PdfSection = pdfDocument.Sections.Add()
- 'Declare the PDF page
- Dim page As PdfPage
- 'Declare PDF page graphics
- Dim graphics As PdfGraphics
- 'Load multi frame Tiff image
- Dim tiffImage As New PdfBitmap("image.tiff")
- 'Get the frame count
- Dim frameCount As Integer = tiffImage.FrameCount
- 'Access each frame draw into the page
- For i As Integer = 0 To frameCount - 1
- page = section.Pages.Add()
- section.PageSettings.Margins.All = 0
- graphics = page.Graphics
- tiffImage.ActiveFrame = i
- graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
- Next
- 'Save and close the document
- pdfDocument.Save("Sample.pdf")
- pdfDocument.Close(True)
-
-
- //Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Add pages to the document
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load the Tiff image
- PdfBitmap image = new PdfBitmap("image.tif");
- //Create masking image
- PdfImageMask mask = new PdfImageMask(new PdfBitmap("mask.bmp"));
- image.Mask = mask;
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Saves the document
- doc.Save("Output.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Add pages to the document
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load the Tiff image
- Dim image As New PdfBitmap("image.tif")
- 'Create masking image
- Dim mask As New PdfImageMask(New PdfBitmap("mask.bmp"))
- image.Mask = mask
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Saves the document
- doc.Save("Output.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page to the document.
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load image from file
- Image picture = Image.FromFile("Autumn Leaves.jpg");
- //Load the image from the Image object
- PdfBitmap image = new PdfBitmap(picture);
- //Create a color mask
- PdfColorMask mask = new PdfColorMask(new PdfColor(Color.Red), new PdfColor(Color.Aqua));
- //Apply a mask to the image
- image.Mask = mask;
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document.
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load image from file
- Dim picture As Image = Image.FromFile("Autumn Leaves.jpg")
- 'Load the image from the Image object
- Dim image As New PdfBitmap(picture)
- 'Create a color mask
- Dim mask As New PdfColorMask(New PdfColor(Color.Red), New PdfColor(Color.Aqua))
- 'Apply a mask to the image
- image.Mask = mask
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document.
- doc.Close(True)
-
-
- //Create a new PDF document.///PdfDocument doc = new PdfDocument();
- //Add a page to the document.
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load image from file
- Image picture = Image.FromFile("Autumn Leaves.jpg");
- //Load the image from the Image object
- PdfBitmap image = new PdfBitmap(picture);
- //Create a color mask
- PdfColorMask mask = new PdfColorMask(new PdfColor(Color.Red), new PdfColor(Color.Aqua));
- //Apply a mask to the image
- image.Mask = mask;
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document.
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page to the document.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load image from file
- Dim picture As Image = Image.FromFile("Autumn Leaves.jpg")
- 'Load the image from the Image object
- Dim image As New PdfBitmap(picture)
- 'Create a color mask
- Dim mask As New PdfColorMask(New PdfColor(Color.Red), New PdfColor(Color.Aqua))
- 'Apply a mask to the image
- image.Mask = mask
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document.
- doc.Close(True)
-
-
- //Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Add pages to the document
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load the Tiff image
- PdfBitmap image = new PdfBitmap("image.tif");
- //Create masking image
- PdfImageMask mask = new PdfImageMask(new PdfBitmap("mask.bmp"));
- image.Mask = mask;
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Saves the document
- doc.Save("Output.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Add pages to the document
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load the Tiff image
- Dim image As New PdfBitmap("image.tif")
- 'Create masking image
- Dim mask As New PdfImageMask(New PdfBitmap("mask.bmp"))
- image.Mask = mask
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Saves the document
- doc.Save("Output.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Add pages to the document
- PdfPage page = doc.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Load the Tiff image
- PdfBitmap image = new PdfBitmap("image.tif");
- //Create masking image
- PdfImageMask mask = new PdfImageMask(new PdfBitmap("mask.bmp"));
- image.Mask = mask;
- //Draw the image
- graphics.DrawImage(image, 0, 0);
- //Saves the document
- doc.Save("Output.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Add pages to the document
- Dim page As PdfPage = doc.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Load the Tiff image
- Dim image As New PdfBitmap("image.tif")
- 'Create masking image
- Dim mask As New PdfImageMask(New PdfBitmap("mask.bmp"))
- image.Mask = mask
- 'Draw the image
- graphics.DrawImage(image, 0, 0)
- 'Saves the document
- doc.Save("Output.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Creates a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Adds a page to the document.
- PdfPage page = doc.Pages.Add();
- //Creates PDF graphics for the page.
- PdfGraphics g = page.Graphics;
- //Creates an image object.
- PdfBitmap image = new PdfBitmap("Autumn Leaves.jpg");
- //Draws the image.
- g.DrawImage(image, new PointF(0, 0));
- //Saves the document.
- doc.Save("Output.pdf");
- //Closes the document.
- doc.Close(true);
-
-
- 'Creates a new PDF document.
- Dim doc As New PdfDocument()
- 'Adds a page to the document.
- Dim page As PdfPage = doc.Pages.Add()
- 'Creates PDF graphics for the page.
- Dim g As PdfGraphics = page.Graphics
- 'Creates an image object.
- Dim image As New PdfBitmap("Autumn Leaves.jpg")
- 'Draws the image.
- g.DrawImage(image,New PointF(0, 0))
- 'Saves the document.
- doc.Save("Output.pdf")
- 'Closes the document.
- doc.Close()
-
-
- //Creates a new PDF document.
- PdfDocument document = new PdfDocument();
- //Adds a page.PdfPage
- page = document.Pages.Add();
- //Creates PDF graphics for the page.
- PdfGraphics graphics = page.Graphics;
- //Creates a solid brush.
- PdfBrush brush = new PdfSolidBrush(Color.Black);
- //Sets the font.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
- //Draws the String.
- graphics.DrawString("Hello world!", font, brush, new PointF(20, 20));
- //Saves the document.
- document.Save("Sample.pdf");
- //Closes the document.
- document.Close(true);
-
-
- 'Creates a new PDF document.
- Dim document As PdfDocument = New PdfDocument()
- 'Adds a page to the document.
- Dim page As PdfPage = document.Pages.Add()
- 'Creates PDF graphics for the page.
- Dim graphics As PdfGraphics = page.Graphics
- 'Creates a solid brush.
- Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
- 'Sets the font.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12)
- 'Draws the text.
- graphics.DrawString("Hello world!", font, brush,new PointF(20,20))
- 'Saves the document.
- document.Save("Sample.pdf")
- 'Closes the document
- document.Close(true)
-
-
- //Creates a new PDF document.
- PdfDocument pdfDocument = new PdfDocument();
- //Adds a page to the PDF document.
- PdfPage pdfPage = pdfDocument.Pages.Add();
- //Create a PDF Template.
- PdfTemplate template = new PdfTemplate(100, 50);
- //Draws a rectangle into the graphics of the template.
- template.Graphics.DrawRectangle(PdfBrushes.BurlyWood, new System.Drawing.RectangleF(0, 0, 100, 50));
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14);
- PdfBrush brush = new PdfSolidBrush(Color.Black);
- //Draws a string into the graphics of the template.
- template.Graphics.DrawString("Hello World", font, brush, 5, 5);
- //Draws the template into the page graphics of the document.
- pdfPage.Graphics.DrawPdfTemplate(template, PointF.Empty);
- //Saves the document.
- pdfDocument.Save("Output.pdf");
- //Close the document
- pdfDocument.Close(true);
-
-
- 'Creates a new PDF document.
- Dim pdfDocument As New PdfDocument()
- 'Adds a page to the PDF document
- Dim pdfPage As PdfPage = pdfDocument.Pages.Add()
- 'Creates a PDF Template.
- Dim template As New PdfTemplate(100, 50)
- 'Draws a rectangle into the graphics of the template.
- template.Graphics.DrawRectangle(PdfBrushes.BurlyWood, New System.Drawing.RectangleF(0, 0, 100, 50))
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14)
- Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
- 'Draws a string into the graphics of the template.
- template.Graphics.DrawString("Hello World", font, brush, 5, 5)
- 'Draws the template into the page graphics of the document.
- pdfPage.Graphics.DrawPdfTemplate(template, PointF.Empty)
- 'Saves the document.
- pdfDocument.Save("Output.pdf")
- 'Close the document
- pdfDocument.Close(True)
-
- //Create new PDF document
- PdfDocument doc = new PdfDocument();
- //Add a new page
- page = doc.Pages.Add();
- //Set the dimension of the PDF page
- float width = new PdfUnitConvertor().ConvertToPixels(page.GetClientSize().Width, PdfGraphicsUnit.Point);
- float height = -1f;
- //Initialize HTML to PDF converter
- using (Syncfusion.HtmlConverter.HtmlConverter html = new Syncfusion.HtmlConverter.HtmlConverter())
- {
- //Convert the URL
- HtmlToPdfResult result = html.Convert("http://www.syncfusion.com", ImageType.Metafile, (int)width, (int)height, AspectRatio.KeepWidth);
- if (result != null)
- {
- //Get the HTML as PdfMetafile
- PdfMetafile mf = new PdfMetafile(result.RenderedImage as Metafile);
- //Formatting options
- PdfMetafileLayoutFormat format = new PdfMetafileLayoutFormat();
- format.Break = PdfLayoutBreakType.FitPage;
- format.Layout = PdfLayoutType.Paginate;
- doc.PageSettings.Height = result.RenderedImage.Size.Height;
- format.SplitTextLines = false;
- format.SplitImages = false;
- //Render the PdfMetafile in the PDF document
- result.Render(page, format);
- }
- }
- //Save the PDF
- doc.Save(@"Output.pdf");
- //Close the PDF
- doc.Close(true);
-
-
- 'Create new PDF document
- Dim doc As New PdfDocument()
- 'Add a new page
- page = doc.Pages.Add()
- 'Set the dimension of the PDF page
- Dim width As Single = New PdfUnitConvertor().ConvertToPixels(page.GetClientSize().Width, PdfGraphicsUnit.Point)
- Dim height As Single = -1F
- 'Initialize HTML to PDF converter
- Using html As New Syncfusion.HtmlConverter.HtmlConverter()
- 'Convert the URL
- Dim result As HtmlToPdfResult = html.Convert("http://www.syncfusion.com", ImageType.Metafile, CInt(width), CInt(height), AspectRatio.KeepWidth)
- If result IsNot Nothing Then
- 'Get the HTML as PdfMetafile
- Dim mf As New PdfMetafile(TryCast(result.RenderedImage, Metafile))
- 'Formatting options
- Dim format As New PdfMetafileLayoutFormat()
- format.Break = PdfLayoutBreakType.FitPage
- format.Layout = PdfLayoutType.Paginate
- doc.PageSettings.Height = result.RenderedImage.Size.Height
- format.SplitTextLines = False
- format.SplitImages = False
- 'Render the PdfMetafile in the PDF document
- result.Render(page, format)
- End If
- End Using
- 'Save the PDF
- doc.Save("Output.pdf")
- 'Close the PDF
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the event
- document.Pages.PageAdded += new PageAddedEventHandler(Pages_PageAdded);
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font with Bold font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, new PointF(10, 10));
- page = document.Pages.Add();
- //Saves the document
- document.Save("Sample.pdf");
- document.Close(true);
- //Event handler for PageAdded event
- void Pages_PageAdded(object sender, PageAddedEventArgs args)
- {
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 10);
- args.Page.Graphics.DrawString("New Page", font, PdfBrushes.Black, new PointF(100, 100));
- }
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the event
- document.Pages.PageAdded += New PageAddedEventHandler(Pages_PageAdded)
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font with Bold font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F, PdfFontStyle.Bold)
- 'Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, New PointF(10, 10))
- page = document.Pages.Add()
- 'Saves the document
- document.Save("Sample.pdf")
- document.Close(True)
- 'Event handler for PageAdded event
- Private Sub Pages_PageAdded(sender As Object, args As PageAddedEventArgs)
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 10)
- args.Page.Graphics.DrawString("New Page", font, PdfBrushes.Black, New PointF(100, 100))
- End Sub
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the event
- document.Pages.PageAdded += new PageAddedEventHandler(Pages_PageAdded);
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font with Bold font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, new PointF(10, 10));
- page = document.Pages.Add();
- //Saves the document
- document.Save("Sample.pdf");
- document.Close(true);
- //Event handler for PageAdded event
- void Pages_PageAdded(object sender, PageAddedEventArgs args)
- {
- PdfPage page = args.Page;
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 10);
- page.Graphics.DrawString("New Page", font, PdfBrushes.Black, new PointF(100, 100));
- }
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the event
- document.Pages.PageAdded += New PageAddedEventHandler(Pages_PageAdded)
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font with Bold font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F, PdfFontStyle.Bold)
- 'Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, New PointF(10, 10))
- page = document.Pages.Add()
- 'Saves the document
- document.Save("Sample.pdf")
- document.Close(True)
- 'Event handler for PageAdded event
- Private Sub Pages_PageAdded(sender As Object, args As PageAddedEventArgs)
- Dim page As PdfPage = args.Page
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 10)
- page.Graphics.DrawString("New Page", font, PdfBrushes.Black, New PointF(100, 100))
- End Sub
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the event
- document.Pages.PageAdded += new PageAddedEventHandler(Pages_PageAdded);
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- //Create font with Bold font style.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
- //Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, new PointF(10, 10));
- page = document.Pages.Add();
- //Saves the document
- document.Save("Sample.pdf");
- document.Close(true);
- //Event handler for PageAdded event
- void Pages_PageAdded(object sender, PageAddedEventArgs args)
- {
- PdfPage page = args.Page;
- PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 10);
- page.Graphics.DrawString("New Page", font, PdfBrushes.Black, new PointF(100, 100));
- }
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the event
- document.Pages.PageAdded += New PageAddedEventHandler(Pages_PageAdded)
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- 'Create font with Bold font style.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12F, PdfFontStyle.Bold)
- 'Draw text in the new page.
- page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, New PointF(10, 10))
- page = document.Pages.Add()
- 'Saves the document
- document.Save("Sample.pdf")
- document.Close(True)
- 'Event handler for PageAdded event
- Private Sub Pages_PageAdded(sender As Object, args As PageAddedEventArgs)
- Dim page As PdfPage = args.Page
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 10)
- page.Graphics.DrawString("New Page", font, PdfBrushes.Black, New PointF(100, 100))
- End Sub
-
-
- //Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
- //Creates a new page and adds it as the last page of the document template
- PdfPageTemplateElement footer = new PdfPageTemplateElement(rect);
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- PdfSolidBrush brush = new PdfSolidBrush(Color.Gray);
- //Create page number field
- PdfPageNumberField pageNumber = new PdfPageNumberField(font, brush);
- //Create page count field
- PdfPageCountField count = new PdfPageCountField(font, brush);
- PdfCompositeField compositeField = new PdfCompositeField(font, brush, "Page {0} of {1}", pageNumber, count);
- compositeField.Bounds = footer.Bounds;
- compositeField.Draw(footer.Graphics, new PointF(40, footer.Height - 50));
- //Add the footer template at the bottom
- doc.Template.Bottom = footer;
- //Save the document
- doc.Save("Template.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Create a PDF document
- Dim doc As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As RectangleF = New RectangleF(0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
- 'Create a page template
- Dim footer As PdfPageTemplateElement = New PdfPageTemplateElement(rect)
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- Dim brush As PdfSolidBrush = New PdfSolidBrush(Color.Gray)
- 'Create page number field
- Dim pageNumber As PdfPageNumberField = New PdfPageNumberField(font, brush)
- 'Create page count field
- Dim count As PdfPageCountField = New PdfPageCountField(font, brush)
- Dim compositeField As PdfCompositeField = New PdfCompositeField(font, brush, "Page {0} of {1}", pageNumber, count)
- compositeField.Bounds = footer.Bounds
- compositeField.Draw(footer.Graphics, New PointF(40, footer.Height - 50))
- 'Add the footer template at the bottom
- doc.Template.Bottom = footer
- doc.Save("Template.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Load the document
- PdfLoadedDocument lDoc = new PdfLoadedDocument("input.pdf");
- //get the first page from the document
- PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
- //Get the annotation collection
- PdfLoadedAnnotationCollection annotations = page.Annotations;
- //Save the document
- lDoc.Save("output.pdf");
- lDoc.Close(true);
-
-
- 'Load the document
- Dim lDoc As New PdfLoadedDocument("input.pdf")
- 'get the first page from the document
- Dim page As PdfLoadedPage = TryCast(lDoc.Pages(0), PdfLoadedPage)
- 'Get the annotation collection
- Dim annotations As PdfLoadedAnnotationCollection = page.Annotations
- 'Save the document
- lDoc.Save("output.pdf")
- lDoc.Close(True)
-
-
- //Load the PDF document
- PdfLoadedDocument doc = new PdfLoadedDocument(@"input.pdf");
- //Create an image instance
- PdfBitmap bmp = new PdfBitmap(@"Autumn Leaves.jpg");
- //Replace the first image in the page.
- doc.Pages[0].ReplaceImage(0, bmp);
- //Save the document
- doc.Save("output.pdf");
- //Close the document
- doc.Close(true);
-
-
- 'Load the PDF document///Dim doc As New PdfLoadedDocument("input.pdf")
- 'Create an image instance
- Dim bmp As New PdfBitmap("Autumn Leaves.jpg")
- 'Replace the first image in the page.
- doc.Pages(0).ReplaceImage(0, bmp)
- 'Save the document
- doc.Save("output.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Load an existing PDF.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileName);
- //Load the page
- PdfLoadedPage loadedPage = loadedDocument.Pages[0] as PdfLoadedPage;
- //Create the template from the page.
- PdfTemplate template = loadedPage.CreateTemplate();
- //Create a new PDF document
- PdfDocument document = new PdfDocument();
- //Set the document margin
- document.PageSettings.SetMargins(2);
- //Add the page
- PdfPage page = document.Pages.Add();
- //Create the graphics
- PdfGraphics graphics = page.Graphics;
- //Draw the template
- graphics.DrawPdfTemplate(template, PointF.Empty,new SizeF(page.Size.Width/2,page.Size.Height));
- //Save the new document.
- document.Save("output.pdf");
- //Close the documents
- loadedDocument.Close(true);
- document.Close(true);
-
-
- 'Load the existing PDF document.
- Dim loadedDocument As New PdfLoadedDocument(fileName)
- 'Load the page
- Dim loadedPage As PdfLoadedPage = TryCast(loadedDocument.Pages(0), PdfLoadedPage)
- 'Create the template from the page.
- Dim template As PdfTemplate = loadedPage.CreateTemplate()
- 'Create a new PDF document
- Dim document As New PdfDocument()
- 'Set the document margin
- document.PageSettings.SetMargins(2)
- 'Add the page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the graphics
- Dim graphics As PdfGraphics = page.Graphics
- 'Draw the template
- graphics.DrawPdfTemplate(template, PointF.Empty, New SizeF(page.Size.Width \ 2, page.Size.Height))
- 'Save the new document.
- document.Save("output.pdf")
- 'Close the documents
- loadedDocument.Close(True)
-
-
- //Load an existing PDF.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileName);
- //Load the first page.
- PdfPageBase page = loadedDocument.Pages[0];
- //Extract text from first page.
- string extractedText = page.ExtractText();
- //Close the document
- loadedDocument.Close(true);
-
-
- 'Load an existing PDF.
- Dim loadedDocument As New PdfLoadedDocument(fileName)
- 'Load the first page.
- Dim page As PdfPageBase = loadedDocument.Pages(0)
- 'Extract the text from first page.
- Dim extractedText As String = page.ExtractText()
- 'close the document.
- loadedDocument.Close(True)
-
-
- //Load an existing PDF.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileName);
- //Load first page.
- PdfPageBase page = loadedDocument.Pages[0];
- //Extract text from first page.
- string extractedTexts = page.ExtractText(true);
- //close the document
- loadedDocument.Close(true);
-
-
- 'Load an existing PDF.
- Dim loadedDocument As New PdfLoadedDocument(fileName)
- 'Load first page.
- Dim page As PdfPageBase = loadedDocument.Pages(0)
- 'Extract text from first page.
- Dim extractedTexts As String = page.ExtractText(True)
- 'close the document
- loadedDocument.Close(True)
-
-
- //Load an existing PDF.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileName);
- //Load an existing PDF.
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileName);
- //Load first page.
- PdfPageBase pageBase = loadedDocument.Pages[0];
- //Extract images from first page.
- Image[] extractedImages = pageBase.ExtractImages();
- //close the document
- loadedDocument.Close(true);
-
-
- 'Load an existing PDF
- Dim loadedDocument As New PdfLoadedDocument(fileName)
- 'Load first page.
- Dim pageBase As PdfPageBase = loadedDocument.Pages(0)
- 'Extract images from first page.
- Dim extractedImages As Image() = pageBase.ExtractImages()
- 'close the document.
- loadedDocument.Close(True)
-
-
- //Load PDF document.
- PdfLoadedDocument document = new PdfLoadedDocument("Input.pdf");
- //Gets ImageInfo from the first page.
- PdfImageInfo[] imageInfo = document.Pages[0].ImagesInfo;
- //Gets the Image Boundary location.
- RectangleF imageBounds = imageInfo[0].Bounds;
- //Gets the Image.
- Image image = imageInfo[0].Image;
- //Gets the Image index.
- int imageIndex = imageInfo[0].Index;
- //Closing the PDF document.
- document.Close(true);
-
-
- 'Load PDF document.
- Dim document As New PdfLoadedDocument("Input.pdf")
- 'Gets ImageInfo from the first page.
- Dim imageInfo As PdfImageInfo() = document.Pages(0).ImagesInfo
- 'Gets the Image Boundary location.
- Dim imageBounds As RectangleF = imageInfo(0).Bounds
- 'Gets the Image.
- Dim image As Image = imageInfo(0).Image
- 'Gets the Image index.
- Dim imageIndex As Integer = imageInfo(0).Index
- 'Closing the PDF document.
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a PDF page
- PdfPage page = document.Pages.Add();
- //Get graphics
- PdfGraphics graphics = page.Graphics;
- //Draw a rectangle
- graphics.DrawRectangle(PdfBrushes.Red, new RectangleF(0, 0, 100, 200));
- //Save and close the document
- document.Save("output.pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Create a PDF page
- Dim page As PdfPage = document.Pages.Add()
- 'Get graphics
- Dim graphics As PdfGraphics = page.Graphics
- 'Draw a rectangle
- graphics.DrawRectangle(PdfBrushes.Red, New RectangleF(0, 0, 100, 200))
- 'Save and close the document
- document.Save("output.pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Add page to the document
- PdfPage page=document.Pages.Add();
- //Get the page layer
- PdfPageLayerCollection angle = page.Layers;
- //Save and close the PDF document
- document.Save("output.Pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Add page to the document
- Dim page As PdfPage = document.Pages.Add()
- 'Get the page layer
- Dim angle As PdfPageLayerCollection = page.Layers
- 'Save and close the PDF document
- document.Save("output.Pdf")
- document.Close(True)
-
-
- //Load the document
- PdfLoadedDocument lDoc = new PdfLoadedDocument("inputAnnotation.pdf");
- //get the first page from the document
- PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
- //Get the annotation collection
- PdfLoadedAnnotationCollection annotations = page.Annotations;
- //Save the document
- lDoc.Save("sample.pdf");
- lDoc.Close(true);
-
-
- 'Load the document
- Dim lDoc As New PdfLoadedDocument("inputAnnotation.pdf")
- 'Get the first page from the document
- Dim page As PdfLoadedPage = TryCast(lDoc.Pages(0), PdfLoadedPage)
- 'Get the annotation collections
- Dim annotations As PdfLoadedAnnotationCollection = page.Annotations
- 'Save the document
- lDoc.Save("sample.pdf")
- lDoc.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a page
- PdfPage page = new PdfPage();
- //Insert page in the document
- document.Pages.Insert(0, page);
- //Get rotation
- PdfPageRotateAngle angle = page.Rotation;
- //Save and close the PDF document
- document.Save("output.Pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Create a page
- Dim page As New PdfPage()
- 'Insert page in the document
- document.Pages.Insert(0, page)
- 'Get rotation
- Dim angle As PdfPageRotateAngle = page.Rotation
- 'Save and close the PDF document
- document.Save("output.Pdf")
- document.Close(True)
-
-
- //Load the document
- PdfLoadedDocument lDoc = new PdfLoadedDocument("inputAnnotation.pdf");
- //get the first page from the document
- PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
- //Get the annotation collection
- PdfLoadedAnnotationCollection annotations = page.Annotations;
- //Save the document
- lDoc.Save("sample.pdf");
- lDoc.Close(true);
-
-
- 'Load the document
- Dim lDoc As New PdfLoadedDocument("inputAnnotation.pdf")
- 'Get the first page from the document
- Dim page As PdfLoadedPage = TryCast(lDoc.Pages(0), PdfLoadedPage)
- 'Get the annotation collections
- Dim annotations As PdfLoadedAnnotationCollection = page.Annotations
- 'Save the document
- lDoc.Save("sample.pdf")
- lDoc.Close(True)
-
-
- //Load the PDF document
- PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
- //Rearrange the page by index
- loadedDocument.Pages.ReArrange(new int[] {1, 0});
- //Save and close the document
- loadedDocument.Save("Output.pdf");
- loadedDocument.Close(true);
-
-
- 'Load the PDF document
- Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
- 'Rearrange the page by index
- loadedDocument.Pages.ReArrange(New Integer() {1, 0})
- 'Save and close the document
- loadedDocument.Save("Output.pdf")
- loadedDocument.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a page
- PdfPage page = new PdfPage();
- //Get annotation collection
- PdfAnnotationCollection annotation = page.Annotations;
- //Get Graphics
- PdfGraphics graphics = page.Graphics;
- //Get page Layers
- PdfPageLayerCollection layers = page.Layers;
- //Get actual page size
- SizeF clientSize = page.GetClientSize();
- //Insert page in the document
- document.Pages.Insert(0, page);
- //Save and close the PDF document
- document.Save("output.Pdf");
- document.Close(true);
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Create a page
- Dim page As New PdfPage()
- 'Get annotation collection
- Dim annotation As PdfAnnotationCollection = page.Annotations
- 'Get Graphics
- Dim graphics As PdfGraphics = page.Graphics
- 'Get page Layers
- Dim layers As PdfPageLayerCollection = page.Layers
- 'Get actual page size
- Dim clientSize As SizeF = page.GetClientSize()
- 'Insert page in the document
- document.Pages.Insert(0, page)
- 'Save and close the PDF document
- document.Save("output.Pdf")
- document.Close(True)
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a page
- PdfPage page = new PdfPage();
- //Insert page in the document
- document.Pages.Insert(0, page);
- //Save and close the PDF document
- document.Save("output.Pdf");
- document.Close(true);
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Create a page
- Dim page As New PdfPage()
- 'Insert page in the document
- document.Pages.Insert(0, page)
- 'Save and close the PDF document
- document.Save("output.Pdf")
- document.Close(True)
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a page
- PdfPage page = new PdfPage();
- //Insert page in the document
- document.Pages.Insert(0, page);
- //Get size of the page
- SizeF size = page.GetClientSize();
- //Save and close the PDF document
- document.Save("output.Pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Create a page
- Dim page As New PdfPage()
- 'Insert page in the document
- document.Pages.Insert(0, page)
- 'Get size of the page
- Dim size As SizeF = page.GetClientSize()
- 'Save and close the PDF document
- document.Save("output.Pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a page
- PdfPage page = new PdfPage();
- //Insert page in the document
- document.Pages.Insert(0, page);
- //Get Section of a page
- PdfSection section = page.Section;
- //Save and close the PDF document
- document.Save("output.Pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Create a page
- Dim page As New PdfPage()
- 'Insert page in the document
- document.Pages.Insert(0, page)
- 'Get Section of a page
- Dim section As PdfSection = page.Section
- 'Save and close the PDF document
- document.Save("output.Pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a page
- PdfPage page = new PdfPage();
- //Insert page in the document
- document.Pages.Insert(0, page);
- //Get size of a page
- SizeF size = page.Size;
- //Save and close the PDF document
- document.Save("output.Pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Create a page
- Dim page As New PdfPage()
- 'Insert page in the document
- document.Pages.Insert(0, page)
- 'Get size of a page
- Dim size As SizeF = page.Size
- 'Save and close the PDF document
- document.Save("output.Pdf")
- document.Close(True)
-
-
- //Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a page
- PdfPage page = new PdfPage();
- //Insert page in the document
- document.Pages.Insert(0, page);
- //Get annotation collection
- PdfAnnotationCollection annotation = page.Annotations;
- //Save and close the PDF document
- document.Save("output.Pdf");
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As New PdfDocument()
- 'Create a page
- Dim page As New PdfPage()
- 'Insert page in the document
- document.Pages.Insert(0, page)
- 'Get annotation collection
- Dim annotation As PdfAnnotationCollection = page.Annotations
- 'Save and close the PDF document
- document.Save("output.Pdf")
- document.Close(True)
-
-
- //Create PDF document.
- PdfDocument document = new PdfDocument();
- PdfPage page = document.Pages.Add();
- //Add the first layer.
- PdfPageLayer layer = page.Layers.Add("Layer1");
- PdfGraphics graphics = layer.Graphics;
- graphics.TranslateTransform(100, 60);
- //Draw arc.
- PdfPen pen = new PdfPen(System.Drawing.Color.Red, 50);
- RectangleF bounds = new RectangleF(0, 0, 50, 50);
- graphics.DrawArc(pen, bounds, 360, 360);
- //Add another layer on the page.
- PdfPageLayer layer2 = page.Layers.Add("Layer2");
- graphics = layer2.Graphics;
- graphics.TranslateTransform(100, 180);
- //Draw ellipse.
- graphics.DrawEllipse(pen, bounds);
- //Save the document.
- document.Save("Sample.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create PDF document.
- Dim document As New PdfDocument()
- Dim page As PdfPage = document.Pages.Add()
- 'Add the first layer.
- Dim layer As PdfPageLayer = page.Layers.Add("Layer1")
- Dim graphics As PdfGraphics = layer.Graphics
- graphics.TranslateTransform(100, 60)
- 'Draw arc.
- Dim pen As New PdfPen(System.Drawing.Color.Red, 50)
- Dim bounds As New RectangleF(0, 0, 50, 50)
- graphics.DrawArc(pen, bounds, 360, 360)
- 'Add another layer on the page.
- Dim layer2 As PdfPageLayer = page.Layers.Add("Layer2")
- graphics = layer2.Graphics
- graphics.TranslateTransform(100, 180)
- 'Draw ellipse.
- graphics.DrawEllipse(pen, bounds)
- 'Save the document.
- document.Save("Sample.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create PDF document.
- PdfDocument document = new PdfDocument();
- PdfPage page = document.Pages.Add();
- //Add the first layer.
- PdfPageLayer layer = page.Layers.Add("Layer1");
- PdfGraphics graphics = layer.Graphics;
- graphics.TranslateTransform(100, 60);
- //Draw arc.
- PdfPen pen = new PdfPen(System.Drawing.Color.Red, 50);
- RectangleF bounds = new RectangleF(0, 0, 50, 50);
- graphics.DrawArc(pen, bounds, 360, 360);
- //Add another layer on the page.
- PdfPageLayer layer2 = page.Layers.Add("Layer2");
- graphics = layer2.Graphics;
- graphics.TranslateTransform(100, 180);
- //Draw ellipse.
- graphics.DrawEllipse(pen, bounds);
- //Save the document.
- document.Save("Sample.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create PDF document.
- Dim document As New PdfDocument()
- Dim page As PdfPage = document.Pages.Add()
- 'Add the first layer.
- Dim layer As PdfPageLayer = page.Layers.Add("Layer1")
- Dim graphics As PdfGraphics = layer.Graphics
- graphics.TranslateTransform(100, 60)
- 'Draw arc.
- Dim pen As New PdfPen(System.Drawing.Color.Red, 50)
- Dim bounds As New RectangleF(0, 0, 50, 50)
- graphics.DrawArc(pen, bounds, 360, 360)
- 'Add another layer on the page.
- Dim layer2 As PdfPageLayer = page.Layers.Add("Layer2")
- graphics = layer2.Graphics
- graphics.TranslateTransform(100, 180)
- 'Draw ellipse.
- graphics.DrawEllipse(pen, bounds)
- 'Save the document.
- document.Save("Sample.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new document
- PdfDocument doc = new PdfDocument();
- //Set page settings
- doc.PageSettings.Orientation = PdfPageOrientation.Landscape;
- doc.PageSettings.Rotate = PdfPageRotateAngle.RotateAngle180;
- //Create a new page
- PdfPage page = doc.Pages.Add();
- doc.Save("output.pdf");
- doc.Close(true);
-
-
- 'Create a new document
- Dim doc As New PdfDocument()
- 'Set page settings
- doc.PageSettings.Orientation = PdfPageOrientation.Landscape
- doc.PageSettings.Rotate = PdfPageRotateAngle.RotateAngle180
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- doc.Save("output.pdf")
- doc.Close(True)
-
-
- //Create a new document
- PdfDocument doc = new PdfDocument();
- doc.ViewerPreferences.PageMode = PdfPageMode.FullScreen;
- //create a page transition
- PdfPageTransition transition = new PdfPageTransition();
- transition.Direction = PdfTransitionDirection.TopLeftToBottomRight;
- transition.Dimension = PdfTransitionDimension.Vertical;
- transition.Motion = PdfTransitionMotion.Outward;
- transition.PageDuration = 3;
- doc.PageSettings.Transition = transition;
- //Create a new page
- PdfPage page = doc.Pages.Add();
- doc.Save("output.pdf");
- doc.Close(true);
-
-
- 'Create a new document
- Dim doc As New PdfDocument()
- doc.ViewerPreferences.PageMode = PdfPageMode.FullScreen
- 'create a page transition
- Dim transition As New PdfPageTransition()
- transition.Direction = PdfTransitionDirection.TopLeftToBottomRight
- transition.Dimension = PdfTransitionDimension.Vertical
- transition.Motion = PdfTransitionMotion.Outward
- transition.PageDuration = 3
- doc.PageSettings.Transition = transition
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- doc.Save("output.pdf")
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Get the document section collection
- PdfSectionCollection sections = document.Sections;
- //Add the section
- PdfSection section = sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Set the font.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
- //Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Get the document section collection
- Dim sections As PdfSectionCollection = document.Sections
- 'Add the section
- Dim section As PdfSection = sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Set the font.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 20)
- 'Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Get the page collection from a section
- PdfSectionPageCollection pageCollection = document.Sections[0].Pages;
- //Add the page
- PdfPage page = pageCollection.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Set the font.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
- //Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Get the page collection from a section
- Dim pageCollection As PdfSectionPageCollection = document.Sections(0).Pages
- 'Add the page
- Dim page As PdfPage = pageCollection.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Set the font.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 20)
- 'Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Create the page label
- PdfPageLabel label = new PdfPageLabel();
- label.NumberStyle = PdfNumberStyle.LowerRoman;
- label.StartNumber = 2;
- section.PageLabel = label;
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Set the font.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
- //Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Create the page label
- Dim label As New PdfPageLabel()
- label.NumberStyle = PdfNumberStyle.LowerRoman
- label.StartNumber = 2
- section.PageLabel = label
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Set the font.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 20)
- 'Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Add another section
- PdfSection section1 = document.Sections.Add();
- //Add the pages to section1
- PdfPage page1 = section1.Pages.Add();
- //Set the page settings
- section.PageSettings.Orientation = PdfPageOrientation.Landscape;
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Set the font.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
- //Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Add another section
- Dim section1 As PdfSection = document.Sections.Add()
- 'Add the pages to section1
- Dim page1 As PdfPage = section1.Pages.Add()
- 'Set the page settings
- section.PageSettings.Orientation = PdfPageOrientation.Landscape
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Set the font.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 20)
- 'Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Create a header and draw the image.
- RectangleF bounds = new RectangleF(0, 0, document.Pages[0].GetClientSize().Width, 50);
- PdfSectionTemplate template = new PdfSectionTemplate();
- template.ApplyDocumentTopTemplate = true;
- //Create a page template
- PdfPageTemplateElement header = new PdfPageTemplateElement(bounds);
- PdfImage image = new PdfBitmap(@"Input.jpg");
- //Draw the image in the header.
- header.Graphics.DrawImage(image, bounds);
- template.Top = header;
- //Add the header at the top of the section
- section.Template = template;
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Create a header and draw the image.
- Dim bounds As New RectangleF(0, 0, document.Pages(0).GetClientSize().Width, 50)
- Dim template As New PdfSectionTemplate()
- template.ApplyDocumentTopTemplate = True
- 'Create a page template
- Dim header As New PdfPageTemplateElement(bounds)
- Dim image As PdfImage = New PdfBitmap("Input.jpg")
- 'Draw the image in the header.
- header.Graphics.DrawImage(image, bounds)
- template.Top = header
- 'Add the header at the top of the section
- section.Template = template
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Get the document section collection
- PdfSectionCollection sections = document.Sections;
- //Add the section
- PdfSection section = sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Set the font.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
- //Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Get the document section collection
- Dim sections As PdfSectionCollection = document.Sections
- 'Add the section
- Dim section As PdfSection = sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Set the font.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 20)
- 'Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Add another section
- PdfSection section1 = document.Sections.Add();
- //Add the pages to section1
- PdfPage page1 = section1.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Set the font.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
- //Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Add another section
- Dim section1 As PdfSection = document.Sections.Add()
- 'Add the pages to section1
- Dim page1 As PdfPage = section1.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Set the font.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 20)
- 'Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Add another section
- PdfSection section1 = document.Sections.Add();
- //Add pages to the section1
- PdfPage page1 = section1.Pages.Add();
- //Get the index of the specified section
- int index = document.Sections.IndexOf(section);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Add another section
- Dim section1 As PdfSection = document.Sections.Add()
- 'Add pages to the section1
- Dim page1 As PdfPage = section1.Pages.Add()
- 'Get the index of the specified section
- Dim index As Integer = document.Sections.IndexOf(section)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Add the section
- PdfSection section1 = document.Sections.Add();
- //Add pages to the section1
- PdfPage page1 = section1.Pages.Add();
- //insert the section at specified index
- document.Sections.Insert(0, section1);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Add the section
- Dim section1 As PdfSection = document.Sections.Add()
- 'Add pages to the section1
- Dim page1 As PdfPage = section1.Pages.Add()
- 'insert the section at specified index
- document.Sections.Insert(0, section1)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Add the section
- PdfSection section1 = document.Sections.Add();
- //Add pages to the section1
- PdfPage page1 = section1.Pages.Add();
- //Check whether the specified section is in the collection
- bool isExists = document.Sections.Contains(section1);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Add the section
- Dim section1 As PdfSection = document.Sections.Add()
- 'Add pages to the section1
- Dim page1 As PdfPage = section1.Pages.Add()
- 'Check whether the specified section is in the collection
- Dim isExists As Boolean = document.Sections.Contains(section1)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section1
- PdfPage page = section.Pages.Add();
- //Get the section from collection
- PdfSection section2 = document.Sections[0];
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section1
- Dim page As PdfPage = section.Pages.Add()
- 'Get the section from collection
- Dim section2 As PdfSection = document.Sections(0)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Add another section
- PdfSection section1 = document.Sections.Add();
- //Add pages to the section1
- PdfPage page1 = section1.Pages.Add();
- //Get the sections count
- int count = document.Sections.Count;
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Add another section
- Dim section1 As PdfSection = document.Sections.Add()
- 'Add pages to the section1
- Dim page1 As PdfPage = section1.Pages.Add()
- 'Get the sections count
- Dim count As Integer = document.Sections.Count
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Get the page collection from a section
- PdfSectionPageCollection pageCollection = document.Sections[0].Pages;
- //Add the page
- PdfPage page = pageCollection.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Set the font.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
- //Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Get the page collection from a section
- Dim pageCollection As PdfSectionPageCollection = document.Sections(0).Pages
- 'Add the page
- Dim page As PdfPage = pageCollection.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Set the font.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 20)
- 'Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Add the section
- PdfSection section1 = document.Sections.Add();
- //Add pages to the section1
- PdfPage page1 = section1.Pages.Add();
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Set the font.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
- //Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Add the section
- Dim section1 As PdfSection = document.Sections.Add()
- 'Add pages to the section1
- Dim page1 As PdfPage = section1.Pages.Add()
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Set the font.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 20)
- 'Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Create a new pdf page
- PdfPage page = new PdfPage();
- //Add the page into section
- document.Sections[0].Pages.Add(page);
- //Create PDF graphics for the page
- PdfGraphics graphics = page.Graphics;
- //Set the font.
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
- //Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Create a new pdf page
- Dim page As New PdfPage()
- 'Add the page into section
- document.Sections(0).Pages.Add(page)
- 'Create PDF graphics for the page
- Dim graphics As PdfGraphics = page.Graphics
- 'Set the font.
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 20)
- 'Draw the text.
- graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Create a page
- PdfPage page1 = new PdfPage();
- //Insert a page at specified index
- document.Sections[0].Pages.Insert(0, page);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Create a page
- Dim page1 As New PdfPage()
- 'Insert a page at specified index
- document.Sections(0).Pages.Insert(0, page)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Add the section
- PdfSection section1 = document.Sections.Add();
- //Add pages to the section1
- PdfPage page1 = section1.Pages.Add();
- //check whether the specified page is in collection
- bool isExists = document.Sections[0].Pages.Contains(page1);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Add the section
- Dim section1 As PdfSection = document.Sections.Add()
- 'Add pages to the section1
- Dim page1 As PdfPage = section1.Pages.Add()
- 'check whether the specified page is in collection
- Dim isExists As Boolean = document.Sections(0).Pages.Contains(page1)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Add the section
- PdfSection section1 = document.Sections.Add();
- //Add pages to the section1
- PdfPage page1 = section1.Pages.Add();
- //Remove the page at specified index
- document.Sections[0].Pages.RemoveAt(0);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Add the section
- Dim section1 As PdfSection = document.Sections.Add()
- 'Add pages to the section1
- Dim page1 As PdfPage = section1.Pages.Add()
- 'Remove the page at specified index
- document.Sections(0).Pages.RemoveAt(0)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Add the section
- PdfSection section1 = document.Sections.Add();
- //Add pages to the section1
- PdfPage page1 = section1.Pages.Add();
- //Get the page count in a section
- int count = document.Sections[0].Pages.Count;
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Add the section
- Dim section1 As PdfSection = document.Sections.Add()
- 'Add pages to the section1
- Dim page1 As PdfPage = section1.Pages.Add()
- 'Get the page count in a section
- Dim count As Integer = document.Sections(0).Pages.Count
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add the section
- PdfSection section = document.Sections.Add();
- //Add pages to the section
- PdfPage page = section.Pages.Add();
- //Create a header and draw the image.
- RectangleF bounds = new RectangleF(0, 0, document.Pages[0].GetClientSize().Width, 50);
- PdfSectionTemplate template = new PdfSectionTemplate();
- template.ApplyDocumentTopTemplate = true;
- //Create a page template
- PdfPageTemplateElement header = new PdfPageTemplateElement(bounds);
- PdfImage image = new PdfBitmap(@"Input.jpg");
- //Draw the image in the header.
- header.Graphics.DrawImage(image, bounds);
- template.Top = header;
- //Add the header at the top of the section
- section.Template = template;
- //Save the document.
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add the section
- Dim section As PdfSection = document.Sections.Add()
- 'Add pages to the section
- Dim page As PdfPage = section.Pages.Add()
- 'Create a header and draw the image.
- Dim bounds As New RectangleF(0, 0, document.Pages(0).GetClientSize().Width, 50)
- Dim template As New PdfSectionTemplate()
- template.ApplyDocumentTopTemplate = True
- 'Create a page template
- Dim header As New PdfPageTemplateElement(bounds)
- Dim image As PdfImage = New PdfBitmap("Input.jpg")
- 'Draw the image in the header.
- header.Graphics.DrawImage(image, bounds)
- template.Top = header
- 'Add the header at the top of the section
- section.Template = template
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
-
-
- //Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Create a page
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
- //Create a page template
- PdfPageTemplateElement footer = new PdfPageTemplateElement(rect);
- //set the dock style
- footer.Dock = PdfDockStyle.Right;
- //Set the template alignment as top right
- footer.Alignment = PdfAlignmentStyle.TopRight;
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- PdfSolidBrush brush = new PdfSolidBrush(Color.Gray);
- //Create page number field
- PdfPageNumberField pageNumber = new PdfPageNumberField(font, brush);
- //Create page count field
- PdfPageCountField count = new PdfPageCountField(font, brush);
- PdfCompositeField compositeField = new PdfCompositeField(font, brush, "Page {0} of {1}", pageNumber, count);
- compositeField.Bounds = footer.Bounds;
- compositeField.Draw(footer.Graphics, new PointF(40, footer.Height - 50));
- //Add the footer template at the bottom
- doc.Template.Right = footer;
- doc.Save("Template.pdf");
- doc.Close(true);
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As New RectangleF(0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
- 'Create a page template
- Dim footer As New PdfPageTemplateElement(rect)
- 'set the dock style
- footer.Dock = PdfDockStyle.Right
- 'Set the template alignment as top right
- footer.Alignment = PdfAlignmentStyle.TopRight
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- Dim brush As New PdfSolidBrush(Color.Gray)
- 'Create page number field
- Dim pageNumber As New PdfPageNumberField(font, brush)
- 'Create page count field
- Dim count As New PdfPageCountField(font, brush)
- Dim compositeField As New PdfCompositeField(font, brush, "Page {0} of {1}", pageNumber, count)
- compositeField.Bounds = footer.Bounds
- compositeField.Draw(footer.Graphics, New PointF(40, footer.Height - 50))
- 'Add the footer template at the bottom
- doc.Template.Right = footer
- doc.Save("Template.pdf")
- doc.Close(True)
-
-
- //Create a PDF document
- PdfDocument doc = new PdfDocument();
- //Create a page
- PdfPage page = doc.Pages.Add();
- RectangleF rect = new RectangleF(0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
- //Create a page template
- PdfPageTemplateElement footer = new PdfPageTemplateElement(rect);
- //set the dock style
- footer.Dock = PdfDockStyle.Right;
- //Set the template alignment as top right
- footer.Alignment = PdfAlignmentStyle.TopRight;
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- PdfSolidBrush brush = new PdfSolidBrush(Color.Gray);
- //Create page number field
- PdfPageNumberField pageNumber = new PdfPageNumberField(font, brush);
- //Create page count field
- PdfPageCountField count = new PdfPageCountField(font, brush);
- PdfCompositeField compositeField = new PdfCompositeField(font, brush, "Page {0} of {1}", pageNumber, count);
- compositeField.Bounds = footer.Bounds;
- compositeField.Draw(footer.Graphics, new PointF(40, footer.Height - 50));
- //Add the footer template at the bottom
- doc.Template.Right = footer;
- doc.Save("Template.pdf");
- doc.Close(true);
-
-
- 'Create a PDF document
- Dim doc As New PdfDocument()
- 'Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim rect As New RectangleF(0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
- 'Create a page template
- Dim footer As New PdfPageTemplateElement(rect)
- 'set the dock style
- footer.Dock = PdfDockStyle.Right
- 'Set the template alignment as top right
- footer.Alignment = PdfAlignmentStyle.TopRight
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- Dim brush As New PdfSolidBrush(Color.Gray)
- 'Create page number field
- Dim pageNumber As New PdfPageNumberField(font, brush)
- 'Create page count field
- Dim count As New PdfPageCountField(font, brush)
- Dim compositeField As New PdfCompositeField(font, brush, "Page {0} of {1}", pageNumber, count)
- compositeField.Bounds = footer.Bounds
- compositeField.Draw(footer.Graphics, New PointF(40, footer.Height - 50))
- 'Add the footer template at the bottom
- doc.Template.Right = footer
- doc.Save("Template.pdf")
- doc.Close(True)
-
-
- //Load an existing PDF document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Get the annotation collection.
- PdfLoadedAnnotationCollection annotationCollection=document.Pages[1].Annotations;
- //Get the sound annotation.
- PdfLoadedSoundAnnotation soundAnnotation = annotationCollection.Annotations[5] as PdfLoadedSoundAnnotation;
- //Set the sound annotation border.
- soundAnnotation.Border.Width = 4;
- soundAnnotation.Border.HorizontalRadius = 20;
- soundAnnotation.Border.VerticalRadius = 30;
- //Set the PDF sound.
- PdfSound sound = new PdfSound("Startup.wav");
- soundAnnotation.Sound=sound;
- //Save the document.
- document.Save("SoundAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing PDF document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation collection.
- Dim annotationCollection As PdfLoadedAnnotationCollection = document.Pages[1].Annotations
- 'Get the PDF sound annotation.
- Dim soundAnnotation As PdfLoadedSoundAnnotation = dannotationCollection.Annotations(5) as PdfLoadedSoundAnnotation
- 'Set the sound annotation border.
- soundAnnotation.Border.Width = 4
- soundAnnotation.Border.HorizontalRadius = 20
- soundAnnotation.Border.VerticalRadius = 30
- 'Set the PDF sound.
- Dim sound As PdfSound = New PdfSound("Startup.wav")
- soundAnnotation.Sound=sound
- 'Save the document.
- document.Save("SoundAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Get the annotation collection
- PdfLoadedAnnotationCollection annotationCollection=document.Pages[1].Annotations;
- //Create a new rectangle
- RectangleF rectangle = new RectangleF(10, 40, 30, 30);
- //Create a new Uri Annotation.
- PdfUriAnnotation uriAnnotation = new PdfUriAnnotation(rectangle, "http://www.google.com");
- //Set Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation";
- annotationCollection.Add(uriAnnotation);
- //Save the document.
- document.Save("SoundAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Get the annotation collection
- Dim annotationCollection As PdfLoadedAnnotationCollection = document.Pages[1].Annotations
- 'Create a new rectangle
- Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
- 'Create a new Uri Annotation.
- Dim uriAnnotation As PdfUriAnnotation = New PdfUriAnnotation(rectangle, "http://www.google.com")
- 'Set the Text to uriAnnotation.
- uriAnnotation.Text = "Uri Annotation"
- annotationCollection.Add(uriAnnotation)
- 'Save the document.
- document.Save("SoundAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Get the annotation collection.
- PdfLoadedAnnotationCollection annotationCollection=document.Pages[1].Annotations;
- //Get the PDF sound annotation.
- PdfLoadedSoundAnnotation soundAnnotation = annotationCollection.Annotations[5] as PdfLoadedSoundAnnotation;
- //Set the sound annotation border
- soundAnnotation.Border.Width = 4;
- //Save the document.
- document.Save("SoundAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Get the annotation from loaded document.
- Dim annotationCollection As PdfLoadedAnnotationCollection = document.Pages[1].Annotations
- 'Get the PDF sound annotation.
- Dim soundAnnotation As PdfLoadedSoundAnnotation = dannotationCollection.Annotations(5) as PdfLoadedSoundAnnotation
- 'Set the sound annotation border.
- soundAnnotation.Border.Width = 4
- 'Save the document.
- document.Save("SoundAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Get the annotation collection.
- PdfLoadedAnnotationCollection annotationCollection=document.Pages[1].Annotations;\
- 'Get the pfd sound annotation.
- PdfLoadedSoundAnnotation soundAnnotation = annotationCollection.Annotations["SoundAnnotation"] as PdfLoadedSoundAnnotation;
- //Set the sound annotation border
- soundAnnotation.Border.Width = 4;
- //Save the document.
- document.Save("SoundAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Get the annotation collection.
- Dim annotationCollection As PdfLoadedAnnotationCollection = document.Pages[1].Annotations
- 'Get the pfd sound annotation.
- Dim soundAnnotation As PdfLoadedSoundAnnotation = dannotationCollection.Annotations("SoundAnnotation") as PdfLoadedSoundAnnotation
- 'Set the sound annotation border
- soundAnnotation.Border.Width = 4
- 'Save the document.
- document.Save("SoundAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Get the annotation collection
- PdfLoadedAnnotationCollection annotationCollection=document.Pages[1].Annotations;
- //Get the PDF sound annotation.
- PdfLoadedSoundAnnotation soundAnnotation = annotationCollection.Annotations[5] as PdfLoadedSoundAnnotation;
- 'Get the sound PDF loaded page.
- PdfLoadedPage page =soundAnnotation.Page;
- //Save the document.
- document.Save("SoundAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Get the annotation collection
- Dim annotationCollection As PdfLoadedAnnotationCollection = document.Pages[1].Annotations
- 'Get the PDF sound annotation.
- Dim soundAnnotation As PdfLoadedSoundAnnotation = dannotationCollection.Annotations(5) as PdfLoadedSoundAnnotation
- 'Get the PDF loaded page.
- Dim page As PdfLoadedPage=soundAnnotation.Page
- 'Save the document.
- document.Save("SoundAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing PDF document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Get the annotation from loaded document.
- PdfLoadedAttachmentAnnotation attchmentAnnotation = document.Pages[1].Annotations[3] as PdfLoadedAttachmentAnnotation;
- //Get the annotation flags
- PdfAnnotationFlags flag = attchmentAnnotation.AnnotationFlags;
- //Get the attachment annotation border.
- PdfAnnotationBorder border = attchmentAnnotation.Border;
- //Save the document.
- document.Save("LoadedAttachmentAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Get the annotation from loaded document.
- Dim attchmentAnnotation As PdfLoadedAttachmentAnnotation = document.Pages(1).Annotations(3) as PdfLoadedAttachmentAnnotation
- 'Get the annotation flags
- Dim flag As PdfAnnotationFlags = attchmentAnnotation.AnnotationFlags
- 'Get the attachment annotation border.
- Dim border As PdfAnnotationBorder = attchmentAnnotation.Border
- 'Save the document.
- document.Save("LoadedAttachmentAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing PDF document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Get the annotation from loaded document.
- PdfLoadedAttachmentAnnotation attchmentAnnotation = document.Pages[1].Annotations[3] as PdfLoadedAttachmentAnnotation;
- attchmentAnnotation.Icon=PdfAttachmentIcon.PushPin;
- //Save the document.
- document.Save("LoadedAttachmentAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Get the annotation from loaded document.
- Dim attchmentAnnotation As PdfLoadedAttachmentAnnotation = document.Pages(1).Annotations(3) as PdfLoadedAttachmentAnnotation
- attchmentAnnotation.Icon=PdfAttachmentIcon.PushPin
- 'Save the document.
- document.Save("LoadedAttachmentAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing PDF document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Get the annotation from loaded document.
- PdfLoadedAttachmentAnnotation attchmentAnnotation = document.Pages[1].Annotations[3] as PdfLoadedAttachmentAnnotation;
- //Get the attached file name
- string fileName = attchmentAnnotation.FileName;
- //Save and close the document.
- document.Save("LoadedAttachmentAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing PDF document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Get the annotation from loaded document.
- Dim attchmentAnnotation As PdfLoadedAttachmentAnnotation = TryCast(document.Pages(1).Annotations(3), PdfLoadedAttachmentAnnotation)
- 'Get the attached file name
- Dim fileName As String = attchmentAnnotation.FileName
- 'Save and close the document.
- document.Save("LoadedAttachmentAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedDocumentLinkAnnotation documentLinkAnnotation = document.Pages[1].Annotations[4] as PdfLoadedDocumentLinkAnnotation;
- //Gets the annotation flags
- PdfAnnotationFlags flag = attchmentAnnotation.AnnotationFlags;
- //Sets the PDF destination.
- documentLinkAnnotation.Destination = new PdfDestination(document.Pages[0], new PointF(10, 10));
- //Gets the document link annotation border.
- PdfAnnotationBorder border = documentLinkAnnotation.Border;
- //Gets the document link annotation bounds.
- RectangleF rectangle = documentLinkAnnotation.Bounds;
- //Gets the document link annotation color.
- PdfColor color = documentLinkAnnotation.Color;
- //Gets the document link annotation location.
- PointF point = documentLinkAnnotation.Location;
- //Gets the document link annotation size.
- SizeF size = documentLinkAnnotation.Size;
- //Gets the document link annotation text.
- string text = documentLinkAnnotation.Text;
- //Save the document.
- document.Save("documentLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim documentLinkAnnotation As PdfLoadedDocumentLinkAnnotation = document.Pages(1).Annotations(4) as PdfLoadedDocumentLinkAnnotation
- 'Sets the destination.
- documentLinkAnnotation.Destination = New PdfDestination(document.Pages[0], New PointF(10, 10));
- 'Gets the annotation flags
- Dim flag As PdfAnnotationFlags = documentLinkAnnotation.AnnotationFlags
- 'Gets the document link annotation border.
- Dim border As PdfAnnotationBorder = documentLinkAnnotation.Border
- 'Gets the document link annotation bounds.
- Dim rectangle As RectangleF = documentLinkAnnotation.Bounds
- 'Gets the document link annotation color.
- Dim color As PdfColor = documentLinkAnnotation.Color
- 'Gets the document link annotation location.
- Dim point As PointF = documentLinkAnnotation.Location
- 'Gets the document link annotation size.
- Dim size As SizeF = documentLinkAnnotation.Size
- 'Gets the document link annotation text.
- Dim text As string = documentLinkAnnotation.Text
- 'Save the document.
- document.Save("documentLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedDocumentLinkAnnotation documentLinkAnnotation = document.Pages[1].Annotations[4] as PdfLoadedDocumentLinkAnnotation;
- //Gets the annotation flags
- PdfAnnotationFlags flag = attchmentAnnotation.AnnotationFlags;
- //Sets the destination.
- documentLinkAnnotation.Destination = new PdfDestination(document.Pages[0], new PointF(10, 10));
- //Save the document.
- document.Save("documentLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim documentLinkAnnotation As PdfLoadedDocumentLinkAnnotation = document.Pages(1).Annotations(4) as PdfLoadedDocumentLinkAnnotation
- 'Sets the destination.
- documentLinkAnnotation.Destination = New PdfDestination(document.Pages[0], New PointF(10, 10));
- 'Save the document.
- document.Save("documentLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
- //Gets the annotation flags
- PdfAnnotationFlags flag = attchmentAnnotation.AnnotationFlags;
- //Sets the file name.
- fileLinkAnnotation.FileName = @"..\..\Data\Manual.txt";
- //Gets the file link annotation border.
- PdfAnnotationBorder border = fileLinkAnnotation.Border;
- //Gets the file link annotation bounds.
- RectangleF rectangle = fileLinkAnnotation.Bounds;
- //Gets the file link annotation bounds.
- PdfColor color = fileLinkAnnotation.Color;
- //Gets the file link annotation location.
- PointF point = fileLinkAnnotation.Location;
- //Gets the file link annotation size.
- SizeF size = fileLinkAnnotation.Size;
- //Gets the file link annotation text.
- string text = fileLinkAnnotation.Text;
- //Save the document.
- document.Save("fileLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
- 'Sets the file name.
- fileLinkAnnotation.FileName = "..\..\Data\Manual.txt"
- 'Gets the annotation flags
- Dim flag As PdfAnnotationFlags = fileLinkAnnotation.AnnotationFlags
- 'Gets the file link annotation border.
- Dim border As PdfAnnotationBorder = fileLinkAnnotation.Border
- 'Gets the file link annotation bounds.
- Dim rectangle As RectangleF = fileLinkAnnotation.Bounds
- 'Gets the file link annotation bounds.
- Dim color As PdfColor = fileLinkAnnotation.Color
- 'Gets the file link annotation location.
- Dim point As PointF = fileLinkAnnotation.Location
- 'Gets the file link annotation size.
- Dim size As SizeF = fileLinkAnnotation.Size
- 'Gets the file link annotation text.
- Dim text As string = fileLinkAnnotation.Text
- 'Save the document.
- document.Save("fileLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
- //Gets the annotation flags
- PdfAnnotationFlags flag = attchmentAnnotation.AnnotationFlags;
- //Sets the file name.
- fileLinkAnnotation.FileName = @"..\..\Data\Manual.txt";
- //Gets the file link annotation border.
- //Save the document.
- document.Save("fileLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
- 'Sets the file name.
- fileLinkAnnotation.FileName = "..\..\Data\Manual.txt"
- 'Save the document.
- document.Save("fileLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedFileLinkAnnotation linkAnnotation = lDoc.Pages[1].Annotations[2] as PdfLoadedFileLinkAnnotation;
- //Assign DestinationArray[pagenumber,xaxis,yaxis]
- int[] array = new int[3] { 2, 750, 0 };
- linkAnnotation.DestinationArray = array;
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim linkAnnotation As PdfLoadedFileLinkAnnotation = lDoc.Pages(1).Annotations(2) as PdfLoadedFileLinkAnnotation
- 'Assign DestinationArray[pagenumber,xaxis,yaxis]
- Dim array As Integer() = New Integer(2) {2, 750, 0}
- linkAnnotation.DestinationArray = array
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Load the existing Page on document
- PdfLoadedPage lPage = document.Pages[0] as PdfLoadedPage;
- //load the annotation collection on this page
- PdfLoadedAnnotationCollection collection = lPage.Annotations;
- //Get the Annotation from the loaded page
- PdfLoadedFreeTextAnnotation free = collection[0] as PdfLoadedFreeTextAnnotation;
- //Get the Annotation position
- RectangleF rectangle = free.Bounds;
- //Set a new position
- free.Bounds = new RectangleF(200, 100, 150, 50);
- //Set Annotation Border
- free.Border= new PdfAnnotationBorder(3f);
- //save the document
- document.save("FreetextAnnotation.pdf");
- document.Close(true);
-
-
- //Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- //Load the existing Page on document
- Dim lPage As PdfLoadedPage = document.Pages(0) as PdfLoadedPage
- //load the annotation collection on this page
- Dim collection As PdfLoadedAnnotationCollection = lPage.Annotations;
- //Get the Annotation from the loaded page
- Dim free As PdfLoadedFreeTextAnnotation = collection(0) as PdfLoadedFreeTextAnnotation;
- //Get the Annotation position
- Dim rectangle As RectangleF = free.Bounds;
- //Set a new position
- free.Bounds = new RectangleF(200, 100, 150, 50);
- //Set Annotation Border
- free.Border= new PdfAnnotationBorder(3f);
- //save the document
- document.save("FreetextAnnotation.pdf");
- document.Close(True)
-
-
- //Load a PDF document.
- PdfLoadedDocument document = new PdfLoadedDocument("InkAnnot.pdf");
- //Load a page
- PdfLoadedPage page = document.Pages[0] as PdfLoadedPage;
- //Load a ink annotation
- PdfLoadedInkAnnotation inkAnnotation = page.Annotations[2] as PdfLoadedInkAnnotation;
- List(float) linePoints = new List(float) { 40, 300, 60, 100, 40, 50, 40, 300 };
- //Set the line points
- inkAnnotation.InkList = linePoints;
- inkAnnotation.Color = new PdfColor(Color.Red);
- //Save the document to disk.
- document.Save("InkAnnot.pdf");
- document.Close(true);
-
-
- 'Load a PDF document.
- Dim document As New PdfLoadedDocument("InkAnnot.pdf")
- 'Load a page
- Dim page As PdfLoadedPage = TryCast(document.Pages(0), PdfLoadedPage)
- 'Load a ink annotation
- Dim inkAnnotation As PdfLoadedInkAnnotation = TryCast(page.Annotations(2), PdfLoadedInkAnnotation)
- Dim linePoints As New List(Of Single)() From {40, 300, 60, 100, 40, 50, 40,300}
- 'Set the line points
- inkAnnotation.InkList = linePoints
- inkAnnotation.Color = New PdfColor(Color.Red)
- 'Save the document to disk.
- document.Save("InkAnnot.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
- int[] points = new int[] { 100, 100, 200, 100 };
- //Create a new PDF line border.
- LineBorder lineBorder = new LineBorder();
- lineBorder.BorderStyle = PdfBorderStyle.Solid;
- lineBorder.DashArray = 1;
- lineBorder.BorderWidth =3;
- lineBorder.DashArray = 8;
- //Sets the line border.
- lineAnnotation.LineBorder = lineBorder;
- //Sets the line indent.
- lineAnnotation.LineIntent = PdfLineIntent.LineArrow;
- //Assign the line ending style
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Slash;
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Circle;
- lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Locked;
- //Assign the line color
- lineAnnotation.InnerLineColor = new PdfColor(Color.Blue);
- lineAnnotation.BackColor = new PdfColor(Color.Red);
- //Assign the leader line
- lineAnnotation.LeaderExt = 20;
- lineAnnotation.LeaderLine = 20;
- lineAnnotation.Size = new SizeF(100, 200);
- //Assign the line caption
- lineAnnotation.LineCaption = true;
- lineAnnotation.Text = "Syncfusion";
- lineAnnotation.CaptionType = PdfLineCaptionType.Top;
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5) as PdfLoadedLineAnnotation
- Dim points As Integer() = { 100, 100, 200, 100 }
- 'Create a new pdf line border.
- Dim lineBorder As New LineBorder()
- lineBorder.BorderStyle = PdfBorderStyle.Solid
- lineBorder.DashArray = 1
- lineBorder.BorderWidth = 3
- lineBorder.DashArray = 8
- 'Sets the line border
- lineAnnotation.LineBorder = lineBorder
- 'Sets the line indent
- lineAnnotation.LineIntent = PdfLineIntent.LineArrow
- 'Assign the line ending style
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Slash
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Circle
- lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Locked
- 'Assign the line color
- lineAnnotation.InnerLineColor = New PdfColor(Color.Blue)
- lineAnnotation.BackColor = New PdfColor(Color.Red)
- 'Assign the leader line
- lineAnnotation.LeaderExt = 20
- lineAnnotation.LeaderLine = 20
- lineAnnotation.Size = New SizeF(100, 200)
- 'Assign the line caption
- lineAnnotation.LineCaption = True
- lineAnnotation.Text = "Syncfusion"
- lineAnnotation.CaptionType = PdfLineCaptionType.Top
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
- //Sets the line annotation back color.
- lineAnnotation.BackColor = new PdfColor(Color.Red);
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5) as PdfLoadedLineAnnotation
- 'Sets the line annotation back color
- lineAnnotation.BackColor = New PdfColor(Color.Red)
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
- //Assign the line ending style
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Slash;
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5) as PdfLoadedLineAnnotation
- 'Assign the line ending style
- lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Slash
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
- //Sets the line caption type.
- lineAnnotation.CaptionType = PdfLineCaptionType.Top;
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5) as PdfLoadedLineAnnotation
- 'Sets the line caption type.
- lineAnnotation.CaptionType = PdfLineCaptionType.Top
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
- //Assign the line ending style
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Circle;
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5) as PdfLoadedLineAnnotation
- 'Assign the line ending style
- lineAnnotation.EndLineStyle = PdfLineEndingStyle.Circle
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
- //Assign the line color
- lineAnnotation.InnerLineColor = new PdfColor(Color.Blue);
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5) as PdfLoadedLineAnnotation
- 'Assign the line color
- lineAnnotation.InnerLineColor = New PdfColor(Color.Blue)
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
- //Sets the leader line.
- lineAnnotation.LeaderLine = 20;
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5) as PdfLoadedLineAnnotation
- 'Sets the leader line.
- lineAnnotation.LeaderLine = 20
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
- //Assign the leader line
- lineAnnotation.LeaderExt = 20;
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5) as PdfLoadedLineAnnotation
- 'Assign the leader line
- lineAnnotation.LeaderExt = 20
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
- //Create a new pdf line border.
- LineBorder lineBorder = new LineBorder();
- lineBorder.BorderStyle = PdfBorderStyle.Solid;
- lineBorder.DashArray = 1;
- lineBorder.BorderWidth =3;
- lineBorder.DashArray = 8;
- lineAnnotation.LineBorder = lineBorder;
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5) as PdfLoadedLineAnnotation
- 'Create a new pdf line border.
- Dim lineBorder As New LineBorder()
- lineBorder.BorderStyle = PdfBorderStyle.Solid
- lineBorder.DashArray = 1
- lineBorder.BorderWidth = 3
- lineBorder.DashArray = 8
- lineAnnotation.LineBorder = lineBorder
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True);
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
- //Assign the line caption
- lineAnnotation.LineCaption = true;
- lineAnnotation.CaptionType = PdfLineCaptionType.Top;
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5) as PdfLoadedLineAnnotation
- 'Assign the line caption
- lineAnnotation.LineCaption = True
- lineAnnotation.CaptionType = PdfLineCaptionType.Top
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
- lineAnnotation.LineIntent = PdfLineIntent.LineArrow;
- //Save the document.
- document.Save("lineAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5) as PdfLoadedLineAnnotation
- lineAnnotation.LineIntent = PdfLineIntent.LineArrow
- 'Save the document.
- document.Save("lineAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedPopupAnnotation popupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedPopupAnnotation;
- //Sets the popup annotation border
- popupAnnotation.Border.Width = 4;
- popupAnnotation.Border.HorizontalRadius = 20;
- popupAnnotation.Border.VerticalRadius = 30;
- //Set the popup icon
- popupAnnotation.Icon = PdfPopupIcon.Key;
- //Save the document.
- document.Save("popupAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim popupAnnotation As PdfLoadedPopupAnnotation = document.Pages(1).Annotations(5) as PdfLoadedPopupAnnotation
- 'Sets the popup annotation border
- popupAnnotation.Border.Width = 4
- popupAnnotation.Border.HorizontalRadius = 20
- popupAnnotation.Border.VerticalRadius = 30
- 'Set the popup icon
- popupAnnotation.Icon = PdfPopupIcon.Key
- 'Save the document.
- document.Save("popupAnnotation.pdf")
- document.Close(True);
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedPopupAnnotation popupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedPopupAnnotation;
- //Set the popup annotation open option
- popupAnnotation.Open = true
- //Save the document.
- document.Save("popupAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim popupAnnotation As PdfLoadedPopupAnnotation = document.Pages(1).Annotations(5) as PdfLoadedPopupAnnotation
- 'Set the popup annotation open option
- popupAnnotation.Open = True
- 'Save the document.
- document.Save("popupAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedPopupAnnotation popupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedPopupAnnotation;
- //Set the PDF popup icon
- popupAnnotation.Icon = PdfPopupIcon.Key;
- //Save the document.
- document.Save("popupAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim popupAnnotation As PdfLoadedPopupAnnotation = document.Pages(1).Annotations(5) as PdfLoadedPopupAnnotation
- 'Set the PDF popup icon
- popupAnnotation.Icon = PdfPopupIcon.Key
- 'Save the document.
- document.Save("popupAnnotation.pdf")
- document.Close(True);
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedRubberStampAnnotation rubberStampAnnotation = document.Pages[1].Annotations[5] as PdfLoadedRubberStampAnnotation;
- //Sets the rubber stamp annotation border
- rubberStampAnnotation.Border.Width = 4;
- rubberStampAnnotation.Border.HorizontalRadius = 20;
- rubberStampAnnotation.Border.VerticalRadius = 30;
- //Set the PDF rubber stamp annotation icon
- rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Approved;
- //Save the document.
- document.Save("RubberStampAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim popupAnnotation As PdfLoadedRubberStampAnnotation = document.Pages(1).Annotations(5) as PdfLoadedRubberStampAnnotation
- 'Sets the rubber stamp annotation border
- rubberStampAnnotation.Border.Width = 4
- rubberStampAnnotation.Border.HorizontalRadius = 20
- rubberStampAnnotation.Border.VerticalRadius = 30
- 'Set the PDF rubber stamp annotation icon
- rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Approved
- 'Save the document.
- document.Save("RubberStampAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedRubberStampAnnotation rubberStampAnnotation = document.Pages[1].Annotations[5] as PdfLoadedRubberStampAnnotation;
- //Set the PDF rubber stamp annotation icon
- rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Approved;
- //Save the document.
- document.Save("RubberStampAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim popupAnnotation As PdfLoadedRubberStampAnnotation = document.Pages(1).Annotations(5) as PdfLoadedRubberStampAnnotation
- 'Set the PDF rubber stamp annotation icon
- rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Approved
- 'Save the document.
- document.Save("RubberStampAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedSoundAnnotation soundAnnotation = document.Pages[1].Annotations[5] as PdfLoadedSoundAnnotation;
- //Sets the sound annotation border
- soundAnnotation.Border.Width = 4;
- soundAnnotation.Border.HorizontalRadius = 20;
- soundAnnotation.Border.VerticalRadius = 30;
- //Set the PDF sound annotation icon.
- soundAnnotation.Icon = PdfSoundIcon.Speaker;
- //Sets the PDF sound.
- PdfSound sound = new PdfSound("Startup.wav");
- soundAnnotation.Sound=sound;
- //Save the document.
- document.Save("SoundAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim soundAnnotation As PdfLoadedSoundAnnotation = document.Pages(1).Annotations(5) as PdfLoadedSoundAnnotation
- 'Sets the sound annotation border
- soundAnnotation.Border.Width = 4
- soundAnnotation.Border.HorizontalRadius = 20
- soundAnnotation.Border.VerticalRadius = 30
- 'Set the PDF sound annotation icon.
- soundAnnotation.Icon = PdfSoundIcon.Speaker
- Sets the PDF sound.
- Dim sound As PdfSound = New PdfSound("Startup.wav")
- soundAnnotation.Sound=sound
- 'Save the document.
- document.Save("SoundAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedSoundAnnotation soundAnnotation = document.Pages[1].Annotations[5] as PdfLoadedSoundAnnotation;
- //Sets the PDF sound.
- PdfSound sound = new PdfSound("Startup.wav");
- soundAnnotation.Sound=sound;
- //Save the document.
- document.Save("SoundAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim soundAnnotation As PdfLoadedSoundAnnotation = document.Pages(1).Annotations(5) as PdfLoadedSoundAnnotation
- Sets the PDF sound.
- Dim sound As PdfSound = New PdfSound("Startup.wav")
- soundAnnotation.Sound=sound
- 'Save the document.
- document.Save("SoundAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedSoundAnnotation soundAnnotation = document.Pages[1].Annotations[5] as PdfLoadedSoundAnnotation;
- 'Gets the file name
- string filename =soundAnnotation.FileName;
- //Save the document.
- document.Save("SoundAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim soundAnnotation As PdfLoadedSoundAnnotation = document.Pages(1).Annotations(5) as PdfLoadedSoundAnnotation
- 'Gets the file name
- Dim filename As String=soundAnnotation.FileName
- 'Save the document.
- document.Save("SoundAnnotation.pdf")
- document.Close(True);
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedSoundAnnotation soundAnnotation = document.Pages[1].Annotations[5] as PdfLoadedSoundAnnotation;
- //Set the pdfsound icon
- soundAnnotation.Icon = PdfSoundIcon.Speaker;
- //Save the document.
- document.Save("SoundAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim soundAnnotation As PdfLoadedSoundAnnotation = document.Pages(1).Annotations(5) as PdfLoadedSoundAnnotation
- 'Set the pdfsound icon
- soundAnnotation.Icon = PdfSoundIcon.Speaker
- 'Save the document.
- document.Save("SoundAnnotation.pdf")
- document.Close(True);
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedTextMarkupAnnotation textMarkupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedTextMarkupAnnotation;
- //Sets the PDF text markup annotation type
- textMarkupAnnotation.TextMarkupAnnotationType=PdfTextMarkupAnnotationType.Highlight
- //Sets the text markup color
- textMarkupAnnotation.TextMarkupColor=new PdfColor(Color.Blue);
- //Save the document.
- document.Save("TextMarkupAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim textMarkupAnnotation As PdfLoadedTextMarkupAnnotation = document.Pages(1).Annotations(5) as PdfLoadedTextMarkupAnnotation
- 'Sets the PDF text markup annotation type
- textMarkupAnnotation.TextMarkupAnnotationType=PdfTextMarkupAnnotationType.Highlight
- 'Sets the text markup color
- textMarkupAnnotation.TextMarkupColor=New PdfColor(Color.Blue)
- 'Save the document.
- document.Save("TextMarkupAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedTextMarkupAnnotation textMarkupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedTextMarkupAnnotation;
- //Sets the PDF text markup annotation type
- textMarkupAnnotation.TextMarkupAnnotationType=PdfTextMarkupAnnotationType.Highlight
- //Save the document.
- document.Save("TextMarkupAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim textMarkupAnnotation As PdfLoadedTextMarkupAnnotation = document.Pages(1).Annotations(5) as PdfLoadedTextMarkupAnnotation
- 'Sets the PDF text markup annotation type
- textMarkupAnnotation.TextMarkupAnnotationType=PdfTextMarkupAnnotationType.Highlight
- 'Save the document.
- document.Save("TextMarkupAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedTextMarkupAnnotation textMarkupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedTextMarkupAnnotation;
- //Sets the text markup color
- textMarkupAnnotation.TextMarkupColor=new PdfColor(Color.Blue);
- //Save the document.
- document.Save("TextMarkupAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim textMarkupAnnotation As PdfLoadedTextMarkupAnnotation = document.Pages(1).Annotations(5) as PdfLoadedTextMarkupAnnotation
- 'Sets the text markup color
- textMarkupAnnotation.TextMarkupColor=New PdfColor(Color.Blue)
- 'Save the document.
- document.Save("TextMarkupAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedTextWebLinkAnnotation textWeblinkAnnotation = document.Pages[1].Annotations[5] as PdfLoadedTextWebLinkAnnotation;
- //Sets the text web link annotation URI
- textWeblinkAnnotation.Url="http://www.syncfusion.com";
- //Save the document.
- document.Save("TextWebLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim textWeblinkAnnotation As PdfLoadedTextWebLinkAnnotation = document.Pages(1).Annotations(5) as PdfLoadedTextWebLinkAnnotation
- 'Sets the text web link annotation URI
- textWeblinkAnnotation.Url="http://www.syncfusion.com"
- 'Save the document.
- document.Save("TextWebLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedTextWebLinkAnnotation textWeblinkAnnotation = document.Pages[1].Annotations[5] as PdfLoadedTextWebLinkAnnotation;
- //Sets the text web link annotation URI
- textWeblinkAnnotation.Url="http://www.syncfusion.com";
- //Save the document.
- document.Save("TextWebLinkAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim textWeblinkAnnotation As PdfLoadedTextWebLinkAnnotation = document.Pages(1).Annotations(5) as PdfLoadedTextWebLinkAnnotation
- 'Sets the text web link annotation URI
- textWeblinkAnnotation.Url="http://www.syncfusion.com"
- 'Save the document.
- document.Save("TextWebLinkAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedUriAnnotation UriAnnotation = document.Pages[1].Annotations[5] as PdfLoadedUriAnnotation;
- //Sets the uri annotation URI
- UriAnnotation.Url="http://www.syncfusion.com";
- //Save the document.
- document.Save("UriAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim UriAnnotation As PdfLoadedUriAnnotation = document.Pages(1).Annotations(5) as PdfLoadedUriAnnotation
- 'Sets the uri annotation URI
- UriAnnotation.Url="http://www.syncfusion.com"
- 'Save the document.
- document.Save("UriAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
- //Gets the annotation from loaded document.
- PdfLoadedUriAnnotation UriAnnotation = document.Pages[1].Annotations[5] as PdfLoadedUriAnnotation;
- //Sets the uri annotation URI
- UriAnnotation.Url="http://www.syncfusion.com";
- //Save the document.
- document.Save("UriAnnotation.pdf");
- document.Close(true);
-
-
- 'Load an existing document.
- Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
- 'Gets the annotation from loaded document.
- Dim UriAnnotation As PdfLoadedUriAnnotation = document.Pages(1).Annotations(5) as PdfLoadedUriAnnotation
- 'Sets the uri annotation URI
- UriAnnotation.Url="http://www.syncfusion.com"
- 'Save the document.
- document.Save("UriAnnotation.pdf")
- document.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the form
- PdfLoadedForm form = doc.Form;
- // Load an existing button field.
- PdfLoadedButtonField buttonField = form.Fields["Submit"] as PdfLoadedButtonField;
- buttonField.ToolTip = "SubmitButton";
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the form
- Dim form As PdfLoadedForm = doc.Form
- ' Load an existing button field.
- Dim buttonField As PdfLoadedButtonField = TryCast(form.Fields("Submit"), PdfLoadedButtonField)
- buttonField.ToolTip = "SubmitButton"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Create a new document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- //load the form fields
- foreach (PdfLoadedField field in doc.Form.Fields)
- {
- // Flatten the form
- field.Flatten = true;
- }
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Create a new document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'load the form fields
- For Each field As PdfLoadedField In doc.Form.Fields
- ' Flatten the form
- field.Flatten = True
- Next field
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- //load the form field
- PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
- // Sets new name of the first field
- field.SetName("fieldFirstName");
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'load the form field
- Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
- ' Sets new name of the first field
- field.SetName("fieldFirstName")
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- //load the form field
- PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
- // Read the field name
- String fieldName = field.Name;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'load the form field
- Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
- ' Read the field name
- Dim fieldName As String = field.Name
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- //load the form field
- PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
- // Sets the Mapping name as 'FirstField'
- field.MappingName = "FirstField";
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'load the form field
- Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
- ' Sets the Mapping name as 'FirstField'
- field.MappingName = "FirstField"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- //load the form field
- PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
- // Sets the tooltip of the field
- field.ToolTip = "FirstField";
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'load the form field
- Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
- ' Sets the tooltip of the field
- field.ToolTip = "FirstField"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- //load the form field
- PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
- PdfPageBase page = field.Page;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'load the form field
- Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
- Dim page As PdfPageBase = field.Page
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- //load the form field
- PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
- // Set the form field as read only
- field.ReadOnly = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'load the form field
- Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
- ' Set the form field as read only
- field.ReadOnly = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- //load the form field
- PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
- field.Required = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'load the form field
- Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
- field.Required = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- //load the form field
- PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
- field.Export = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'load the form field
- Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
- field.Export = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument ldoc = new PdfLoadedDocument("SourceDoc.pdf");
- // Load the existing form
- PdfLoadedForm form = ldoc.Form;
- // Load an existing button field.
- PdfLoadedButtonField buttonField = form.Fields["Submit"] as PdfLoadedButtonField;
- // Adding print action
- buttonField.AddPrintAction();
- // Save the document to a disk
- ldoc.Save("Form.pdf");
- ldoc.Close(true);
-
-
- 'Load an existing document
- Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("SourceDoc.pdf")
- ' Load the existing form
- Dim form As PdfLoadedForm = ldoc.Form
- ' Load an existing button field.
- Dim buttonField As PdfLoadedButtonField = TryCast(form.Fields("Submit"), PdfLoadedButtonField)
- ' Adding print action
- buttonField.AddPrintAction()
- ' Save the document to a disk
- ldoc.Save("Form.pdf")
- ldoc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the form
- PdfLoadedForm form = doc.Form;
- // Load an existing button field.
- PdfLoadedButtonField buttonField = form.Fields["Submit"] as PdfLoadedButtonField;
- buttonField.ToolTip = "SubmitButton";
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the form
- Dim form As PdfLoadedForm = doc.Form
- ' Load an existing button field.
- Dim buttonField As PdfLoadedButtonField = TryCast(form.Fields("Submit"), PdfLoadedButtonField)
- buttonField.ToolTip = "SubmitButton"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing button field
- PdfLoadedButtonField buttonField = doc.Form.Fields["Submit"] as PdfLoadedButtonField;
- // Reading button collection item
- PdfLoadedButtonItemCollection buttonCollection = buttonField.Items;
- // Load an existing button item
- PdfLoadedButtonItem buttonItem = buttonCollection[0];
- buttonItem.Bounds = new RectangleF(0, 0, 20, 30);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing button field
- Dim buttonField As PdfLoadedButtonField = TryCast(doc.Form.Fields("Submit"), PdfLoadedButtonField)
- ' Reading button collection item
- Dim buttonCollection As PdfLoadedButtonItemCollection = buttonField.Items
- ' Load an existing button item
- Dim buttonItem As PdfLoadedButtonItem = buttonCollection(0)
- buttonItem.Bounds = New RectangleF(0, 0, 20, 30)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing button field
- PdfLoadedButtonField buttonField = doc.Form.Fields["Submit"] as PdfLoadedButtonField;
- // Load an existing button item
- PdfLoadedButtonItem buttonItem = buttonField.Items[0];
- buttonItem.Bounds = new RectangleF(0, 0, 20, 30);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing button field
- Dim buttonField As PdfLoadedButtonField = TryCast(doc.Form.Fields("Submit"), PdfLoadedButtonField)
- ' Load an existing button item
- Dim buttonItem As PdfLoadedButtonItem = buttonField.Items(0)
- buttonItem.Bounds = New RectangleF(0, 0, 20, 30)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the form
- PdfLoadedForm form = doc.Form;
- // Load an existing button field
- PdfLoadedButtonField buttonField = doc.Form.Fields["Submit"] as PdfLoadedButtonField;
- // Load an existing button collection
- PdfLoadedButtonItemCollection buttonCollection = buttonField.Items;
- // Load an existing button button item
- PdfLoadedButtonItem buttonItem = buttonCollection[0];
- buttonItem.Bounds = new RectangleF(0, 0, 20, 30);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the form
- Dim form As PdfLoadedForm = doc.Form
- ' Load an existing button field
- Dim buttonField As PdfLoadedButtonField = TryCast(doc.Form.Fields("Submit"), PdfLoadedButtonField)
- ' Load an existing button collection
- Dim buttonCollection As PdfLoadedButtonItemCollection = buttonField.Items
- ' Load an existing button button item
- Dim buttonItem As PdfLoadedButtonItem = buttonCollection(0)
- buttonItem.Bounds = New RectangleF(0, 0, 20, 30)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the form
- PdfLoadedForm form = doc.Form;
- // Load an existing button field
- PdfLoadedButtonField buttonField = doc.Form.Fields["Submit"] as PdfLoadedButtonField;
- // Load an existing button collection
- PdfLoadedButtonItemCollection buttonCollection = buttonField.Items;
- // Load an existing button button item
- PdfLoadedButtonItem buttonItem = buttonCollection[0];
- buttonItem.Bounds = new RectangleF(0, 0, 20, 30);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the form
- Dim form As PdfLoadedForm = doc.Form
- ' Load an existing button field
- Dim buttonField As PdfLoadedButtonField = TryCast(doc.Form.Fields("Submit"), PdfLoadedButtonField)
- ' Load an existing button collection
- Dim buttonCollection As PdfLoadedButtonItemCollection = buttonField.Items
- ' Load an existing button button item
- Dim buttonItem As PdfLoadedButtonItem = buttonCollection(0)
- buttonItem.Bounds = New RectangleF(0, 0, 20, 30)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing Check field
- PdfLoadedCheckBoxField checkField = doc.Form.Fields["Java"] as PdfLoadedCheckBoxField;
- checkField.Checked = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'Load an existing Check field
- Dim checkField As PdfLoadedCheckBoxField = TryCast(doc.Form.Fields("Java"), PdfLoadedCheckBoxField)
- checkField.Checked = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Flatten the radio button field
- radiobuttonField.Flatten = true;
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Flatten the radio button field
- radiobuttonField.Flatten = True
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing Check field
- PdfLoadedCheckBoxField checkField = doc.Form.Fields["Java"] as PdfLoadedCheckBoxField;
- checkField.Checked = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing Check field
- Dim checkField As PdfLoadedCheckBoxField = TryCast(doc.Form.Fields("Java"), PdfLoadedCheckBoxField)
- checkField.Checked = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing Check field
- PdfLoadedCheckBoxField checkField = doc.Form.Fields["Java"] as PdfLoadedCheckBoxField;
- // Loads the check box items collection.
- PdfLoadedCheckBoxItemCollection checkCollection = checkField.Items;
- checkCollection[0].Checked = false;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing Check field
- Dim checkField As PdfLoadedCheckBoxField = TryCast(doc.Form.Fields("Java"), PdfLoadedCheckBoxField)
- ' Loads the check box items collection.
- Dim checkCollection As PdfLoadedCheckBoxItemCollection = checkField.Items
- checkCollection(0).Checked = False
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing Check field
- PdfLoadedCheckBoxField checkField = doc.Form.Fields["Java"] as PdfLoadedCheckBoxField;
- // Loads the check box items collection.
- PdfLoadedCheckBoxItemCollection checkCollection = checkField.Items;
- checkCollection[0].Checked = false;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing Check field
- Dim checkField As PdfLoadedCheckBoxField = TryCast(doc.Form.Fields("Java"), PdfLoadedCheckBoxField)
- ' Loads the check box items collection.
- Dim checkCollection As PdfLoadedCheckBoxItemCollection = checkField.Items
- checkCollection(0).Checked = False
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // State Item collection
- PdfLoadedStateItemCollection stateItemCollection = radiobuttonField.Items;
- // Radio button field item
- PdfLoadedRadioButtonItem radiobuttonItem = stateItemCollection[0] as PdfLoadedRadioButtonItem;
- // Selected the item
- radiobuttonItem.Checked = true;
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' State Item collection
- Dim stateItemCollection As PdfLoadedStateItemCollection = radiobuttonField.Items
- ' Radio button field item
- Dim radiobuttonItem As PdfLoadedRadioButtonItem = TryCast(stateItemCollection(0), PdfLoadedRadioButtonItem)
- ' Selected the item
- radiobuttonItem.Checked = True
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing Check field
- PdfLoadedCheckBoxField checkField = doc.Form.Fields["Java"] as PdfLoadedCheckBoxField;
- // Loads the check box items collection.
- PdfLoadedCheckBoxItemCollection checkCollection = checkField.Items;
- // Read the first item of the collection
- PdfLoadedCheckBoxItem checkItem = checkCollection[0];
- checkItem.Checked = false;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing Check field
- Dim checkField As PdfLoadedCheckBoxField = TryCast(doc.Form.Fields("Java"), PdfLoadedCheckBoxField)
- ' Loads the check box items collection.
- Dim checkCollection As PdfLoadedCheckBoxItemCollection = checkField.Items
- ' Read the first item of the collection
- Dim checkItem As PdfLoadedCheckBoxItem = checkCollection(0)
- checkItem.Checked = False
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // State Item collection
- PdfLoadedStateItemCollection stateItemCollection = radiobuttonField.Items;
- PdfLoadedStateItem stateItem =stateItemCollection[0];
- // Radio button field item
- PdfLoadedRadioButtonItem radiobuttonItem = stateItem as PdfLoadedRadioButtonItem;
- // Selected the item
- radiobuttonItem.Checked = true;
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' State Item collection
- Dim stateItemCollection As PdfLoadedStateItemCollection = radiobuttonField.Items
- Dim stateItem As PdfLoadedStateItem = stateItemCollection(0)
- ' Radio button field item
- Dim radiobuttonItem As PdfLoadedRadioButtonItem = TryCast(stateItem, PdfLoadedRadioButtonItem)
- ' Selected the item
- radiobuttonItem.Checked = True
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing choice field
- PdfLoadedChoiceField choiceField = doc.Form.Fields["Java"] as PdfLoadedChoiceField;
- choiceField.SelectedIndex = 0;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing Check field
- Dim choiceField As PdfLoadedChoiceField = TryCast(doc.Form.Fields("Java"), PdfLoadedChoiceField)
- choiceField.SelectedIndex = 0
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing choice field
- PdfLoadedChoiceField choiceField = doc.Form.Fields["Java"] as PdfLoadedChoiceField;
- choiceField.SelectedIndex = 0;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing Check field
- Dim choiceField As PdfLoadedChoiceField = TryCast(doc.Form.Fields("Java"), PdfLoadedChoiceField)
- choiceField.SelectedIndex = 0
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing choice field
- PdfLoadedChoiceField choiceField = doc.Form.Fields["Java"] as PdfLoadedChoiceField;
- choiceField.SelectedValue = "Employee";
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing choice field
- Dim choiceField As PdfLoadedChoiceField = TryCast(doc.Form.Fields("Java"), PdfLoadedChoiceField)
- choiceField.SelectedValue = "Employee"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing Check field
- PdfLoadedChoiceField choiceField = doc.Form.Fields["Java"] as PdfLoadedChoiceField;
- // Change the selected item
- PdfLoadedListItem item = choiceField.SelectedItem;
- item.Text = "New Text";
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing Check field
- Dim choiceField As PdfLoadedChoiceField = TryCast(doc.Form.Fields("Java"), PdfLoadedChoiceField)
- ' Change the selected item
- Dim item As PdfLoadedListItem = choiceField.SelectedItem
- item.Text = "New Text"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read a combo box field
- PdfLoadedComboBoxField comboField = doc.Form.Fields["EmployeeCombo"] as PdfLoadedComboBoxField;
- comboField.SelectedIndex = 0;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'Read a combo box field
- Dim comboField As PdfLoadedComboBoxField = TryCast(doc.Form.Fields("EmployeeCombo"), PdfLoadedComboBoxField)
- comboField.SelectedIndex = 0
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing combo field
- PdfLoadedComboBoxField comboField = doc.Form.Fields["EmployeeCombo"] as PdfLoadedComboBoxField;
- comboField.Editable = false;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'Load an existing Check field
- Dim choiceField As PdfLoadedChoiceField = TryCast(doc.Form.Fields("Java"), PdfLoadedChoiceField)
- 'Change the selected item
- Dim item As PdfLoadedListItem = choiceField.SelectedItem
- item.Text = "New Text"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing combo field
- PdfLoadedComboBoxField comboField = doc.Form.Fields["EmployeeCombo"] as PdfLoadedComboBoxField;
- // Load combo field collection
- PdfLoadedComboBoxItemCollection comboCollection = comboField.Items;
- // Reading first item of the collection.
- PdfLoadedComboBoxItem item = comboCollection[0];
- item.Location = new PointF(200, 200);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'Load an existing combo field
- Dim comboField As PdfLoadedComboBoxField = TryCast(doc.Form.Fields("EmployeeCombo"), PdfLoadedComboBoxField)
- 'Load combo field collection
- Dim comboCollection As PdfLoadedComboBoxItemCollection = comboField.Items
- 'Reading first item of the collection.
- Dim item As PdfLoadedComboBoxItem = comboCollection(0)
- item.Location = New PointF(200, 200)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing combo field
- PdfLoadedComboBoxField comboField = doc.Form.Fields["EmployeeCombo"] as PdfLoadedComboBoxField;
- // Load combo field collection
- PdfLoadedComboBoxItemCollection comboCollection = comboField.Items;
- // Load combo field item
- PdfLoadedComboBoxItem comboItem = comboCollection[0];
- comboItem.Bounds = new RectangleF(10,20,200,300);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing combo field
- Dim comboField As PdfLoadedComboBoxField = TryCast(doc.Form.Fields("EmployeeCombo"), PdfLoadedComboBoxField)
- ' Load combo field collection
- Dim comboCollection As PdfLoadedComboBoxItemCollection = comboField.Items
- ' Load combo field item
- Dim comboItem As PdfLoadedComboBoxItem = comboCollection(0)
- comboItem.Bounds = New RectangleF(10,20,200,300)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing combo field
- PdfLoadedComboBoxField comboField = doc.Form.Fields["EmployeeCombo"] as PdfLoadedComboBoxField;
- // Load combo field collection
- PdfLoadedComboBoxItemCollection comboCollection = comboField.Items;
- // Load combo field item
- PdfLoadedComboBoxItem comboItem = comboCollection[0];
- comboItem.Bounds = new RectangleF(10,20,200,300);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing combo field
- Dim comboField As PdfLoadedComboBoxField = TryCast(doc.Form.Fields("EmployeeCombo"), PdfLoadedComboBoxField)
- ' Load combo field collection
- Dim comboCollection As PdfLoadedComboBoxItemCollection = comboField.Items
- ' Load combo field item
- Dim comboItem As PdfLoadedComboBoxItem = comboCollection(0)
- comboItem.Bounds = New RectangleF(10,20,200,300)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load an existing combo field
- PdfLoadedComboBoxField comboField = doc.Form.Fields["EmployeeCombo"] as PdfLoadedComboBoxField;
- // Load combo field collection
- PdfLoadedComboBoxItemCollection comboCollection = comboField.Items;
- // Load combo field item
- PdfLoadedComboBoxItem comboItem = comboCollection[0];
- comboItem.Bounds = new RectangleF(10,20,200,300);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load an existing combo field
- Dim comboField As PdfLoadedComboBoxField = TryCast(doc.Form.Fields("EmployeeCombo"), PdfLoadedComboBoxField)
- ' Load combo field collection
- Dim comboCollection As PdfLoadedComboBoxItemCollection = comboField.Items
- ' Load combo field item
- Dim comboItem As PdfLoadedComboBoxItem = comboCollection(0)
- comboItem.Bounds = New RectangleF(10,20,200,300)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the existing form
- PdfLoadedForm form = doc.Form;
- //load the form field
- PdfLoadedField field = form.Fields[0] as PdfLoadedField;
- field.Export = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the existing form
- Dim form As PdfLoadedForm = doc.Form
- 'load the form field
- Dim field As PdfLoadedField = TryCast(form.Fields(0), PdfLoadedField)
- field.Export = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the existing form
- PdfLoadedForm form = doc.Form;
- form.ExportData("Export.xml", DataFormat.Xml, "SourceForm.pdf");
- doc.Close(true);
-
-
- ' Loads an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the existing form
- Dim form As PdfLoadedForm = doc.Form
- form.ExportData("Export.xml", DataFormat.Xml, "SourceForm.pdf")
- doc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the existing form
- PdfLoadedForm form = doc.Form;
- MemoryStream stream = new MemoryStream();
- form.ExportData(stream, DataFormat.Xml, "SourceForm.pdf");
- doc.Close(true);
-
-
- ' Loads an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the existing form
- Dim form As PdfLoadedForm = doc.Form
- Dim stream As MemoryStream = New MemoryStream()
- form.ExportData(stream, DataFormat.Xml, "SourceForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the existing form
- PdfLoadedForm form = doc.Form;
- form.ImportData("ImportData.xml",DataFormat.Xml, false);
- doc.Save("Import.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the existing form
- Dim form As PdfLoadedForm = doc.Form
- form.ImportData("ImportData.xml",DataFormat.Xml, False)
- doc.Save("Import.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the existing form
- PdfLoadedForm form = doc.Form;
- // Load the FDF file
- FileStream stream = new FileStream("ImportFDF.fdf", FileMode.Open);
- // Import the FDF stream
- form.ImportDataFDF(stream,true);
- doc.Save("Import.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the existing form
- Dim form As PdfLoadedForm = doc.Form
- ' Load the FDF file
- Dim stream As FileStream = New FileStream("ImportFDF.fdf", FileMode.Open)
- ' Import the FDF stream
- form.ImportDataFDF(stream,True)
- doc.Save("Import.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the existing form
- PdfLoadedForm form = doc.Form;
- //load the form field
- PdfLoadedField field = form.Fields[0] as PdfLoadedField;
- field.Export = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the existing form
- Dim form As PdfLoadedForm = doc.Form
- 'load the form field
- Dim field As PdfLoadedField = TryCast(form.Fields(0), PdfLoadedField)
- field.Export = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the existing form
- PdfLoadedForm form = doc.Form;
- //Set the form as read only
- form.ReadOnly = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the existing form
- Dim form As PdfLoadedForm = doc.Form
- 'Set the form as read only
- form.ReadOnly = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // PDF loaded field collection
- PdfLoadedFormFieldCollection fieldCollection = doc.Form.Fields;
- // Remove the first field
- fieldCollection.RemoveAt(0);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' PDF loaded field collection
- Dim fieldCollection As PdfLoadedFormFieldCollection = doc.Form.Fields
- ' Remove the first field
- fieldCollection.RemoveAt(0)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- //load the form fields
- foreach (PdfField field in doc.Form.Fields)
- {
- // Flatten the form
- field.Flatten = true;
- }
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- 'load the form fields
- For Each field As PdfField In doc.Form.Fields
- ' Flatten the form
- field.Flatten = True
- Next field
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- // Loads an existing PDF document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the FirstTextBox field
- PdfField field = doc.Form.Fields["FirstTextBox"];
- field.Flatten = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- // Loads an existing PDF document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the FirstTextBox field
- Dim field As PdfField = doc.Form.Fields("FirstTextBox")
- field.Flatten = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // Flatten the list field
- listField.Flatten = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' Flatten the list field
- listField.Flatten = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // Enabling the multi selection option
- listField.MultiSelect = true;
- doc.Save("Sample.pdf");
- doc.Close(true);
-
-
- ' Loads an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' Enabling the multi selection option
- listField.MultiSelect = True
- doc.Save("Sample.pdf")
- doc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // List box items collection
- PdfLoadedListFieldItemCollection listcollection = listField.Items;
- listcollection[0].Location = new PointF(100, 200);
- doc.Save("Sample.pdf");
- doc.Close(true);
-
-
- ' Loads an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' List box items collection
- Dim listcollection As PdfLoadedListFieldItemCollection = listField.Items
- listcollection(0).Location = New PointF(100, 200)
- doc.Save("Sample.pdf")
- doc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // Loaded list box field items
- PdfLoadedListFieldItem listFieldItem = listField.Items[0];
- listFieldItem.Location = new PointF(100, 200);
- doc.Save("Sample.pdf");
- doc.Close(true);
-
-
- ' Loads an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' Loaded list box field items
- Dim listFieldItem As PdfLoadedListFieldItem = listField.Items(0)
- listFieldItem.Location = New PointF(100, 200)
- doc.Save("Sample.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'course' list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // list field item Collection
- PdfLoadedListFieldItemCollection listItemCollection = listField.Items;
- listItemCollection[0].Bounds = new RectangleF(0, 0, 20, 30);
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'course' list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' list field item Collection
- Dim listItemCollection As PdfLoadedListFieldItemCollection = listField.Items
- listItemCollection(0).Bounds = New RectangleF(0, 0, 20, 30)
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'course' list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // List field item Collection
- PdfLoadedListFieldItemCollection listItemCollection = listField.Items;
- // Reading the first item in the list items collection
- PdfLoadedListFieldItem listItem = listItemCollection[0];
- // Relocate the list item
- listItem.Location = new PointF(10, 20);
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'course' list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' List field item Collection
- Dim listItemCollection As PdfLoadedListFieldItemCollection = listField.Items
- ' Reading the first item in the list items collection
- Dim listItem As PdfLoadedListFieldItem = listItemCollection(0)
- ' Relocate the list item
- listItem.Location = New PointF(10, 20)
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // Get the selected list item
- PdfLoadedListItem listItem = listField.SelectedItem;
- listItem.Text = "NewText";
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' Get the selected list item
- Dim listItem As PdfLoadedListItem = listField.SelectedItem
- listItem.Text = "NewText"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- // Load the list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // Get the selected list item
- PdfLoadedListItem listItem = new PdfLoadedListItem("C#.Net",".NET Course");
- // Add the list item in list field
- listField.Values.Add(listItem);
-
-
- ' Load the list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' Get the selected list item
- Dim listItem As PdfLoadedListItem = New PdfLoadedListItem("C#.Net",".NET Course")
- ' Add the list item in list field
- listField.Values.Add(listItem)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // Get the selected list item
- PdfLoadedListItem listItem = listField.SelectedItem;
- listItem.Value = "C#.NET";
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' Get the selected list item
- Dim listItem As PdfLoadedListItem = listField.SelectedItem
- listItem.Value = "C#.NET"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'course' list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // List field item Collection
- PdfLoadedListItemCollection listItemCollection = listField.Values;
- // Create a new list item
- PdfLoadedListItem listItem = new PdfLoadedListItem("Oracle", "Oracle");
- // Adding item in collection
- listItemCollection.Add(listItem);
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'course' list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' List field item Collection
- Dim listItemCollection As PdfLoadedListItemCollection = listField.Values
- ' Create a new list item
- Dim listItem As PdfLoadedListItem = New PdfLoadedListItem("Oracle", "Oracle")
- ' Adding item in collection
- listItemCollection.Add(listItem)
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'course' list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // List field item Collection
- PdfLoadedListItemCollection listItemCollection = listField.Values;
- // Create a new list item
- PdfLoadedListItem listItem = new PdfLoadedListItem("Oracle", "Oracle");
- // Adding item in collection
- listItemCollection.Add(listItem);
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'course' list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' List field item Collection
- Dim listItemCollection As PdfLoadedListItemCollection = listField.Values
- ' Create a new list item
- Dim listItem As PdfLoadedListItem = New PdfLoadedListItem("Oracle", "Oracle")
- ' Adding item in collection
- listItemCollection.Add(listItem)
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'course' list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // List field item Collection
- PdfLoadedListItemCollection listItemCollection = listField.Values;
- // Getting the first item from the list item collection
- PdfLoadedListItem listItem = listItemCollection[0];
- // Insert the item at first index
- listItemCollection.Insert(0, listItem);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'course' list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' List field item Collection
- Dim listItemCollection As PdfLoadedListItemCollection = listField.Values
- ' Getting the first item from the list item collection
- Dim listItem As PdfLoadedListItem = listItemCollection(0)
- ' Insert the item at first index
- listItemCollection.Insert(0, listItem)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'course' list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // List field item Collection
- PdfLoadedListItemCollection listItemCollection = listField.Values;
- // Remove the first item
- listItemCollection.RemoveAt(0);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'course' list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' List field item Collection
- Dim listItemCollection As PdfLoadedListItemCollection = listField.Values
- ' Remove the first item
- listItemCollection.RemoveAt(0)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'course' list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // List field item Collection
- PdfLoadedListItemCollection listItemCollection = listField.Values;
- // Clears the collection
- listItemCollection.Clear();
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'course' list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' List field item Collection
- Dim listItemCollection As PdfLoadedListItemCollection = listField.Values
- ' Clears the collection
- listItemCollection.Clear()
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document.
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'course' list box field
- PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
- // List field item Collection
- PdfLoadedListItemCollection listItemCollection = listField.Values;
- // Getting the first item from the list item collection
- PdfLoadedListItem listItem = listItemCollection[0];
- listItem.Value = "C#.NET";
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document.
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'course' list box field
- Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
- ' List field item Collection
- Dim listItemCollection As PdfLoadedListItemCollection = listField.Values
- ' Getting the first item from the list item collection
- Dim listItem As PdfLoadedListItem = listItemCollection(0)
- listItem.Value = "C#.NET"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Radio button field collection
- PdfLoadedRadioButtonItemCollection radiobuttonFieldCollection = radiobuttonField.Items;
- // Radio button field item
- PdfLoadedRadioButtonItem radiobuttonItem = radiobuttonFieldCollection[0];
- // Selected the item
- radiobuttonItem.Checked = true;
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Radio button field collection
- Dim radiobuttonFieldCollection As PdfLoadedRadioButtonItemCollection = radiobuttonField.Items
- ' Radio button field item
- Dim radiobuttonItem As PdfLoadedRadioButtonItem = radiobuttonFieldCollection(0)
- ' Selected the item
- radiobuttonItem.Checked = True
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Radio button field collection
- PdfLoadedRadioButtonItemCollection radiobuttonFieldCollection = radiobuttonField.Items;
- // Radio button field item
- PdfLoadedRadioButtonItem radiobuttonItem = radiobuttonFieldCollection[0];
- // Selected the item
- radiobuttonItem.Checked = true;
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Radio button field collection
- Dim radiobuttonFieldCollection As PdfLoadedRadioButtonItemCollection = radiobuttonField.Items
- ' Radio button field item
- Dim radiobuttonItem As PdfLoadedRadioButtonItem = radiobuttonFieldCollection(0)
- ' Selected the item
- radiobuttonItem.Checked = True
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Radio button field collection
- PdfLoadedRadioButtonItemCollection radiobuttonFieldCollection = radiobuttonField.Items;
- // Radio button field item
- PdfLoadedRadioButtonItem radiobuttonItem = radiobuttonFieldCollection[0];
- radiobuttonItem.Checked = true;
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Radio button field collection
- Dim radiobuttonFieldCollection As PdfLoadedRadioButtonItemCollection = radiobuttonField.Items
- ' Radio button field item
- Dim radiobuttonItem As PdfLoadedRadioButtonItem = radiobuttonFieldCollection(0)
- radiobuttonItem.Checked = True
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Radio button field collection
- PdfLoadedRadioButtonItemCollection radiobuttonFieldCollection = radiobuttonField.Items;
- // Radio button field item
- PdfLoadedRadioButtonItem radiobuttonItem = radiobuttonFieldCollection[0];
- // Set the value of the item
- radiobuttonItem.Value = "Male";
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Radio button field collection
- Dim radiobuttonFieldCollection As PdfLoadedRadioButtonItemCollection = radiobuttonField.Items
- ' Radio button field item
- Dim radiobuttonItem As PdfLoadedRadioButtonItem = radiobuttonFieldCollection(0)
- ' Set the value of the item
- radiobuttonItem.Value = "Male"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Radio button field collection
- PdfLoadedRadioButtonItemCollection radiobuttonFieldCollection = radiobuttonField.Items;
- // Radio button field item
- PdfLoadedRadioButtonItem radiobuttonItem = radiobuttonFieldCollection[0];
- // Set the first item as selected item
- radiobuttonItem.Selected = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Radio button field collection
- Dim radiobuttonFieldCollection As PdfLoadedRadioButtonItemCollection = radiobuttonField.Items
- ' Radio button field item
- Dim radiobuttonItem As PdfLoadedRadioButtonItem = radiobuttonFieldCollection(0)
- ' Set the first item as selected item
- radiobuttonItem.Selected = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Flatten the radio button field
- radiobuttonField.Flatten = true;
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Flatten the radio button field
- radiobuttonField.Flatten = True
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Getting the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Radio button field collection
- PdfLoadedRadioButtonItemCollection radiobuttonFieldCollection = radiobuttonField.Items;
- // Radio button field item
- PdfLoadedRadioButtonItem radiobuttonItem = radiobuttonFieldCollection[0];
- // Selected the item
- radiobuttonItem.Checked = true;
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Getting the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Radio button field collection
- Dim radiobuttonFieldCollection As PdfLoadedRadioButtonItemCollection = radiobuttonField.Items
- ' Radio button field item
- Dim radiobuttonItem As PdfLoadedRadioButtonItem = radiobuttonFieldCollection(0)
- ' Selected the item
- radiobuttonItem.Checked = True
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Set the selected index as 1
- radiobuttonField.SelectedIndex = 1;
- // Save the document to a disk
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Set the selected index as 1
- radiobuttonField.SelectedIndex = 1
- ' Save the document to a disk
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Set the selected index as 1
- radiobuttonField.SelectedValue = "Female";
- // Save the document to a disk
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Set the selected index as 1
- radiobuttonField.SelectedValue = "Female"
- ' Save the document to a disk
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Read the selected item of the radio button
- PdfLoadedRadioButtonItem radiobuttonItem = radiobuttonField.SelectedItem;
- // Uncheck the selected item
- radiobuttonItem.Checked = false;
- // Save the document to a disk
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Read the selected item of the radio button
- Dim radiobuttonItem As PdfLoadedRadioButtonItem = radiobuttonField.SelectedItem
- ' Uncheck the selected item
- radiobuttonItem.Checked = False
- ' Save the document to a disk
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the 'Gender' radio button field
- PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
- // Set the radio box value as Male
- radiobuttonField.Value = "Male";
- // Save the document to a disk
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the 'Gender' radio button field
- Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
- ' Set the radio box value as Male
- radiobuttonField.Value = "Male"
- ' Save the document to a disk
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Gets the signature field
- PdfLoadedSignatureField signatureField = doc.Form.Fields["ManagerSignature"] as PdfLoadedSignatureField;
- signatureField.Flatten = true;
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Gets the signature field
- Dim signatureField As PdfLoadedSignatureField = TryCast(doc.Form.Fields("ManagerSignature"), PdfLoadedSignatureField)
- signatureField.Flatten = True
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the first page
- PdfPageBase page = doc.Pages[0];
- // Gets the signature field
- PdfLoadedSignatureField signatureField = doc.Form.Fields["ManagerSignature"] as PdfLoadedSignatureField;
- // Create a new Signature
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Bounds = new RectangleF(new PointF(5, 5), new SizeF(100, 200));
- // Set the signature of the field
- signatureField.Signature = signature;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the first page
- Dim page As PdfPageBase = doc.Pages(0)
- ' Gets the signature field
- Dim signatureField As PdfLoadedSignatureField = TryCast(doc.Form.Fields("ManagerSignature"), PdfLoadedSignatureField)
- ' Create a new Signature
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Bounds = New RectangleF(New PointF(5, 5), New SizeF(100, 200))
- ' Set the signature of the field
- signatureField.Signature = signature
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the text box field
- PdfLoadedTextBoxField textBoxField = doc.Form.Fields["EmployeeName"] as PdfLoadedTextBoxField;
- // Read the first text box field item from the collection
- PdfLoadedTexBoxItem textBoxItem = textBoxField.Items[0];
- textBoxItem.Location = new PointF(10, 20);
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the text box field
- Dim textBoxField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields("EmployeeName"), PdfLoadedTextBoxField)
- ' Read the first text box field item from the collection
- Dim textBoxItem As PdfLoadedTexBoxItem = textBoxField.Items(0)
- textBoxItem.Location = New PointF(10, 20)
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the text box field
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- RectangleF newBounds = new RectangleF(100, 100, 50, 50);
- ldField.Bounds = newBounds;
- ldField.SpellCheck = true;
- ldField.Text = "New text of the field.";
- ldField.Password = false;
- ldField.BorderStyle = PdfBorderStyle.Dashed;
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the text box field
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- Dim newBounds As RectangleF = New RectangleF(100, 100, 50, 50)
- ldField.Bounds = newBounds
- ldField.SpellCheck = True
- ldField.Text = "New text of the field."
- ldField.Password = False
- ldField.BorderStyle = PdfBorderStyle.Dashed
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field.
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- ldField.BackColor = new PdfColor(Color.Transparent);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ldField.BackColor = New PdfColor(Color.Transparent)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field.
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- ldField.ForeColor = new PdfColor(Color.Red);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field.
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ldField.ForeColor = New PdfColor(Color.Red)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field.
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- ldField.TextAlignment = PdfTextAlignment.Justify;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field.
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ldField.TextAlignment = PdfTextAlignment.Justify
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the text box field
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- ldField.HighlightMode = PdfHighlightMode.Push;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the text box field
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ldField.HighlightMode = PdfHighlightMode.Push
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- ldField.Text = "New Text";
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ldField.Text = "New Text"
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- ldField.SpellCheck = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ldField.SpellCheck = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- ldField.InsertSpaces = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ldField.InsertSpaces = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- ldField.Multiline = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ldField.Multiline = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- ldField.Password = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ldField.Password = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- ldField.Scrollable = true;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ldField.Scrollable = True
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field
- PdfLoadedTextBoxField ldField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- ldField.MaxLength = 10;
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field
- Dim ldField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ldField.MaxLength = 10
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field
- PdfLoadedTextBoxField textboxField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- // TextBox Item collection
- PdfLoadedTextBoxItemCollection textboxFieldCollection = textboxField.Items;
- textboxFieldCollection[0].Location = new PointF(10, 20);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field
- Dim textboxField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ' TextBox Item collection
- Dim textboxFieldCollection As PdfLoadedTextBoxItemCollection = textboxField.Items
- textboxFieldCollection(0).Location = New PointF(10, 20)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field item
- PdfLoadedTextBoxField textboxField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- // TextBox Item collection
- PdfLoadedTextBoxItemCollection textboxFieldCollection = textboxField.Items;
- textboxFieldCollection[0].Location = new PointF(10, 20);
- doc.Save("LoadedForm.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field item
- Dim textboxField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ' TextBox Item collection
- Dim textboxFieldCollection As PdfLoadedTextBoxItemCollection = textboxField.Items
- textboxFieldCollection(0).Location = New PointF(10, 20)
- doc.Save("LoadedForm.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
- // Read the text box field item
- PdfLoadedTextBoxField textboxField = doc.Form.Fields[0] as PdfLoadedTextBoxField;
- // Read the text box item collection
- PdfLoadedTextBoxItemCollection textboxFieldCollection = textboxField.Items;
- PdfLoadedTexBoxItem textboxItem = textboxFieldCollection[0];
- textboxItem.Location = new PointF(10, 20);
- doc.Save("Form.pdf");
- doc.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Read the text box field item
- Dim textboxField As PdfLoadedTextBoxField = TryCast(doc.Form.Fields(0), PdfLoadedTextBoxField)
- ' Read the text box item collection
- Dim textboxFieldCollection As PdfLoadedTextBoxItemCollection = textboxField.Items
- Dim textboxItem As PdfLoadedTexBoxItem = textboxFieldCollection(0)
- textboxItem.Location = New PointF(10, 20)
- doc.Save("Form.pdf")
- doc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument ldoc = new PdfLoadedDocument("SourceForm.pdf");
- // Load the existing form
- PdfLoadedForm form = ldoc.Form;
- // Export the form data as XML file
- form.ExportData("Export.xml", DataFormat.Xml, "SourceForm.pdf");
-
-
- 'Load an existing document
- Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
- ' Load the existing form
- Dim form As PdfLoadedForm = ldoc.Form
- ' Export the form data as XML file
- form.ExportData("Export.xml", DataFormat.Xml, "SourceForm.pdf")
-
-
- // Loads an existing document
- PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
- lDoc.Save("Output.pdf");
- lDoc.Close(true);
-
-
- ' Loads an existing document
- Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("Input.pdf")
- lDoc.Save("Output.pdf")
- lDoc.Close(True)
-
-
- // Loads an existing PDF Document
- PdfLoadedDocument doc = new PdfLoadedDocument("Input.pdf");
- // Save the document to a disk
- doc.Save("Output.pdf");
- doc.Close(true);
-
-
- ' Loads an existing PDF Document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("Input.pdf")
- ' Save the document to a disk
- doc.Save("Output.pdf")
- doc.Close(True)
-
-
- // Loads an existing PDF Document
- PdfLoadedDocument doc = new PdfLoadedDocument("Input.pdf",true);
- // Save the document to a disk
- doc.Save("Output.pdf");
- doc.Close(true);
-
-
- ' Loads an existing PDF Document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("Input.pdf",True)
- ' Save the document to a disk
- doc.Save("Output.pdf")
- doc.Close(True)
-
-
- // Load the PDF document with password.
- PdfLoadedDocument doc = new PdfLoadedDocument("Input.pdf","password");
- doc.Save("Output.pdf");
- doc.Close(true);
-
-
- ' Load the PDF document with password.
- PdfLoadedDocument doc = new PdfLoadedDocument("Input.pdf","password")
- doc.Save("Output.pdf")
- doc.Close(True)
-
-
- // Load the PDF document with password.
- PdfLoadedDocument doc = new PdfLoadedDocument("Input.pdf","password",true);
- doc.Save("Output.pdf");
- doc.Close(true);
-
-
- ' Load the PDF document with password.
- PdfLoadedDocument doc = new PdfLoadedDocument("Input.pdf","password",true)
- doc.Save("Output.pdf")
- doc.Close(True)
-
-
- Stream file2 = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read);
- // Create a byte array of file stream length
- byte[] pdfData = new byte[file2.Length];
- //Read block of bytes from stream into the byte array
- file2.Read(pdfData,0,System.Convert.ToInt32(pdfData.Length));
- // Load the byte array
- PdfLoadedDocument doc = new PdfLoadedDocument(pdfData);
- doc.Save("Output.pdf");
- doc.Close(true);
-
-
- Dim file2 As Stream = New FileStream("sample.pdf", FileMode.Open, FileAccess.Read, FileShare.Read)
- ' Create a byte array of file stream length
- Dim pdfData() As Byte = New Byte(file2.Length){}
- 'Read block of bytes From stream Into the Byte array
- file2.Read(pdfData,0,System.Convert.ToInt32(pdfData.Length))
- ' Load the byte array
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument(pdfData)
- doc.Save("Output.pdf")
- doc.Close(True)
-
-
- Stream file2 = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read);
- // Create a byte array of file stream length
- byte[] pdfData = new byte[file2.Length];
- //Read block of bytes from stream into the byte array
- file2.Read(pdfData,0,System.Convert.ToInt32(pdfData.Length));
- // Load the byte array
- PdfLoadedDocument doc = new PdfLoadedDocument(pdfData,true);
- doc.Save("Output.pdf");
- doc.Close(true);
-
-
- Dim file2 As Stream = New FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read)
- ' Create a byte array of file stream length
- Dim pdfData() As Byte = New Byte(file2.Length){}
- 'Read block of bytes From stream Into the Byte array
- file2.Read(pdfData,0,System.Convert.ToInt32(pdfData.Length))
- ' Load the byte array
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument(pdfData,true)
- doc.Save("Output.pdf")
- doc.Close(True)
-
-
- Stream file2 = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read);
- // Create a byte array of file stream length
- byte[] pdfData = new byte[file2.Length];
- //Read block of bytes from stream into the byte array
- file2.Read(pdfData,0,System.Convert.ToInt32(pdfData.Length));
- // Load the byte array
- PdfLoadedDocument doc = new PdfLoadedDocument(pdfData,"password");
- doc.Save("Output.pdf");
- doc.Close(true);
-
-
- Dim file2 As Stream = New FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read)
- ' Create a byte array of file stream length
- Dim pdfData() As Byte = New Byte(file2.Length){}
- 'Read block of bytes From stream Into the Byte array
- file2.Read(pdfData,0,System.Convert.ToInt32(pdfData.Length))
- ' Load the byte array
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument(pdfData,"password")
- doc.Save("Output.pdf")
- doc.Close(True)
-
-
- Stream file2 = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read);
- // Create a byte array of file stream length
- byte[] pdfData = new byte[file2.Length];
- //Read block of bytes from stream into the byte array
- file2.Read(pdfData,0,System.Convert.ToInt32(pdfData.Length));
- // Load the byte array
- PdfLoadedDocument doc = new PdfLoadedDocument(pdfData,"password",true);
- doc.Save("Output.pdf");
- doc.Close(true);
-
-
- Dim file2 As Stream = New FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read)
- ' Create a byte array of file stream length
- Dim pdfData() As Byte = New Byte(file2.Length){}
- 'Read block of bytes From stream Into the Byte array
- file2.Read(pdfData,0,System.Convert.ToInt32(pdfData.Length))
- ' Load the byte array
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument(pdfData,"password",True)
- doc.Save("Output.pdf")
- doc.Close(True)
-
-
- Stream file2 = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read);
- // Load the stream
- PdfLoadedDocument doc = new PdfLoadedDocument(file2);
- doc.Save("Output.pdf");
- doc.Close(true);
-
-
- Dim file2 As Stream = New FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read)
- ' Load the stream
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument(file2)
- doc.Save("Output.pdf")
- doc.Close(True)
-
-
- Stream file2 = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read);
- // Load the stream
- PdfLoadedDocument doc = new PdfLoadedDocument(file2,true);
- doc.Save("Output.pdf");
- doc.Close(true);
-
-
- Dim file2 As Stream = New FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read)
- ' Load the stream
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument(file2,true)
- doc.Save("Output.pdf")
- doc.Close(True)
-
-
- Stream file2 = new FileStream("sample.pdf", FileMode.Open, FileAccess.Read, FileShare.Read);
- // Load the stream
- PdfLoadedDocument doc = new PdfLoadedDocument(file2, "password");
- doc.Save("Samplepdf.pdf");
-
-
- Dim file2 As Stream = New FileStream("sample.pdf", FileMode.Open, FileAccess.Read, FileShare.Read)
- ' Load the stream
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument(file2, "password")
- doc.Save("Samplepdf.pdf")
-
-
- // Loads an existing document
- PdfLoadedDocument ldoc = new PdfLoadedDocument("Input.pdf");
- ldoc.FileStructure.Version = PdfVersion.Version1_6;
- // Save the changes in the same document.
- ldoc.Save();
- ldoc.Close(true);
-
-
- ' Loads an existing document
- Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("Input.pdf")
- ldoc.FileStructure.Version = PdfVersion.Version1_6
- ' Save the changes in the same document.
- ldoc.Save()
- ldoc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument ldoc = new PdfLoadedDocument("Input.pdf");
- // Splits the source document
- ldoc.Split("Output.pdf");
- ldoc.Close(true);
-
-
- ' Loads an existing document
- Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("Input.pdf")
- ' Splits the source document
- ldoc.Split("Output.pdf")
- ldoc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument ldoc = new PdfLoadedDocument("Form.pdf");
- // Splits the source document
- ldoc.Split("pdfDoc.pdf", 1);
- ldoc.Close(true);
-
-
- ' Loads an existing document
- Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("Form.pdf")
- ' Splits the source document
- ldoc.Split("pdfDoc.pdf", 1)
- ldoc.Close(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceDoc.pdf");
- //Creates a new page and adds it as the last page of the document
- PdfPageBase page = doc.Pages.Add();
- //Create Pdf graphics for the page
- PdfGraphics g = page.Graphics;
- //Create a solid brush
- PdfBrush brush = new PdfSolidBrush(Color.Black);
- float fontSize = 8f;
- //Set the font
- PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, fontSize);
- //Draw the text
- g.DrawString("HelloWorld", font, brush, new RectangleF(47.835f, 236.835f, 564.165f, 553.937f));
- doc.Save("Dispose.pdf");
- // Dispose the object
- doc.Dispose(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceDoc.pdf")
- 'Create a page
- Dim page As PdfPageBase = doc.Pages.Add()
- 'Create Pdf graphics for the page
- Dim g As PdfGraphics = page.Graphics
- 'Create a solid brush
- Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
- Dim fontSize As Single = 8f
- 'Set the font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.TimesRoman, fontSize)
- 'Draw the text
- g.DrawString("HelloWorld", font, brush, New RectangleF(47.835f, 236.835f, 564.165f, 553.937f))
- doc.Save("Dispose.pdf")
- ' Dispose the object
- doc.Dispose(True)
-
-
- //Load an existing document
- PdfLoadedDocument doc = new PdfLoadedDocument("SourceDoc.pdf");
- // Clone the existing the document
- PdfLoadedDocument doc1 = doc.Clone() as PdfLoadedDocument;
- // Save the cloned document to a disk
- doc1.Save("ClonedPDF.pdf");
- doc1.Close(true);
-
-
- 'Load an existing document
- Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceDoc.pdf")
- ' Clone the existing the document
- Dim doc1 As PdfLoadedDocument = TryCast(doc.Clone(), PdfLoadedDocument)
- ' Save the cloned document to a disk
- doc1.Save("ClonedPDF.pdf")
- doc1.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
- // Create page label with upper case roman letters and starts with 1
- PdfPageLabel label = new PdfPageLabel();
- label.NumberStyle = PdfNumberStyle.UpperRoman;
- label.StartNumber = 1;
- lDoc.LoadedPageLabel = label;
- lDoc.Save("Output.pdf");
- lDoc.Close(true);
-
-
- ' Loads an existing document
- Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("Input.pdf")
- ' Create page label with upper case roman letters and starts with 1
- Dim label As PdfPageLabel = New PdfPageLabel()
- label.NumberStyle = PdfNumberStyle.UpperRoman
- label.StartNumber = 1
- lDoc.LoadedPageLabel = label
- lDoc.Save("Output.pdf")
- lDoc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
- // Gets the collection of attachments embedded in the document.
- PdfAttachmentCollection collection = lDoc.Attachments;
- // Creating an attachment
- PdfAttachment attachment = new PdfAttachment("logo.jpeg");
- attachment.FileName = "Syncfusion Logo";
- // Adding attachments to an existing document
- collection.Add(attachment);
- lDoc.Save("Output.pdf");
- lDoc.Close(true);
-
-
- ' Loads an existing document
- Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("Input.pdf")
- ' Gets the collection of attachments displayed on a PDF page.
- Dim collection As PdfAttachmentCollection = lDoc.Attachments
- ' Creating an attachment
- Dim attachment As PdfAttachment = New PdfAttachment("logo.jpeg")
- attachment.FileName = "Syncfusion Logo"
- ' Adding attachments to an existing document
- collection.Add(attachment)
- lDoc.Save("Output.pdf")
- lDoc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
- // Sets the documents colorSpace as GrayScale
- lDoc.ColorSpace = PdfColorSpace.GrayScale;
- lDoc.Save("Output.pdf");
- lDoc.Close(true);
-
-
- ' Loads an existing document
- Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("Input.pdf")
- 'Sets the documents colorSpace as GrayScale
- lDoc.ColorSpace = PdfColorSpace.GrayScale
- lDoc.Save("Output.pdf")
- lDoc.Close(True)
-
-
- // Load the PDF form
- PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
- // Gets the form from the existing document
- PdfLoadedForm form = lDoc.Form;
- // Reading field element
- PdfLoadedTextBoxField textField = form[0] as PdfLoadedTextBoxField;
- textField.Text = "Syncfusion";
- lDoc.Save("Output.pdf");
- lDoc.Close(true);
-
-
- ' Loads an existing document
- Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("Input.pdf")
- ' Gets the form from the existing document
- Dim form As PdfLoadedForm = lDoc.Form
- ' Reading field element
- Dim textField As PdfLoadedTextBoxField = TryCast(form(0), PdfLoadedTextBoxField)
- textField.Text = "Syncfusion"
- lDoc.Save("Output.pdf")
- lDoc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
- // Reading page collection from an existing document
- PdfLoadedPageCollection pageCollection = lDoc.Pages;
- //Creates a new page
- pageCollection.Add();
- lDoc.Save("Output.pdf");
- lDoc.Close(true);
-
-
- ' Loads an existing document
- Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("Input.pdf")
- ' Reading page collection from an existing document
- Dim pageCollection As PdfLoadedPageCollection = lDoc.Pages
- ' Create a page
- pageCollection.Add()
- lDoc.Save("Output.pdf")
- lDoc.Close(True)
-
-
- // Loads an existing document
- PdfLoadedDocument lDoc = new PdfLoadedDocument("sourceDoc.pdf");
- // Reading bookmark collection from an existing document
- PdfBookmarkBase bm = lDoc.Bookmarks;
- // Creates a new bookmark
- PdfBookmark newbm = bm.Add("Chapter1");
- newbm.Color = Color.DarkBlue;
- newbm.TextStyle = PdfTextStyle.Bold;
- newbm.Destination = new PdfDestination( lDoc.Pages[0]);
- lDoc.Save("BookMark.pdf");
-
-
- ' Loads an existing document
- Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("sourceDoc.pdf")
- ' Reading bookmark collection from an existing document
- Dim bm As PdfBookmarkBase = lDoc.Bookmarks
- ' Creates a new bookmark
- Dim newbm As PdfBookmark = bm.Add("Chapter1")
- newbm.Color = Color.DarkBlue
- newbm.TextStyle = PdfTextStyle.Bold
- newbm.Destination = New PdfDestination(lDoc.Pages(0))
- lDoc.Save("BookMark.pdf")
-
-
- // Loads an existing document
- PdfLoadedDocument lDoc = new PdfLoadedDocument("sourceDoc.pdf");
- // Reading named destination collection from an existing document
- PdfNamedDestinationCollection destinationCollection = lDoc.NamedDestinationCollection;
- // Creates a new named destination
- PdfNamedDestination newNamedDestination = new PdfNamedDestination("Chapter1");
- newNamedDestination.Destination = new PdfDestination( lDoc.Pages[0]);
- destinationCollection.Add(newNamedDestination);
- lDoc.Save("NamedDestination.pdf");
-
-
- ' Loads an existing document
- Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("sourceDoc.pdf")
- ' Reading named destination collection from an existing document
- Dim destinationCollection As PdfNamedDestinationCollection = lDoc.NamedDestinationCollection
- ' Creates a new named destination
- Dim newNamedDestination As PdfNamedDestination = New PdfNamedDestination("Chapter1")
- newNamedDestination.Destination = New PdfDestination(lDoc.Pages(0))
- destinationCollection.Add(newNamedDestination)
- lDoc.Save("NamedDestination.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "syncfusion");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "syncfusion")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate(certificateStream, "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate(certificateStream, "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123",KeyStorageFlags.DefaultKeySet);
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123",KeyStorageFlags.DefaultKeySet)
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate(certificateStream, "123",KeyStorageFlags.DefaultKeySet);
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate(certificateStream, "123",KeyStorageFlags.DefaultKeySet)
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(page, pdfCert, "Signature");
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(page, pdfCert, "Signature")
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
-
-
- // Creates a new document
- PdfLoadedDocument doc = new PdfLoadedDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfLoadedSignatureField signatureField = loadedDocument.Form.Fields["Signature"] as PdfLoadedSignatureField;
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature",signatureField);
- doc.Save("SignedPdfSample.pdf");
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signatureField as PdfLoadedSignatureField = TryCast(loadedDocument.Form.Fields["Signature"],PdfLoadedSignature)
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature",signatureField)
- doc.Save("SignedPdfSample.pdf")
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- PdfAppearance appearance = signature.Appearence;
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- Dim appearance As PdfAppearance = signature.Appearence
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- PdfAppearance appearance = signature.Appearence;
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- Dim appearance As PdfAppearance = signature.Appearence
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Location = new PointF(100, 200);
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Location = New PointF(100, 200)
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Location = new PointF(100, 200);
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Location = New PointF(100, 200)
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.ContactInfo = "Syncfusion";
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.ContactInfo = "Syncfusion"
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Reason = "PDF is signed";
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Reason = "PDF is signed"
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.LocationInfo = "US";
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.LocationInfo = "US"
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Certificated = true;
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Certificated = True
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.DocumentPermissions = PdfCertificationFlags.AllowComments;
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.DocumentPermissions = PdfCertificationFlags.AllowComments
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.ContactInfo = "Syncfusion";
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.ContactInfo = "Syncfusion"
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.Visible = false;
- signature.Bounds = new RectangleF(new PointF(5, 5),new SizeF(100,200));
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.Visible = False
- signature.Bounds = New RectangleF(New PointF(5, 5),New SizeF(100,200))
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- PdfStandardFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 20f, PdfFontStyle.Bold);
- PdfBrush brush = PdfBrushes.Black;
- //Document security
- PdfSecurity security = document.Security;
- //use 128 bits key
- security.KeySize = PdfEncryptionKeySize.Key128Bit;
- security.OwnerPassword = "syncfusion";
- security.Permissions = PdfPermissionsFlags.Print | PdfPermissionsFlags.FullQualityPrint;
- security.UserPassword = "password";
- document.Save("Security.pdf");
- document.Close(true);
-
-
- ' Creates a new document
- Dim document As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- Dim font As PdfStandardFont = New PdfStandardFont(PdfFontFamily.TimesRoman, 20f, PdfFontStyle.Bold)
- Dim brush As PdfBrush = PdfBrushes.Black
- 'Document security
- Dim security As PdfSecurity = document.Security
- 'use 128 bits key
- security.KeySize = PdfEncryptionKeySize.Key128Bit
- security.OwnerPassword = "syncfusion"
- security.Permissions = PdfPermissionsFlags.Print Or PdfPermissionsFlags.FullQualityPrint
- security.UserPassword = "password"
- document.Save("Security.pdf")
- document.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfSecurity security = doc.Security;
- security.SetPermissions(PdfPermissionsFlags.AssembleDocument);
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, new PointF(10,10));
- doc.Save("Security.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- 'Document security
- Dim security As PdfSecurity = doc.Security
- security.SetPermissions(PdfPermissionsFlags.AssembleDocument)
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, New PointF(10,10))
- doc.Save("Security.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- PdfSecurity security = doc.Security;
- security.ResetPermissions(PdfPermissionsFlags.AssembleDocument);
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, new PointF(10,10));
- doc.Save("Security.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- 'Document security
- Dim security As PdfSecurity = doc.Security
- security.ResetPermissions(PdfPermissionsFlags.AssembleDocument)
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, New PointF(10,10))
- doc.Save("Security.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- // Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit;
- doc.Security.OwnerPassword = "Syncfusion";
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations;
- doc.Security.UserPassword = "123";
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, new PointF(10,10));
- doc.Save("Security.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit
- doc.Security.OwnerPassword = "Syncfusion"
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations
- doc.Security.UserPassword = "123"
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, New PointF(10,10))
- doc.Save("Security.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- // Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit;
- doc.Security.OwnerPassword = "Syncfusion";
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations;
- doc.Security.UserPassword = "123";
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, new PointF(10,10));
- doc.Save("Security.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit
- doc.Security.OwnerPassword = "Syncfusion"
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations
- doc.Security.UserPassword = "123"
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, New PointF(10,10))
- doc.Save("Security.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- // Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit;
- doc.Security.OwnerPassword = "Syncfusion";
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations | PdfPermissionsFlags.Print;
- doc.Security.UserPassword = "123";
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, new PointF(10,10));
- doc.Save("Security.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit
- doc.Security.OwnerPassword = "Syncfusion"
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations | PdfPermissionsFlags.Print
- doc.Security.UserPassword = "123"
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, New PointF(10,10))
- doc.Save("Security.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- // Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit;
- doc.Security.OwnerPassword = "Syncfusion";
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations;
- doc.Security.UserPassword = "123";
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, new PointF(10,10));
- doc.Save("Security.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit
- doc.Security.OwnerPassword = "Syncfusion"
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations
- doc.Security.UserPassword = "123"
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, New PointF(10,10))
- doc.Save("Security.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- // Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit;
- doc.Security.OwnerPassword = "Syncfusion";
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations | PdfPermissionsFlags.Print;
- doc.Security.UserPassword = "123";
- doc.Security.Algorithm = PdfEncryptionAlgorithm.AES;
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, new PointF(10,10));
- doc.Save("Security.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit
- doc.Security.OwnerPassword = "Syncfusion"
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations | PdfPermissionsFlags.Print
- doc.Security.UserPassword = "123"
- doc.Security.Algorithm = PdfEncryptionAlgorithm.AES
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, New PointF(10,10))
- doc.Save("Security.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- // Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit;
- doc.Security.OwnerPassword = "Syncfusion";
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations;
- doc.Security.UserPassword = "123";
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, new PointF(10,10));
- doc.Save("Security.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit
- doc.Security.OwnerPassword = "Syncfusion"
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations
- doc.Security.UserPassword = "123"
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, New PointF(10,10))
- doc.Save("Security.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- // Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit;
- doc.Security.OwnerPassword = "Syncfusion";
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations;
- doc.Security.UserPassword = "123";
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, new PointF(10,10));
- doc.Save("Security.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Set the documents permission settings
- doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit
- doc.Security.OwnerPassword = "Syncfusion"
- doc.Security.Permissions = PdfPermissionsFlags.EditAnnotations
- doc.Security.UserPassword = "123"
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = doc.Pages.Add()
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
- page.Graphics.DrawString("Permission",font,PdfBrushes.Blue, New PointF(10,10))
- doc.Save("Security.pdf")
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = doc.Pages.Add();
- PdfCertificate pdfCert = new PdfCertificate("Pdf.pfx", "123");
- PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");
- signature.DocumentPermissions = PdfCertificationFlags.AllowComments;
- doc.Save("SignedPdfSample.pdf");
- doc.Close(true);
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = doc.Pages.Add()
- Dim pdfCert As PdfCertificate = New PdfCertificate("Pdf.pfx", "123")
- Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")
- signature.DocumentPermissions = PdfCertificationFlags.AllowComments
- doc.Save("SignedPdfSample.pdf")
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Layout format
- PdfGridLayoutFormat format = new PdfGridLayoutFormat();
- format.Break = PdfLayoutBreakType.FitPage;
- format.PaginateBounds = new RectangleF(0, 0, 400, 500);
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10),format);
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Layout format
- Dim format As New PdfGridLayoutFormat()
- format.Break = PdfLayoutBreakType.FitPage
- format.PaginateBounds = New RectangleF(0, 0, 400, 500)
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10),format)
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Draw grid to the page of PDF document.
- PdfGridLayoutResult result = pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Draw grid to the page of PDF document.
- Dim result As PdfGridLayoutResult = pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page.Graphics, new PointF(10, 10), 100);
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page.Graphics, New PointF(10, 10), 100)
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page.Graphics, 10, 10, 100);
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page.Graphics, 10, 10, 100)
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page.Graphics, new RectangleF(0, 0, 100, 100));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page.Graphics, New RectangleF(0, 0, 100, 100))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Creating layout format
- PdfGridLayoutFormat format=new PdfGridLayoutFormat();
- format.Layout=PdfLayoutType.Paginate;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10), format);
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Creating layout format
- Dim format As New PdfGridLayoutFormat()
- format.Layout = PdfLayoutType.Paginate
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10), format)
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new RectangleF(0, 0, 100, 100));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New RectangleF(0, 0, 100, 100))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Creating layout format
- PdfGridLayoutFormat format=new PdfGridLayoutFormat();
- format.Layout=PdfLayoutType.Paginate;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new RectangleF(0, 0, 100, 100), format);
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Creating layout format
- Dim format As New PdfGridLayoutFormat()
- format.Layout = PdfLayoutType.Paginate
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New RectangleF(0, 0, 100, 100), format)
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, 10, 10);
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, 10, 10)
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Creating layout format
- PdfGridLayoutFormat format=new PdfGridLayoutFormat();
- format.Layout=PdfLayoutType.Paginate;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, 10, 10, format);
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Creating layout format
- Dim format As New PdfGridLayoutFormat()
- format.Layout = PdfLayoutType.Paginate
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, 10, 10, format)
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, 10, 10, 100);
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, 10, 10, 100)
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Creating layout format
- PdfGridLayoutFormat format=new PdfGridLayoutFormat();
- format.Layout=PdfLayoutType.Paginate;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, 10, 10, 100, format);
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Creating layout format
- Dim format As New PdfGridLayoutFormat()
- format.Layout = PdfLayoutType.Paginate
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, 10, 10, 100, format)
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add();
- dataTable.Columns.Add();
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- // Add a new header to PdfGrid.
- pdfGrid.Headers.Add(1);
- // Get the header collection.
- PdfGridHeaderCollection collection = pdfGrid.Headers;
- // Set the header names.
- collection[0].Cells[0].Value = "Header1";
- collection[0].Cells[1].Value = "Header2";
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add()
- dataTable.Columns.Add()
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- ' Add a new header to PdfGrid.
- pdfGrid.Headers.Add(1)
- ' Get the header collection.
- Dim collection As PdfGridHeaderCollection = pdfGrid.Headers
- ' Set the header names.
- collection(0).Cells(0).Value = "Header1"
- collection(0).Cells(1).Value = "Header2"
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Get the rows collection from the PdfGrid
- PdfGridRowCollection rowCollection = pdfGrid.Rows;
- rowCollection[0].Cells[0].Value = "Row Collection Sample";
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Get the rows collection from the PdfGrid
- Dim rowCollection As PdfGridRowCollection = pdfGrid.Rows
- rowCollection(0).Cells(0).Value = "Row Collection Sample"
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Adding different style
- PdfGridStyle style = new PdfGridStyle();
- style.BackgroundBrush = PdfBrushes.Cyan;
- style.TextBrush = PdfBrushes.BlueViolet;
- style.TextPen = new PdfPen(PdfBrushes.Black, 0.25F);
- //Add style to the PdfGrid
- pdfGrid.Style = style;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Adding different style
- Dim style As New PdfGridStyle()
- style.BackgroundBrush = PdfBrushes.Cyan
- style.TextBrush = PdfBrushes.BlueViolet
- style.TextPen = New PdfPen(PdfBrushes.Black, 0.25F)
- 'Add style to the PdfGrid
- pdfGrid.Style = style
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Get the column collection from the PdfGrid
- PdfGridColumnCollection columnCollection = pdfGrid.Columns;
- columnCollection[0].Width = 100;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Get the column collection from the PdfGrid
- Dim columnCollection As PdfGridColumnCollection = pdfGrid.Columns
- columnCollection(0).Width = 100
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Create Cell Style
- PdfGridCellStyle style = new PdfGridCellStyle();
- style.TextBrush = PdfBrushes.Cyan;
- //Gets the width of the 1st column
- float columnWidth = pdfGrid.Columns[0].Width;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Create Cell Style
- Dim style As New PdfGridCellStyle()
- style.TextBrush = PdfBrushes.Cyan
- 'Gets the width of the 1st column
- Dim columnWidth As Single = pdfGrid.Columns(0).Width
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Creating new string formatting
- PdfStringFormat stringFormat = new PdfStringFormat();
- stringFormat.Alignment = PdfTextAlignment.Right;
- //Set string format
- pdfGrid.Columns[0].Format = stringFormat;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Creating new string formatting
- Dim stringFormat As New PdfStringFormat()
- stringFormat.Alignment = PdfTextAlignment.Right
- 'Set string format
- pdfGrid.Columns(0).Format = stringFormat
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Gets the parent grid
- PdfGrid parentGrid = pdfGrid.Columns[0].Grid;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- /// 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Gets the parent grid
- Dim parentGrid As PdfGrid = pdfGrid.Columns(0).Grid
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Using the Column collection
- pdfGrid.Columns[0].Width = 100;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Using the Column collection
- pdfGrid.Columns(0).Width = 100
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Adding new Row
- PdfGridRow row = new PdfGridRow(pdfGrid);
- pdfGrid.Rows.Add(row);
- row.Cells[0].Value = "E03";
- row.Cells[1].Value = "Bran";
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Adding new Row
- Dim row As New PdfGridRow(pdfGrid)
- pdfGrid.Rows.Add(row)
- row.Cells(0).Value = "E03"
- row.Cells(1).Value = "Bran"
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Create Cell Style
- PdfGridCellStyle style = new PdfGridCellStyle();
- style.TextBrush = PdfBrushes.Cyan;
- //Apply style to the specific row
- pdfGrid.Rows[0].ApplyStyle(style);
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Create Cell Style
- Dim style As New PdfGridCellStyle()
- style.TextBrush = PdfBrushes.Cyan
- 'Apply style to the specific row
- pdfGrid.Rows(0).ApplyStyle(style)
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Usage of cell collection
- pdfGrid.Rows[0].Cells[0].Value = "E03";
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Usage of cell collection
- pdfGrid.Rows(0).Cells(0).Value = "E03"
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Create row style
- PdfGridRowStyle rowStyle = new PdfGridRowStyle();
- rowStyle.BackgroundBrush = PdfBrushes.Cyan;
- //Apply style to the row
- pdfGrid.Rows[0].Style = rowStyle;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Create row style
- Dim rowStyle As New PdfGridRowStyle()
- rowStyle.BackgroundBrush = PdfBrushes.Cyan
- 'Apply style to the row
- pdfGrid.Rows(0).Style = rowStyle
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Apply row height
- pdfGrid.Rows[0].Height = 100;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Apply row height
- pdfGrid.Rows(0).Height = 100
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Add new row
- PdfGridRow row = pdfGrid.Rows.Add();
- row.Cells[0].Value = "E03";
- row.Cells[1].Value = "Bran";
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Add new row
- Dim row As PdfGridRow = pdfGrid.Rows.Add()
- row.Cells(0).Value = "E03"
- row.Cells(1).Value = "Bran"
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Adding new Row
- PdfGridRow row = new PdfGridRow(pdfGrid);
- pdfGrid.Rows.Add(row);
- row.Cells[0].Value = "E03";
- row.Cells[1].Value = "Bran";
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Adding new Row
- Dim row As New PdfGridRow(pdfGrid)
- pdfGrid.Rows.Add(row)
- row.Cells(0).Value = "E03"
- row.Cells(1).Value = "Bran"
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Set Span to the cell
- pdfGrid.Rows.SetSpan(0, 0, 2, 2);
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Set Span to the cell
- pdfGrid.Rows.SetSpan(0, 0, 2, 2)
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Create Cell Style
- PdfGridCellStyle style = new PdfGridCellStyle();
- style.TextBrush = PdfBrushes.Cyan;
- //Apply style to the specific row
- pdfGrid.Rows.ApplyStyle(style);
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Create Cell Style
- Dim style As New PdfGridCellStyle()
- style.TextBrush = PdfBrushes.Cyan
- 'Apply style to the specific row
- pdfGrid.Rows.ApplyStyle(style)
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Add new row to the header
- PdfGridRow[] header = pdfGrid.Headers.Add(1);
- header[1].Cells[0].Value = "New Header";
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Add new row to the header
- Dim header As PdfGridRow() = pdfGrid.Headers.Add(1)
- header(1).Cells(0).Value = "New Header"
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Removes all the header in the PdfGrid
- pdfGrid.Headers.Clear();
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Removes all the header in the PdfGrid
- pdfGrid.Headers.Clear()
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Create Cell Style
- PdfGridCellStyle style = new PdfGridCellStyle();
- style.TextBrush = PdfBrushes.Cyan;
- //Apply style to the header
- pdfGrid.Headers.ApplyStyle(style);
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Create Cell Style
- Dim style As New PdfGridCellStyle()
- style.TextBrush = PdfBrushes.Cyan
- 'Apply style to the header
- pdfGrid.Headers.ApplyStyle(style)
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Using the Header collection
- pdfGrid.Headers[0].Cells[0].Value="Column1";
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Using the Header collection
- pdfGrid.Headers(0).Cells(0).Value = "Column1"
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Gets the number of rows in the header
- int count = pdfGrid.Headers.Count;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Gets the number of rows in the header
- Dim count As Integer = pdfGrid.Headers.Count
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Using the Column collection
- pdfGrid.Columns[0].Width = 100;
- //Adding grid cell style
- PdfGridCellStyle rowStyle = new PdfGridCellStyle();
- //Creating Border
- PdfBorders border = new PdfBorders();
- border.All = PdfPens.Blue;
- //setting border to the style
- rowStyle.Borders = border;
- //Applying style to grid
- pdfGrid.Rows[0].Cells[0].Style = rowStyle;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Using the Column collection
- pdfGrid.Columns(0).Width = 100
- 'Adding grid cell style
- Dim rowStyle As New PdfGridCellStyle()
- 'Creating Border
- Dim border As New PdfBorders()
- border.All = PdfPens.Blue
- 'setting border to the style
- rowStyle.Borders = border
- 'Applying style to grid
- pdfGrid.Rows(0).Cells(0).Style = rowStyle
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Using the Column collection
- pdfGrid.Columns[0].Width = 100;
- //Adding grid style
- PdfGridStyle gridStyle = new PdfGridStyle();
- //Adding cell padding
- gridStyle.CellPadding = new PdfPaddings(5, 5, 5, 5);
- //Applying style to grid
- pdfGrid.Style = gridStyle;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Using the Column collection
- pdfGrid.Columns(0).Width = 100
- 'Adding grid style
- Dim gridStyle As New PdfGridStyle()
- 'Adding cell padding
- gridStyle.CellPadding = New PdfPaddings(5, 5, 5, 5)
- 'Applying style to grid
- pdfGrid.Style = gridStyle
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Using the Column collection
- pdfGrid.Columns[0].Width = 100;
- //Adding grid style
- PdfGridStyle gridStyle = new PdfGridStyle();
- //Allow grid to overflow horizontally
- gridStyle.AllowHorizontalOverflow = true;
- //Adding cell spacing between cells
- gridStyle.CellSpacing = 0.5F;
- //Setting text pen for grid
- gridStyle.TextBrush = PdfBrushes.Blue;
- //Applying style to grid
- pdfGrid.Style = gridStyle;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Using the Column collection
- pdfGrid.Columns(0).Width = 100
- 'Adding grid style
- Dim gridStyle As New PdfGridStyle()
- 'Allow grid to overflow horizontally
- gridStyle.AllowHorizontalOverflow = True
- 'Adding cell spacing between cells
- gridStyle.CellSpacing = 0.5F
- 'Setting text pen for grid
- gridStyle.TextBrush = PdfBrushes.Blue
- 'Applying style to grid
- pdfGrid.Style = gridStyle
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Using the Column collection
- pdfGrid.Columns[0].Width = 100;
- //Adding grid row style
- PdfGridRowStyle rowStyle = new PdfGridRowStyle();
- //Setting text pen for row
- rowStyle.TextBrush = PdfBrushes.Blue;
- //Applying style to grid
- pdfGrid.Rows[0].Style = rowStyle;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Using the Column collection
- pdfGrid.Columns(0).Width = 100
- 'Adding grid row style
- Dim rowStyle As New PdfGridRowStyle()
- 'Setting text pen for row
- rowStyle.TextBrush = PdfBrushes.Blue
- 'Applying style to grid
- pdfGrid.Rows(0).Style = rowStyle
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument doc = new PdfDocument();
- //Add a page.
- PdfPage page = doc.Pages.Add();
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Create a DataTable.
- DataTable dataTable = new DataTable();
- //Add columns to the DataTable
- dataTable.Columns.Add("ID");
- dataTable.Columns.Add("Name");
- //Add rows to the DataTable.
- dataTable.Rows.Add(new object[] { "E01", "Clay" });
- dataTable.Rows.Add(new object[] { "E02", "Thomas" });
- //Assign data source.
- pdfGrid.DataSource = dataTable;
- //Using the Column collection
- pdfGrid.Columns[0].Width = 100;
- //Adding grid cell style
- PdfGridCellStyle rowStyle = new PdfGridCellStyle();
- //Setting text pen for cell
- rowStyle.TextBrush = PdfBrushes.Blue;
- //Applying style to grid
- pdfGrid.Rows[0].Cells[0].Style = rowStyle;
- //Draw grid to the page of PDF document.
- pdfGrid.Draw(page, new PointF(10, 10));
- //Save the document.
- doc.Save("Output.pdf");
- //close the document
- doc.Close(true);
-
-
- 'Create a new PDF document.
- Dim doc As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = doc.Pages.Add()
- 'Create a PdfGrid.
- Dim pdfGrid As New PdfGrid()
- 'Create a DataTable.
- Dim dataTable As New DataTable()
- 'Add columns to the DataTable
- dataTable.Columns.Add("ID")
- dataTable.Columns.Add("Name")
- 'Add rows to the DataTable.
- dataTable.Rows.Add(New Object() {"E01", "Clay"})
- dataTable.Rows.Add(New Object() {"E02", "Thomas"})
- 'Assign data source.
- pdfGrid.DataSource = dataTable
- 'Using the Column collection
- pdfGrid.Columns(0).Width = 100
- 'Adding grid cell style
- Dim rowStyle As New PdfGridCellStyle()
- 'Setting text pen for cell
- rowStyle.TextBrush = PdfBrushes.Blue
- 'Applying style to grid
- pdfGrid.Rows(0).Cells(0).Style = rowStyle
- 'Draw grid to the page of PDF document.
- pdfGrid.Draw(page, New PointF(10, 10))
- 'Save the document.
- doc.Save("Output.pdf")
- 'close the document
- doc.Close(True)
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- RectangleF rect = new RectangleF(0, 0, 500, 50);
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- PdfPage page = doc.Pages.Add();
- PdfPageTemplateElement top = new PdfPageTemplateElement(rect);
- PdfGrid table=new PdfGrid();
- // Subscribe the cell layout event
- table.BeginCellLayout += new PdfGridBeginCellLayoutEventHandler(table_BeginCellLayout);
- table.DataSource = dataTable;
- // Draws the table in page
- table.Draw(page.Graphics);
- doc.Save("Tables.pdf");
- // Cell layout event handler
- void table_BeginCellLayout(object sender,PdfGridBeginCellLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- args.Graphics.DrawRectangle(new PdfPen(PdfBrushes.Red, 2), PdfBrushes.White,args.Bounds);
- }
- }
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim rect As RectangleF = New RectangleF(0, 0, 500, 50)
- 'Create DataTable for source
- Dim dataTable As DataTable = New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = New Object() { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- Dim page As PdfPage = doc.Pages.Add()
- Dim top As PdfPageTemplateElement = New PdfPageTemplateElement(rect)
- Dim table As PdfGrid = New PdfGrid()
- ' Subscribe the cell layout event
- AddHandler table.BeginCellLayout, AddressOf table_BeginCellLayout
- table.DataSource = dataTable
- ' Draws the table in page
- table.Draw(page.Graphics)
- doc.Save("Tables.pdf")
- ' Cell layout event handler
- Private Sub table_BeginCellLayout(ByVal sender As Object, ByVal args As PdfGridBeginCellLayoutEventArgs)
- If args.RowIndex = 1 Then
- args.Graphics.DrawRectangle(New PdfPen(PdfBrushes.Red, 2), PdfBrushes.White,args.Bounds)
- End If
- End Sub
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- RectangleF rect = new RectangleF(0, 0, 500, 50);
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- PdfPage page = doc.Pages.Add();
- PdfPageTemplateElement top = new PdfPageTemplateElement(rect);
- PdfGrid table = new PdfGrid();
- // Subscribe the cell layout event
- table.EndCellLayout += new PdfGridEndCellLayoutEventHandler(table_EndCellLayout);
- table.DataSource = dataTable;
- table.Style.CellPadding = 16;
- // Draws the table in page
- table.Draw(page.Graphics);
- doc.Save("Tables.pdf");
- // Cell layout event handler
- void table_EndCellLayout(object sender, PdfGridEndCellLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- args.Graphics.DrawRectangle(new PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds);
- }
- }
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim rect As RectangleF = New RectangleF(0, 0, 500, 50)
- 'Create DataTable for source
- Dim dataTable As DataTable = New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = New Object() { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- Dim page As PdfPage = doc.Pages.Add()
- Dim top As PdfPageTemplateElement = New PdfPageTemplateElement(rect)
- Dim table As PdfGrid = New PdfGrid()
- ' Subscribe the cell layout event
- AddHandler table.EndCellLayout, AddressOf table_EndCellLayout
- table.DataSource = dataTable
- table.Style.CellPadding = 16
- ' Draws the table in page
- table.Draw(page.Graphics)
- doc.Save("Tables.pdf")
- ' Cell layout event handler
- Private Sub table_EndCellLayout(ByVal sender As Object, ByVal args As PdfGridEndCellLayoutEventArgs)
- If args.RowIndex = 1 Then
- args.Graphics.DrawRectangle(New PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds)
- End If
- End Sub
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- RectangleF rect = new RectangleF(0, 0, 500, 50);
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- PdfPage page = doc.Pages.Add();
- PdfPageTemplateElement top = new PdfPageTemplateElement(rect);
- PdfGrid table = new PdfGrid();
- // Subscribe the cell layout event
- table.BeginCellLayout += new PdfGridBeginCellLayoutEventHandler(table_BeginCellLayout);
- table.DataSource = dataTable;
- table.Style.CellPadding = 16;
- // Draws the table in page
- table.Draw(page.Graphics);
- doc.Save("Tables.pdf");
- // Cell layout event handler
- void table_BeginCellLayout(object sender, PdfGridBeginCellLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- args.Graphics.DrawRectangle(new PdfPen(PdfBrushes.Red, 2), PdfBrushes.White,args.Bounds);
- }
- }
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim rect As RectangleF = New RectangleF(0, 0, 500, 50)
- 'Create DataTable for source
- Dim dataTable As DataTable = New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = New Object() { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- Dim page As PdfPage = doc.Pages.Add()
- Dim top As PdfPageTemplateElement = New PdfPageTemplateElement(rect)
- Dim table As PdfGrid = New PdfGrid()
- ' Subscribe the cell layout event
- AddHandler table.BeginCellLayout, AddressOf table_BeginCellLayout
- table.DataSource = dataTable
- table.Style.CellPadding = 16
- ' Draws the table in page
- table.Draw(page.Graphics)
- doc.Save("Tables.pdf")
- ' Cell layout event handler
- Private Sub table_BeginCellLayout(ByVal sender As Object, ByVal args As PdfGridBeginCellLayoutEventArgs)
- If args.RowIndex = 1 Then
- args.Graphics.DrawRectangle(New PdfPen(PdfBrushes.Red, 2), PdfBrushes.White,args.Bounds)
- End If
- End Sub
-
-
- // Creates a new document
- PdfDocument doc = new PdfDocument();
- RectangleF rect = new RectangleF(0, 0, 500, 50);
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- PdfPage page = doc.Pages.Add();
- PdfPageTemplateElement top = new PdfPageTemplateElement(rect);
- PdfGrid table = new PdfGrid();
- // Subscribe the cell layout event
- table.EndCellLayout += new PdfGridEndCellLayoutEventHandler(table_EndCellLayout);
- table.DataSource = dataTable;
- // Draws the table in page
- table.Draw(page.Graphics);
- doc.Save("Tables.pdf");
- // Cell layout event handler
- void table_EndCellLayout(object sender, PdfGridEndCellLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- args.Graphics.DrawRectangle(new PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds);
- }
- }
-
-
- ' Creates a new document
- Dim doc As PdfDocument = New PdfDocument()
- Dim rect As RectangleF = New RectangleF(0, 0, 500, 50)
- 'Create DataTable for source
- Dim dataTable As DataTable = New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = New Object() { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- Dim page As PdfPage = doc.Pages.Add()
- Dim top As PdfPageTemplateElement = New PdfPageTemplateElement(rect)
- Dim table As PdfGrid = New PdfGrid()
- ' Subscribe the cell layout event
- AddHandler table.EndCellLayout, AddressOf table_EndCellLayout
- table.DataSource = dataTable
- table.Style.CellPadding = 16
- ' Draws the table in page
- table.Draw(page.Graphics)
- doc.Save("Tables.pdf")
- ' Cell layout event handler
- Private Sub table_EndCellLayout(ByVal sender As Object, ByVal args As PdfGridEndCellLayoutEventArgs)
- If args.RowIndex = 1 Then
- args.Graphics.DrawRectangle(New PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds)
- End If
- End Sub
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14,PdfFontStyle.Bold);
- //Create a unordered list
- PdfOrderedMarker list = new PdfOrderedMarker(PdfNumberStyle.LowerRoman, font);
- //Create Ordered list as sublist of parent list
- PdfOrderedList subList = new PdfOrderedList();
- subList.Marker = list;
- //Add items to the list
- subList.Items.Add("List of Essential Studio products");
- subList.Items.Add("IO products");
- subList.Items.Add("Grid products");
- subList.Items.Add("Tools products");
- //Draw list
- subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14,PdfFontStyle.Bold)
- 'Create a unordered list
- Dim list As PdfOrderedMarker = New PdfOrderedMarker(PdfNumberStyle.LowerRoman, font)
- 'Create Ordered list as sublist of parent list
- Dim subList As PdfOrderedList = New PdfOrderedList()
- subList.Marker = list
- 'Add items to the list
- subList.Items.Add("List of Essential Studio products")
- subList.Items.Add("IO products")
- subList.Items.Add("Grid products")
- subList.Items.Add("Tools products")
- 'Draw list
- subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create Ordered list as sublist of parent list
- PdfOrderedList subList = new PdfOrderedList();
- subList.Marker.Alignment = PdfListMarkerAlignment.Right;
- subList.Marker.Delimiter = ".";
- subList.Marker.StartNumber = 2;
- subList.Marker.Style = PdfNumberStyle.UpperRoman;
- //Add items to the list
- subList.Items.Add("List of Essential Studio products");
- subList.Items.Add("IO products");
- subList.Items.Add("Grid products");
- subList.Items.Add("Tools products");
- //Draw list
- subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create Ordered list as sublist of parent list
- Dim subList As PdfOrderedList = New PdfOrderedList()
- subList.Marker.Alignment = PdfListMarkerAlignment.Right
- subList.Marker.Delimiter = "."
- subList.Marker.StartNumber = 2
- subList.Marker.Style = PdfNumberStyle.UpperRoman
- 'Add items to the list
- subList.Items.Add("List of Essential Studio products")
- subList.Items.Add("IO products")
- subList.Items.Add("Grid products")
- subList.Items.Add("Tools products")
- 'Draw list
- subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create Ordered list as sublist of parent list
- PdfOrderedList subList = new PdfOrderedList();
- subList.Marker.Alignment = PdfListMarkerAlignment.Right;
- subList.Marker.Delimiter = ".";
- subList.Marker.StartNumber = 2;
- subList.Marker.Style = PdfNumberStyle.UpperRoman;
- //Add items to the list
- subList.Items.Add("List of Essential Studio products");
- subList.Items.Add("IO products");
- subList.Items.Add("Grid products");
- subList.Items.Add("Tools products");
- //Draw list
- subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create Ordered list as sublist of parent list
- Dim subList As PdfOrderedList = New PdfOrderedList()
- subList.Marker.Alignment = PdfListMarkerAlignment.Right
- subList.Marker.Delimiter = "."
- subList.Marker.StartNumber = 2
- subList.Marker.Style = PdfNumberStyle.UpperRoman
- 'Add items to the list
- subList.Items.Add("List of Essential Studio products")
- subList.Items.Add("IO products")
- subList.Items.Add("Grid products")
- subList.Items.Add("Tools products")
- 'Draw list
- subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create Ordered list as sublist of parent list
- PdfOrderedList subList = new PdfOrderedList();
- subList.Marker.Alignment = PdfListMarkerAlignment.Right;
- subList.Marker.Delimiter = ".";
- subList.Marker.StartNumber = 2;
- subList.Marker.Style = PdfNumberStyle.UpperRoman;
- //Add items to the list
- subList.Items.Add("List of Essential Studio products");
- subList.Items.Add("IO products");
- subList.Items.Add("Grid products");
- subList.Items.Add("Tools products");
- //Draw list
- subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create Ordered list as sublist of parent list
- Dim subList As PdfOrderedList = New PdfOrderedList()
- subList.Marker.Alignment = PdfListMarkerAlignment.Right
- subList.Marker.Delimiter = "."
- subList.Marker.StartNumber = 2
- subList.Marker.Style = PdfNumberStyle.UpperRoman
- 'Add items to the list
- subList.Items.Add("List of Essential Studio products")
- subList.Items.Add("IO products")
- subList.Items.Add("Grid products")
- subList.Items.Add("Tools products")
- 'Draw list
- subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create Ordered list as sublist of parent list
- PdfOrderedList subList = new PdfOrderedList();
- subList.Marker.Alignment = PdfListMarkerAlignment.Right;
- subList.Marker.Delimiter = ".";
- subList.Marker.StartNumber = 2;
- subList.Marker.Style = PdfNumberStyle.UpperRoman;
- //Add items to the list
- subList.Items.Add("List of Essential Studio products");
- subList.Items.Add("IO products");
- subList.Items.Add("Grid products");
- subList.Items.Add("Tools products");
- //Draw list
- subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Creates a new page and adds it as the last page of the document
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create Ordered list as sublist of parent list
- Dim subList As PdfOrderedList = New PdfOrderedList()
- subList.Marker.Alignment = PdfListMarkerAlignment.Right
- subList.Marker.Delimiter = "."
- subList.Marker.StartNumber = 2
- subList.Marker.Style = PdfNumberStyle.UpperRoman
- 'Add items to the list
- subList.Items.Add("List of Essential Studio products")
- subList.Items.Add("IO products")
- subList.Items.Add("Grid products")
- subList.Items.Add("Tools products")
- 'Draw list
- subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList();
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create string format
- PdfStringFormat format = new PdfStringFormat();
- format.LineSpacing = 20f;
- font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
- //Apply formattings to list
- list.Font = font;
- list.StringFormat = format;
- //Set list indent
- list.Indent = 10;
- //Add items to the list
- list.Items.Add("List of Essential Studio products");
- list.Items.Add("IO products");
- //Set text indent
- list.TextIndent = 10;
- //Draw list
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("UnOrderList.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList()
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create string format
- Dim format As PdfStringFormat = New PdfStringFormat()
- format.LineSpacing = 20f
- font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
- 'Apply formattings to list
- list.Font = font
- list.StringFormat = format
- 'Set list indent
- list.Indent = 10
- 'Add items to the list
- list.Items.Add("List of Essential Studio products")
- list.Items.Add("IO products")
- 'Set text indent
- list.TextIndent = 10
- 'Draw list
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("UnOrderList.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList();
- list.Marker = new PdfUnorderedMarker("list", font);
- //Create string format
- PdfStringFormat format = new PdfStringFormat();
- format.LineSpacing = 20f;
- font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
- //Apply formattings to list
- list.Font = font;
- list.StringFormat = format;
- //Set list indent
- list.Indent = 10;
- //Add items to the list
- list.Items.Add("List of Essential Studio products");
- list.Items.Add("IO products");
- //Set text indent
- list.TextIndent = 10;
- //Draw list
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("UnOrderList.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList()
- list.Marker = New PdfUnorderedMarker("list", font)
- 'Create string format
- Dim format As PdfStringFormat = New PdfStringFormat()
- format.LineSpacing = 20f
- font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
- 'Apply formattings to list
- list.Font = font
- list.StringFormat = format
- 'Set list indent
- list.Indent = 10
- 'Add items to the list
- list.Items.Add("List of Essential Studio products")
- list.Items.Add("IO products")
- 'Set text indent
- list.TextIndent = 10
- 'Draw list
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("UnOrderList.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList();
- list.Markerlist.Marker = new PdfUnorderedMarker(PdfUnorderedMarkerStyle.Asterisk);
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create string format
- PdfStringFormat format = new PdfStringFormat();
- format.LineSpacing = 20f;
- font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
- //Apply formattings to list
- list.Font = font;
- list.StringFormat = format;
- //Set list indent
- list.Indent = 10;
- //Add items to the list
- list.Items.Add("List of Essential Studio products");
- list.Items.Add("IO products");
- //Set text indent
- list.TextIndent = 10;
- //Draw list
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("UnOrderList.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList()
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create string format
- Dim format As PdfStringFormat = New PdfStringFormat()
- format.LineSpacing = 20f
- font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
- 'Apply formattings to list
- list.Font = font
- list.StringFormat = format
- 'Set list indent
- list.Indent = 10
- 'Add items to the list
- list.Items.Add("List of Essential Studio products")
- list.Items.Add("IO products")
- 'Set text indent
- list.TextIndent = 10
- 'Draw list
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("UnOrderList.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList();
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create string format
- PdfStringFormat format = new PdfStringFormat();
- format.LineSpacing = 20f;
- font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
- //Apply formattings to list
- list.Font = font;
- list.StringFormat = format;
- //Set list indent
- list.Indent = 10;
- //Add items to the list
- list.Items.Add("List of Essential Studio products");
- list.Items.Add("IO products");
- //Set text indent
- list.TextIndent = 10;
- //Draw list
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("UnOrderList.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList()
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create string format
- Dim format As PdfStringFormat = New PdfStringFormat()
- format.LineSpacing = 20f
- font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
- 'Apply formattings to list
- list.Font = font
- list.StringFormat = format
- 'Set list indent
- list.Indent = 10
- 'Add items to the list
- list.Items.Add("List of Essential Studio products")
- list.Items.Add("IO products")
- 'Set text indent
- list.TextIndent = 10
- 'Draw list
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("UnOrderList.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList();
- //Set the list image
- list.Marker.Image = new PdfBitmap("Bullet.jpg");
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create string format
- PdfStringFormat format = new PdfStringFormat();
- format.LineSpacing = 20f;
- font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
- //Apply formattings to list
- list.Font = font;
- list.StringFormat = format;
- //Set list indent
- list.Indent = 10;
- //Add items to the list
- list.Items.Add("List of Essential Studio products");
- list.Items.Add("IO products");
- //Set text indent
- list.TextIndent = 10;
- //Draw list
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("UnOrderList.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList()
- 'Set the list image
- list.Marker.Image = new PdfBitmap("Bullet.jpg")
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create string format
- Dim format As PdfStringFormat = New PdfStringFormat()
- format.LineSpacing = 20f
- font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
- 'Apply formattings to list
- list.Font = font
- list.StringFormat = format
- 'Set list indent
- list.Indent = 10
- 'Add items to the list
- list.Items.Add("List of Essential Studio products")
- list.Items.Add("IO products")
- 'Set text indent
- list.TextIndent = 10
- 'Draw list
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("UnOrderList.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList();
- //Set the marker Text
- list.Marker.Text = "List: ";
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create string format
- PdfStringFormat format = new PdfStringFormat();
- format.LineSpacing = 20f;
- font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
- //Apply formattings to list
- list.Font = font;
- list.StringFormat = format;
- //Set list indent
- list.Indent = 10;
- //Add items to the list
- list.Items.Add("List of Essential Studio products");
- list.Items.Add("IO products");
- //Set text indent
- list.TextIndent = 10;
- //Draw list
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("UnOrderList.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList()
- 'Set the marker Text
- list.Marker.Text = "List: "
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create string format
- Dim format As PdfStringFormat = New PdfStringFormat()
- format.LineSpacing = 20f
- font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
- 'Apply formattings to list
- list.Font = font
- list.StringFormat = format
- 'Set list indent
- list.Indent = 10
- 'Add items to the list
- list.Items.Add("List of Essential Studio products")
- list.Items.Add("IO products")
- 'Set text indent
- list.TextIndent = 10
- 'Draw list
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("UnOrderList.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList();
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create string format
- PdfStringFormat format = new PdfStringFormat();
- format.LineSpacing = 20f;
- font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
- //Apply formattings to list
- list.Font = font;
- list.StringFormat = format;
- //Set list indent
- list.Indent = 10;
- //Add items to the list
- list.Items.Add("List of Essential Studio products");
- list.Items.Add("IO products");
- //Set text indent
- list.TextIndent = 10;
- //Draw list
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("UnOrderList.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList()
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create string format
- Dim format As PdfStringFormat = New PdfStringFormat()
- format.LineSpacing = 20f
- font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
- 'Apply formattings to list
- list.Font = font
- list.StringFormat = format
- 'Set list indent
- list.Indent = 10
- 'Add items to the list
- list.Items.Add("List of Essential Studio products")
- list.Items.Add("IO products")
- 'Set text indent
- list.TextIndent = 10
- 'Draw list
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("UnOrderList.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList();
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create string format
- PdfStringFormat format = new PdfStringFormat();
- format.LineSpacing = 20f;
- font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
- //Apply formattings to list
- list.Font = font;
- list.StringFormat = format;
- //Set list indent
- list.Indent = 10;
- //Add items to the list
- list.Items.Add("List of Essential Studio products");
- list.Items.Add("IO products");
- //Set text indent
- list.TextIndent = 10;
- //Draw list
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("UnOrderList.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList()
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create string format
- Dim format As PdfStringFormat = New PdfStringFormat()
- format.LineSpacing = 20f
- font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
- 'Apply formattings to list
- list.Font = font
- list.StringFormat = format
- 'Set list indent
- list.Indent = 10
- 'Add items to the list
- list.Items.Add("List of Essential Studio products")
- list.Items.Add("IO products")
- 'Set text indent
- list.TextIndent = 10
- 'Draw list
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("UnOrderList.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList();
- //Set the marker style
- list.Marker.Alignment = PdfListMarkerAlignment.Left
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- //Create string format
- PdfStringFormat format = new PdfStringFormat();
- format.LineSpacing = 20f;
- font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
- //Apply formattings to list
- list.Font = font;
- list.StringFormat = format;
- //Set list indent
- list.Indent = 10;
- //Add items to the list
- list.Items.Add("List of Essential Studio products");
- list.Items.Add("IO products");
- //Set text indent
- list.TextIndent = 10;
- //Draw list
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("UnOrderList.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList()
- 'Set the marker alignment
- list.Marker.Alignment = PdfListMarkerAlignment.Left
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- 'Create string format
- Dim format As PdfStringFormat = New PdfStringFormat()
- format.LineSpacing = 20f
- font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
- 'Apply formattings to list
- list.Font = font
- list.StringFormat = format
- 'Set list indent
- list.Indent = 10
- 'Add items to the list
- list.Items.Add("List of Essential Studio products")
- list.Items.Add("IO products")
- 'Set text indent
- list.TextIndent = 10
- 'Draw list
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("UnOrderList.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- // Creates an item
- PdfListItem item = new PdfListItem("Tools");
- item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Creates Grid list item
- PdfListItem gridItem = new PdfListItem("Grid");
- gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Adding items in collection
- listItemCollection.Add(item);
- listItemCollection.Add(gridItem);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- ' Creates an item
- Dim item As PdfListItem = New PdfListItem("Tools")
- item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Creates Grid list item
- Dim gridItem As PdfListItem = New PdfListItem("Grid")
- gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Adding items in collection
- listItemCollection.Add(item)
- listItemCollection.Add(gridItem)
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- // Creates an item
- PdfListItem item = new PdfListItem("Tools");
- item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Creates Grid list item
- PdfListItem gridItem = new PdfListItem("Grid");
- gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Adding items in collection
- listItemCollection.Add(item);
- listItemCollection.Add(gridItem);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- ' Creates an item
- Dim item As PdfListItem = New PdfListItem("Tools")
- item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Creates Grid list item
- Dim gridItem As PdfListItem = New PdfListItem("Grid")
- gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Adding items in collection
- listItemCollection.Add(item)
- listItemCollection.Add(gridItem)
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- // Creates an item
- PdfListItem item = new PdfListItem("Tools");
- item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Creates Grid list item
- PdfListItem gridItem = new PdfListItem("Grid");
- gridItem.Text = "Grid";
- gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Adding items in collection
- listItemCollection.Add(item);
- listItemCollection.Add(gridItem);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- ' Creates an item
- Dim item As PdfListItem = New PdfListItem("Tools")
- item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Creates Grid list item
- Dim gridItem As PdfListItem = New PdfListItem("Grid")
- gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- gridItem.Text = "Grid"
- ' Adding items in collection
- listItemCollection.Add(item)
- listItemCollection.Add(gridItem)
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- // Creates an item
- PdfListItem item = new PdfListItem("Tools");
- item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Creates Grid list item
- PdfListItem gridItem = new PdfListItem("Grid");
- gridItem.StringFormat = new PdfStringFormat(PdfTextAlignment.Left);
- gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Adding items in collection
- listItemCollection.Add(item);
- listItemCollection.Add(gridItem);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- ' Creates an item
- Dim item As PdfListItem = New PdfListItem("Tools")
- item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Creates Grid list item
- Dim gridItem As PdfListItem = New PdfListItem("Grid")
- gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- gridItem.StringFormat = New PdfStringFormat(PdfTextAlignment.Left)
- ' Adding items in collection
- listItemCollection.Add(item)
- listItemCollection.Add(gridItem)
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- // Creates an item
- PdfListItem item = new PdfListItem("Tools");
- item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Creates Grid list item
- PdfListItem gridItem = new PdfListItem("Grid");
- gridItem.Pen = new PdfPen(PdfBrushes.Blue);
- gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Adding items in collection
- listItemCollection.Add(item);
- listItemCollection.Add(gridItem);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- ' Creates an item
- Dim item As PdfListItem = New PdfListItem("Tools")
- item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Creates Grid list item
- Dim gridItem As PdfListItem = New PdfListItem("Grid")
- gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- gridItem.Pen = New PdfPen(PdfBrushes.Blue)
- ' Adding items in collection
- listItemCollection.Add(item)
- listItemCollection.Add(gridItem)
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- // Creates an item
- PdfListItem item = new PdfListItem("Tools");
- item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Creates Grid list item
- PdfListItem gridItem = new PdfListItem("Grid");
- gridItem.Brush = PdfBrushes.BlueViolet;
- gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Adding items in collection
- listItemCollection.Add(item);
- listItemCollection.Add(gridItem);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- ' Creates an item
- Dim item As PdfListItem = New PdfListItem("Tools")
- item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Creates Grid list item
- Dim gridItem As PdfListItem = New PdfListItem("Grid")
- gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- gridItem.Brush = PdfBrushes.BlueViolet
- ' Adding items in collection
- listItemCollection.Add(item)
- listItemCollection.Add(gridItem)
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection();
- // Creates an item
- PdfListItem item = new PdfListItem("Backoffice");
- item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Creates Grid list item
- PdfListItem gridItem = new PdfListItem("Grid");
- gridItem.Brush = PdfBrushes.BlueViolet;
- gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Adding items in collection
- listItemCollection.Add(item);
- listItemCollection.Add(gridItem);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- //Create Ordered list as sublist of parent list
- PdfOrderedList subList = new PdfOrderedList();
- subList.Marker.Brush = PdfBrushes.Black;
- subList.Indent = 20;
- subList.Items.Add("Essential PDF");
- subList.Items.Add("Essential DocIO");
- subList.Items.Add("Essrntial XlsIO");
- list.Items[0].SubList = subList;
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection()
- ' Creates an item
- Dim item As PdfListItem = New PdfListItem("Backoffice")
- item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Creates Grid list item
- Dim gridItem As PdfListItem = New PdfListItem("Grid")
- gridItem.Brush = PdfBrushes.BlueViolet
- gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Adding items in collection
- listItemCollection.Add(item)
- listItemCollection.Add(gridItem)
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- 'Create Ordered list as sublist of parent list
- Dim subList As PdfOrderedList = New PdfOrderedList()
- subList.Marker.Brush = PdfBrushes.Black
- subList.Indent = 20
- subList.Items.Add("Essential PDF")
- subList.Items.Add("Essential DocIO")
- subList.Items.Add("Essrntial XlsIO")
- list.Items(0).SubList = subList
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection();
- // Creates an item
- PdfListItem item = new PdfListItem("Backoffice");
- item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Creates Grid list item
- PdfListItem gridItem = new PdfListItem("Grid");
- gridItem.TextIndent = 10;
- gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Adding items in collection
- listItemCollection.Add(item);
- listItemCollection.Add(gridItem);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- //Create Ordered list as sublist of parent list
- PdfOrderedList subList = new PdfOrderedList();
- subList.Marker.Brush = PdfBrushes.Black;
- subList.Indent = 20;
- subList.Items.Add("Essential PDF");
- subList.Items.Add("Essential DocIO");
- subList.Items.Add("Essrntial XlsIO");
- list.Items[0].SubList = subList;
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection()
- ' Creates an item
- Dim item As PdfListItem = New PdfListItem("Backoffice")
- item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Creates Grid list item
- Dim gridItem As PdfListItem = New PdfListItem("Grid")
- gridItem.TextIndent = 10
- gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Adding items in collection
- listItemCollection.Add(item)
- listItemCollection.Add(gridItem)
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- 'Create Ordered list as sublist of parent list
- Dim subList As PdfOrderedList = New PdfOrderedList()
- subList.Marker.Brush = PdfBrushes.Black
- subList.Indent = 20
- subList.Items.Add("Essential PDF")
- subList.Items.Add("Essential DocIO")
- subList.Items.Add("Essrntial XlsIO")
- list.Items(0).SubList = subList
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection();
- // Creates an item
- PdfListItem item = new PdfListItem("Backoffice");
- item.TextIndent = 10;
- item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Creates Grid list item
- PdfListItem gridItem = new PdfListItem("Grid");
- gridItem.Brush = PdfBrushes.BlueViolet;
- gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Adding items in collection
- listItemCollection.Add(item);
- listItemCollection.Add(gridItem);
-
-
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection()
- ' Creates an item
- Dim item As PdfListItem = New PdfListItem("Backoffice")
- item.TextIndent = 10
- item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Creates Grid list item
- Dim gridItem As PdfListItem = New PdfListItem("Grid")
- gridItem.Brush = PdfBrushes.BlueViolet
- gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Adding items in collection
- listItemCollection.Add(item)
- listItemCollection.Add(gridItem)
-
-
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection();
- // Creates an item
- PdfListItem item = new PdfListItem("Backoffice");
- item.TextIndent = 10;
- item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Creates Grid list item
- PdfListItem gridItem = new PdfListItem("Grid");
- gridItem.Brush = PdfBrushes.BlueViolet;
- gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Adding items in collection
- listItemCollection.Add(item);
- listItemCollection.Add(gridItem);
-
-
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection()
- ' Creates an item
- Dim item As PdfListItem = New PdfListItem("Backoffice")
- item.TextIndent = 10
- item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Creates Grid list item
- Dim gridItem As PdfListItem = New PdfListItem("Grid")
- gridItem.Brush = PdfBrushes.BlueViolet
- gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Adding items in collection
- listItemCollection.Add(item)
- listItemCollection.Add(gridItem)
-
-
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection();
- // Creates an item
- PdfListItem item = new PdfListItem("Backoffice");
- item.TextIndent = 10;
- item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Creates Grid list item
- PdfListItem gridItem = new PdfListItem("Grid");
- gridItem.Brush = PdfBrushes.BlueViolet;
- gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Adding items in collection
- listItemCollection.Add(item, 10);
- listItemCollection.Add(gridItem, 8);
-
-
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection()
- ' Creates an item
- Dim item As PdfListItem = New PdfListItem("Backoffice")
- item.TextIndent = 10
- item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Creates Grid list item
- Dim gridItem As PdfListItem = New PdfListItem("Grid")
- gridItem.Brush = PdfBrushes.BlueViolet
- gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- ' Adding items in collection
- listItemCollection.Add(item, 10)
- listItemCollection.Add(gridItem, 8)
-
-
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection();
- // Adding items in collection
- listItemCollection.Add("Backoffice", 10);
- listItemCollection.Add("Grid", 8);
-
-
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection()
- ' Adding items in collection
- listItemCollection.Add("Backoffice", 10)
- listItemCollection.Add("Grid", 8)
-
-
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection();
- // Adding items in collection
- listItemCollection.Add("Backoffice", new PdfStandardFont( PdfFontFamily.TimesRoman,10));
- listItemCollection.Add("Grid", new PdfStandardFont(PdfFontFamily.TimesRoman, 11));
-
-
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection()
- ' Adding items in collection
- listItemCollection.Add("Backoffice", New PdfStandardFont(PdfFontFamily.TimesRoman,10))
- listItemCollection.Add("Grid", New PdfStandardFont(PdfFontFamily.TimesRoman, 11))
-
-
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection();
- // Adding items in collection
- listItemCollection.Add("Backoffice", new PdfStandardFont( PdfFontFamily.TimesRoman,10), 10);
- listItemCollection.Add("Grid", new PdfStandardFont(PdfFontFamily.TimesRoman, 11), 8);
-
-
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection()
- ' Adding items in collection
- listItemCollection.Add("Backoffice", New PdfStandardFont(PdfFontFamily.TimesRoman,10), 10)
- listItemCollection.Add("Grid", New PdfStandardFont(PdfFontFamily.TimesRoman, 11), 8)
-
-
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- PdfListItem newItem = new PdfListItem("PDF");
- // Insert a new item in the collection
- listItemCollection.Insert(0, newItem);
-
-
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- Dim newItem As PdfListItem = New PdfListItem("PDF")
- ' Insert a new item in the collection
- listItemCollection.Insert(0, newItem)
-
-
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- PdfListItem newItem = new PdfListItem("PDF");
- // Insert a new item in the collection
- listItemCollection.Insert(0, newItem, 10);
-
-
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- Dim newItem As PdfListItem = New PdfListItem("PDF")
- ' Insert a new item in the collection
- listItemCollection.Insert(0, newItem, 10)
-
-
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- PdfListItem toolsItem = new PdfListItem("Tools");
- // Remove 'Tools' list item
- listItemCollection.Remove(toolsItem);
-
-
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- Dim toolsItem As PdfListItem = New PdfListItem("Tools")
- ' Remove 'Tools' list item
- listItemCollection.Remove(toolsItem)
-
-
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- // Remove the firse item from the collection
- listItemCollection.RemoveAt(0);
-
-
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- ' Remove the firse item from the collection
- listItemCollection.RemoveAt(0)
-
-
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- // Creates 'Tools' list item
- PdfListItem toolsItem = new PdfListItem("Tools");
- int indexOf = listItemCollection.IndexOf(toolsItem);
-
-
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- ' Creates 'Tools' list item
- Dim toolsItem As PdfListItem = New PdfListItem("Tools")
- Dim indexOf As Integer = listItemCollection.IndexOf(toolsItem)
-
-
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- // Clears the list
- listItemCollection.Clear();
-
-
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- ' Clears the list
- listItemCollection.Clear()
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- // Creates an item collection
- PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- // Event handler
- list.BeginPageLayout += new BeginPageLayoutEventHandler(list_BeginPageLayout);
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
- // Event handler
- void list_BeginPageLayout(object sender, BeginPageLayoutEventArgs e)
- {
- // Set the new bounds for the list
- e.Bounds = new RectangleF(0, 0, e.Page.GetClientSize().Width, e.Page.GetClientSize().Height);
- }
-
-
- 'Create a new PDf document
- Private document As PdfDocument = New PdfDocument()
- 'Create a page
- Private page As PdfPage = document.Pages.Add()
- Private graphics As PdfGraphics = page.Graphics
- Private products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- ' Creates an item collection
- Private listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
- 'Create a unordered list
- Private list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- ' Event handler
- AddHandler list.BeginPageLayout, AddressOf list_BeginPageLayout
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
- ' Event handler
- Private Sub list_BeginPageLayout(ByVal sender As Object, ByVal e As BeginPageLayoutEventArgs)
- ' Set the new bounds for the list
- e.Bounds = New RectangleF(0, 0, e.Page.GetClientSize().Width, e.Page.GetClientSize().Height)
- End Sub
-
-
- // Event handler
- void list_BeginPageLayout(object sender, BeginPageLayoutEventArgs e)
- {
- PdfUnorderedList list = sender as PdfUnorderedList;
- list.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
- // Set the new bounds for the list
- e.Bounds = new RectangleF(0, 0, e.Page.GetClientSize().Width, e.Page.GetClientSize().Height);
- }
-
-
- ' Event handler
- Private Sub list_BeginPageLayout(ByVal sender As Object, ByVal e As BeginPageLayoutEventArgs)
- Dim list As PdfUnorderedList = TryCast(sender, PdfUnorderedList)
- list.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 12)
- ' Set the new bounds for the list
- e.Bounds = New RectangleF(0, 0, e.Page.GetClientSize().Width, e.Page.GetClientSize().Height)
- End Sub
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14,PdfFontStyle.Bold);
- //Create a unordered list
- PdfOrderedMarker list = new PdfOrderedMarker(PdfNumberStyle.LowerRoman, font);
- //Create Ordered list as sublist of parent list
- PdfOrderedList subList = new PdfOrderedList();
- subList.Marker = list;
- //Add items to the list
- subList.Items.Add("List of Essential Studio products");
- subList.Items.Add("IO products");
- subList.Items.Add("Grid products");
- subList.Items.Add("Tools products");
- //Draw list
- subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14,PdfFontStyle.Bold)
- 'Create a unordered list
- Dim list As PdfOrderedMarker = New PdfOrderedMarker(PdfNumberStyle.LowerRoman, font)
- 'Create Ordered list as sublist of parent list
- Dim subList As PdfOrderedList = New PdfOrderedList()
- subList.Marker = list
- 'Add items to the list
- subList.Items.Add("List of Essential Studio products")
- subList.Items.Add("IO products")
- subList.Items.Add("Grid products")
- subList.Items.Add("Tools products")
- 'Draw list
- subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14,PdfFontStyle.Bold);
- //Create a unordered list
- PdfOrderedMarker list = new PdfOrderedMarker(PdfNumberStyle.LowerRoman, font);
- //Create Ordered list as sublist of parent list
- PdfOrderedList subList = new PdfOrderedList();
- subList.Marker = list;
- //Add items to the list
- subList.Items.Add("List of Essential Studio products");
- subList.Items.Add("IO products");
- subList.Items.Add("Grid products");
- subList.Items.Add("Tools products");
- //Draw list
- subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14,PdfFontStyle.Bold)
- 'Create a unordered list
- Dim list As PdfOrderedMarker = New PdfOrderedMarker(PdfNumberStyle.LowerRoman, font)
- 'Create Ordered list as sublist of parent list
- Dim subList As PdfOrderedList = New PdfOrderedList()
- subList.Marker = list
- 'Add items to the list
- subList.Items.Add("List of Essential Studio products")
- subList.Items.Add("IO products")
- subList.Items.Add("Grid products")
- subList.Items.Add("Tools products")
- 'Draw list
- subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14,PdfFontStyle.Bold);
- //Create a unordered list
- PdfOrderedMarker list = new PdfOrderedMarker(PdfNumberStyle.LowerRoman, font);
- //Create Ordered list as sublist of parent list
- PdfOrderedList subList = new PdfOrderedList();
- subList.Marker = list;
- subList.MarkerHierarchy = true;
- //Add items to the list
- subList.Items.Add("List of Essential Studio products");
- subList.Items.Add("IO products");
- subList.Items.Add("Grid products");
- subList.Items.Add("Tools products");
- //Draw list
- subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("List.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14,PdfFontStyle.Bold)
- 'Create a unordered list
- Dim list As PdfOrderedMarker = New PdfOrderedMarker(PdfNumberStyle.LowerRoman, font)
- 'Create Ordered list as sublist of parent list
- Dim subList As PdfOrderedList = New PdfOrderedList()
- subList.Marker = list
- subList.MarkerHierarchy = True
- 'Add items to the list
- subList.Items.Add("List of Essential Studio products")
- subList.Items.Add("IO products")
- subList.Items.Add("Grid products")
- subList.Items.Add("Tools products")
- 'Draw list
- subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("List.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList();
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- graphics.DrawString("List Features", font, PdfBrushes.DarkBlue, new PointF(225, 10));
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- string[] IO = { "XlsIO", "PDF", "DocIO" };
- font = new PdfStandardFont(PdfFontFamily.Helvetica, 12, PdfFontStyle.Regular);
- graphics.DrawString("This sample demonstrates various features of bullets and lists. A list can be ordered and Unordered. Essential PDF provides support for creating and formatting ordered and unordered lists.", font, PdfBrushes.Black, new RectangleF(0, 50, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- //Create string format
- PdfStringFormat format = new PdfStringFormat();
- format.LineSpacing = 20f;
- font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
- //Apply formattings to list
- list.Font = font;
- list.StringFormat = format;
- //Set list indent
- list.Indent = 10;
- //Add items to the list
- list.Items.Add("List of Essential Studio products");
- list.Items.Add("IO products");
- //Set text indent
- list.TextIndent = 10;
- //Draw list
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("UnOrderList.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList()
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- graphics.DrawString("List Features", font, PdfBrushes.DarkBlue, New PointF(225, 10))
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- Dim IO() As String = { "XlsIO", "PDF", "DocIO" }
- font = New PdfStandardFont(PdfFontFamily.Helvetica, 12, PdfFontStyle.Regular)
- graphics.DrawString("This sample demonstrates various features of bullets and lists. A list can be ordered and Unordered. Essential PDF provides support for creating and formatting ordered and unordered lists.", font, PdfBrushes.Black, New RectangleF(0, 50, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- 'Create string format
- Dim format As PdfStringFormat = New PdfStringFormat()
- format.LineSpacing = 20f
- font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
- 'Apply formattings to list
- list.Font = font
- list.StringFormat = format
- 'Set list indent
- list.Indent = 10
- 'Add items to the list
- list.Items.Add("List of Essential Studio products")
- list.Items.Add("IO products")
- 'Set text indent
- list.TextIndent = 10
- 'Draw list
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("UnOrderList.pdf")
-
-
- //Create a new PDf document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- PdfGraphics graphics = page.Graphics;
- //Create a unordered list
- PdfUnorderedList list = new PdfUnorderedList();
- //Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
- //Create a font and write title
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
- graphics.DrawString("List Features", font, PdfBrushes.DarkBlue, new PointF(225, 10));
- string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
- string[] IO = { "XlsIO", "PDF", "DocIO" };
- font = new PdfStandardFont(PdfFontFamily.Helvetica, 12, PdfFontStyle.Regular);
- graphics.DrawString("This sample demonstrates various features of bullets and lists. A list can be ordered and Unordered. Essential PDF provides support for creating and formatting ordered and unordered lists.", font, PdfBrushes.Black, new RectangleF(0, 50, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- //Create string format
- PdfStringFormat format = new PdfStringFormat();
- format.LineSpacing = 20f;
- font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
- //Apply formattings to list
- list.Font = font;
- list.StringFormat = format;
- //Set list indent
- list.Indent = 10;
- //Add items to the list
- list.Items.Add("List of Essential Studio products");
- list.Items.Add("IO products");
- //Set text indent
- list.TextIndent = 10;
- //Draw list
- list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
- document.Save("UnOrderList.pdf");
-
-
- 'Create a new PDf document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim graphics As PdfGraphics = page.Graphics
- 'Create a unordered list
- Dim list As PdfUnorderedList = New PdfUnorderedList()
- 'Set the marker style
- list.Marker.Style = PdfUnorderedMarkerStyle.Disk
- 'Create a font and write title
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
- graphics.DrawString("List Features", font, PdfBrushes.DarkBlue, New PointF(225, 10))
- Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
- Dim IO() As String = { "XlsIO", "PDF", "DocIO" }
- font = New PdfStandardFont(PdfFontFamily.Helvetica, 12, PdfFontStyle.Regular)
- graphics.DrawString("This sample demonstrates various features of bullets and lists. A list can be ordered and Unordered. Essential PDF provides support for creating and formatting ordered and unordered lists.", font, PdfBrushes.Black, New RectangleF(0, 50, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- 'Create string format
- Dim format As PdfStringFormat = New PdfStringFormat()
- format.LineSpacing = 20f
- font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
- 'Apply formattings to list
- list.Font = font
- list.StringFormat = format
- 'Set list indent
- list.Indent = 10
- 'Add items to the list
- list.Items.Add("List of Essential Studio products")
- list.Items.Add("IO products")
- 'Set text indent
- list.TextIndent = 10
- 'Draw list
- list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
- document.Save("UnOrderList.pdf")
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Creating Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- // Adding rows
- PdfRowCollection rowCollection = table.Rows;
- // Gets the first row from the collection.
- rowCollection.Add(new object[] { "111", "Maxim", "III" });
- // Create the layout format
- PdfLightTableLayoutFormat format = new PdfLightTableLayoutFormat();
- format.Layout = PdfLayoutType.Paginate;
- format.Break = PdfLayoutBreakType.FitElement;
- // Draw the table
- PdfLightTableLayoutResult result = table.Draw(page, new PointF(0, 0), format);
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Create a new table
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Creating Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- ' Adding rows
- Dim rowCollection As PdfRowCollection = table.Rows
- ' Gets the first row from the collection.
- rowCollection.Add(New Object() { "111", "Maxim", "III" })
- ' Create the layout format
- Dim format As New PdfLightTableLayoutFormat()
- format.Layout = PdfLayoutType.Paginate
- format.Break = PdfLayoutBreakType.FitElement
- ' Draw the table
- Dim result As PdfLightTableLayoutResult = table.Draw(page, New PointF(0, 0), format)
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document
- doc.Close(True)
-
-
- // Create a new document
- PdfDocument doc = new PdfDocument();
- //Create a new page
- PdfPage page = doc.Pages.Add();
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Creating Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- // Adding rows
- PdfRowCollection rowCollection = table.Rows;
- // Gets the first row from the collection.
- rowCollection.Add(new object[] { "111", "Maxim", "III" });
- // Create the layout format
- PdfLightTableLayoutFormat format = new PdfLightTableLayoutFormat();
- format.Layout = PdfLayoutType.Paginate;
- format.Break = PdfLayoutBreakType.FitElement;
- // Draw the table
- PdfLightTableLayoutResult result = table.Draw(page, new PointF(0, 0), format);
- // Gets the last row index
- int lastRow = result.LastRowIndex;
- //Save the document.
- doc.Save("Output.pdf");
- //Close the document
- doc.Close(true);
-
-
- ' Create a new document
- Dim doc As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = doc.Pages.Add()
- ' Create a new table
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Creating Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- ' Adding rows
- Dim rowCollection As PdfRowCollection = table.Rows
- ' Gets the first row from the collection.
- rowCollection.Add(New Object() { "111", "Maxim", "III" })
- ' Create the layout format
- Dim format As New PdfLightTableLayoutFormat()
- format.Layout = PdfLayoutType.Paginate
- format.Break = PdfLayoutBreakType.FitElement
- ' Draw the table
- Dim result As PdfLightTableLayoutResult = table.Draw(page, New PointF(0, 0), format)
- ' Gets the last row index
- Dim lastRow As Integer = result.LastRowIndex
- 'Save the document.
- doc.Save("Output.pdf")
- 'Close the document
- doc.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- // Add a page.
- PdfPage page = document.Pages.Add();
- //Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- //Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the DataTable.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the DataTable.
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- // Assign data source.
- pdfLightTable.DataSource = table;
- // Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- // Save the document.
- document.Save("output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the DataTable.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the DataTable.
- table.Rows.Add(New String() {"abc", "21", "Male"})
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the DataTable.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the DataTable.
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page.Graphics, new PointF(0, 0),500);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the DataTable.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the DataTable.
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page.Graphics, New PointF(0, 0),500)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the DataTable.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the DataTable.
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page.Graphics, 10, 10, 500);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the DataTable.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the DataTable.
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page.Graphics, 10, 10, 500)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the DataTable.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the DataTable.
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page.Graphics, new RectangleF(0, 0,500,500));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the DataTable.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the DataTable.
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page.Graphics, New RectangleF(0, 0,500,500))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the DataTable.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the DataTable.
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the DataTable.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the DataTable.
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the Data Table.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Set properties to paginate the table.
- PdfLightTableLayoutFormat layoutFormat = new PdfLightTableLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0), layoutFormat);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the Data Table.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Set properties to paginate the table.
- Dim layoutFormat As New PdfLightTableLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0), layoutFormat)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the DataTable.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the DataTable.
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new RectangleF(0,0,500,500));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the DataTable.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the DataTable.
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New RectangleF(0,0,500,500))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the Data Table.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Set properties to paginate the table.
- PdfLightTableLayoutFormat layoutFormat = new PdfLightTableLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new RectangleF(0, 0,500,500), layoutFormat);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the Data Table.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Set properties to paginate the table.
- Dim layoutFormat As New PdfLightTableLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New RectangleF(0, 0,500,500), layoutFormat)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the DataTable.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the DataTable.
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, 10, 10);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the DataTable.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the DataTable.
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, 10, 10)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the Data Table.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Set properties to paginate the table.
- PdfLightTableLayoutFormat layoutFormat = new PdfLightTableLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, 10, 10, layoutFormat);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the Data Table.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Set properties to paginate the table.
- Dim layoutFormat As New PdfLightTableLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, 10, 10, layoutFormat)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the Data Table.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, 10, 10, 500);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the Data Table.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, 10, 10, 500)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the Data Table.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Set properties to paginate the table.
- PdfLightTableLayoutFormat layoutFormat = new PdfLightTableLayoutFormat();
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
- layoutFormat.Layout = PdfLayoutType.Paginate;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, 10,10,500, layoutFormat);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the Data Table.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Set properties to paginate the table.
- Dim layoutFormat As New PdfLightTableLayoutFormat()
- layoutFormat.Break = PdfLayoutBreakType.FitPage
- layoutFormat.Layout = PdfLayoutType.Paginate
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, 10,10,500, layoutFormat)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
-
- //Create a new PDF document.
- PdfDocument document = new PdfDocument();
- //Add a page.
- PdfPage page = document.Pages.Add();
- // Create a PdfLightTable.
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Initialize DataTable to assign as DataSource to the light table.
- DataTable table = new DataTable();
- //Include columns to the Data Table.
- table.Columns.Add("Name");
- table.Columns.Add("Age");
- table.Columns.Add("Sex");
- //Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(new string[] { "abc", "21", "Male" });
- //Assign data source.
- pdfLightTable.DataSource = table;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page.Graphics, 10, 10);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- 'Create a new PDF document.
- Dim document As New PdfDocument()
- 'Add a page.
- Dim page As PdfPage = document.Pages.Add()
- ' Create a PdfLightTable.
- Dim pdfLightTable As New PdfLightTable()
- ' Initialize DataTable to assign as DataSource to the light table.
- Dim table As New DataTable()
- 'Include columns to the Data Table.
- table.Columns.Add("Name")
- table.Columns.Add("Age")
- table.Columns.Add("Sex")
- 'Include rows to the Data Table.//you can add multiple rows
- table.Rows.Add(New String() { "abc", "21", "Male" })
- 'Assign data source.
- pdfLightTable.DataSource = table
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page.Graphics, 10, 10)
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
-
- // Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Get the columns collection
- PdfColumnCollection tableColumns = table.Columns;
- // Creating Columns
- tableColumns.Add(new PdfColumn("Roll Number"));
- tableColumns.Add(new PdfColumn("Name"));
- tableColumns.Add(new PdfColumn("Class"));
- // Get the row collection
- PdfRowCollection rows = table.Rows;
- // Adding Rows
- rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //save the document
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
- 'Create a PDF document
- Dim document As PdfDocument = New PdfDocument()
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As PdfLightTable = New PdfLightTable()
- 'Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- 'Get the columns collection
- Dim tableColumns As PdfColumnCollection = table.Columns
- 'Creating Columns
- tableColumns.Add(New PdfColumn("Roll Number"))
- tableColumns.Add(New PdfColumn("Name"))
- tableColumns.Add(New PdfColumn("Class"))
- 'Adding Rows
- table.Rows.Add(New Object() {"111", "Maxim", "III"})
- 'Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("output.pdf")
- 'Close the document.
- document.Close(True)
-
-
- // Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Get the columns collection
- PdfColumnCollection tableColumns = table.Columns;
- // Creating Columns
- tableColumns.Add(new PdfColumn("Roll Number"));
- tableColumns.Add(new PdfColumn("Name"));
- tableColumns.Add(new PdfColumn("Class"));
- // Get the row collection
- PdfRowCollection rows = table.Rows;
- // Adding Rows
- rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //save the document
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
- ' Create a PDF document
- Dim document As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = document.Pages.Add()
- Dim table As PdfLightTable = New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Get the columns collection
- Dim tableColumns As PdfColumnCollection = table.Columns
- ' Creating Columns
- tableColumns.Add(New PdfColumn("Roll Number"))
- tableColumns.Add(New PdfColumn("Name"))
- tableColumns.Add(New PdfColumn("Class"))
- ' Get the row collection
- Dim rows As PdfRowCollection = table.Rows
- ' Adding Rows
- rows.Add(New Object() {"111", "Maxim", "III"})
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document.
- document.Close(True)
-
-
- //Create a new document.
- PdfDocument document = new PdfDocument();
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- //set the data source
- table.DataSource = dataTable;
- //Draw the table
- table.Draw(page.Graphics);
- //save the document
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- //set the data source
- table.DataSource = dataTable;
- //Draw the table
- table.Draw(page.Graphics);
- //save the document
- document.Save("Output.pdf");
- //Close the document.
- document.Close(true);
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- table.DataSource = dataTable;
- //Set the data member
- table.DataMember = "ID1";
- table.Style.CellPadding = 16;
- //Draw the table
- table.Draw(page.Graphics);
- //Save the document
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- 'Create a new document
- Dim document As PdfDocument = New PdfDocument()
- 'Create DataTable for source
- Dim dataTable As DataTable = New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = New Object() {"Table Features Demo", ""}
- dataTable.Rows.Add(values)
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As PdfLightTable = New PdfLightTable()
- table.DataSource = dataTable
- 'Set the data member
- table.DataMember = "ID1"
- table.Style.CellPadding = 16
- 'Draw the table
- table.Draw(page.Graphics)
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- //Set the data source type
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- //Set the data table
- table.DataSource = dataTable;
- Draw the table
- table.Draw(page.Graphics);
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new document
- Dim document As PdfDocument = New PdfDocument()
- 'Create DataTable for source
- Dim dataTable As DataTable = New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = New Object() {"Table Features Demo", ""}
- dataTable.Rows.Add(values)
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As PdfLightTable = New PdfLightTable()
- 'Set the data source type
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- 'Set the data source
- table.DataSource = dataTable
- ' Draw the table
- table.Draw(page.Graphics)
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create a new document
- PdfDocument document = new PdfDocument();
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create the page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- //Create the font
- PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
- // Alternative cell style
- PdfCellStyle altStyle = new PdfCellStyle(font, PdfBrushes.White, PdfPens.Green);
- altStyle.BackgroundBrush = PdfBrushes.DarkGray;
- // Table header cell style
- PdfCellStyle headerStyle = new PdfCellStyle(font, PdfBrushes.White, PdfPens.Brown);
- headerStyle.BackgroundBrush = PdfBrushes.Red;
- //Set the table style
- table.Style.AlternateStyle = altStyle;
- table.Style.HeaderStyle = headerStyle;
- //set the data source
- table.DataSource = dataTable;
- // Draw the table
- table.Draw(page.Graphics);
- //save the document
- document.Save("output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new document
- Dim document As PdfDocument = New PdfDocument()
- 'Create DataTable for source
- Dim dataTable As DataTable = New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = New Object() {"Table Features Demo", ""}
- dataTable.Rows.Add(values)
- 'Create the page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As PdfLightTable = New PdfLightTable()
- 'Create the font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
- 'Alternative cell style
- Dim altStyle As PdfCellStyle = New PdfCellStyle(font, PdfBrushes.White, PdfPens.Green)
- altStyle.BackgroundBrush = PdfBrushes.DarkGray
- 'Table header cell style
- Dim headerStyle As PdfCellStyle = New PdfCellStyle(font, PdfBrushes.White, PdfPens.Brown)
- headerStyle.BackgroundBrush = PdfBrushes.Red
- 'Set the table style
- table.Style.AlternateStyle = altStyle
- table.Style.HeaderStyle = headerStyle
- 'set the data source
- table.DataSource = dataTable
- 'Draw the table
- table.Draw(page.Graphics)
- 'save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //create the page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Disabling sorting
- table.IgnoreSorting = true;
- //Set the data source
- table.DataSource = dataTable;
- //Draw the table
- table.Draw(page.Graphics);
- //save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new document
- Dim document As PdfDocument = New PdfDocument()
- 'Create DataTable for source
- Dim dataTable As DataTable = New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = New Object() {"Table Features Demo", ""}
- dataTable.Rows.Add(values)
- 'Create the page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As PdfLightTable = New PdfLightTable()
- ' Disabling sorting
- table.IgnoreSorting = True
- 'Set the data table
- table.DataSource = dataTable
- 'Draw the table in page
- table.Draw(page.Graphics)
- 'save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Set font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- //Create Pdf pen for drawing border
- PdfPen borderPen = new PdfPen(PdfBrushes.DarkBlue);
- borderPen.Width = 0;
- //Create brush
- PdfColor color = new PdfColor(192, 201, 219);
- PdfSolidBrush brush = new PdfSolidBrush(color);
- //Create alternative cell styles
- PdfCellStyle altStyle = new PdfCellStyle();
- altStyle.Font = font;
- altStyle.BackgroundBrush = brush;
- altStyle.BorderPen = borderPen;
- // Create default cell style
- PdfCellStyle defStyle = new PdfCellStyle();
- defStyle.Font = font;
- defStyle.BackgroundBrush = PdfBrushes.White;
- defStyle.BorderPen = borderPen;
- // Create header cell style
- PdfCellStyle headerStyle = new PdfCellStyle(font, PdfBrushes.White, PdfPens.DarkBlue);
- brush = new PdfSolidBrush(new PdfColor(33, 67, 126));
- headerStyle.BackgroundBrush = brush;
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- //Set the data source
- table.DataSource = dataTable;
- // Set the cell styles
- table.Style.AlternateStyle = altStyle;
- table.Style.DefaultStyle = defStyle;
- table.Style.HeaderStyle = headerStyle;
- // Draw the table
- table.Draw(page.Graphics, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create PDF document
- Dim document As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Set font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- 'Create Pdf pen for drawing border
- Dim borderPen As PdfPen = New PdfPen(PdfBrushes.DarkBlue)
- borderPen.Width = 0
- 'Create brush
- Dim color As PdfColor = New PdfColor(192, 201, 219)
- Dim brush As PdfSolidBrush = New PdfSolidBrush(color)
- 'Create alternative cell styles
- Dim altStyle As PdfCellStyle = New PdfCellStyle()
- altStyle.Font = font
- altStyle.BackgroundBrush = brush
- altStyle.BorderPen = borderPen
- ' Create default cell style
- Dim defStyle As PdfCellStyle = New PdfCellStyle()
- defStyle.Font = font
- defStyle.BackgroundBrush = PdfBrushes.White
- defStyle.BorderPen = borderPen
- ' Create header cell style
- Dim headerStyle As PdfCellStyle = New PdfCellStyle(font, PdfBrushes.White, PdfPens.DarkBlue)
- brush = New PdfSolidBrush(New PdfColor(33, 67, 126))
- headerStyle.BackgroundBrush = brush
- 'Create DataTable for source
- Dim dataTable As DataTable = New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = New Object() {"Table Features Demo", ""}
- dataTable.Rows.Add(values)
- 'Create the PdfLightTable
- Dim table As PdfLightTable = New PdfLightTable()
- 'Set the data source
- table.DataSource = dataTable
- 'Set the cell styles
- table.Style.AlternateStyle = altStyle
- table.Style.DefaultStyle = defStyle
- table.Style.HeaderStyle = headerStyle
- 'Draw the table
- table.Draw(page.Graphics, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Set font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- //Create PdfPen for drawing border
- PdfPen borderPen = new PdfPen(PdfBrushes.DarkBlue);
- borderPen.Width = 0;
- // Create default cell style
- PdfCellStyle defaultStyle = new PdfCellStyle();
- defaultStyle.Font = font;
- defaultStyle.BackgroundBrush = PdfBrushes.White;
- defaultStyle.BorderPen = borderPen;
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- table.DataSource = dataTable;
- // Set the default cell style
- table.Style.DefaultStyle = defaultStyle;
- // Draw the table
- table.Draw(page.Graphics, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Set font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- 'Create PdfPen for drawing border
- Dim borderPen As New PdfPen(PdfBrushes.DarkBlue)
- borderPen.Width = 0
- ' Create default cell style
- Dim defaultStyle As New PdfCellStyle()
- defaultStyle.Font = font
- defaultStyle.BackgroundBrush = PdfBrushes.White
- defaultStyle.BorderPen = borderPen
- 'Create DataTable for source
- Dim dataTable As New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Table Features Demo", "" }
- dataTable.Rows.Add(values)
- 'Create PdfLightTable
- Dim table As New PdfLightTable()
- 'Set the data source
- table.DataSource = dataTable
- ' Set the default cell style
- table.Style.DefaultStyle = defaultStyle
- ' Draw the table
- table.Draw(page.Graphics, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Set font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- //Create PdfPen for drawing border
- PdfPen borderPen = new PdfPen(PdfBrushes.DarkBlue);
- borderPen.Width = 0;
- //Create brush
- PdfColor color = new PdfColor(192, 201, 219);
- PdfSolidBrush brush = new PdfSolidBrush(color);
- //Create alternative cell style
- PdfCellStyle alternateStyle = new PdfCellStyle();
- alternateStyle.Font = font;
- alternateStyle.BackgroundBrush = brush;
- alternateStyle.BorderPen = borderPen;
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- //Set the data source
- table.DataSource = dataTable;
- // Set the cell styles
- table.Style.AlternateStyle = alternateStyle;
- // Draw the table
- table.Draw(page.Graphics, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Set font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- 'Create PdfPen for drawing border
- Dim borderPen As New PdfPen(PdfBrushes.DarkBlue)
- borderPen.Width = 0
- 'Create brush
- Dim color As New PdfColor(192, 201, 219)
- Dim brush As New PdfSolidBrush(color)
- 'Create alternative cell style
- Dim alternateStyle As New PdfCellStyle()
- alternateStyle.Font = font
- alternateStyle.BackgroundBrush = brush
- alternateStyle.BorderPen = borderPen
- 'Create DataTable for source
- Dim dataTable As New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Table Features Demo", "" }
- dataTable.Rows.Add(values)
- 'Create the PdfLightTable
- Dim table As New PdfLightTable()
- 'Set the data source
- table.DataSource = dataTable
- ' Set the cell styles
- table.Style.AlternateStyle = alternateStyle
- ' Draw the table
- table.Draw(page.Graphics, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Create new Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- //Set the header source
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions;
- // Add new Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Add a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Create new Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- 'Set the header source
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions
- ' Add new Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Create new Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- table.Style.ShowHeader = true;
- table.Style.HeaderRowCount = 2;
- // Add new Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Add a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Create new Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- table.Style.ShowHeader = True
- table.Style.HeaderRowCount = 2
- ' Add new Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'close the document
- document.Close(True)
-
-
- //Create PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Set font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- // Create header cell style
- PdfCellStyle headerStyle = new PdfCellStyle();
- headerStyle.Font = font;
- headerStyle.BackgroundBrush = PdfBrushes.White;
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- //Set the data source
- table.DataSource = dataTable;
- // Set the cell styles
- table.Style.HeaderStyle = headerStyle;
- // Draw the table
- table.Draw(page.Graphics, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Set font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- ' Create header cell style
- Dim headerStyle As New PdfCellStyle()
- headerStyle.Font = font
- headerStyle.BackgroundBrush = PdfBrushes.White
- 'Create DataTable for source
- Dim dataTable As New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Table Features Demo", "" }
- dataTable.Rows.Add(values)
- 'Create the PdfLightTable
- Dim table As New PdfLightTable()
- 'Set the data source
- table.DataSource = dataTable
- ' Set the cell styles
- table.Style.HeaderStyle = headerStyle
- ' Draw the table
- table.Draw(page.Graphics, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Create new Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions;
- table.Style.RepeatHeader = true;
- // Add new Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Add a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Create new Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions
- table.Style.RepeatHeader = True
- ' Add new Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- //Set the properties
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions;
- table.Style.ShowHeader = true;
- table.Style.HeaderRowCount = 2;
- // Add new Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Add a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Create new Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- 'Set the properties
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions
- table.Style.ShowHeader = True
- table.Style.HeaderRowCount = 2
- ' Add new Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Create new Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions;
- //Set the cell spacing
- table.Style.CellSpacing = 10;
- // Add new Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Add a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Create new Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions
- 'Set the cell spacing
- table.Style.CellSpacing = 10
- ' Add new Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Create new Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions;
- // Set the cell padding
- table.Style.CellPadding = 8;
- // Add new Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draws the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Add a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Create new Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions
- ' Set the cell padding
- table.Style.CellPadding = 8
- ' Add new Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draws the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Create new Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- //set the border overlap style
- table.Style.BorderOverlapStyle = PdfBorderOverlapStyle.Inside;
- // Add new Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draws the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Create new Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- ' set the border overlap style
- table.Style.BorderOverlapStyle = PdfBorderOverlapStyle.Inside
- ' Add new Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draws the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- PdfPage page = document.Pages.Add();
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Create new Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- //Add the border pen
- table.Style.BorderPen = PdfPens.BlueViolet;
- // Add new Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- Dim page As PdfPage = document.Pages.Add()
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Create new Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- 'Add the border pen
- table.Style.BorderPen = PdfPens.BlueViolet
- ' Add new Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Set font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- //Create PdfPen for drawing border
- PdfPen borderPen = new PdfPen(PdfBrushes.DarkBlue);
- borderPen.Width = 0;
- // Create default cell style
- PdfCellStyle defaultStyle = new PdfCellStyle();
- defaultStyle.Font = font;
- defaultStyle.BackgroundBrush = PdfBrushes.White;
- defaultStyle.BorderPen = borderPen;
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- table.DataSource = dataTable;
- // Set the default cell style
- table.Style.DefaultStyle = defaultStyle;
- // Draw the table
- table.Draw(page.Graphics, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Set font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- 'Create PdfPen for drawing border
- Dim borderPen As New PdfPen(PdfBrushes.DarkBlue)
- borderPen.Width = 0
- ' Create default cell style
- Dim defaultStyle As New PdfCellStyle()
- defaultStyle.Font = font
- defaultStyle.BackgroundBrush = PdfBrushes.White
- defaultStyle.BorderPen = borderPen
- 'Create DataTable for source
- Dim dataTable As New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Table Features Demo", "" }
- dataTable.Rows.Add(values)
- 'Create PdfLightTable
- Dim table As New PdfLightTable()
- 'Set the data source
- table.DataSource = dataTable
- ' Set the default cell style
- table.Style.DefaultStyle = defaultStyle
- ' Draw the table
- table.Draw(page.Graphics, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Set font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- //Create PdfPen for drawing border
- PdfPen borderPen = new PdfPen(PdfBrushes.DarkBlue);
- borderPen.Width = 0;
- // Create default cell style
- PdfCellStyle defaultStyle = new PdfCellStyle();
- defaultStyle.Font = font;
- defaultStyle.BackgroundBrush = PdfBrushes.White;
- defaultStyle.BorderPen = borderPen;
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- table.DataSource = dataTable;
- // Set the default cell style
- table.Style.DefaultStyle = defaultStyle;
- // Draw the table
- table.Draw(page.Graphics, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Set font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- 'Create PdfPen for drawing border
- Dim borderPen As New PdfPen(PdfBrushes.DarkBlue)
- borderPen.Width = 0
- ' Create default cell style
- Dim defaultStyle As New PdfCellStyle()
- defaultStyle.Font = font
- defaultStyle.BackgroundBrush = PdfBrushes.White
- defaultStyle.BorderPen = borderPen
- 'Create DataTable for source
- Dim dataTable As New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Table Features Demo", "" }
- dataTable.Rows.Add(values)
- 'Create PdfLightTable
- Dim table As New PdfLightTable()
- 'Set the data source
- table.DataSource = dataTable
- ' Set the default cell style
- table.Style.DefaultStyle = defaultStyle
- ' Draw the table
- table.Draw(page.Graphics, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Set font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- // Create default cell style
- PdfCellStyle defaultStyle = new PdfCellStyle();
- defaultStyle.Font = font;
- defaultStyle.BackgroundBrush = PdfBrushes.White;
- defaultStyle.BorderPen = PdfPens.Blue;
- //set the string format
- defaultStyle.StringFormat = new PdfStringFormat(PdfTextAlignment.Justify);
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- table.DataSource = dataTable;
- //Set the cell style
- table.Style.DefaultStyle = defaultStyle;
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Set font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- ' Create default cell style
- Dim defaultStyle As New PdfCellStyle()
- defaultStyle.Font = font
- defaultStyle.BackgroundBrush = PdfBrushes.White
- defaultStyle.BorderPen = PdfPens.Blue
- 'set the string format
- defaultStyle.StringFormat = New PdfStringFormat(PdfTextAlignment.Justify)
- 'Create DataTable for source
- Dim dataTable As New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Table Features Demo", "" }
- dataTable.Rows.Add(values)
- ' Create a new table
- Dim table As New PdfLightTable()
- table.DataSource = dataTable
- 'Set the cell style
- table.Style.DefaultStyle = defaultStyle
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- // Create default cell style
- PdfCellStyle defaultStyle = new PdfCellStyle();
- defaultStyle.TextPen = PdfPens.BlueViolet;
- defaultStyle.BorderPen = PdfPens.Black;
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- table.DataSource = dataTable;
- //Set the cell style
- table.Style.DefaultStyle = defaultStyle;
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create default cell style
- Dim defaultStyle As New PdfCellStyle()
- defaultStyle.TextPen = PdfPens.BlueViolet
- defaultStyle.BorderPen = PdfPens.Black
- 'Create DataTable for source
- Dim dataTable As New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Table Features Demo", "" }
- dataTable.Rows.Add(values)
- ' Create a new table
- Dim table As New PdfLightTable()
- table.DataSource = dataTable
- 'Set the cell style
- table.Style.DefaultStyle = defaultStyle
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- // Create default cell style
- PdfCellStyle defaultStyle = new PdfCellStyle();
- defaultStyle.TextPen = PdfPens.BlueViolet;
- defaultStyle.BorderPen = PdfPens.Black;
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- table.DataSource = dataTable;
- //Set the cell style
- table.Style.DefaultStyle = defaultStyle;
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create default cell style
- Dim defaultStyle As New PdfCellStyle()
- 'set the text brush
- defaultStyle.TextBrush = PdfBrushes.BlueViolet
- 'set the border pen
- defaultStyle.BorderPen = PdfPens.Black
- 'Create DataTable for source
- Dim dataTable As New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Table Features Demo", "" }
- dataTable.Rows.Add(values)
- ' Create a new table
- Dim table As New PdfLightTable()
- table.DataSource = dataTable
- 'Set the cell style
- table.Style.DefaultStyle = defaultStyle
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- // Create default cell style
- PdfCellStyle defaultStyle = new PdfCellStyle();
- defaultStyle.TextPen = PdfPens.BlueViolet;
- defaultStyle.BorderPen = PdfPens.Black;
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- table.DataSource = dataTable;
- //Set the cell style
- table.Style.DefaultStyle = defaultStyle;
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create default cell style
- Dim defaultStyle As New PdfCellStyle()
- 'set the text brush
- defaultStyle.TextBrush = PdfBrushes.BlueViolet
- 'set the border pen
- defaultStyle.BorderPen = PdfPens.Black
- 'Create DataTable for source
- Dim dataTable As New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Table Features Demo", "" }
- dataTable.Rows.Add(values)
- ' Create a new table
- Dim table As New PdfLightTable()
- table.DataSource = dataTable
- 'Set the cell style
- table.Style.DefaultStyle = defaultStyle
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- //Create PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Set font
- PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
- // Create default cell style
- PdfCellStyle defaultStyle = new PdfCellStyle();
- defaultStyle.Font = font;
- defaultStyle.BackgroundBrush = PdfBrushes.Red;
- defaultStyle.BorderPen = PdfPens.Blue;
- //set the string format
- defaultStyle.StringFormat = new PdfStringFormat(PdfTextAlignment.Justify);
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- table.DataSource = dataTable;
- //Set the cell style
- table.Style.DefaultStyle = defaultStyle;
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- 'Create PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Set font
- Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 8)
- ' Create default cell style
- Dim defaultStyle As New PdfCellStyle()
- defaultStyle.Font = font
- defaultStyle.BackgroundBrush = PdfBrushes.Red
- defaultStyle.BorderPen = PdfPens.Blue
- 'set the string format
- defaultStyle.StringFormat = New PdfStringFormat(PdfTextAlignment.Justify)
- 'Create DataTable for source
- Dim dataTable As New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Table Features Demo", "" }
- dataTable.Rows.Add(values)
- ' Create a new table
- Dim table As New PdfLightTable()
- table.DataSource = dataTable
- 'Set the cell style
- table.Style.DefaultStyle = defaultStyle
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Get the columns collection
- PdfColumnCollection tableColumns = table.Columns;
- // Add Columns
- tableColumns.Add(new PdfColumn("Roll Number"));
- tableColumns.Add(new PdfColumn("Name"));
- tableColumns.Add(new PdfColumn("Class"));
- // Add Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Get the columns collection
- Dim tableColumns As PdfColumnCollection = table.Columns
- ' Add Columns
- tableColumns.Add(New PdfColumn("Roll Number"))
- tableColumns.Add(New PdfColumn("Name"))
- tableColumns.Add(New PdfColumn("Class"))
- ' Add Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Get the columns collection
- PdfColumnCollection tableColumns = table.Columns;
- // Add Columns
- tableColumns.Add(new PdfColumn("Roll Number"));
- tableColumns.Add(new PdfColumn("Name"));
- tableColumns.Add(new PdfColumn("Class"));
- // Add Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- ' Create a PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Get the columns collection
- Dim tableColumns As PdfColumnCollection = table.Columns
- ' Add Columns
- tableColumns.Add(New PdfColumn("Roll Number"))
- tableColumns.Add(New PdfColumn("Name"))
- tableColumns.Add(New PdfColumn("Class"))
- ' Add Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Get the columns collection
- PdfColumnCollection tableColumns = table.Columns;
- // Add Columns
- tableColumns.Add(new PdfColumn("Roll Number"));
- tableColumns.Add(new PdfColumn("Name"));
- tableColumns.Add(new PdfColumn("Class"));
- // Add Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Get the columns collection
- Dim tableColumns As PdfColumnCollection = table.Columns
- ' Add Columns
- tableColumns.Add(New PdfColumn("Roll Number"))
- tableColumns.Add(New PdfColumn("Name"))
- tableColumns.Add(New PdfColumn("Class"))
- ' Add Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Get the columns collection
- PdfColumnCollection tableColumns = table.Columns;
- // Creating Columns
- tableColumns.Add(new PdfColumn("Name"));
- tableColumns.Add(new PdfColumn("Class"));
- // Create a new column
- PdfColumn rollNumber = new PdfColumn("Roll Number");
- //Set the string format
- rollNumber.StringFormat = new PdfStringFormat(PdfTextAlignment.Right);
- //Add the column
- tableColumns.Add(rollNumber);
- // Adding Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Get the columns collection
- Dim tableColumns As PdfColumnCollection = table.Columns
- ' Creating Columns
- tableColumns.Add(New PdfColumn("Name"))
- tableColumns.Add(New PdfColumn("Class"))
- ' Create a new column
- Dim rollNumber As New PdfColumn("Roll Number")
- 'Set the string format
- rollNumber.StringFormat = New PdfStringFormat(PdfTextAlignment.Right)
- 'Add the column
- tableColumns.Add(rollNumber)
- ' Adding Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Get the columns collection
- PdfColumnCollection tableColumns = table.Columns;
- // Creating Columns
- tableColumns.Add(new PdfColumn("Name"));
- tableColumns.Add(new PdfColumn("Class"));
- // Create a new column
- PdfColumn rollNumber = new PdfColumn("Roll Number");
- //Set the string format
- rollNumber.StringFormat = new PdfStringFormat(PdfTextAlignment.Left);
- //set the width
- rollNumber.Width = 20;
- //Add the column
- tableColumns.Add(rollNumber);
- // Adding Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Get the columns collection
- Dim tableColumns As PdfColumnCollection = table.Columns
- ' Creating Columns
- tableColumns.Add(New PdfColumn("Name"))
- tableColumns.Add(New PdfColumn("Class"))
- ' Create a new column
- Dim rollNumber As New PdfColumn("Roll Number")
- 'Set the string format
- rollNumber.StringFormat = New PdfStringFormat(PdfTextAlignment.Left)
- 'set the width
- rollNumber.Width = 20
- 'Add the column
- tableColumns.Add(rollNumber)
- ' Adding Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Get the columns collection
- PdfColumnCollection tableColumns = table.Columns;
- // Creating Columns
- tableColumns.Add(new PdfColumn("Name"));
- tableColumns.Add(new PdfColumn("Class"));
- // Create a new column
- PdfColumn rollNumber = new PdfColumn();
- //Set the string format
- rollNumber.StringFormat = new PdfStringFormat(PdfTextAlignment.Left);
- //set the column name
- rollNumber.ColumnName = "Roll Number";
- //Add the column
- tableColumns.Add(rollNumber);
- // Adding Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Get the columns collection
- Dim tableColumns As PdfColumnCollection = table.Columns
- ' Creating Columns
- tableColumns.Add(New PdfColumn("Name"))
- tableColumns.Add(New PdfColumn("Class"))
- ' Create a new column
- Dim rollNumber As New PdfColumn()
- 'Set the string format
- rollNumber.StringFormat = New PdfStringFormat(PdfTextAlignment.Left)
- 'set the column name
- rollNumber.ColumnName = "Roll Number"
- 'Add the column
- tableColumns.Add(rollNumber)
- ' Adding Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Get the columns collection
- PdfColumnCollection tableColumns = table.Columns;
- // Add Columns
- tableColumns.Add(new PdfColumn("Roll Number"));
- tableColumns.Add(new PdfColumn("Name"));
- tableColumns.Add(new PdfColumn("Class"));
- // Add Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Get the columns collection
- Dim tableColumns As PdfColumnCollection = table.Columns
- ' Add Columns
- tableColumns.Add(New PdfColumn("Roll Number"))
- tableColumns.Add(New PdfColumn("Name"))
- tableColumns.Add(New PdfColumn("Class"))
- ' Add Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a PDF document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Get the columns collection
- PdfColumnCollection tableColumns = table.Columns;
- // Add Columns
- tableColumns.Add(new PdfColumn("Roll Number"));
- tableColumns.Add(new PdfColumn("Name"));
- tableColumns.Add(new PdfColumn("Class"));
- // Add Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a PDF document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Get the columns collection
- Dim tableColumns As PdfColumnCollection = table.Columns
- ' Add Columns
- tableColumns.Add(New PdfColumn("Roll Number"))
- tableColumns.Add(New PdfColumn("Name"))
- tableColumns.Add(New PdfColumn("Class"))
- ' Add Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Creating Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- // get the row collection
- PdfRowCollection rowCollection = table.Rows;
- //Add the rows
- rowCollection.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a new table
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Creating Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- ' get the row collection
- Dim rowCollection As PdfRowCollection = table.Rows
- 'Add the rows
- rowCollection.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Creating Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- // get the row collection
- PdfRowCollection rowCollection = table.Rows;
- //Add the rows
- rowCollection.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a new table
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Creating Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- ' get the row collection
- Dim rowCollection As PdfRowCollection = table.Rows
- 'Add the rows
- rowCollection.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Creates a new document
- PdfDocument document = new PdfDocument();
- //Creates a new page and adds it as the last page of the document
- PdfPage page = document.Pages.Add();
- // Creates a new table
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Creating Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- // Adding rows
- PdfRowCollection rowCollection = table.Rows;
- // Gets the first row from the collection.
- rowCollection.Add(new object[] { "111", "Maxim", "III" });
- // Creates the layout format
- PdfLightTableLayoutFormat format = new PdfLightTableLayoutFormat();
- format.Layout = PdfLayoutType.Paginate;
- format.Break = PdfLayoutBreakType.FitElement;
- format.StartColumnIndex = 1;
- format.EndColumnIndex = 2;
- // Draws the table with the layout format
- table.Draw(page, new PointF(0, 0), format);
- document.Save("Tables.pdf");
-
-
- ' Creates a new document
- Dim document As PdfDocument = New PdfDocument()
- ' Create a page
- Dim page As PdfPage = document.Pages.Add()
- ' Creates a new table
- Dim table As PdfLightTable = New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Creating Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- ' Adding rows
- Dim rowCollection As PdfRowCollection = table.Rows
- ' Gets the first row from the collection.
- rowCollection.Add(New Object() { "111", "Maxim", "III" })
- ' Creates the layout format
- Dim format As PdfLightTableLayoutFormat = New PdfLightTableLayoutFormat()
- format.Layout = PdfLayoutType.Paginate
- format.Break = PdfLayoutBreakType.FitElement
- format.StartColumnIndex = 1
- format.EndColumnIndex = 2
- ' Draws the table with the layout format
- table.Draw(page, New PointF(0, 0), format)
- document.Save("Tables.pdf")
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Creating Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- // Adding rows
- PdfRowCollection rowCollection = table.Rows;
- // Gets the first row from the collection.
- rowCollection.Add(new object[] { "111", "Maxim", "III" });
- // Create the layout format
- PdfLightTableLayoutFormat format = new PdfLightTableLayoutFormat();
- //set the column index
- format.StartColumnIndex = 1;
- format.EndColumnIndex = 2;
- format.Layout = PdfLayoutType.Paginate;
- format.Break = PdfLayoutBreakType.FitElement;
- // Draw the table
- PdfLightTableLayoutResult result = table.Draw(page, new PointF(0, 0), format);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a new table
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Creating Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- ' Adding rows
- Dim rowCollection As PdfRowCollection = table.Rows
- ' Gets the first row from the collection.
- rowCollection.Add(New Object() { "111", "Maxim", "III" })
- ' Create the layout format
- Dim format As New PdfLightTableLayoutFormat()
- 'set the column index
- format.EndColumnIndex = 2
- format.StartColumnIndex = 1
- format.Layout = PdfLayoutType.Paginate
- format.Break = PdfLayoutBreakType.FitElement
- ' Draw the table
- Dim result As PdfLightTableLayoutResult = table.Draw(page, New PointF(0, 0), format
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Creating Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- // Adding rows
- PdfRowCollection rowCollection = table.Rows;
- // Gets the first row from the collection.
- rowCollection.Add(new object[] { "111", "Maxim", "III" });
- // Create the layout format
- PdfLightTableLayoutFormat format = new PdfLightTableLayoutFormat();
- //set the column index
- format.StartColumnIndex = 1;
- format.EndColumnIndex = 2;
- format.Layout = PdfLayoutType.Paginate;
- format.Break = PdfLayoutBreakType.FitElement;
- // Draw the table
- PdfLightTableLayoutResult result = table.Draw(page, new PointF(0, 0), format);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a new table
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Creating Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- ' Adding rows
- Dim rowCollection As PdfRowCollection = table.Rows
- ' Gets the first row from the collection.
- rowCollection.Add(New Object() { "111", "Maxim", "III" })
- ' Create the layout format
- Dim format As New PdfLightTableLayoutFormat()
- 'set the column index
- format.EndColumnIndex = 2
- format.StartColumnIndex = 1
- format.Layout = PdfLayoutType.Paginate
- format.Break = PdfLayoutBreakType.FitElement
- ' Draw the table
- Dim result As PdfLightTableLayoutResult = table.Draw(page, New PointF(0, 0), format
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- // Create a new table
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Creating Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- // Adding rows
- PdfRowCollection rowCollection = table.Rows;
- // Gets the first row from the collection.
- rowCollection.Add(new object[] { "111", "Maxim", "III" });
- // Create the layout format
- PdfLightTableLayoutFormat format = new PdfLightTableLayoutFormat();
- //set the column index
- format.StartColumnIndex = 1;
- format.EndColumnIndex = 2;
- format.Layout = PdfLayoutType.Paginate;
- format.Break = PdfLayoutBreakType.FitElement;
- // Draw the table
- PdfLightTableLayoutResult result = table.Draw(page, new PointF(0, 0), format);
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- ' Create a new table
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Creating Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- ' Adding rows
- Dim rowCollection As PdfRowCollection = table.Rows
- ' Gets the first row from the collection.
- rowCollection.Add(New Object() { "111", "Maxim", "III" })
- ' Create the layout format
- Dim format As New PdfLightTableLayoutFormat()
- 'set the column index
- format.EndColumnIndex = 2
- format.StartColumnIndex = 1
- format.Layout = PdfLayoutType.Paginate
- format.Break = PdfLayoutBreakType.FitElement
- ' Draw the table
- Dim result As PdfLightTableLayoutResult = table.Draw(page, New PointF(0, 0), format
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Subscribe the begin row event
- pdfLightTable.BeginRowLayout += new BeginRowLayoutEventHandler(table_BeginRowLayout);
- //Set the data source
- pdfLightTable.DataSource = dataTable;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- PdfLightTable table = (PdfLightTable)sender;
- int count = table.Columns.Count;
- int[] spanMap = new int[count];
- // Set just spanned cells. Other values are not important except negatives that are not allowed.
- spanMap[0] = 2;
- spanMap[1] = 3;
- args.ColumnSpanMap = spanMap;
- //Set row height.
- args.MinimalHeight = 30f;
- }
- }
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create DataTable for source
- Dim dataTable As New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Subscribe the begin row event
- AddHandler pdfLightTable.BeginRowLayout, AddressOf table_BeginRowLayout
- 'Set the data source
- pdfLightTable.DataSource = dataTable
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- Private Sub table_BeginRowLayout(ByVal sender As Object, ByVal args As BeginRowLayoutEventArgs)
- If args.RowIndex = 1 Then
- Dim table As PdfLightTable = CType(sender, PdfLightTable)
- Dim count As Integer = table.Columns.Count
- Dim spanMap(count - 1) As Integer
- ' Set just spanned cells. Other values are not important except negatives that are not allowed.
- spanMap(0) = 2
- spanMap(1) = 3
- args.ColumnSpanMap = spanMap
- 'Set row height.
- args.MinimalHeight = 30f
- End If
- End Sub
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- //Set the data source
- pdfLightTable.DataSource = dataTable;
- // Subscribe the end row event
- pdfLightTable.EndRowLayout += new EndRowLayoutEventHandler(table_EndRowLayout);
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- void table_EndRowLayout(object sender, EndRowLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- // Cancel property used to cancel the table rendering operation
- args.Cancel = true;
- }
- }
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create DataTable for source
- Dim dataTable As New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- 'Set the data source
- pdfLightTable.DataSource = dataTable
- ' Subscribe the end row event
- AddHandler pdfLightTable.EndRowLayout, AddressOf table_EndRowLayout
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- Private Sub table_EndRowLayout(ByVal sender As Object, ByVal args As EndRowLayoutEventArgs)
- If args.RowIndex = 1 Then
- ' Cancel property used to cancel the table rendering operation
- args.Cancel = True
- End If
- End Sub
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Subscribe the cell layout event
- pdfLightTable.BeginCellLayout += new BeginCellLayoutEventHandler(table_BeginCellLayout);
- pdfLightTable.DataSource = dataTable;
- pdfLightTable.Style.CellPadding = 16;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- // Cell layout event handler
- void table_BeginCellLayout(object sender, BeginCellLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- args.Graphics.DrawRectangle(new PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds);
- }
- }
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create DataTable for source
- Dim dataTable As New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Subscribe the cell layout event
- AddHandler pdfLightTable.BeginCellLayout, AddressOf table_BeginCellLayout
- pdfLightTable.DataSource = dataTable
- pdfLightTable.Style.CellPadding = 16
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- ' Cell layout event handler
- Private Sub table_BeginCellLayout(ByVal sender As Object, ByVal args As BeginCellLayoutEventArgs)
- If args.RowIndex = 1 Then
- args.Graphics.DrawRectangle(New PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds)
- End If
- End Sub
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Subscribe the cell layout event
- pdfLightTable.EndCellLayout += new EndCellLayoutEventHandler(table_EndCellLayout);
- pdfLightTable.DataSource = dataTable;
- pdfLightTable.Style.CellPadding = 16;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- // Cell layout event handler
- void table_EndCellLayout(object sender, EndCellLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- args.Graphics.DrawRectangle(new PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds);
- }
- }
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create DataTable for source
- Dim dataTable As New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Subscribe the cell layout event
- AddHandler pdfLightTable.EndCellLayout, AddressOf table_EndCellLayout
- pdfLightTable.DataSource = dataTable
- pdfLightTable.Style.CellPadding = 16
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- ' Cell layout event handler
- Private Sub table_EndCellLayout(ByVal sender As Object, ByVal args As EndCellLayoutEventArgs)
- If args.RowIndex = 1 Then
- args.Graphics.DrawRectangle(New PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds)
- End If
- End Sub
-
-
- public string[][] datastring = new string[2][];
- // Specify values for the table
- datastring[0] = new string[] { "111", "Maxim", "100" };
- datastring[1] = new string[] { "222", "Calvin", "95" };
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External;
- //Subscribing Events
- pdfLightTable.QueryColumnCount += new QueryColumnCountEventHandler(table_QueryColumnCount);
- pdfLightTable.QueryNextRow += new QueryNextRowEventHandler(table_QueryNextRow);
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- void table_QueryColumnCount(object sender, QueryColumnCountEventArgs args)
- {
- args.ColumnCount = 3;
- }
-
- void table_QueryNextRow(object sender, QueryNextRowEventArgs args)
- {
- if (datastring.Length > args.RowIndex )
- args.RowData = new string[] { datastring[args.RowIndex][0], datastring[args.RowIndex][1], datastring[args.RowIndex][2] };
- }
-
-
- Public datastring(2)() As String
- ' Specify values for the table
- datastring(0) = New String() { "111", "Maxim", "100" }
- datastring(1) = New String() { "222", "Calvin", "95" }
- ' Create a new document' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External
- 'Subscribing Events
- AddHandler pdfLightTable.QueryColumnCount, AddressOf table_QueryColumnCount
- AddHandler pdfLightTable.QueryNextRow, AddressOf table_QueryNextRow
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- Private Sub table_QueryColumnCount(ByVal sender As Object, ByVal args As QueryColumnCountEventArgs)
- args.ColumnCount = 3
- End Sub
-
- Private Sub table_QueryNextRow(ByVal sender As Object, ByVal args As QueryNextRowEventArgs)
- If datastring.Length > args.RowIndex Then
- args.RowData = New String() { datastring(args.RowIndex)(0), datastring(args.RowIndex)(1), datastring(args.RowIndex)(2) }
- End If
- End Sub
-
-
- public string[][] datastring = new string[2][];
- // Specify values for the table
- datastring[0] = new string[] { "111", "Maxim", "100" };
- datastring[1] = new string[] { "222", "Calvin", "95" };
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External;
- //Subscribing Events
- pdfLightTable.QueryColumnCount += new QueryColumnCountEventHandler(table_QueryColumnCount);
- pdfLightTable.QueryNextRow += new QueryNextRowEventHandler(table_QueryNextRow);
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- void table_QueryColumnCount(object sender, QueryColumnCountEventArgs args)
- {
- args.ColumnCount = 3;
- }
-
- void table_QueryNextRow(object sender, QueryNextRowEventArgs args)
- {
- if (datastring.Length > args.RowIndex)
- args.RowData = new string[] { datastring[args.RowIndex][0], datastring[args.RowIndex][1], datastring[args.RowIndex][2] };
- }
-
-
- Public datastring(2)() As String
- ' Specify values for the table
- datastring(0) = New String() { "111", "Maxim", "100" }
- datastring(1) = New String() { "222", "Calvin", "95" }
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External
- 'Subscribing Events
- AddHandler pdfLightTable.QueryColumnCount, AddressOf table_QueryColumnCount
- AddHandler pdfLightTable.QueryNextRow, AddressOf table_QueryNextRow
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- Private Sub table_QueryColumnCount(ByVal sender As Object, ByVal args As QueryColumnCountEventArgs)
- args.ColumnCount = 3
- End Sub
-
- Private Sub table_QueryNextRow(ByVal sender As Object, ByVal args As QueryNextRowEventArgs)
- If datastring.Length > args.RowIndex Then
- args.RowData = New String() { datastring(args.RowIndex)(0), datastring(args.RowIndex)(1), datastring(args.RowIndex)(2) }
- End If
- End Sub
-
-
- public string[][] datastring = new string[3][];
- // Specify values for the table
- datastring[0] = new string[] { "111", "Maxim", "100" };
- datastring[1] = new string[] { "222", "Calvin", "95" };
- datastring[2] = new string[] { "333", "Criss", "99" };
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External;
- //Subscribing Events
- pdfLightTable.QueryRowCount += new QueryRowCountEventHandler(table_QueryRowCount);
- pdfLightTable.QueryColumnCount += new QueryColumnCountEventHandler(table_QueryColumnCount);
- pdfLightTable.QueryNextRow += new QueryNextRowEventHandler(table_QueryNextRow);
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- void table_QueryColumnCount(object sender, QueryColumnCountEventArgs args)
- {
- args.ColumnCount = 3;
- }
-
- void table_QueryNextRow(object sender, QueryNextRowEventArgs args)
- {
- if (datastring.Length > args.RowIndex )
- args.RowData = new string[] { datastring[args.RowIndex][0], datastring[args.RowIndex][1], datastring[args.RowIndex][2] };
- }
-
- void table_QueryRowCount(object sender, QueryRowCountEventArgs args)
- {
- args.RowCount = 2;
- }
-
-
- Public datastring(2)() As String
- ' Specify values for the table
- datastring(0) = New String() { "111", "Maxim", "100" }
- datastring(1) = New String() { "222", "Calvin", "95" }
- datastring(2) = New String() { "333", "Criss", "99" }
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External
- 'Subscribing Events
- AddHandler pdfLightTable.QueryRowCount, AddressOf table_QueryRowCount
- AddHandler pdfLightTable.QueryColumnCount, AddressOf table_QueryColumnCount
- AddHandler pdfLightTable.QueryNextRow, AddressOf table_QueryNextRow
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- Private Sub table_QueryColumnCount(ByVal sender As Object, ByVal args As QueryColumnCountEventArgs)
- args.ColumnCount = 3
- End Sub
-
- Private Sub table_QueryNextRow(ByVal sender As Object, ByVal args As QueryNextRowEventArgs)
- If datastring.Length > args.RowIndex Then
- args.RowData = New String() { datastring(args.RowIndex)(0), datastring(args.RowIndex)(1), datastring(args.RowIndex)(2) }
- End If
- End Sub
-
- Private Sub table_QueryRowCount(ByVal sender As Object, ByVal args As QueryRowCountEventArgs)
- args.RowCount = 2
- End Sub
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Subscribe the begin row event
- pdfLightTable.BeginRowLayout += new BeginRowLayoutEventHandler(table_BeginRowLayout);
- //Set the data source
- pdfLightTable.DataSource = dataTable;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- PdfLightTable table = (PdfLightTable)sender;
- int count = table.Columns.Count;
- int[] spanMap = new int[count];
- // Set just spanned cells. Other values are not important except negatives that are not allowed.
- spanMap[0] = 2;
- spanMap[1] = 3;
- args.ColumnSpanMap = spanMap;
- //Set row height.
- args.MinimalHeight = 30f;
- }
- }
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create DataTable for source
- Dim dataTable As New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Subscribe the begin row event
- AddHandler pdfLightTable.BeginRowLayout, AddressOf table_BeginRowLayout
- 'Set the data source
- pdfLightTable.DataSource = dataTable
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- Private Sub table_BeginRowLayout(ByVal sender As Object, ByVal args As BeginRowLayoutEventArgs)
- If args.RowIndex = 1 Then
- Dim table As PdfLightTable = CType(sender, PdfLightTable)
- Dim count As Integer = table.Columns.Count
- Dim spanMap(count - 1) As Integer
- ' Set just spanned cells. Other values are not important except negatives that are not allowed.
- spanMap(0) = 2
- spanMap(1) = 3
- args.ColumnSpanMap = spanMap
- 'Set row height.
- args.MinimalHeight = 30f
- End If
- End Sub
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- //Set the data source
- pdfLightTable.DataSource = dataTable;
- // Subscribe the end row event
- pdfLightTable.EndRowLayout += new EndRowLayoutEventHandler(table_EndRowLayout);
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- void table_EndRowLayout(object sender, EndRowLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- // Cancel property used to cancel the table rendering operation
- args.Cancel = true;
- }
- }
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create DataTable for source
- Dim dataTable As New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- 'Set the data source
- pdfLightTable.DataSource = dataTable
- ' Subscribe the end row event
- AddHandler pdfLightTable.EndRowLayout, AddressOf table_EndRowLayout
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- Private Sub table_EndRowLayout(ByVal sender As Object, ByVal args As EndRowLayoutEventArgs)
- If args.RowIndex = 1 Then
- ' Cancel property used to cancel the table rendering operation
- args.Cancel = True
- End If
- End Sub
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Subscribe the cell layout event
- pdfLightTable.BeginCellLayout += new BeginCellLayoutEventHandler(table_BeginCellLayout);
- pdfLightTable.DataSource = dataTable;
- pdfLightTable.Style.CellPadding = 16;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- // Cell layout event handler
- void table_BeginCellLayout(object sender, BeginCellLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- args.Graphics.DrawRectangle(new PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds);
- }
- }
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create DataTable for source
- Dim dataTable As New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Subscribe the cell layout event
- AddHandler pdfLightTable.BeginCellLayout, AddressOf table_BeginCellLayout
- pdfLightTable.DataSource = dataTable
- pdfLightTable.Style.CellPadding = 16
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- ' Cell layout event handler
- Private Sub table_BeginCellLayout(ByVal sender As Object, ByVal args As BeginCellLayoutEventArgs)
- If args.RowIndex = 1 Then
- args.Graphics.DrawRectangle(New PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds)
- End If
- End Sub
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create DataTable for source
- DataTable dataTable = new DataTable("myTable");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Roll Number", "Student Name" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Cris" };
- dataTable.Rows.Add(values);
- values = new object[] { "011", "Clay" };
- dataTable.Rows.Add(values);
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Subscribe the cell layout event
- pdfLightTable.EndCellLayout += new EndCellLayoutEventHandler(table_EndCellLayout);
- pdfLightTable.DataSource = dataTable;
- pdfLightTable.Style.CellPadding = 16;
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- // Cell layout event handler
- void table_EndCellLayout(object sender, EndCellLayoutEventArgs args)
- {
- if (args.RowIndex == 1)
- {
- args.Graphics.DrawRectangle(new PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds);
- }
- }
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create DataTable for source
- Dim dataTable As New DataTable("myTable")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = { "Roll Number", "Student Name" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Cris" }
- dataTable.Rows.Add(values)
- values = New Object() { "011", "Clay" }
- dataTable.Rows.Add(values)
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Subscribe the cell layout event
- AddHandler pdfLightTable.EndCellLayout, AddressOf table_EndCellLayout
- pdfLightTable.DataSource = dataTable
- pdfLightTable.Style.CellPadding = 16
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- ' Cell layout event handler
- Private Sub table_EndCellLayout(ByVal sender As Object, ByVal args As EndCellLayoutEventArgs)
- If args.RowIndex = 1 Then
- args.Graphics.DrawRectangle(New PdfPen(PdfBrushes.Red, 2), PdfBrushes.White, args.Bounds)
- End If
- End Sub
-
-
- public string[][] datastring = new string[2][];
- // Specify values for the table
- datastring[0] = new string[] { "111", "Maxim", "100" };
- datastring[1] = new string[] { "222", "Calvin", "95" };
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External;
- //Subscribing Events
- pdfLightTable.QueryColumnCount += new QueryColumnCountEventHandler(table_QueryColumnCount);
- pdfLightTable.QueryNextRow += new QueryNextRowEventHandler(table_QueryNextRow);
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- void table_QueryColumnCount(object sender, QueryColumnCountEventArgs args)
- {
- args.ColumnCount = 3;
- }
-
- void table_QueryNextRow(object sender, QueryNextRowEventArgs args)
- {
- if (datastring.Length > args.RowIndex)
- args.RowData = new string[] { datastring[args.RowIndex][0], datastring[args.RowIndex][1], datastring[args.RowIndex][2] };
- }
-
-
- Public datastring(2)() As String
- ' Specify values for the table
- datastring(0) = New String() { "111", "Maxim", "100" }
- datastring(1) = New String() { "222", "Calvin", "95" }
- ' Create a new document' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External
- 'Subscribing Events
- AddHandler pdfLightTable.QueryColumnCount, AddressOf table_QueryColumnCount
- AddHandler pdfLightTable.QueryNextRow, AddressOf table_QueryNextRow
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- Private Sub table_QueryColumnCount(ByVal sender As Object, ByVal args As QueryColumnCountEventArgs)
- args.ColumnCount = 3
- End Sub
-
- Private Sub table_QueryNextRow(ByVal sender As Object, ByVal args As QueryNextRowEventArgs)
- If datastring.Length > args.RowIndex Then
- args.RowData = New String() { datastring(args.RowIndex)(0), datastring(args.RowIndex)(1), datastring(args.RowIndex)(2) }
- End If
- End Sub
-
-
- public string[][] datastring = new string[2][];
- // Specify values for the table
- datastring[0] = new string[] { "111", "Maxim", "100" };
- datastring[1] = new string[] { "222", "Calvin", "95" };
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External;
- //Subscribing Events
- pdfLightTable.QueryColumnCount += new QueryColumnCountEventHandler(table_QueryColumnCount);
- pdfLightTable.QueryNextRow += new QueryNextRowEventHandler(table_QueryNextRow);
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- void table_QueryColumnCount(object sender, QueryColumnCountEventArgs args)
- {
- args.ColumnCount = 3;
- }
-
- void table_QueryNextRow(object sender, QueryNextRowEventArgs args)
- {
- if (datastring.Length > args.RowIndex)
- args.RowData = new string[] { datastring[args.RowIndex][0], datastring[args.RowIndex][1], datastring[args.RowIndex][2] };
- }
-
-
- Public datastring(2)() As String
- ' Specify values for the table
- datastring(0) = New String() { "111", "Maxim", "100" }
- datastring(1) = New String() { "222", "Calvin", "95" }
- ' Create a new document' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External
- 'Subscribing Events
- AddHandler pdfLightTable.QueryColumnCount, AddressOf table_QueryColumnCount
- AddHandler pdfLightTable.QueryNextRow, AddressOf table_QueryNextRow
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- Private Sub table_QueryColumnCount(ByVal sender As Object, ByVal args As QueryColumnCountEventArgs)
- args.ColumnCount = 3
- End Sub
-
- Private Sub table_QueryNextRow(ByVal sender As Object, ByVal args As QueryNextRowEventArgs)
- If datastring.Length > args.RowIndexThen
- args.RowData = New String() { datastring(args.RowIndex)(0), datastring(args.RowIndex)(1), datastring(args.RowIndex)(2) }
- End If
- End Sub
-
-
- public string[][] datastring = new string[3][];
- // Specify values for the table
- datastring[0] = new string[] { "111", "Maxim", "100" };
- datastring[1] = new string[] { "222", "Calvin", "95" };
- datastring[2] = new string[] { "333", "Criss", "99" };
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a Page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable pdfLightTable = new PdfLightTable();
- // Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External;
- //Subscribing Events
- pdfLightTable.QueryRowCount += new QueryRowCountEventHandler(table_QueryRowCount);
- pdfLightTable.QueryColumnCount += new QueryColumnCountEventHandler(table_QueryColumnCount);
- pdfLightTable.QueryNextRow += new QueryNextRowEventHandler(table_QueryNextRow);
- //Draw PdfLightTable.
- pdfLightTable.Draw(page, new PointF(0, 0));
- //Save the document.
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
- void table_QueryColumnCount(object sender, QueryColumnCountEventArgs args)
- {
- args.ColumnCount = 3;
- }
-
- void table_QueryNextRow(object sender, QueryNextRowEventArgs args)
- {
- if (datastring.Length > args.RowIndex)
- args.RowData = new string[] { datastring[args.RowIndex][0], datastring[args.RowIndex][1], datastring[args.RowIndex][2] };
- }
-
- void table_QueryRowCount(object sender, QueryRowCountEventArgs args)
- {
- args.RowCount = 2;
- }
-
-
- Public datastring(2)() As String
- ' Specify values for the table
- datastring(0) = New String() { "111", "Maxim", "100" }
- datastring(1) = New String() { "222", "Calvin", "95" }
- datastring(2) = New String() { "333", "Criss", "99" }
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a Page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim pdfLightTable As New PdfLightTable()
- ' Setting the DataSourceType as Direct
- pdfLightTable.DataSourceType = PdfLightTableDataSourceType.External
- 'Subscribing Events
- AddHandler pdfLightTable.QueryRowCount, AddressOf table_QueryRowCount
- AddHandler pdfLightTable.QueryColumnCount, AddressOf table_QueryColumnCount
- AddHandler pdfLightTable.QueryNextRow, AddressOf table_QueryNextRow
- 'Draw PdfLightTable.
- pdfLightTable.Draw(page, New PointF(0, 0))
- 'Save the document.
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
- Private Sub table_QueryColumnCount(ByVal sender As Object, ByVal args As QueryColumnCountEventArgs)
- args.ColumnCount = 3
- End Sub
-
- Private Sub table_QueryNextRow(ByVal sender As Object, ByVal args As QueryNextRowEventArgs)
- If datastring.Length > args.RowIndex Then
- args.RowData = New String() { datastring(args.RowIndex)(0), datastring(args.RowIndex)(1), datastring(args.RowIndex)(2) }
- End If
- End Sub
-
- Private Sub table_QueryRowCount(ByVal sender As Object, ByVal args As QueryRowCountEventArgs)
- args.RowCount = 2
- End Sub
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Add a page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Create new Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- //Set the header source
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions;
- // Add new Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draw the table
- table.Draw(page, new PointF(0, 0));
- //save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Add a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Create new Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- 'Set the header source
- table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions
- ' Add new Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draw the table
- table.Draw(page, New PointF(0, 0))
- 'save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create DataTable for source
- DataTable dataTable = new DataTable("Table");
- dataTable.Columns.Add("ID1");
- dataTable.Columns[0].Caption = "id";
- dataTable.Columns.Add("ID2");
- object[] values = new object[] { "Table Features Demo", "" };
- dataTable.Rows.Add(values);
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create the PdfLightTable
- PdfLightTable table = new PdfLightTable();
- //Set the data source type
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- //Set the data table
- table.DataSource = dataTable;
- Draw the table
- table.Draw(page.Graphics);
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- 'Create a new document
- Dim document As PdfDocument = New PdfDocument()
- 'Create DataTable for source
- Dim dataTable As DataTable = New DataTable("Table")
- dataTable.Columns.Add("ID1")
- dataTable.Columns(0).Caption = "id"
- dataTable.Columns.Add("ID2")
- Dim values() As Object = New Object() {"Table Features Demo", ""}
- dataTable.Rows.Add(values)
- 'Create a page
- Dim page As PdfPage = document.Pages.Add()
- 'Create the PdfLightTable
- Dim table As PdfLightTable = New PdfLightTable()
- 'Set the data source type
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- 'Set the data source
- table.DataSource = dataTable
- ' Draw the table
- table.Draw(page.Graphics)
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
-
- // Create a new document
- PdfDocument document = new PdfDocument();
- //Create a new page
- PdfPage page = document.Pages.Add();
- //Create PdfLightTable
- PdfLightTable table = new PdfLightTable();
- // Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect;
- // Create new Columns
- table.Columns.Add(new PdfColumn("Roll Number"));
- table.Columns.Add(new PdfColumn("Name"));
- table.Columns.Add(new PdfColumn("Class"));
- //set the border overlap style
- table.Style.BorderOverlapStyle = PdfBorderOverlapStyle.Inside;
- // Add new Rows
- table.Rows.Add(new object[] { "111", "Maxim", "III" });
- // Draws the table
- table.Draw(page, new PointF(0, 0));
- //Save the document
- document.Save("Output.pdf");
- //Close the document
- document.Close(true);
-
-
-
- ' Create a new document
- Dim document As New PdfDocument()
- 'Create a new page
- Dim page As PdfPage = document.Pages.Add()
- 'Create PdfLightTable
- Dim table As New PdfLightTable()
- ' Set the DataSourceType as Direct
- table.DataSourceType = PdfLightTableDataSourceType.TableDirect
- ' Create new Columns
- table.Columns.Add(New PdfColumn("Roll Number"))
- table.Columns.Add(New PdfColumn("Name"))
- table.Columns.Add(New PdfColumn("Class"))
- ' set the border overlap style
- table.Style.BorderOverlapStyle = PdfBorderOverlapStyle.Inside
- ' Add new Rows
- table.Rows.Add(New Object() { "111", "Maxim", "III" })
- ' Draws the table
- table.Draw(page, New PointF(0, 0))
- 'Save the document
- document.Save("Output.pdf")
- 'Close the document
- document.Close(True)
-
-
-
- //Create new instance for XPSToPdfConverter
- XPSToPdfConverter converter = new XPSToPdfConverter();
- //Converts XPS to PDF
- PdfDocument pdfDocument = converter.Convert("XPSToPDF.xps");
- //Save the PDF document
- pdfDocument.Save("Output.pdf");
- //Closing the PDF document
- pdfDocument.Close(true);
-
-
- 'Create new instance for XPSToPdfConverter
- Dim converter As New XPSToPdfConverter()
- 'Converts XPS to PDF
- Dim pdfDocument As PdfDocument = converter.Convert("XPSToPDF.xps")
- 'Save the PDF document
- pdfDocument.Save("Output.pdf")
- 'Closing the PDF document
- pdfDocument.Close(True)
-
-
- //Create new instance for XPSToPdfConverter
- XPSToPdfConverter converter = new XPSToPdfConverter();
- //Converts XPS to PDF
- PdfDocument pdfDocument = converter.Convert("XPSToPDF.xps");
- //Save the PDF document
- pdfDocument.Save("Output.pdf");
- //Closing the PDF document
- pdfDocument.Close(true);
-
-
- 'Create new instance for XPSToPdfConverter
- Dim converter As New XPSToPdfConverter()
- 'Converts XPS to PDF
- Dim pdfDocument As PdfDocument = converter.Convert("XPSToPDF.xps")
- 'Save the PDF document
- pdfDocument.Save("Output.pdf")
- 'Closing the PDF document
- pdfDocument.Close(True)
-
-
- //Create new instance for XPSToPdfConverter
- XPSToPdfConverter converter = new XPSToPdfConverter();
- //Converts XPS to PDF
- PdfDocument pdfDocument = converter.Convert("XPSToPDF.xps");
- //Save the PDF document
- pdfDocument.Save("Output.pdf");
- //Closing the PDF document
- pdfDocument.Close(true);
-
-
- 'Create new instance for XPSToPdfConverter
- Dim converter As New XPSToPdfConverter()
- 'Converts XPS to PDF
- Dim pdfDocument As PdfDocument = converter.Convert("XPSToPDF.xps")
- 'Save the PDF document
- pdfDocument.Save("Output.pdf")
- 'Closing the PDF document
- pdfDocument.Close(True)
-
-
- //Create new instance for XPSToPdfConverter
- XPSToPdfConverter converter = new XPSToPdfConverter();
- //Converts XPS to PDF
- PdfDocument pdfDocument = converter.Convert(XpsStream);
- //Save the PDF document
- pdfDocument.Save("Output.pdf");
- //Closing the PDF document
- pdfDocument.Close(true);
-
-
- 'Create new instance for XPSToPdfConverter
- Dim converter As New XPSToPdfConverter()
- 'Converts XPS to PDF
- Dim pdfDocument As PdfDocument = converter.Convert(XpsStream)
- 'Save the PDF document
- pdfDocument.Save("Output.pdf")
- 'Closing the PDF document
- pdfDocument.Close(True)
-
-
- //Create new instance for XPSToPdfConverter
- XPSToPdfConverter converter = new XPSToPdfConverter();
- //Converts XPS to PDF
- PdfDocument pdfDocument = converter.Convert(XpsByte);
- //Save the PDF document
- pdfDocument.Save("Output.pdf");
- //Closing the PDF document
- pdfDocument.Close(true);
-
-
- 'Create new instance for XPSToPdfConverter
- Dim converter As New XPSToPdfConverter()
- 'Converts XPS to PDF
- Dim pdfDocument As PdfDocument = converter.Convert(XpsByte)
- 'Save the PDF document
- pdfDocument.Save("Output.pdf")
- 'Closing the PDF document
- pdfDocument.Close(True)
-
-