static void Main(string[] args)
        {
            SautinSoft.PdfMetamorphosis p = new SautinSoft.PdfMetamorphosis();

            // You may download the latest version of SDK here:
            // http://sautinsoft.com/products/pdf-metamorphosis/download.php

            if (p != null)
            {
                string docxPath = @"D:\Tempos\test.docx";
                string pdfPath  = Path.ChangeExtension(docxPath, ".pdf");


                // 2. Convert DOCX file to PDF file
                if (p.DocxToPdfConvertFile(docxPath, pdfPath) == 0)
                {
                    System.Diagnostics.Process.Start(pdfPath);
                }
                else
                {
                    System.Console.WriteLine("Conversion failed!");
                    Console.ReadLine();
                }
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            SautinSoft.PdfMetamorphosis p = new SautinSoft.PdfMetamorphosis();

            // You may download the latest version of SDK here:
            // http://sautinsoft.com/products/pdf-metamorphosis/download.php

            string rtfPath = @"d:\test.rtf";
            string pdfPath = Path.ChangeExtension(rtfPath, ".pdf");

            int i = p.RtfToPdfConvertFile(rtfPath, pdfPath);

            if (i != 0)
            {
                System.Console.WriteLine("An error occured during converting RTF to PDF!");
            }
            else
            {
                System.Diagnostics.Process.Start(pdfPath);
            }
        }