Create PDF from Syncfusion PDF Document

 Imports Syncfusion.Pdf

Imports Syncfusion.Pdf.Graphics


Dim fileName As String = Application.StartupPath & "\chartExport"

Dim exportFileName As String = fileName & ".pdf"

Dim file As String = fileName & ".gif"


Me.chartControl1.SaveImage(file)


'Create a PDF document

Dim pdfDoc As PdfDocument = New PdfDocument()


'Add a page to the empty PDF document

pdfDoc.Pages.Add()


'Draw chart image in the first page

pdfDoc.Pages(0).Graphics.DrawImage(PdfImage.FromFile(file), New PointF(10,30))


'Save the PDF Document to disk.

pdfDoc.Save(exportFileName)


' Launches the file.

System.Diagnostics.Process.Start(exportFileName)

Comments

Popular posts from this blog

Shared / Static Class in vb.net/C#

Xamarin Forms : PopUp Page with RG.Plugins.Popup

Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard)