Java API för att exportera XML till PPS

Exportera XML till PPS 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 XML till PPS i valfri Java J2SE, J2EE, J2ME-applikation. För det första, genom att använda Aspose.PDF för Java , kan du exportera XML till PPTX. Efter det, genom att använda Aspose.Slides för Java PowerPoint Processing API, kan du konvertera PPTX till PPS.

Java API för att konvertera XML till PPS

  1. Öppna XML-filen med klassen Document
  2. Konvertera XML till PPTX genom att använda metoden save
  3. Ladda PPTX-dokument genom att använda klassen Presentation
  4. Spara dokumentet i PPS-format med metoden save och ställ in Pps 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 XML file with an instance of Document class
Document document = new Document("template.xml");
// save XML 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 Pps format
presentation.save("output.pps", SaveFormat.Pps);   

Konverteringskrav

När du laddar XML-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 XML document
Document doc = new Document("input.xml", "Your@Password");
// save XML as PPTX format 
document.save("PptxOutput.pptx", SaveFormat.Pptx); 

Öppna krypterad XML-fil via Java

Efter att ha konverterat XML till PPS 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 Pps format
presentation.save("output.pps", SaveFormat.Pps);    

Utforska XML konverteringsalternativ med Java

Konvertera XMLs till CSV (Comma Seperated Values)
Konvertera XMLs till DIF (Data Interchange Format)
Konvertera XMLs till EXCEL (Spreadsheet File Formats)
Konvertera XMLs till FODS (OpenDocument Flat XML Spreadsheet)
Konvertera XMLs till MD (Markdown Language)
Konvertera XMLs till ODS (OpenDocument Spreadsheet)
Konvertera XMLs till SXC (StarOffice Calc Spreadsheet)
Konvertera XMLs till TSV (Tab Seperated Values)
Konvertera XMLs till TXT (Text Document)
Konvertera XMLs till XLAM (Excel Macro-Enabled Add-In)
Konvertera XMLs till XLSB (Excel Binary Workbook)
Konvertera XMLs till XLSM (Macro-enabled Spreadsheet)
Konvertera XMLs till XLT (Excel 97 - 2003 Template)
Konvertera XMLs till XLTM (Excel Macro-Enabled Template)
Konvertera XMLs till XLTX (Excel Template)
Konvertera XMLs till ODP (OpenDocument Presentation Format)
Konvertera XMLs till OTP (OpenDocument Standard Format)
Konvertera XMLs till POT (Microsoft PowerPoint Template Files)
Konvertera XMLs till POTM (Microsoft PowerPoint Template File)
Konvertera XMLs till POTX (Microsoft PowerPoint Template Presentation)
Konvertera XMLs till PPSM (Macro-enabled Slide Show)
Konvertera XMLs till PPSX (PowerPoint Slide Show)
Konvertera XMLs till PPT (Microsoft PowerPoint 97-2003)
Konvertera XMLs till PPTM (Macro-enabled Presentation File)
Konvertera XMLs till SWF (Shockwave Flash Movie)