Java API för att exportera XPS till ODP

Exportera XPS till ODP via lokalt Java API utan att använda Microsoft® PowerPoint eller Adobe® Acrobat Reader

 

Genom att använda Aspose.Total for Java kan du enkelt konvertera XPS till ODP i valfri Java J2SE, J2EE, J2ME-applikation. För det första, genom att använda Aspose.PDF för Java , kan du exportera XPS till PPTX. Efter det, genom att använda Aspose.Slides för Java PowerPoint Processing API, kan du konvertera PPTX till ODP.

Java API för att konvertera XPS till ODP

  1. Öppna XPS-filen med klassen Document
  2. Konvertera XPS till PPTX genom att använda metoden save
  3. Ladda PPTX-dokument genom att använda klassen Presentation
  4. Spara dokumentet i ODP-format med metoden save och ställ in Odp som SaveFormat

Konverteringskrav

Du kan enkelt använda Aspose.Total för Java direkt från ett Maven baserat projekt och inkludera Aspose.PDF för Java och Aspose.Slides för Java i din pom.xml.

Alternativt kan du få en ZIP-fil från downloads .

// load XPS file with an instance of Document class
Document document = new Document("template.xps");
// save XPS as PPTX format 
document.save("PptxOutput.pptx", SaveFormat.Pptx); 
// instantiate a Presentation object that represents a PPTX file
Presentation presentation = new Presentation("PptxOutput.pptx");
// save the presentation as Odp format
presentation.save("output.odp", SaveFormat.Odp);   

Konverteringskrav

När du laddar XPS-filformatet kan ditt dokument vara lösenordsskyddat. Aspose.PDF för Java låter dig också öppna krypterade dokument. För att öppna den krypterade filen kan du initiera en ny instans av Document klass och skicka filnamn och lösenord som argument.

// open XPS document
Document doc = new Document("input.xps", "Your@Password");
// save XPS as PPTX format 
document.save("PptxOutput.pptx", SaveFormat.Pptx); 

Öppna krypterad XPS-fil via Java

Efter att ha konverterat XPS till ODP kan du också lägga till fördefinierad vytyp för din presentation. Aspose.Slides for Java ger en möjlighet att ställa in vytypen för den genererade presentationen när den öppnas i PowerPoint via ViewProperties . Egenskapen setLastView används för att ställa in vytypen genom att använda ViewType enumerator.

// instantiate a Presentation object that represents a PPTX file
Presentation presentation = new Presentation("PptxOutput.pptx");
// set view type
presentation.getViewProperties().setLastView((byte) ViewType.SlideMasterView);
// save the presentation as Odp format
presentation.save("output.odp", SaveFormat.Odp);    

Utforska XPS konverteringsalternativ med Java

Konvertera XPSs till DOCM (Microsoft Word 2007 Marco File)
Konvertera XPSs till DOT (Microsoft Word Template Files)
Konvertera XPSs till DOTM (Microsoft Word 2007+ Template File)
Konvertera XPSs till DOTX (Microsoft Word Template File)
Konvertera XPSs till FLATOPC (Microsoft Word 2003 WordprocessingML)
Konvertera XPSs till GIF (Graphical Interchange Format)
Konvertera XPSs till MHTML (Web Page Archive Format)
Konvertera XPSs till ODT (OpenDocument Text File Format)
Konvertera XPSs till OTT (OpenDocument Standard Format)
Konvertera XPSs till PCL (Printer Command Language Document)
Konvertera XPSs till PS (PostScript File)
Konvertera XPSs till RTF (Rich Text Format)
Konvertera XPSs till WORDML (Microsoft Word 2003 WordprocessingML)
Konvertera XPSs till CSV (Comma Seperated Values)
Konvertera XPSs till DIF (Data Interchange Format)
Konvertera XPSs till EXCEL (Spreadsheet File Formats)
Konvertera XPSs till FODS (OpenDocument Flat XML Spreadsheet)
Konvertera XPSs till MD (Markdown Language)
Konvertera XPSs till ODS (OpenDocument Spreadsheet)
Konvertera XPSs till SXC (StarOffice Calc Spreadsheet)
Konvertera XPSs till TSV (Tab Seperated Values)
Konvertera XPSs till TXT (Text Document)
Konvertera XPSs till XLAM (Excel Macro-Enabled Add-In)
Konvertera XPSs till XLSB (Excel Binary Workbook)
Konvertera XPSs till XLSM (Macro-enabled Spreadsheet)
Konvertera XPSs till XLT (Excel 97 - 2003 Template)
Konvertera XPSs till XLTM (Excel Macro-Enabled Template)
Konvertera XPSs till XLTX (Excel Template)
Konvertera XPSs till APNG (Animated Portable Network Graphics)
Konvertera XPSs till DICOM (Digital Imaging and Communications in Medicine)
Konvertera XPSs till DXF (Autodesk Drawing Exchange Format)
Konvertera XPSs till EMZ (Windows Compressed Enhanced Metafile)
Konvertera XPSs till OTP (OpenDocument Standard Format)
Konvertera XPSs till POT (Microsoft PowerPoint Template Files)
Konvertera XPSs till POTM (Microsoft PowerPoint Template File)
Konvertera XPSs till POTX (Microsoft PowerPoint Template Presentation)