0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Java Word文書をTIFF形式に変換

Posted at

TIFFは、ビットマップ画像の符号化形式の一種です。タグと呼ばれる識別子を使うことによって、様々な形式のビットマップ画像を柔軟に表現できると思われています。今日は、Free Spire.doc for Javaという無料のライブラリを利用して、Word文書をTIFF形式に変換する方法を紹介したいと思います。さあ、参りましょう~

下準備

1.E-iceblueの公式サイトからFree Spire.doc for Java無料版をダウンロードしてください。

f:id:lendoris:20210907152120p:plain

2.IDEを起動して新規プロジェクトを作成してから、インストールされたファイルにあった相応しいSpire.doc.jarを参照に追加してください。

f:id:lendoris:20210907152125p:plain

```JAVA import com.spire.doc.*;

public class WordToTiff {
public static void main(String[] args) {
Document doc = new Document();
doc.loadFromFile("inputfile.docx");
doc.saveToTiff("ToTiff.tiff");
}
}

<h4><strong>実行結果</strong></h4>
<p><img src="https://cdn-ak.f.st-hatena.com/images/fotolife/l/lendoris/20210907/20210907152201.png" alt="f:id:lendoris:20210907152201p:plain" width="432" height="487" loading="lazy" title="" class="hatena-fotolife" itemprop="image" /></p>
<p> </p>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?