Пример #1
0
        private static void ExecuteConvert(string docxFilePath, string pdfOutputFilePath)
        {
            using var docxStream = File.Open(docxFilePath, FileMode.Open, FileAccess.Read);
            var pdfGenerator = new PdfGenerator();
            var pdf          = pdfGenerator.GenerateAsByteArray(docxStream);

            File.WriteAllBytes(pdfOutputFilePath, pdf);
        }