Telerik Forums
Telerik Document Processing Forum
3 answers
858 views

hello,

i'm working on function to export word to PDF, and the result is inconherent, i'm loosing the special caracter like "é"  , "ô". the document is in french language, also the style of wording of the document.

this is my function, any suggestion to resolve it?

regards.


public static void ConvertWordtopdf(string input, string output)
        {
            var docxProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
            var pdfProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();


            try
            {
                //var docxBytes = File.ReadAllBytes(input);
                var docxBytes = System.IO.File.OpenRead(input);
                RadFlowDocument docx = docxProvider.Import(docxBytes);

                var pdfBytes = pdfProvider.Export(docx);
                File.WriteAllBytes(output, pdfBytes);

                docxBytes.Dispose();
                
            }
            catch (Exception ex)
            {
                ;
            }
        }

Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?