המר קבצים מקוונים של DOC ל-PPTM באמצעות אפליקציה
- העלה קבצים DOC להמרה
- המתן מספר שניות או יותר בהתאם לגודל DOC
- עקוב אחר שורת הסטטוס של העלאה
- לחץ על כפתור “המר”.
- DOC יומר למסמך PPTM
- הורד את קובץ ה-PPTM שהומר
המר את DOC ל-PPTM באמצעות Android Automation API
- פתח קובץ DOC באמצעות מחלקת Document
- המר קובץ DOC ל-HTML באמצעות שיטת save
- אתחול אובייקט Presentation חדש
- חלץ תוכן מקובץ HTML באמצעות BufferedReader וכתוב תוכן לקובץ מצגת
- שמור את המסמך ב-PPTM בשיטת save
קוד אנדרואיד עבור המרה של DOC ל-PPTM
// 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); |
עוד כמה מקרים לשמירת DOC ל-PPTM עם תכונות אחרות.
// supports DOC, DOT, DOCX, DOCM, DOTX, and DOTM file formats | |
// load DOC file with an instance of Document | |
Document document = new Document("template.doc", new LoadOptions("MyPassword")); | |
// save the document in HTML file format | |
document.save("HtmlOutput.html",SaveFormat.HTML); | |
// create a new presentation | |
Presentation pres = new Presentation(); | |
// perform the conversion to PPT |
// 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); |
פתח אפליקציית המרת קבצים DOC באמצעות אנדרואיד
צריך לפתח יישום תוכנה מבוסס אנדרואיד כדי לשמור ולייצא בקלות קבצי DOC למסמך PPTM? עם
Aspose.Total for Android via Java
, כל מפתח אנדרואיד יכול לשלב את קוד ה-API לעיל כדי לתכנת את אפליקציית ההמרה במגוון פורמטים, כולל Microsoft Word (DOC, DOCX), Excel (XLS, XLSX), Powerpoint (PPT, PPTX), PDF, קבצי דוא"ל, תמונות (JPG, PNG, BMP, GIF) ופורמטים אחרים. ספריית אנדרואיד רבת עוצמה להמרת מסמכים, תומכת בפורמטים פופולריים רבים כולל פורמט DOC. ייצוא ועיבוד מסמכים לפורמטים אחרים, מתכנתים יכולים להשתמש ב-Aspose.Total for Android via Java ילד API כולל
Aspose.Words for Android via Java
,
Aspose.Cells for Android via Java
,
Aspose.Slides for Android via Java
,
Aspose.PDF for Android via Java
,
Aspose.BarCode for Android via Java
ועוד.
ספריית ההמרות של DOC עבור אנדרואיד
ישנן אפשרויות חלופיות לשילוב Aspose.Total for Android via Java במערכת שלך. אנא בחר אחד שדומה לצרכים שלך ופעל לפי ההוראות המפורטות:
- השתמש ב-Aspose.Total for Android via Java ישירות מפרויקט מבוסס Maven וכלול את ה-API הרלוונטי של הילד ב-pom.xml.
- לחלופין, אפשר לקבל קובץ ZIP מ- הורדות .
שומר את DOC ל-PPTM דרישות האפליקציה
לחלופין, השתמש ב-API הרלוונטי של הילד לשמירה, ככל הנראה.