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
Post a Comment