Dateiformatkonvertierung über Java

Konvertieren Sie Microsoft® Office-Dokumente, PDFs, Bilder, HTML und mehrere andere Dateien, ohne andere Software zu verwenden.

 

Java Total Library beschleunigt die Entwicklung von Dokumentenmanipulationslösungen von Grund auf oder verbessert vorhandene Anwendungen, um die Dokumentenverwaltung mit Leichtigkeit zu bewältigen. API erstellt, bearbeitet und konvertiert nicht nur Microsoft Office-Dokumente, sondern verarbeitet auch PDF, HTML, Bilder TIFF, JPG, PNG, BMP und SVG, E-Mail-Dateien, Videoformate, 3D, CAD und vieles mehr. Es ist eine Sammlung von APIs für Dokumentenverwaltungs- und -bearbeitungslösungen ohne Softwareabhängigkeiten innerhalb von Java J2SE-, J2EE-, J2ME-Anwendungen. Programmierer können in allen Java-basierten Anwendungen problemlos zwischen den gängigsten Formaten erstellen, aktualisieren, rendern, drucken und konvertieren.

Word-zu-Excel-Konvertierung

Total API unterstützt nicht nur die Konvertierung von Microsoft Word-Formaten, sondern auch die Konvertierung von Word in Excel, PDF, HTML, Bilder, EPUB, Markdown und XPS. Der Konvertierungsprozess ist einfach. Betrachten wir den Fall der Umwandlung von Word in Excel. Laden Sie die Microsoft Word-Datei mit der Klasse Document und konvertieren Sie WORD in HTML mit der Save-Methode . Öffnen Sie als nächstes das konvertierte HTML-Dokument mit der Klasse Workbook und speichern Sie das Dokument im XLSX-Format mit Save Methode. Entwickler können auch [Word in PDF] konvertieren ( https://products.aspose.com/words/java/conversion/word-to-pdf/) .

Java Word-zu-Excel-Konvertierung

// supports DOC, DOT, DOCX, DOCM, DOTX, DOTM, RTF, WordML, MOBI, ODT, and OTT input file formats
// load DOCX with an instance of Document
Document document = new Document("template.docx");
// call Save method while passing SaveFormat.HTML
document.save("html_output.html",SaveFormat.HTML);
// load the HTML file in an instance of Workbook
Workbook book = new Workbook("html_output.html");
// supports XLS, XLSX, XLSB, XLSM, XLT, XLT, XLTM, XLAM, CSV, TSV, ODS, DIF, SXC, and FODS file formats
// save HTML as XLSX
book.save("output.xlsx", SaveFormat.AUTO);
 

Konvertieren Sie PDF in Bilder

Die API unterstützt die Konvertierung von PDF in Bilder wie JPEG2000, EMZ, WMZ, TGA, PSD, DXF, WMF, SVGZ, APNG, DICOM, Powerpoint, Excel und andere Formate. Betrachten wir für die Konvertierung von PDF in Bild das JPG-Bild als Zieldatei. Prozess ist, PDF-Datei mit Document-Klasse zu laden und JpegDevice-Klasse -Objekt zu initialisieren und PDF über [Process](https ://apireference.aspose.com/pdf/java/aspose.pdf.devices.pagedevice/process/methods/1) Methode Laden Sie die JPEG-Datei mithilfe der Klasse Image und rufen Sie schließlich die Save-Methode auf.

Java PDF to Image Conversion

// supports PDF, CGM, EPUB, TeX, PCL, PS, XPS, MD, MHTML, XSLFO, HTML file formats
// load PDF with an instance of Document
Document document = new Document("input.pdf");
// create an object of JpegDevice
JpegDevice renderer = new JpegDevice();
// convert first of a particular PDF page to JPEG format
renderer.process(document.getPages().get_Item(1), "output.jpeg");
// load JPEG file
Image image = Image.Load("output.jpeg");
// supports Dicom, Jpeg2000, Apng, Psd, Dxf, Wmf, Emz, Wmz, Tga, Svgz file formats
// save JPEG to PSD file format
image.save("output.psd", new PsdOptions());
 

Konvertieren Sie PowerPoint in Excel-Dateien

Zum Konvertieren von Microsoft PowerPoint-Dateien in andere Dateien, einschließlich Excel, Word, MHTML, relevante Unter-APIs, die in die Haupt-API von Aspose.Total für Java eingebunden sind. Prozess zum Konvertieren von PowerPoint-Dateien in ein Excel-Dokument, Laden einer PowerPoint-Datei mit der Klasse Presentation und Konvertieren von PowerPoint in HTML durch Verwenden Sie die Methode save . Laden Sie als Nächstes das konvertierte HTML-Dokument mithilfe der Klasse Workbook und speichern Sie das Dokument im EXCEL-Format mit save Methode. Code für die Umwandlung von PowerPoint in Word ist ebenfalls aufgeführt.

Java-PowerPoint-zu-Excel-Konvertierung

// supports PPT, POT, PPS, PPTX, POTX, PPSX, PPTM, PPSM, and POTM input file formats
// instantiate a Presentation object that represents a PPT file
Presentation presentation = new Presentation("template.ppt");
// save the presentation as HTML
presentation.save("output.html", SaveFormat.Html);
// load the HTML file in an instance of Workbook
Workbook book = new Workbook("output.html");
// Supports XLS, XLSX, XLSB, XLSM, XLT, XLTX, XLTM, XLAM, CSV, TSV, TXT, MHTML, ODS, DIF, MARKDOWN, SXC, and FODS output file formats
// save HTML as XLS
book.save("output.xls", SaveFormat.Xls);

Java-PowerPoint-zu-Word-Konvertierung

// supports POTM, POT, POTX, PPSM, PPS, PPSX, PPTM, PPT, and PPTX input file formats
// instantiate a Presentation object that represents a PPT file
Presentation presentation = new Presentation("input.ppt");
// save the presentation as HTML
presentation.save("htmlOutput.html", SaveFormat.Html);
// load HTML with an instance of Document
Document document = new Document("htmlOutput.html");
// supports DOC, DOCX, DOT, DOTM, DOTX, FLATOPC, ODT, OTT, RTF, TXT, WORDML, DOCM output file formats.
// save document in DOC format
document.save("output.doc",SaveFormat.Doc);