IronPDF ドキュメント はじめに IronPDF for Java - JavaアプリケーションでPDFを作成、編集、読み取る Darrius Serrant 更新日:2025年7月22日 IronPDF をダウンロード Mavenダウンロード JARダウンロード 無料トライアル LLM向けのコピー LLM向けのコピー LLM 用の Markdown としてページをコピーする ChatGPTで開く このページについてChatGPTに質問する ジェミニで開く このページについてGeminiに問い合わせる Grokで開く このページについてGrokに質問する 困惑の中で開く このページについてPerplexityに問い合わせる 共有する Facebook で共有 Xでシェア(Twitter) LinkedIn で共有 URLをコピー 記事をメールで送る This article was translated from English: Does it need improvement? Translated View the article in English IronPDF for Javaについて IronPDF for Javaは、Iron Softwareによって開発および維持されているライブラリで、ソフトウェアエンジニアがJava 8+、Kotlin、ScalaプロジェクトでPDFコンテンツを作成、編集、および抽出するのを助けます。 IronPDF for Java は、 IronPDF for .NETの成功と人気を基盤としています。 IronPDF for Java は gRPC を使用して IronPdfEngine と通信します。 IronPDFの得意分野 HTML、URL、JavaScript、CSS、および多くの画像フォーマットからPDFを生成 ヘッダー/フッター、署名、添付ファイル、パスワードおよびセキュリティの追加 パフォーマンス最適化: フルマルチスレッドおよび非同期サポート その他多数! 私たちのウェブサイトにアクセスして、すべてのコード例や私たちの50以上の機能の完全リストを確認してください。 IronPDF for Javaの使用 IronPDFをJavaの依存関係として定義 pom.xml 依存関係 IronPDF を依存関係として定義するには、pom.xml に以下を追加してください。 <dependencies> <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf</artifactId> <version>20xx.xx.xxxx</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>2.0.3</version> </dependency> </dependencies> <dependencies> <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf</artifactId> <version>20xx.xx.xxxx</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>2.0.3</version> </dependency> </dependencies> XML jarファイルのダウンロード オプションでIronPDF JARファイルを手動でダウンロードしてスタンドアロンで使用することができます。 初回ビルドと実行 IronPdfEngine バイナリは、プロジェクトの初回実行時に自動的にダウンロードされます。IronPdfEngine プロセスは、 IronPDF関数を初めて呼び出したときに開始され、アプリケーションが終了されるかアイドル状態になったときに停止します。 Maven依存関係としてIronPDFエンジンをインストール IronPdfEngineをMaven依存関係として追加することで、依存関係の読み込み中にバイナリがダウンロードされます: このアプローチにより、IronPdfEngineのバイナリがすでにダウンロードされているため、長いスタートアッププロセスを避けることができます。 さらに、外部ソースからのダウンロードを許可しないデプロイメント設定にも有益です。 マルチプラットフォームアプリで作業している場合は、単純に以下のいずれかまたは複数のコードスニペットをpom.xmlファイルに追加してください: Windows x64用 <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf-engine-windows-x64</artifactId> <version>20xx.xx.xxxx</version> </dependency> <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf-engine-windows-x64</artifactId> <version>20xx.xx.xxxx</version> </dependency> XML Windows x86用 <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf-engine-windows-x86</artifactId> <version>20xx.xx.xxxx</version> </dependency> <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf-engine-windows-x86</artifactId> <version>20xx.xx.xxxx</version> </dependency> XML Linux x64用 <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf-engine-linux-x64</artifactId> <version>20xx.xx.xxxx</version> </dependency> <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf-engine-linux-x64</artifactId> <version>20xx.xx.xxxx</version> </dependency> XML macOS x64 (Intel)用 <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf-engine-macos-x64</artifactId> <version>20xx.xx.xxxx</version> </dependency> <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf-engine-macos-x64</artifactId> <version>20xx.xx.xxxx</version> </dependency> XML macOS Arm (Apple Silicon)用 <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf-engine-macos-arm64</artifactId> <version>20xx.xx.xxxx</version> </dependency> <dependency> <groupId>com.ironsoftware</groupId> <artifactId>ironpdf-engine-macos-arm64</artifactId> <version>20xx.xx.xxxx</version> </dependency> XML Javaコードの書き始め 依存関係が定義されたら、Java コードの先頭に import com.ironsoftware.ironpdf.* ステートメントを追加して開始できます。 始めるための簡単なHTMLからPDFへのサンプルはこちらです: // Import statement for IronPDF Java import com.ironsoftware.ironpdf.*; // Apply your license key License.setLicenseKey("YOUR-LICENSE-KEY"); // Set a log path Settings.setLogPath(Paths.get("C:/tmp/IronPdfEngine.log")); // Render the HTML as a PDF. Stored in myPdf as type PdfDocument PdfDocument myPdf = PdfDocument.renderHtmlAsPdf("<h1> ~Hello World~ </h1> Made with IronPDF!"); // Save the PdfDocument to a file myPdf.saveAs(Paths.get("html_saved.pdf")); // Import statement for IronPDF Java import com.ironsoftware.ironpdf.*; // Apply your license key License.setLicenseKey("YOUR-LICENSE-KEY"); // Set a log path Settings.setLogPath(Paths.get("C:/tmp/IronPdfEngine.log")); // Render the HTML as a PDF. Stored in myPdf as type PdfDocument PdfDocument myPdf = PdfDocument.renderHtmlAsPdf("<h1> ~Hello World~ </h1> Made with IronPDF!"); // Save the PdfDocument to a file myPdf.saveAs(Paths.get("html_saved.pdf")); JAVA これは、URLからPDFへの別の簡単な例です: // Import statement for IronPDF Java import com.ironsoftware.ironpdf.*; // Apply your license key License.setLicenseKey("YOUR-LICENSE-KEY"); // Set a log path Settings.setLogPath(Paths.get("C:/tmp/IronPdfEngine.log")); // Render the URL as a PDF. Stored in myPdf as type PdfDocument PdfDocument myPdf = PdfDocument.renderUrlAsPdf("https://ironpdf.com/java"); // Save the PdfDocument to a file myPdf.saveAs(Paths.get("url_saved.pdf")); // Import statement for IronPDF Java import com.ironsoftware.ironpdf.*; // Apply your license key License.setLicenseKey("YOUR-LICENSE-KEY"); // Set a log path Settings.setLogPath(Paths.get("C:/tmp/IronPdfEngine.log")); // Render the URL as a PDF. Stored in myPdf as type PdfDocument PdfDocument myPdf = PdfDocument.renderUrlAsPdf("https://ironpdf.com/java"); // Save the PdfDocument to a file myPdf.saveAs(Paths.get("url_saved.pdf")); JAVA 完全なMain.java例 package org.example; // Import statement for IronPDF Java import com.ironsoftware.ironpdf.*; import java.io.IOException; import java.nio.file.Paths; public class Main { public static void main(String[] args) throws IOException { // Apply your license key License.setLicenseKey("YOUR-LICENSE-KEY"); // Set a log path Settings.setLogPath(Paths.get("C:/tmp/IronPdfEngine.log")); // Render the HTML as a PDF. Stored in myPdf as type PdfDocument PdfDocument myPdf = PdfDocument.renderHtmlAsPdf("<h1> ~Hello World~ </h1> Made with IronPDF!"); // Save the PdfDocument to a file myPdf.saveAs(Paths.get("html_saved.pdf")); } } package org.example; // Import statement for IronPDF Java import com.ironsoftware.ironpdf.*; import java.io.IOException; import java.nio.file.Paths; public class Main { public static void main(String[] args) throws IOException { // Apply your license key License.setLicenseKey("YOUR-LICENSE-KEY"); // Set a log path Settings.setLogPath(Paths.get("C:/tmp/IronPdfEngine.log")); // Render the HTML as a PDF. Stored in myPdf as type PdfDocument PdfDocument myPdf = PdfDocument.renderHtmlAsPdf("<h1> ~Hello World~ </h1> Made with IronPDF!"); // Save the PdfDocument to a file myPdf.saveAs(Paths.get("html_saved.pdf")); } } JAVA さらなる設定情報 注意:すべての設定、ログ、およびライセンス操作は、任意のIronPDFメソッドが呼び出される前に実行される必要があることに注意してください。 ライセンスキーの適用 ライセンスキーを適用するには、以下をメソッドの冒頭に追加してください。 com.ironsoftware.ironpdf.License.setLicenseKey("YOUR-LICENSE-KEY"); com.ironsoftware.ironpdf.License.setLicenseKey("YOUR-LICENSE-KEY"); JAVA ロギング IronPDF Javaは、ロギング目的でslf4jロガーを使用します。 ロギングを有効にするには、次を使用します: com.ironsoftware.ironpdf.Settings.setDebug(true); com.ironsoftware.ironpdf.Settings.setDebug(true); JAVA IronPdfEngine ログ パスを指定するには、次を追加します。 com.ironsoftware.ironpdf.Settings.setLogPath(Paths.get("C:/tmp/myIronPdfEngineLog.log")); com.ironsoftware.ironpdf.Settings.setLogPath(Paths.get("C:/tmp/myIronPdfEngineLog.log")); JAVA ライセンスとサポートの提供 ライブプロジェクトで使用するためにIronPDFのライセンスを購入する。 30日間のトライアルライセンスもトライアルユーザー向けに利用可能です。 完全なコード例、チュートリアル、ライセンス情報、ドキュメントについては、IronPDF for Javaリソースを訪問してください。 さらなるサポートとお問い合わせには、サポートチームに連絡してください。 Darrius Serrant 今すぐエンジニアリングチームとチャット フルスタックソフトウェアエンジニア(WebOps) Darrius Serrantは、マイアミ大学でコンピュータサイエンスの学士号を取得し、Iron SoftwareでフルスタックWebOpsマーケティングエンジニアとして働いています。若い頃からコーディングに惹かれ、コンピューティングを神秘的かつアクセス可能なものとし、創造性と問題解決のための完璧な媒体と考えていました。Iron Softwareでは、新しいものを創造することと、複雑なコンセプトをより理解しやすくすることを楽しんでいます。Resident Developerの一人として、次世代に専門知識を共有するために、学生を教えることにも志願しました。Darriusにとって、その仕事は価値があり、実際の影響があるため、満足感があります。 準備はできましたか? バージョン: 2026.3 リリース 無料トライアル 無料のMavenダウンロード ライセンスを見る まだスクロールしていますか? すぐに証拠が欲しいですか? サンプルを実行するHTML が PDF に変換されるのを確認します。 無料のMavenダウンロード ライセンスを見る