המר קבצים מקוונים של FLATOPC ל-PPTX באמצעות אפליקציה
- העלה קבצים FLATOPC להמרה
- המתן מספר שניות או יותר בהתאם לגודל FLATOPC
- עקוב אחר שורת המצב של העלאה
- לחץ על כפתור “המר”.
- FLATOPC יומר למסמך PPTX
- הורד את קובץ ה-PPTX שהומר
המר את FLATOPC ל-PPTX באמצעות Java Automation API
- פתח קובץ FLATOPC באמצעות מחלקת Document
- המר קובץ FLATOPC ל-HTML באמצעות שיטת save
- אתחול אובייקט Presentation חדש
- חלץ תוכן מקובץ HTML באמצעות BufferedReader וכתוב את התוכן בקובץ המצגת שלך
- שמור את המסמך ב-PPTX בשיטת save
קוד Java עבור המרה של FLATOPC ל-PPTX
// supports DOC, DOCX, DOT, DOTM, DOTX, FLATOPC, ODT, OTT, RTF, TXT, WORDML, DOCM input file formats | |
// load DOC file with an instance of Document | |
Document document = new Document("template.doc"); | |
// save the document in HTML file format | |
document.save("HtmlOutput.html",SaveFormat.HTML); | |
// create a new presentation | |
Presentation pres = new Presentation(); | |
// access the default first slide of presentation | |
ISlide slide = pres.getSlides().get_Item(0); | |
// add the AutoShape to accommodate the HTML content | |
IAutoShape ashape = slide.getShapes().addAutoShape(ShapeType.Rectangle, 10, 10, | |
(float) pres.getSlideSize().getSize().getWidth(), | |
(float) pres.getSlideSize().getSize().getHeight()); | |
ashape.getFillFormat().setFillType(FillType.NoFill); | |
// add text frame to the shape | |
ashape.addTextFrame(""); | |
// clear all paragraphs in added text frame | |
ashape.getTextFrame().getParagraphs().clear(); | |
// initialize StringBuilder to read Html | |
StringBuilder contents = new StringBuilder(); | |
// load HTML file by using BufferedReader | |
BufferedReader reader = new BufferedReader(new FileReader(new File("HtmlOutput.html"))); | |
String text = null; | |
// repeat until all lines are read | |
while ((text = reader.readLine()) != null) { | |
contents.append(text).append(System.getProperty("line.separator")); | |
} | |
reader.close(); | |
// add HTML content in text frame | |
ashape.getTextFrame().getParagraphs().addFromHtml(content); | |
// supports POTM, POT, POTX, PPSM, PPS, PPSX, PPTM, PPT, PPTX, ODP output file formats. | |
// save presentation as Pptx | |
pres.save("output.pptx", com.aspose.slides.SaveFormat.Pptx); |
עוד כמה מקרים לשמירת FLATOPC ב-PPTX עם תכונות אחרות כמו.
// supports DOC, DOCX, DOT, DOTM, DOTX, FLATOPC, ODT, OTT, RTF, TXT, WORDML, DOCM input file formats | |
// load DOC file with an instance of Document | |
Document document = new Document("template.doc"); | |
// save the document in HTML file format | |
document.save("HtmlOutput.html",SaveFormat.HTML); | |
// create a new presentation | |
Presentation pres = new Presentation(); | |
// access the default first slide of presentation | |
ISlide slide = pres.getSlides().get_Item(0); | |
// add the AutoShape to accommodate the HTML content | |
IAutoShape ashape = slide.getShapes().addAutoShape(ShapeType.Rectangle, 10, 10, | |
(float) pres.getSlideSize().getSize().getWidth(), | |
(float) pres.getSlideSize().getSize().getHeight()); | |
ashape.getFillFormat().setFillType(FillType.NoFill); | |
// add text frame to the shape | |
ashape.addTextFrame(""); | |
// clear all paragraphs in added text frame | |
ashape.getTextFrame().getParagraphs().clear(); | |
// initialize StringBuilder to read Html | |
StringBuilder contents = new StringBuilder(); | |
// load HTML file by using BufferedReader | |
BufferedReader reader = new BufferedReader(new FileReader(new File("HtmlOutput.html"))); | |
String text = null; | |
// repeat until all lines are read | |
while ((text = reader.readLine()) != null) { | |
contents.append(text).append(System.getProperty("line.separator")); | |
} | |
reader.close(); | |
// add HTML content in text frame | |
ashape.getTextFrame().getParagraphs().addFromHtml(content); | |
// add watermark | |
IAutoShape ashp = slide.getShapes() | |
.addAutoShape(ShapeType.Rectangle,50, 50, 500, 500); | |
ashp.addTextFrame("Watermark Text"); | |
ashp.getTextFrame().getParagraphs().get_Item(0).getPortions() | |
.get_Item(0).getPortionFormat().getFillFormat() | |
.setFillType(FillType.Solid); | |
ashp.getTextFrame().getParagraphs().get_Item(0).getPortions() | |
.get_Item(0).getPortionFormat().getFillFormat() | |
.getSolidFillColor().setColor(Color.GRAY); | |
ashp.getTextFrame().getParagraphs().get_Item(0).getPortions() | |
.get_Item(0).getPortionFormat().setFontHeight(25); | |
// Change the line color of the rectangle to White | |
ashp.getShapeStyle().getLineColor().setColor(Color.WHITE); | |
ashp.getShapeStyle().setLineStyleIndex(LineStyle.ThinThin); | |
// Remove any fill formatting in the shape | |
ashp.getFillFormat().setFillType(FillType.NoFill); | |
ashp.setRotation(-45); | |
ashp.getAutoShapeLock().setSelectLocked(true); | |
ashp.getAutoShapeLock().setSizeLocked(true); | |
ashp.getAutoShapeLock().setTextLocked(true); | |
ashp.getAutoShapeLock().setPositionLocked(true); | |
ashp.getAutoShapeLock().setGroupingLocked(true); | |
// supports POTM, POT, POTX, PPSM, PPS, PPSX, PPTM, PPT, PPTX, ODP output file formats. | |
// save presentation as Pptx | |
pres.save("output.pptx", com.aspose.slides.SaveFormat.Pptx); |
פתח יישום המרת קבצים FLATOPC באמצעות Java
צריך לפתח יישום תוכנה מבוסס Java כדי לשמור ולייצא בקלות קבצי FLATOPC למסמך PPTX? עם
Aspose.Total for Java
, כל מפתח Java יכול לשלב את קוד ה-API לעיל כדי לתכנת את אפליקציית ההמרה במגוון פורמטים כולל Microsoft Word (DOC, DOCX), Excel (XLS, XLSX), Powerpoint (PPT, PPTX), PDF, קבצי דוא"ל, תמונות (JPG, PNG, BMP, GIF) ופורמטים אחרים. ספריית Java רבת עוצמה להמרת מסמכים, תומכת בפורמטים פופולריים רבים כולל פורמט FLATOPC. ייצוא ועיבוד מסמכים לפורמטים אחרים, מתכנתים יכולים להשתמש ב-Aspose.Total for Java ילד API כולל
Aspose.Words for Java
,
Aspose.Cells for Java
,
Aspose.Slides for Java
,
Aspose.PDF for Java
,
Aspose.Imaging for Java
ועוד.
FLATOPC ספריית המרות עבור Java
ישנן אפשרויות חלופיות לשילוב Aspose.Total for Java במערכת שלך. אנא בחר אחד שדומה לצרכים שלך ופעל לפי ההוראות המפורטות:
- השתמש ב-Aspose.Total for Java ישירות מפרויקט מבוסס Maven וכלול צאצא API רלוונטי ב-pom.xml.
- לחלופין, אפשר לקבל קובץ ZIP מ- הורדות .
שומר את FLATOPC ל-PPTX דרישות האפליקציה
כל מערכת הפעלה שיכולה להריץ את Java Runtime Environment (JRE) יכולה להריץ Aspose.Total for Java. הרשימות הבאות לרוב, אך לא כולן, מערכות הפעלה נתמכות.
- Microsoft Windows
- לינוקס: אובונטו, OpenSUSE, CentOS ואחרים
- macOS: 10.9 (Mavericks) ואילך
- נייד: אנדרואיד, iOS