この Java ライブラリは、Word、PDFドキュメントをプログラムで編集するための強力なAPIを開発者に提供します。ドキュメント変更機能をソフトウェアに簡単に統合できます。私たちのソリューションは、 PDF, DOCX, DOC, RTF, ODT, EPUB, HTML 、および Java の他の多くのファイル形式の編集をサポートしています。
Java でプログラムによってドキュメントを編集するタスクは、ドキュメントツリーの要素を変更するタスクです。これは、「DOM」とも呼ばれます。これは、ドキュメント要素とそのプロパティを操作するためのプログラミングモデルです。
複雑なデータ構造の編集機能は、高度な検索機能と切り離せません。最高レベルの柔軟性を確保するために、私たちのライブラリは Java 開発者に正規表現検索機能を提供します。このアプローチにより、テキストを編集する可能性が広がり、動的なコンテンツ変更にテンプレートを使用できるようになります。
WordおよびPDFドキュメントのプログラムによる変更は、デジタルワークフローの不可欠な部分です。 PDF、 Word でテキストを編集し、テーブルを変更し、外部データを使用してグラフを挿入します。
Java ライブラリは、Microsoft WordまたはAcrobatReaderをインストールする必要のないドキュメントを編集するためのスタンドアロンソリューションです。産業用に使用でき、Word、PDF、その他のファイル形式を変更するためのあらゆる操作を提供します。
最も要望の多かった機能の1つは、WordおよびPDFドキュメントでの動的なテーブル生成とテーブル変更です。 Java ライブラリを使用すると、テーブルの操作が簡単になります。テーブルの編集、テーブルの更新、および Java コードでのテーブルテキストの抽出が可能です。
次の例は、 Java コードでWord文書を変更する方法を示しています。
// Repository path: https://releases.aspose.com/java/repo/
// Maven, where 'ver' - Aspose.Words version number, for example, 24.4.
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>ver</version>
<classifier>jdk17</classifier>
</dependency>
コピー
// Repository path: https://releases.aspose.com/java/repo/
// Gradle, where 'ver' - Aspose.Words version number, for example, 24.4.
compile(group: 'com.aspose', name: 'aspose-words', version: 'ver', classifier: 'jdk17')
コピー
// Repository path: https://releases.aspose.com/java/repo/
// Ivy, where 'ver' - Aspose.Words version number, for example, 24.4.
<dependency org="com.aspose" name="aspose-words" rev="ver">
<artifact name="aspose-words" m:classifier="jdk17" ext="jar"/>
</dependency>
コピー
// Repository path: https://releases.aspose.com/java/repo/
// Sbt, where 'ver' - Aspose.Words version number, for example, 24.4.
libraryDependencies += "com.aspose" % "aspose-words" % "ver"
コピー
import com.aspose.words.*;
Document doc = new Document("Input.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
// ドキュメントの先頭にテキストを挿入します。
builder.moveToDocumentStart();
builder.writeln("Morbi enim nunc faucibus a.");
doc.save("Output.docx");
import com.aspose.words.*;
Document doc = new Document("Input.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
// ドキュメントの先頭にテーブルを挿入します。
builder.moveToDocumentStart();
builder.startTable();
builder.insertCell();
builder.write("Row 1, cell 1.");
builder.insertCell();
builder.write("Row 1, cell 2.");
builder.endTable();
doc.save("Output.docx");
import com.aspose.words.*;
Document doc = new Document("Input.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
// ドキュメントの先頭に画像を挿入します。
builder.moveToDocumentStart();
builder.insertImage("Image.png");
doc.save("Output.docx");
Java パッケージはMavenリポジトリでホストします。 'Aspose.Words for Java' は、バイトコードを含む一般的な JAR Java開発者環境にインストールする方法のステップバイステップの説明に従ってください。
Java SE 7 Java バージョンがサポートされています。 JRE を使用する必要がある場合に備えて Java SE 6 用の個別のパッケージも提供しています。
私たちの Java Microsoft Windows 、Linux、macOS、Android、iOS JVM 実装されているすべてのオペレーティングシステムで実行されます。
JogAmp JOGL 、 Harfbuzz フォントエンジン、 Java Advanced Imaging JAI などのオプションのパッケージ依存関係については、製品ドキュメントを参照してください。