Hi Syncfusion team,
Trying to convert the docx to pdf but the comments is missing. Please assist.
Attached sample docx and code below.
Code:
using (MemoryStream memWord = new MemoryStream(fileBytes))
{
var wordDocument = new WordDocument(memWord, Syncfusion.DocIO.FormatType.Automatic);
// Creates a new instance of DocIORenderer class.
DocIORenderer render = new DocIORenderer();
// Converts Word document into PDF document.
PdfDocument pdf = render.ConvertToPDF(wordDocument);
// Save the PDF document.
pdf.Save(stream);
using (FileStream file = new FileStream(Path.Combine(Path.GetTempPath(), "test.pdf"), FileMode.Create, FileAccess.Write))
stream.WriteTo(file);
render.Dispose();
pdf.Close();
}
Regards
Attachment:
Lorem_9f7794b7.zip