Ejemplo n.º 1
0
        public static void DocxToPdf()
        {
            //var licenseKey = @"N9Q9EUUVTICI";

            //Spire.License.LicenseProvider.SetLicenseKey(licenseKey);
            ////Spire.License.LicenseProvider.LoadLicense();
            //Document doc = new Document();
            //doc.LoadFromFile(@"C:\Working\Outsource\WGD\THUVIEN\doc\20200224_WGD-THUVIEN-Yeu cau chuc nang.docx");
            //doc.SaveToFile(@"C:\Working\Outsource\WGD\THUVIEN\doc\20200224_WGD-THUVIEN-Yeu cau chuc nang.pdf", FileFormat.PDF);
            //#region DocConvertToPdf

            //var locationOfLibreOfficeSoffice = @"C:\Program Files\LibreOffice\program\soffice.exe";
            //var test = new ReportGenerator(locationOfLibreOfficeSoffice);
            //test.Convert(@"C:\Working\Outsource\WGD\THUVIEN\doc\20200224_WGD-THUVIEN-Yeu cau chuc nang.docx", @"C:\Working\Outsource\WGD\THUVIEN\doc\20200224_WGD-THUVIEN-Yeu cau chuc nang.pdf");
            //test.Convert(@"C:\Working\Outsource\WGD\THUVIEN\doc\Facilites list.xlsx", @"C:\Working\Outsource\WGD\THUVIEN\doc\Facilites list.pdf");
            //#endregion

            new Aspose.Words.License().SetLicense(AsposeLicense.GetLStream());
            var doc = new Document(@"C:\Working\Outsource\WGD\THUVIEN\doc\20200224_WGD-THUVIEN-Yeu cau chuc nang.docx");

            doc.Save(@"C:\Working\Outsource\WGD\THUVIEN\doc\20200224_WGD-THUVIEN-Yeu cau chuc nang.pdf",
                     SaveFormat.Pdf);
        }
Ejemplo n.º 2
0
 public static void RegisterAsposeWord()
 {
     new Aspose.Words.License().SetLicense(AsposeLicense.GetLStream());
 }