Hi,
I have a problem with converting .doc to .pdf. Check attachment and result. If there is a table within .doc and additional table in cell, there polish characters are broken. Outside of this inner table it is not perfect but better. Look at my samples how odd words looks like in pdf. They are broken with whitespace or their format is different in different parts. Maybe I need to update my .doc file?
Here is my code:
var fileName = DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss");
var docFileInfo = new FileInfo(Path.Combine(environment.WebRootPath, "uploads", $"sample.doc"));
WordDocument document2 = null;
using (var stream = docFileInfo.OpenRead())
{
document2 = new WordDocument(stream, Syncfusion.DocIO.FormatType.Doc);
}
DocIORenderer render = new DocIORenderer();
var doc = render.ConvertToPDF(document2);
using (var stream = new FileStream(Path.Combine(environment.WebRootPath, "uploads", $"{fileName}.pdf"), FileMode.Create))
{
doc.Save(stream);
}
doc.Close(true);
document2.Close();
Attachment:
samples_12586385.rar