Java Total Library , belge yönetimini kolaylıkla halletmek için sıfırdan belge işleme çözümleri geliştirmeyi veya mevcut uygulamaları iyileştirmeyi hızlandırır. API yalnızca Microsoft Office belgeleri oluşturmak, düzenlemek ve dönüştürmekle kalmaz, aynı zamanda PDF, HTML, Görüntüler TIFF, JPG, PNG, BMP ve SVG, E-posta dosyaları, Video biçimleri, 3D, CAD ve çok daha fazlasını da işler. Herhangi bir Java J2SE, J2EE, J2ME uygulamasında herhangi bir yazılım bağımlılığı olmayan bir belge yönetimi ve işleme çözümü API’leri topluluğudur. Programcılar, herhangi bir Java tabanlı uygulama içinde en popüler biçimleri kolayca oluşturabilir, güncelleyebilir, görüntüleyebilir, yazdırabilir ve dönüştürebilir.
Word'den Excel'e Dönüştürme
Total API, yalnızca Microsoft Word biçimlerinin karşılıklı dönüştürülmesini değil, aynı zamanda Word’ün Excel, PDF, HTML, Görüntüler, EPUB, Markdown ve XPS’ye dönüştürülmesini de destekler. Dönüşüm süreci basittir. Word’den Excel’e dönüştürme örneğini ele alalım. Document sınıfını kullanarak Microsoft Word dosyasını yükleyin ve Kaydetme yöntemini . Ardından dönüştürülen HTML belgesini Workbook sınıfını kullanarak açın ve Kaydet yöntemi. Geliştiriciler ayrıca Word’ü PDF’ye dönüştürebilir.
Java Word'den Excel'e Dönüştürme
// 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); |
PDF'yi Görüntülere Dönüştür
API, PDF’yi JPEG2000, EMZ, WMZ, TGA, PSD, DXF, WMF, SVGZ, APNG, DICOM, Powerpoint, Excel ve diğer formatlar gibi Görüntülere dönüştürmeyi destekler. PDF’den Görüntüye dönüştürme için, JPG görüntüsünü hedef dosya olarak düşünelim. İşlem, PDF dosyasını Document sınıfını kullanarak yükleyin ve JpegDevice class nesnesini başlatın ve [Process](https aracılığıyla PDF’yi JPEG’e dönüştürün) ://apireference.aspose.com/pdf/java/aspose.pdf.devices.pagedevice/process/methods/1) yöntemi Image sınıfını kullanarak JPEG dosyasını yükleyin ve son olarak Save yöntemini çağırın.
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()); |
PowerPoint'i Excel Dosyalarına Dönüştür
Microsoft PowerPoint dosyalarını Excel Word, MHTML, ana Aspose.Total for Java API’sinin içerdiği ilgili alt API’ler dahil olmak üzere farklı dosyalara dönüştürmek için. PowerPoint dosyalarını Excel belgesine dönüştürme işlemi, PowerPoint dosyasını Sunum sınıfını kullanarak yükleyin ve PowerPoint’i HTML’ye dönüştürün save yöntemini kullanarak. Ardından dönüştürülen HTML belgesini Workbook sınıfını kullanarak yükleyin ve kaydet yöntemi. PowerPoint’ten Word’e dönüştürme kodu da listelenmiştir.
Java PowerPoint'ten Excel'e Dönüştürme
// 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'ten Word'e Dönüştürme
// 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); |