//Creates a new Word document
WordDocument wordDocument = new WordDocument();
//Add a section into the word document
IWSection section = wordDocument.AddSection();
//Add a paragraph into the section
IWParagraph paragraph = section.AddParagraph();
//Add a text into the paragraph
paragraph.AppendText("First Chapter1");
//Apply style for the text
paragraph.ApplyStyle(BuiltinStyle.Heading1);
paragraph.AppendText("First Chapter2");
paragraph.ApplyStyle(BuiltinStyle.Heading2);
paragraph.AppendText("First Chapter3");
paragraph.ApplyStyle(BuiltinStyle.Heading3);
//Instantiation of DocIORenderer for Word to PDF conversion
DocIORenderer render = new DocIORenderer();
//Sets ExportBookmarks for preserving Word document headings as PDF bookmarks
render.Settings.ExportBookmarks = Syncfusion.DocIO.ExportBookmarkType.Headings;
//Converts Word document into PDF document
PdfDocument pdfDocument = render.ConvertToPDF(wordDocument);
//Saves the PDF file
MemoryStream outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
//Releases all resources used by the object.
render.Dispose();
//Closes the instance of document objects
pdfDocument.Close();
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 the template document
WordDocument document = new WordDocument("Sample.docx");
//Accesses the instance of the first section in the Word document
WSection section = document.Sections[0];
//Accesses the instance of the first table in the section
WTable table = section.Tables[0] as WTable;
//Auto fits the table with respect to window.
table.AutoFit(AutoFitType.FitToWindow);
//Saves and closes the document instance
document.Save("TableAutoFit.docx");
document.Close();
Private Sub SurroundingSub()
Dim document As WordDocument = New WordDocument("Sample.docx")
Dim section As WSection = document.Sections(0)
Dim table As WTable = TryCast(section.Tables(0), WTable)
table.AutoFit(AutoFitType.FitToWindow)
document.Save("TableAutoFit.docx")
document.Close()
End Sub
//Open an input word template
WordDocument document = new WordDocument(@"Template.docx");
//Update the table of contents.
document.UpdateTableOfContents();
//Save and close the Word document instance.
document.Save("Sample.docx", FormatType.Docx);
document.Close();
'Open an input word template
Dim document As New WordDocument("Template.docx")
'Update the table of contents.
document.UpdateTableOfContents()
'Save and close the Word document instance.
document.Save("Sample.docx", FormatType.Docx)
document.Close()
//Open an input word template from stream through constructor of `WordDocument` class
FileStream inputStream = new FileStream(@"Template.docx", FileMode.Open, FileAccess.Read);
WordDocument document = new WordDocument(inputStream, FormatType.Automatic);
//Update the Page count, Paragraphs count, Word count and Character count in the document
document.UpdateWordCount(true);
FileStream outputStream = new FileStream(@"Sample.docx", FileMode.Create);
//Save and close the Word document instance.
document.Save(outputStream, FormatType.Docx);
document.Close();
'Open an input word template
Dim inputStream As FileStream = New FileStream("Template.docx", FileMode.Open, FileAccess.Read)
Dim document As WordDocument = New WordDocument(inputStream, FormatType.Automatic)
'Update the Page count, Paragraphs count, Word count and Character count in the document.
document.UpdateWordCount(True)
Dim outputStream As FileStream = New FileStream("Sample.docx", FileMode.Create)
'Save and close the Word document instance.
document.Save(outputStream, FormatType.Docx)
document.Close()
//Load an existing Word document into DocIO instance
WordDocument document = new WordDocument("Input.docx", FormatType.Docx);
//Updates the fields present in a document.
document.UpdateDocumentFields(true);
document.Save("Result.docx", FormatType.Docx);
document.Close();
'Load an existing Word document into DocIO instance
Dim document As New WordDocument("Input.docx", FormatType.Docx)
'Updates the fields present in a document.
document.UpdateDocumentFields(True)
document.Save("Result.docx", FormatType.Docx)
document.Close()
//Open the file as Stream.
using (FileStream docStream = new FileStream("Template.docx", FileMode.Open))
{
//Load file stream into Word document.
using (WordDocument wordDocument = new WordDocument(docStream, Syncfusion.DocIO.FormatType.Automatic))
{
//Get the first paragraph from the section.
WParagraph paragraph = wordDocument.LastSection.Paragraphs[0];
//Get the chart element from the paragraph.
WChart chart = paragraph.ChildEntities[0] as WChart;
//Create an instance of DocIORenderer.
using (DocIORenderer renderer = new DocIORenderer())
{
//Convert chart to an image.
using (Stream stream = chart.SaveAsImage())
{
//Create the output image file stream.
using (FileStream fileStreamOutput = File.Create("ChartToImage.jpeg"))
{
//Copies the converted image stream into created output stream.
stream.CopyTo(fileStreamOutput);
}
}
}
}
}
//Loads the template document
WordDocument document = new WordDocument("Sample.docx");
//Accesses the instance of the first section in the Word document
WSection section = document.Sections[0];
//Accesses the instance of the first table in the section
IWTable table = section.Tables[0];
//Auto fits the table with respect to window.
table.AutoFit(AutoFitType.FitToWindow);
//Saves and closes the document instance
document.Save("TableAutoFit.docx");
document.Close();
Private Sub SurroundingSub()
Dim document As WordDocument = New WordDocument("Sample.docx")
Dim section As WSection = document.Sections(0)
Dim table As IWTable = section.Tables(0)
table.AutoFit(AutoFitType.FitToWindow)
document.Save("TableAutoFit.docx")
document.Close()
End Sub
//Open an input word template
IWordDocument document = new WordDocument(@"Template.docx");
//Update the table of contents.
document.UpdateTableOfContents();
//Save and close the Word document instance.
document.Save("Sample.docx", FormatType.Docx);
document.Close();
'Open an input word template
Dim document As IWordDocument = New WordDocument("Template.docx")
'Update the table of contents.
document.UpdateTableOfContents()
'Save and close the Word document instance.
document.Save("Sample.docx", FormatType.Docx)
document.Close()
//Open an input word template from stream through constructor of `WordDocument` class
FileStream inputStream = new FileStream(@"Template.docx", FileMode.Open, FileAccess.Read);
IWordDocument document = new WordDocument(inputStream, FormatType.Automatic);
//Update the Page count, Paragraphs count, Word count and Character count in the document
document.UpdateWordCount(true);
FileStream outputStream = new FileStream(@"Sample.docx", FileMode.Create);
//Save and close the Word document instance.
document.Save(outputStream, FormatType.Docx);
document.Close();
'Open an input word template
Dim inputStream As FileStream = New FileStream("Template.docx", FileMode.Open, FileAccess.Read)
Dim document As IWordDocument = New WordDocument(inputStream, FormatType.Automatic)
'Update the Page count, Paragraphs count, Word count and Character count in the document.
document.UpdateWordCount(True)
Dim outputStream As FileStream = New FileStream("Sample.docx", FileMode.Create)
'Save and close the Word document instance.
document.Save(outputStream, FormatType.Docx)
document.Close()
//Load an existing Word document into DocIO instance
IWordDocument document = new WordDocument("Input.docx", FormatType.Docx);
//Updates the fields present in a document.
document.UpdateDocumentFields(true);
document.Save("Result.docx", FormatType.Docx);
document.Close();
'Load an existing Word document into DocIO instance
Dim document As IWordDocument = New WordDocument("Input.docx", FormatType.Docx)
'Updates the fields present in a document.
document.UpdateDocumentFields(True)
document.Save("Result.docx", FormatType.Docx)
document.Close()
//Creates a new Word document
WordDocument wordDocument = new WordDocument();
//Add a section into the word document
IWSection section = wordDocument.AddSection();
//Add a paragraph into the section
IWParagraph paragraph = section.AddParagraph();
//Add a text into the paragraph
paragraph.AppendText("First Chapter1");
//Apply style for the text
paragraph.ApplyStyle(BuiltinStyle.Heading1);
paragraph.AppendText("First Chapter2");
paragraph.ApplyStyle(BuiltinStyle.Heading2);
paragraph.AppendText("First Chapter3");
paragraph.ApplyStyle(BuiltinStyle.Heading3);
//Instantiation of DocIORenderer for Word to PDF conversion
DocIORenderer render = new DocIORenderer();
//Sets ExportBookmarks for preserving Word document headings as PDF bookmarks
render.Settings.ExportBookmarks = Syncfusion.DocIO.ExportBookmarkType.Headings;
//Converts Word document into PDF document
PdfDocument pdfDocument = render.ConvertToPDF(wordDocument);
//Saves the PDF file
MemoryStream outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
//Releases all resources used by the object.
render.Dispose();
//Closes the instance of document objects
pdfDocument.Close();
wordDocument.Close();
FileStream fileStream = new FileStream("Template.docx", FileMode.Open);
//Loads an existing Word document
WordDocument wordDocument = new WordDocument(fileStream, FormatType.Docx);
//Instantiates DocIORenderer instance for Word to PDF conversion
DocIORenderer renderer = new DocIORenderer();
//Sets AutoDetectComplexScript property as true, to detect the complex scripts automatically.
renderer.Settings.AutoDetectComplexScript = true;
//Converts Word document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument);
//Closes the instance of Word document object
wordDocument.Close();
//Releases the resources occupied by DocIORenderer instance
renderer.Dispose();
//Saves the PDF file
MemoryStream outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
//Closes the instance of PDF document object
pdfDocument.Close();
Dim fileStream As FileStream = New FileStream("Template.docx", FileMode.Open)
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument(fileStream, FormatType.Docx)
'Instantiates DocIORenderer instance for Word to PDF conversion
Dim renderer As DocIORenderer = New DocIORenderer
'Sets AutoDetectComplexScript property as true, to detect the complex scripts automatically.
renderer.Settings.AutoDetectComplexScript = True
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = renderer.ConvertToPDF(wordDocument)
'Closes the instance of Word document object
wordDocument.Close()
'Releases the resources occupied by DocIORenderer instance
renderer.Dispose()
'Saves the PDF file
Dim outputStream As MemoryStream = New MemoryStream
pdfDocument.Save(outputStream)
'Closes the instance of PDF document object
pdfDocument.Close()
FileStream fileStream = new FileStream("Template.docx", FileMode.Open);
//Loads an existing Word document
WordDocument wordDocument = new WordDocument(fileStream, FormatType.Docx);
//Instantiates DocIORenderer instance for Word to PDF conversion
DocIORenderer renderer = new DocIORenderer();
//Sets EnableAlternateChunks property as true, to enable the Alternate chunks in the document
renderer.Settings.EnableAlternateChunks = true;
//Converts Word document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument);
//Closes the instance of Word document object
wordDocument.Close();
//Releases the resources occupied by DocIORenderer instance
renderer.Dispose();
//Saves the PDF file
MemoryStream outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
//Closes the instance of PDF document object
pdfDocument.Close();
Dim fileStream As FileStream = New FileStream("Template.docx", FileMode.Open)
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument(fileStream, FormatType.Docx)
'Instantiates DocIORenderer instance for Word to PDF conversion
Dim renderer As DocIORenderer = New DocIORenderer
'Sets EnableAlternateChunks property as true, to enable the Alternate chunks in the document
renderer.Settings.EnableAlternateChunks = True
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = renderer.ConvertToPDF(wordDocument)
'Closes the instance of Word document object
wordDocument.Close()
'Releases the resources occupied by DocIORenderer instance
renderer.Dispose()
'Saves the PDF file
Dim outputStream As MemoryStream = New MemoryStream
pdfDocument.Save(outputStream)
'Closes the instance of PDF document object
pdfDocument.Close()
FileStream fileStream = new FileStream("Template.docx", FileMode.Open);
//Loads an existing Word document
WordDocument wordDocument = new WordDocument(fileStream, FormatType.Docx);
//Instantiates DocIORenderer instance for Word to PDF conversion
DocIORenderer renderer = new DocIORenderer();
//Sets true to optimize the memory usage for identical images
renderer.Settings.OptimizeIdenticalImages = true;
//Converts Word document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument);
//Closes the instance of Word document object
wordDocument.Close();
//Releases the resources occupied by DocIORenderer instance
renderer.Dispose();
//Saves the PDF file
MemoryStream outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
//Closes the instance of PDF document object
pdfDocument.Close();
Dim fileStream As FileStream = New FileStream("Template.docx", FileMode.Open)
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument(fileStream, FormatType.Docx)
'Instantiates DocIORenderer instance for Word to PDF conversion
Dim renderer As DocIORenderer = New DocIORenderer
'Sets true to optimize the memory usage for identical images
renderer.Settings.OptimizeIdenticalImages = True
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = renderer.ConvertToPDF(wordDocument)
'Closes the instance of Word document object
wordDocument.Close()
'Releases the resources occupied by DocIORenderer instance
renderer.Dispose()
'Saves the PDF file
Dim outputStream As MemoryStream = New MemoryStream
pdfDocument.Save(outputStream)
'Closes the instance of PDF document object
pdfDocument.Close()
FileStream fileStream = new FileStream("Template.docx", FileMode.Open);
//Loads an existing Word document
WordDocument wordDocument = new WordDocument(fileStream, FormatType.Docx);
//Instantiates DocIORenderer instance for Word to PDF conversion
DocIORenderer renderer = new DocIORenderer();
//Sets EmbedFonts property as true, to embed fonts in resultant PDF
renderer.Settings.EmbedFonts = true;
//Converts Word document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument);
//Closes the instance of Word document object
wordDocument.Close();
//Releases the resources occupied by DocIORenderer instance
renderer.Dispose();
//Saves the PDF file
MemoryStream outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
//Closes the instance of PDF document object
pdfDocument.Close();
Dim fileStream As FileStream = New FileStream("Template.docx", FileMode.Open)
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument(fileStream, FormatType.Docx)
'Instantiates DocIORenderer instance for Word to PDF conversion
Dim renderer As DocIORenderer = New DocIORenderer
'Sets EmbedFonts property as true, to embed fonts in resultant PDF
renderer.Settings.EmbedFonts = True
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = renderer.ConvertToPDF(wordDocument)
'Closes the instance of Word document object
wordDocument.Close()
'Releases the resources occupied by DocIORenderer instance
renderer.Dispose()
'Saves the PDF file
Dim outputStream As MemoryStream = New MemoryStream
pdfDocument.Save(outputStream)
'Closes the instance of PDF document object
pdfDocument.Close()
FileStream fileStream = new FileStream("Template.docx", FileMode.Open);
//Loads an existing Word document
WordDocument wordDocument = new WordDocument(fileStream, FormatType.Docx);
//Instantiates DocIORenderer instance for Word to PDF conversion
DocIORenderer renderer = new DocIORenderer();
//Sets the embed complete font information in converted PDF
renderer.Settings.EmbedCompleteFonts = true;
//Converts Word document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument);
//Closes the instance of Word document object
wordDocument.Close();
//Releases the resources occupied by DocIORenderer instance
renderer.Dispose();
//Saves the PDF file
MemoryStream outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
//Closes the instance of PDF document object
pdfDocument.Close();
Dim fileStream As FileStream = New FileStream("Template.docx", FileMode.Open)
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument(fileStream, FormatType.Docx)
'Instantiates DocIORenderer instance for Word to PDF conversion
Dim renderer As DocIORenderer = New DocIORenderer
'Sets the embed complete font information in converted PDF
renderer.Settings.EmbedCompleteFonts = True
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = renderer.ConvertToPDF(wordDocument)
'Closes the instance of Word document object
wordDocument.Close()
'Releases the resources occupied by DocIORenderer instance
renderer.Dispose()
'Saves the PDF file
Dim outputStream As MemoryStream = New MemoryStream
pdfDocument.Save(outputStream)
'Closes the instance of PDF document object
pdfDocument.Close()
FileStream fileStream = new FileStream("Template.docx", FileMode.Open);
//Loads an existing Word document
WordDocument wordDocument = new WordDocument(fileStream, FormatType.Docx);
//Instantiates DocIORenderer instance for Word to PDF conversion
DocIORenderer renderer = new DocIORenderer();
//Sets the accessible structure tags in converted PDF
renderer.Settings.AutoTag = true;
//Converts Word document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument);
//Closes the instance of Word document object
wordDocument.Close();
//Releases the resources occupied by DocIORenderer instance
renderer.Dispose();
//Saves the PDF file
MemoryStream outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
//Closes the instance of PDF document object
pdfDocument.Close();
Dim fileStream As FileStream = New FileStream("Template.docx", FileMode.Open)
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument(fileStream, FormatType.Docx)
'Instantiates DocIORenderer instance for Word to PDF conversion
Dim renderer As DocIORenderer = New DocIORenderer
'Sets the accessible structure tags in converted PDF
renderer.Settings.AutoTag = True
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = renderer.ConvertToPDF(wordDocument)
'Closes the instance of Word document object
wordDocument.Close()
'Releases the resources occupied by DocIORenderer instance
renderer.Dispose()
'Saves the PDF file
Dim outputStream As MemoryStream = New MemoryStream
pdfDocument.Save(outputStream)
'Closes the instance of PDF document object
pdfDocument.Close()
//Creates a new Word document
WordDocument wordDocument = new WordDocument();
//Adds a section into the word document
IWSection section = wordDocument.AddSection();
//Adds a paragraph into the section
IWParagraph paragraph = section.AddParagraph();
//Adds a text into the paragraph
paragraph.AppendText("First Chapter1");
//Applies style for the text
paragraph.ApplyStyle(BuiltinStyle.Heading1);
paragraph.AppendText("First Chapter2");
paragraph.ApplyStyle(BuiltinStyle.Heading2);
paragraph.AppendText("First Chapter3");
paragraph.ApplyStyle(BuiltinStyle.Heading3);
//Instantiates DocIORenderer instance for Word to PDF conversion
DocIORenderer renderer = new DocIORenderer();
//Sets ExportBookmarks for preserving Word document headings as PDF bookmarks
renderer.Settings.ExportBookmarks = Syncfusion.DocIO.ExportBookmarkType.Headings;
//Converts Word document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument);
//Closes the instance of Word document object
wordDocument.Close();
//Releases the resources occupied by DocIORenderer instance
renderer.Dispose();
//Saves the PDF file
MemoryStream outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
//Closes the instance of PDF document object
pdfDocument.Close();
'Creates a new Word document
Dim wordDocument As WordDocument = New WordDocument
'Adds a section into the word document
Dim section As IWSection = wordDocument.AddSection
'Adds a paragraph into the section
Dim paragraph As IWParagraph = section.AddParagraph
'Adds a text into the paragraph
paragraph.AppendText("First Chapter1")
'Applies style for the text
paragraph.ApplyStyle(BuiltinStyle.Heading1)
paragraph.AppendText("First Chapter2")
paragraph.ApplyStyle(BuiltinStyle.Heading2)
paragraph.AppendText("First Chapter3")
paragraph.ApplyStyle(BuiltinStyle.Heading3)
'Instantiates DocIORenderer instance for Word to PDF conversion
Dim renderer As DocIORenderer = New DocIORenderer
'Sets ExportBookmarks for preserving Word document headings as PDF bookmarks
renderer.Settings.ExportBookmarks = Syncfusion.DocIO.ExportBookmarkType.Headings
Dim pdfDocument As PdfDocument = renderer.ConvertToPDF(wordDocument)
'Closes the instance of Word document object
wordDocument.Close()
'Releases the resources occupied by DocIORenderer instance
renderer.Dispose()
Dim outputStream As MemoryStream = New MemoryStream
pdfDocument.Save(outputStream)
'Closes the instance of PDF document object
pdfDocument.Close()
FileStream fileStream = new FileStream("Template.docx", FileMode.Open);
//Loads an existing Word document
WordDocument wordDocument = new WordDocument(fileStream, FormatType.Docx);
//Instantiates DocIORenderer instance for Word to PDF conversion
DocIORenderer renderer = new DocIORenderer();
//Updates the fields present in Word document
renderer.Settings.UpdateDocumentFields = true;
//Converts Word document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument);
//Closes the instance of Word document object
wordDocument.Close();
//Releases the resources occupied by DocIORenderer instance
renderer.Dispose();
//Saves the PDF file
MemoryStream outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
//Closes the instance of PDF document object
pdfDocument.Close();
Dim fileStream As FileStream = New FileStream("Template.docx", FileMode.Open)
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument(fileStream, FormatType.Docx)
'Instantiates DocIORenderer instance for Word to PDF conversion
Dim renderer As DocIORenderer = New DocIORenderer
'Updates the fields present in Word document
renderer.Settings.UpdateDocumentFields = true
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = renderer.ConvertToPDF(wordDocument)
'Closes the instance of Word document object
wordDocument.Close()
'Releases the resources occupied by DocIORenderer instance
renderer.Dispose()
'Saves the PDF file
Dim outputStream As MemoryStream = New MemoryStream
pdfDocument.Save(outputStream)
'Closes the instance of PDF document object
pdfDocument.Close()
FileStream fileStream = new FileStream("Template.docx", FileMode.Open);
//Loads an existing Word document
WordDocument wordDocument = new WordDocument(fileStream, FormatType.Docx);
//Instantiates DocIORenderer instance for Word to PDF conversion
DocIORenderer renderer = new DocIORenderer();
//Sets Export Chart Image Options.
renderer.Settings.ChartRenderingOptions.ImageFormat = ExportImageFormat.Png;
//Converts Word document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument);
//Closes the instance of Word document object
wordDocument.Close();
//Releases the resources occupied by DocIORenderer instance
renderer.Dispose();
//Saves the PDF file
MemoryStream outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
//Closes the instance of PDF document object
pdfDocument.Close();
Dim fileStream As FileStream = New FileStream("Template.docx", FileMode.Open)
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument(fileStream, FormatType.Docx)
'Instantiates DocIORenderer instance for Word to PDF conversion
Dim renderer As DocIORenderer = New DocIORenderer
'Sets Export Chart Image Options.
renderer.Settings.ChartRenderingOptions.ImageFormat = ExportImageFormat.Png
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = renderer.ConvertToPDF(wordDocument)
'Closes the instance of Word document object
wordDocument.Close()
'Releases the resources occupied by DocIORenderer instance
renderer.Dispose()
'Saves the PDF file
Dim outputStream As MemoryStream = New MemoryStream
pdfDocument.Save(outputStream)
'Closes the instance of PDF document object
pdfDocument.Close()
series.ConfigItems.RadarItem.Type = ChartRadarDrawType.Symbol;
// access the RadarItem ConfigItem to configure radar charts
series.ConfigItems.RadarItem.Type = ChartRadarDrawType.Symbol;
This color list will be used to specify the
The first entry in this list will be the same as the
Note that this list is Read-only.
The following code demonstrate how to get the average of the data points in a series.
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Mean1=BasicStatisticalFormulas.Mean(series1);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Mean1 As Double
Mean1=BasicStatisticalFormulas.Mean(series1)
Use this method to calculate the mean (i.e. average) of the points stored in a series.
If the specified input series does not exist in the SeriesCollection at the time of the method call than an exception will be thrown.
The following code demonstrate how to get the average of the data points in a series.
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Mean1=BasicStatisticalFormulas.Mean(series1, 0);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Mean1 As Double
Mean1=BasicStatisticalFormulas.Mean(series1, 0)
Use this method to calculate the mean (i.e. average) of the points stored in a series.
If the specified input series does not exist in the SeriesCollection at the time of the method call than an exception will be thrown.
The following Code demonstrate how to gets the VarianceUnBasedEstimator of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double VarianceUnBased1= Statistics.BasicStatisticalFormulas.VarianceUnBiasedEstimator(series);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim VarianceUnBased1 As Double
VarianceUnBased1=BasicStatisticalFormulas.VarianceUnBiasedEstimator(series)
This method estimates the variance for a sample.
If the specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following Code demonstrate how to gets the VarianceUnBasedEstimator of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double VarianceUnBased1= Statistics.BasicStatisticalFormulas.VarianceUnBiasedEstimator(series, 0);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim VarianceUnBased1 As Double
VarianceUnBased1=BasicStatisticalFormulas.VarianceUnBiasedEstimator(series, 0)
This method estimates the variance for a sample.
If the specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following Code demonstrate how to gets the VarianceBasedEstimator of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double VarianceBased1= Statistics.BasicStatisticalFormulas.VarianceBiasedEstimator(series);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim VarianceBased1 As Double
VarianceBased1=BasicStatisticalFormulas.VarianceBiasedEstimator(series)
This method estimates the variance for a sample.
If the specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following Code demonstrate how to gets the VarianceBasedEstimator of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double VarianceBased1= Statistics.BasicStatisticalFormulas.VarianceBiasedEstimator(series, 0);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim VarianceBased1 As Double
VarianceBased1=BasicStatisticalFormulas.VarianceBiasedEstimator(series, 0)
This method estimates the variance for a sample.
If the specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following Code demonstrate how to gets the Variance of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Variance1= Statistics.BasicStatisticalFormulas.Variance(series,true);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Variance1 As Double
Variance1=BasicStatisticalFormulas.Variance(series,true)
This method estimates the variance for a sample.
If the specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following Code demonstrate how to gets the Variance of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Variance1= Statistics.BasicStatisticalFormulas.Variance(series,true);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Variance1 As Double
Variance1=BasicStatisticalFormulas.Variance(series,true)
This method estimates the variance for a sample.
If the specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following Code demonstrate how to gets the Standard Deviation of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Standard1= Statistics.BasicStatisticalFormulas.StandartDeviation(series,false);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Standard1 As Double
Standard1=BasicStatisticalFormulas.StandartDeviation(series,false)
This method estimates the Standard Deviation for a sample.
If the specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following Code demonstrate how to gets the Standard Deviation of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Standard1= Statistics.BasicStatisticalFormulas.StandardDeviation(series,0,false);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Standard1 As Double
Standard1=BasicStatisticalFormulas.StandardDeviation(series,0,false)
This method estimates the Standard Deviation for a sample.
If the specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following Code demonstrate how to gets the Covariance of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Covariance1= Statistics.BasicStatisticalFormulas.Covariance(series1,series2);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Covariance1 As Double
Covariance1=BasicStatisticalFormulas.Covariance(series1,series2)
This method returns the average of the product of deviations of the data points from their respective means.
Covariance is a measure of the relationship between two ranges of data, and can be used to determine whether two ranges of data move together - that is, whether large values of one set are associated with large values of the other (positive covariance), whether small values of one set are associated with large values of the other (negative covariance), or whether values in both sets are unrelated (covariance near zero).
If a specified input series does not exist in the series collection at the time of the method call than an exception will be thrown. An exception will also be raised if the series do not have the same number of data points.
The following Code demonstrate how to gets the Covariance of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Covariance1= Statistics.BasicStatisticalFormulas.Covariance(series1,series2, 0);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Covariance1 As Double
Covariance1=BasicStatisticalFormulas.Covariance(series1,series2, 0)
This method returns the average of the product of deviations of the data points from their respective means.
Covariance is a measure of the relationship between two ranges of data, and can be used to determine whether two ranges of data move together - that is, whether large values of one set are associated with large values of the other (positive covariance), whether small values of one set are associated with large values of the other (negative covariance), or whether values in both sets are unrelated (covariance near zero).
If a specified input series does not exist in the series collection at the time of the method call than an exception will be thrown. An exception will also be raised if the series do not have the same number of data points.
The following Code demonstrate how to gets the Correlation of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Correlation1= Statistics.BasicStatisticalFormulas.Correlation(series1,series2);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Correlation1 As Double
Correlation1=BasicStatisticalFormulas.Correlation(series1,series2)
Correlation measures the relationship between two data sets that are scaled to be independent of the unit of measurement. This correlation method returns the covariance of two data sets divided by the product of their standard deviations, and always ranges from -1 to 1. Use correlation to determine whether two ranges of data move together that is, whether large values of one set are associated with large values of the other (positive correlation), whether small values of one set are associated with large values of the other (negative correlation), or whether values in both sets are unrelated (correlation near zero).
If a specified input series does not exist in the series collection at the time of the method call than an exception will be thrown. An exception will also be raised if the series do not have the same number of data points.
The following Code demonstrate how to gets the Correlation of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Correlation1= Statistics.BasicStatisticalFormulas.Correlation(series1,series2,0);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Correlation1 As Double
Correlation1=BasicStatisticalFormulas.Correlation(series1,series2,0)
Correlation measures the relationship between two data sets that are scaled to be independent of the unit of measurement. This correlation method returns the covariance of two data sets divided by the product of their standard deviations, and always ranges from -1 to 1. Use correlation to determine whether two ranges of data move together that is, whether large values of one set are associated with large values of the other (positive correlation), whether small values of one set are associated with large values of the other (negative correlation), or whether values in both sets are unrelated (correlation near zero).
If a specified input series does not exist in the series collection at the time of the method call than an exception will be thrown. An exception will also be raised if the series do not have the same number of data points.
The following Code demonstrate how to gets the median of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Median1= Statistics.BasicStatisticalFormulas.Median(series1);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Median1 As Double
Median1=BasicStatisticalFormulas.Median(series1)
Use this method to calculate the median of the points stored in a series. The median is the middle value of a sample set, where half of the members are greater in size and half the members are lesser in size.
if the specified input series does not exist in the SeriesCollection at the time of the method call than an exception will be thrown.
The following Code demonstrate how to gets the median of the data points in a series
using Syncfusion.Windows.Forms.Chart.Statistics;
............
double Median1= Statistics.BasicStatisticalFormulas.Median(series1, 0);
Imports Syncfusion.Windows.Forms.Chart.Statistics
.............
Dim Median1 As Double
Median1=BasicStatisticalFormulas.Median(series1, 0)
Use this method to calculate the median of the points stored in a series. The median is the middle value of a sample set, where half of the members are greater in size and half the members are lesser in size.
if the specified input series does not exist in the SeriesCollection at the time of the method call than an exception will be thrown.
The following code demonstrate how to calculate Ztest
ZTestResult ztr = BasicStatisticalFormulas.ZTest( Convert.ToDouble(TextBox6.Text.ToString()),sqrtVarianceOfFirstSeries*sqrtVarianceOfFirstSeries,sqrtVarianceOfSecondSeries* sqrtVarianceOfSecondSeries,0.05,series1,series2);
Dim ztr As ZTestResult = BasicStatisticalFormulas.ZTest(Convert.ToDouble(TextBox6.Text.ToString()), sqrtVarianceOfFirstSeries*sqrtVarianceOfFirstSeries, sqrtVarianceOfSecondSeries*sqrtVarianceOfSecondSeries, 0.05, series1, series2)
This method performs a Z test for two groups of data, and returns the results using a ZTestResult object.
Two and only two groups of data must be specified. If either input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following code demonstrate how to calculate Ztest
ZTestResult ztr = BasicStatisticalFormulas.ZTest( Convert.ToDouble(TextBox6.Text.ToString()),sqrtVarianceOfFirstSeries*sqrtVarianceOfFirstSeries,sqrtVarianceOfSecondSeries* sqrtVarianceOfSecondSeries,0.05,series1,series2, 0);
Dim ztr As ZTestResult = BasicStatisticalFormulas.ZTest(Convert.ToDouble(TextBox6.Text.ToString()), sqrtVarianceOfFirstSeries*sqrtVarianceOfFirstSeries, sqrtVarianceOfSecondSeries*sqrtVarianceOfSecondSeries, 0.05, series1, series2, 0)
This method performs a Z test for two groups of data, and returns the results using a ZTestResult object.
Two and only two groups of data must be specified. If either input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following code demonstrate how to calculate TTest Equal Variance
using Syncfusion.Windows.Forms.Chart.Statistics;
........
TTestResult ttr = BasicStatisticalFormulas.TTestEqualVariances (0.2, 0.05, series1, series2);
Imports Syncfusion.Windows.Forms.Chart.Statistics
........
Dim ttr As TTestResult = BasicStatisticalFormulas.TTestEqualVariances (0.2, 0.05, series1, series2)
This method performs a T test for two groups of data, and assumes equal variances between the two groups (i.e. series).
If either input series does not exist in the series collection at the time of the method call an exception will be thrown.
The following code demonstrate how to calculate TTest Equal Variance
using Syncfusion.Windows.Forms.Chart.Statistics;
........
TTestResult ttr = BasicStatisticalFormulas.TTestEqualVariances (0.2, 0.05, series1, series2, 0);
Imports Syncfusion.Windows.Forms.Chart.Statistics
........
Dim ttr As TTestResult = BasicStatisticalFormulas.TTestEqualVariances (0.2, 0.05, series1, series2, 0)
This method performs a T test for two groups of data, and assumes equal variances between the two groups (i.e. series).
If either input series does not exist in the series collection at the time of the method call an exception will be thrown.
The following code demonstrate how to calculate TTest UnEqual Variance
using Syncfusion.Windows.Forms.Chart.Statistics;
........
TTestResult ttr = BasicStatisticalFormulas.TTestUnEqualVariances (0.2, 0.05, series1, series2);
Imports Syncfusion.Windows.Forms.Chart.Statistics
........
Dim ttr As TTestResult = BasicStatisticalFormulas.TTestUnEqualVariances (0.2, 0.05, series1, series2)
This method performs a T test for two groups of data, and assumes unequal variances between the two groups (i.e. series).
This analysis tool is referred to as a heteroscedastic t-test, and can be used when the groups under study are distinct. Use a paired test when there is one group before and after a treatment.
If either input series does not exist in the series collection at the time of the method call an exception will be thrown.
The following code demonstrate how to calculate TTest UnEqual Variance
using Syncfusion.Windows.Forms.Chart.Statistics;
........
TTestResult ttr = BasicStatisticalFormulas.TTestUnEqualVariances (0.2, 0.05, series1, series2, 0);
Imports Syncfusion.Windows.Forms.Chart.Statistics
........
Dim ttr As TTestResult = BasicStatisticalFormulas.TTestUnEqualVariances (0.2, 0.05, series1, series2, 0)
This method performs a T test for two groups of data, and assumes unequal variances between the two groups (i.e. series).
This analysis tool is referred to as a heteroscedastic t-test, and can be used when the groups under study are distinct. Use a paired test when there is one group before and after a treatment.
If either input series does not exist in the series collection at the time of the method call an exception will be thrown.
The following code demonstrate how to calculate TTestPaired
using Syncfusion.Windows.Forms.Chart.Statistics;
........
TTestResult ttr = BasicStatisticalFormulas.TTestPaired(0.2, 0.05, series1, series2);
Imports Syncfusion.Windows.Forms.Chart.Statistics
........
Dim ttr As TTestResult = BasicStatisticalFormulas.TTestPaired (0.2, 0.05, series1, series2)
This method performs a paired two-sample student's t-test to determine whether a sample's means are distinct. This form of the t-test does not assume that the variances of both populations are equal.
Use a paired test when there is a natural pairing of observations in the samples, such as a sample group that is tested twice (e.g. before and after an experiment).
If either input series does not exist in the series collection at the time of the method call an exception will be thrown.
The following code demonstrate how to calculate TTestPaired
using Syncfusion.Windows.Forms.Chart.Statistics;
........
TTestResult ttr = BasicStatisticalFormulas.TTestPaired(0.2, 0.05, series1, series2, 0);
Imports Syncfusion.Windows.Forms.Chart.Statistics
........
Dim ttr As TTestResult = BasicStatisticalFormulas.TTestPaired (0.2, 0.05, series1, series2, 0)
This method performs a paired two-sample student's t-test to determine whether a sample's means are distinct. This form of the t-test does not assume that the variances of both populations are equal.
Use a paired test when there is a natural pairing of observations in the samples, such as a sample group that is tested twice (e.g. before and after an experiment).
If either input series does not exist in the series collection at the time of the method call an exception will be thrown.
The following code demonstrate how to calculate FTest.
using Syncfusion.Windows.Forms.Chart.Statistics;
........
FTestResult ftr = BasicStatisticalFormulas.FTest(0.05, series1, series2);
Imports Syncfusion.Windows.Forms.Chart.Statistics
........
Dim ftr As FTestResult = BasicStatisticalFormulas.FTest(0.05, series1, series2)
This method returns the results of the F-test using an FTestResult object.
FTest performs a two-sample F-test to compare two population variances. For example, it can be used to determine whether the time scores in a swimming meet have a difference in variance for samples from two teams.
If a specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following code demonstrate how to calculate FTest.
using Syncfusion.Windows.Forms.Chart.Statistics;
........
FTestResult ftr = BasicStatisticalFormulas.FTest(0.05, series1, series2, 0);
Imports Syncfusion.Windows.Forms.Chart.Statistics
........
Dim ftr As FTestResult = BasicStatisticalFormulas.FTest(0.05, series1, series2, 0)
This method returns the results of the F-test using an FTestResult object.
FTest performs a two-sample F-test to compare two population variances. For example, it can be used to determine whether the time scores in a swimming meet have a difference in variance for samples from two teams.
If a specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following code demonstrate how to calculate AnovaTest
using Syncfusion.Windows.Forms.Chart.Statistics;
........
AnovaResult ar = BasicStatisticalFormulas.Anova(0.5,new ChartSeries[]{ series1, series2, series3} );
Imports Syncfusion.Windows.Forms.Chart.Statistics
........
Dim ar As AnovaResult = BasicStatisticalFormulas.Anova(0.5, New ChartSeries(){ series1, series2, series3})
An ANOVA test is used to test the difference between the means of two or more groups of data.
Two or more groups of data (series) must be specified, and each series must have the same number of data points otherwise an exception will be raised.
If a specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
The following code demonstrate how to calculate AnovaTest
using Syncfusion.Windows.Forms.Chart.Statistics;
........
AnovaResult ar = BasicStatisticalFormulas.Anova(0.5,new ChartSeries[]{ series1, series2, series3}, 0 );
Imports Syncfusion.Windows.Forms.Chart.Statistics
........
Dim ar As AnovaResult = BasicStatisticalFormulas.Anova(0.5, New ChartSeries(){ series1, series2, series3}, 0)
An ANOVA test is used to test the difference between the means of two or more groups of data.
Two or more groups of data (series) must be specified, and each series must have the same number of data points otherwise an exception will be raised.
If a specified input series does not exist in the series collection at the time of the method call than an exception will be thrown.
this.chart.Series[0].Styles[0].Font.Facename = "Arial";
standard.Font.Facename = "Helvetica";
model[1, 3].Font.Bold = true;
string faceName = model[1, 3].Font.Facename; // any cell inherits standard style
Console.WriteLIne(faceName); // will output "Helvetica"
Console.WriteLIne(model[1, 3].Font.Bold); // will output "true"
Console.WriteLIne(model[1, 3].Font.HasFaceName); // will output "False"
public override StyleInfoSubObjectIdentity CreateSubObjectIdentity(StyleInfoProperty sip)
{
return new GridStyleInfoSubObjectIdentity(this, sip);
}
XmlSerializer imageHolderSerializer = new XmlSerializer(typeof(object), new Type[] { typeof(ImageHolder) });
GridStyleInfoStore.RegisterXmlSerializer(typeof(ImageHolder), imageHolderSerializer);
standard.Font.Facename = "Helvetica";
model[1, 3].Font.Bold = true;
string faceName = model[1, 3].Font.Facename; // any cell inherits standard style
Console.WriteLIne(faceName); // will output "Helvetica"
Console.WriteLIne(model[1, 3].Font.Bold); // will output "true"
Console.WriteLIne(model[1, 3].Font.HasFaceName); // will output "False"