using (var document = new WordDocument(sourcePath))
{
document.ChartToImageConverter = new ChartToImageConverter();
document.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Normal;
using (var converter = new DocToPDFConverter())
{
converter.Settings = new DocToPDFConverterSettings
{
PdfConformanceLevel = PdfConformanceLevel.Pdf_A1B
};
//Convert word document into PDF document
using (var pdfDoc = converter.ConvertToPDF(document))
{
pdfDoc.EnableMemoryOptimization = false;
pdfDoc.Save(dstPath);
pdfDoc.Close();
}
}
document.Close();
}