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); }
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"); }
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); } }