示例#1
0
        public void FromXps(string absoluteFilePath, string outputPath)
        {
            // Instantiate LoadOption object using XPS load option
            Aspose.Pdf.LoadOptions options = new XpsLoadOptions();

            // Create document object
            Aspose.Pdf.Document document = new Aspose.Pdf.Document(absoluteFilePath, options);

            // Save the resultant PDF document
            document.Save(outputPath);
        }
示例#2
0
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_AsposePdf_DocumentConversion();

            // instantiate LoadOption object using XPS load option
            Aspose.Pdf.LoadOptions options = new XpsLoadOptions();

            // create document object
            Aspose.Pdf.Document document = new Aspose.Pdf.Document(dataDir + "test.xps", options);

            // save the resultant PDF document
            document.Save(dataDir + "resultant.pdf");
        }
示例#3
0
        public static void Main(string[] args)
        {
            // The path to the documents directory.
            string dataDir = Path.GetFullPath("../../../Data/");

            // instantiate LoadOption object using XPS load option
            Aspose.Pdf.LoadOptions options = new XpsLoadOptions();

            // create document object
            Aspose.Pdf.Document document = new Aspose.Pdf.Document(dataDir + "test.xps", options);

            // save the resultant PDF document
            document.Save(dataDir + "resultant.pdf");
        }
示例#4
0
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_AsposePdf_DocumentConversion();

            // instantiate LoadOption object using XPS load option
            Aspose.Pdf.LoadOptions options = new XpsLoadOptions();
            
            // create document object 
            Aspose.Pdf.Document document = new Aspose.Pdf.Document(dataDir + "test.xps", options);
            
            // save the resultant PDF document
            document.Save(dataDir + "resultant.pdf");
        }
        public static void Main(string[] args)
        {
            // The path to the documents directory.
            string dataDir = Path.GetFullPath("../../../Data/");

            // instantiate LoadOption object using XPS load option
            Aspose.Pdf.LoadOptions options = new XpsLoadOptions();

            // create document object
            Aspose.Pdf.Document document = new Aspose.Pdf.Document(dataDir + "test.xps", options);

            // save the resultant PDF document
            document.Save(dataDir + "resultant.pdf");
        }
示例#6
0
        public static void Run()
        {
            try
            {
                // ExStart:XPSToPDF
                // The path to the documents directory.
                string dataDir = RunExamples.GetDataDir_AsposePdf_DocumentConversion();

                // Instantiate LoadOption object using XPS load option
                Aspose.Pdf.LoadOptions options = new XpsLoadOptions();

                // Create document object
                Aspose.Pdf.Document document = new Aspose.Pdf.Document(dataDir + "XPSToPDF.xps", options);

                // Save the resultant PDF document
                document.Save(dataDir + "XPSToPDF_out_.pdf");
                // ExEnd:XPSToPDF
            }
            catch (Exception ex)

            {
                Console.WriteLine(ex.Message);
            }
        }
        public static void Run()
        {
            try
            {
                // ExStart:XPSToPDF
                // The path to the documents directory.
                string dataDir = RunExamples.GetDataDir_AsposePdf_DocumentConversion();

                // Instantiate LoadOption object using XPS load option
                Aspose.Pdf.LoadOptions options = new XpsLoadOptions();

                // Create document object 
                Aspose.Pdf.Document document = new Aspose.Pdf.Document(dataDir + "XPSToPDF.xps", options);

                // Save the resultant PDF document
                document.Save(dataDir + "XPSToPDF_out.pdf");
                // ExEnd:XPSToPDF
            }
            catch(Exception ex)
               
            {
                Console.WriteLine(ex.Message);
            }
        }