AndroidアプリでDOCMをPPSMに変換する またはオンラインアプリ

Microsoft Word ®またはPowerPointをインストールせずにAndroidアプリケーションでDOCMからPPSMに変換

 

アプリケーションにドキュメント変換機能を追加しようとしているAndroid開発者ですか? Aspose.Total for Android via Java ファイル形式自動化ライブラリは、Androidアプリケーションでのドキュメント変換プロセスの自動化に役立ちます。 DOCMファイルをPPSMに変換するには、最初にドキュメント操作API Aspose.Words for Android via Java を使用してDOCMファイル形式をHTMLに変換できます。その後、PowerPoint API Aspose.Slides for Android Java を使用して、新しいプレゼンテーションを作成し、その中にHTMLコンテンツを書き込んで、名前を付けて保存できます。 PPSM。

AndroidでDOCMをPPSMに変換する方法

  1. ドキュメント クラスを使用してDOCMファイルを開きます
  2. save ) 方法
  3. しい プレゼンテーション オブジェクトを初期化します
  4. BufferedReaderを使用してHTMLファイルからコンテンツを抽出し、プレゼンテーションファイルにコンテンツを書き込みます
  5. save メソッドを使用してドキュメントをPPSMに保存します

変換要件

DOCMからPPSMファイルへの変換では、 Maven そしてアプリにライブラリをインストールします。

または、 ダウンロード からZIPファイルを取得することもできます。

// 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);

DOCMからPPSMへの無料オンラインコンバーター

保護されたDOCMをJava経由でAndroidのPPSMに変換する

Androidアプリケーション内でパスワードで保護されたDOCMをPPSMに変換することもできます。入力DOCMドキュメントがパスワードで保護されている場合、パスワードを使用せずにPPSM形式に変換することはできません。暗号化されたドキュメントを開くには、LoadOptionsオブジェクトに正しいパスワードを設定し、それをDocumentコンストラクターに渡すことができます。

// 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);

よくある質問

  • オンラインで DOCM を PPSM に変換するにはどうすればよいですか?
    DOCM 変換オンライン アプリは、便宜上統合されています。 DOCM ファイルを PPSM に変換するには、DOCM ファイルをドラッグ アンド ドロップして白い領域に追加するか、領域内をクリックしてインポートします。その後、「変換」ボタンをクリックします。 DOCM から PPSM への変換が完了したら、変換されたファイルをワンクリックでダウンロードできます。
  • DOCM の変換にはどのくらいの時間がかかりますか?
    このオンライン コンバーターの速度は、変換する DOCM ファイルのサイズに大きく依存します。小さな DOCM ファイルは、わずか数秒で PPSM に変換できます。ただし、変換コードを Android App アプリケーションに統合した場合、速度は変換プロセス用にアプリケーションをどれだけ最適化したかに依存します。
  • 無料の Aspose.Total コンバーターを使用して DOCM を PPSM に変換しても安全ですか?
    もちろん!変換後、PPSM ファイルのダウンロード リンクがすぐに利用できるようになります。アップロードされたファイルは 24 時間後に自動的に削除され、この時間が経過するとダウンロード リンクは無効になります。他の誰もアクセスできないため、ファイルは安全ですのでご安心ください。 DOCM ファイルを含む当社のファイル変換サービスは完全に安全です。さらに、テスト用に無料のアプリが提供されており、コードを統合する前に結果を確認できます。
  • DOCM を変換するには、どのブラウザを使用すればよいですか?
    Google Chrome、Firefox、Opera、Safari などの最新の Web ブラウザーは、このオンライン変換ツールと互換性があります。ただし、デスクトップ アプリケーションで作業している場合は、スムーズな操作のために Aspose.Total DOCM Conversion API をお勧めします。

DOCM の変換オプションを Android で探索

DOCM を CSV に変換 (カンマ区切りの値)
DOCM を DIF に変換 (データ交換フォーマット)
DOCM を EXCEL に変換 (スプレッドシートのファイル形式)
DOCM を FODS に変換 (OpenDocument フラット XML スプレッドシート)
DOCM を ODS に変換 (OpenDocument スプレッドシート)
DOCM を SXC に変換 (StarOffice Calc スプレッドシート)
DOCM を TSV に変換 (タブ区切りの値)
DOCM を XLAM に変換 (Excel マクロ有効アドイン)
DOCM を XLSB に変換 (Excel バイナリ ワークブック)
DOCM を XLSM に変換 (マクロが有効なスプレッドシート)
DOCM を XLSX に変換 (XML ワークブックを開く)
DOCM を XLS に変換 (Microsoft Excel バイナリ形式)
DOCM を XLTM に変換 (Excel マクロ有効テンプレート)
DOCM を XLTX に変換 (Excel テンプレート)
DOCM を XLT に変換 (Excel 97 - 2003 テンプレート)
DOCM を JSON に変換 (JavaScript オブジェクト表記ファイル)
DOCM を ODP に変換 (OpenDocument プレゼンテーション形式)
DOCM を POTM に変換 (Microsoft PowerPoint テンプレート ファイル)
DOCM を POTX に変換 (Microsoft PowerPoint テンプレートのプレゼンテーション)
DOCM を POT に変換 (Microsoft PowerPoint テンプレート ファイル)
DOCM を PPTX に変換 (オープン XML プレゼンテーション形式)
DOCM を PPSX に変換 (PowerPoint スライド ショー)
DOCM を PPS に変換 (PowerPoint スライド ショー)
DOCM を PPTM に変換 (マクロが有効なプレゼンテーション ファイル)
DOCM を PPTX に変換 (オープン XML プレゼンテーション形式)
DOCM を PPT に変換 (パワーポイントによるプレゼンテーション)