コード例 #1
0
ファイル: AsposePdfComponent.cs プロジェクト: wingfay/studio
        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
ファイル: XPSToPDF.cs プロジェクト: joyang1/Aspose_Pdf_NET
        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");
        }
コード例 #5
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");
        }
コード例 #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);
            }
        }
コード例 #7
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);
            }
        }