I am using Spire.PDF to convert some documents to Word format, and it seems like there is a problem with encoding.
The code:
- Code: Select all
System.Globalization.CultureInfo current = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
PdfDocument pdoc = new PdfDocument(@"D:\sample.pdf");
string sample_fn = @"D:\sample.doc";
pdoc.SaveToFile(sample_fn, FileFormat.DOC);
pdoc.Close();
Console.ReadLine();
The results are in attachment (sample.pdf as the source, and sample.doc as result). Looks like the encoding of .doc is broken. I tried to replace the fonts in pdf, but it has no effect. What would you advice in such case?