IRONPDFの使用 PDFコンバータ .NET(開発者向けチュートリアル) Curtis Chau 更新日:6月 22, 2025 Download IronPDF NuGet Download テキストの検索と置換 テキストと画像のスタンプ Start Free Trial Copy for LLMs Copy for LLMs Copy page as Markdown for LLMs Open in ChatGPT Ask ChatGPT about this page Open in Gemini Ask Gemini about this page Open in Grok Ask Grok about this page Open in Perplexity Ask Perplexity about this page Share Share on Facebook Share on X (Twitter) Share on LinkedIn Copy URL Email article 1.0 はじめに AdobeのPortable Document Format(PDF)は、文書の表示と交換に広く使用されています。 開発者はクライアントのニーズを満たすためにしばしばPDFを作成する必要があり、現代のライブラリはこのプロセスを簡素化しました。 プロジェクトのライブラリを選ぶ際には、ビルド、読み取り、変換機能などの特長を考慮することが重要です。 2.0 IronPDFの特徴 IronPDFは、PDFドキュメントの作成、読み取り、編集に対応した多機能ライブラリで、Chromeエンジンを使用してHTMLをPDFに変換する機能を備えています。ASP.NETウェブアプリケーションおよび従来のWindowsアプリケーションの両方で使用できます。 このライブラリは、HTML5、JavaScript、CSS、画像を使用して視覚的に魅力的なPDFを作成でき、強力なHTML-to-PDFコンバーターを含んでいます。 The IronPDF library supports a variety of inputs for PDF production, including image files to PDF conversion, HTML5 to PDF conversion, ASPX to PDF conversion, and Razor/MVC View conversion. The library has tools for creating interactive PDF files, editing and sending interactive forms, dividing PDF files, extracting text and images, text searching, and rasterizing PDF pages into images. ライブラリは、HTMLログインフォームの認証のために、ユーザーエージェント、プロキシ、クッキー、HTTPヘッダー、フォーム変数を使用して、URLをPDFドキュメントの基礎として使用することを許可します。 IronPDFは、ユーザー名とパスワードを提供することで、パスワード保護されたPDFファイルへのアクセスを可能にします。 ライブラリは既存のPDFドキュメントの読み取りと編集をサポートしています。 Users can add text, graphics, organize bookmarks, watermarks, customize headers and footers to PDF documents with IronPDF, and extract images from PDF files. IronPDFは、新規または既存のPDFドキュメントのページを分割およびマージし、Adobe Acrobat Readerを必要とせずにテキストからPDFオブジェクトを生成できます。 CSSメディアファイルおよびCSSファイルのPDF変換がサポートされています。 ユーザーはIronPDFを使用して新しい記入可能なPDFフォームを追加または既存のものを完成させることができます。 IronPDFはまた、JPEG、PNGなどのさまざまな画像形式にPDFページを変換することができます。 3.0 URLからPDFドキュメントを作成 IronPDFの組み込みChromeブラウザとAPIライブラリを使用すると、ウェブページからPDFファイルを簡単に生成できます。 単にURLを提供し、IronPDF APIライブラリを使用してそれをPDFファイルに変換します。 ドキュメントの変換は、わずか数行のコードで迅速に完了できます。 // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified URL to a PDF var pdf = renderer.RenderUrlAsPdf("https://www.google.co.in/"); // Save the PDF to the specified path pdf.SaveAs("result.pdf"); // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified URL to a PDF var pdf = renderer.RenderUrlAsPdf("https://www.google.co.in/"); // Save the PDF to the specified path pdf.SaveAs("result.pdf"); ' Create a new instance of the ChromePdfRenderer class Dim renderer = New IronPdf.ChromePdfRenderer() ' Convert the specified URL to a PDF Dim pdf = renderer.RenderUrlAsPdf("https://www.google.co.in/") ' Save the PDF to the specified path pdf.SaveAs("result.pdf") $vbLabelText $csharpLabel RenderUrlAsPdfメソッドを使用して、URLをPDFドキュメントに迅速に変換できます。 単にURLと希望の保存場所を提供し、IronPDFは上記の情報に基づいてPDFファイルを生成します。 これにより、わずか数行のコードでウェブページをPDFドキュメントに変換することが容易になります。 Google URLから生成されたPDFファイル 4.0 HTML文字列からPDFを作成 HTML文字列はIronPDF APIライブラリを使用して迅速にPDFファイルに変換できます。 次のコードスニペットはHTML文字列をドキュメントに変換し、任意のHTMLタグをPDFファイルに変換できます。 // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified HTML string to a PDF var pdf = renderer.RenderHtmlAsPdf("<p>Hello world!!</p>"); // Save the PDF to the specified path pdf.SaveAs("result.pdf"); // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified HTML string to a PDF var pdf = renderer.RenderHtmlAsPdf("<p>Hello world!!</p>"); // Save the PDF to the specified path pdf.SaveAs("result.pdf"); ' Create a new instance of the ChromePdfRenderer class Dim renderer = New IronPdf.ChromePdfRenderer() ' Convert the specified HTML string to a PDF Dim pdf = renderer.RenderHtmlAsPdf("<p>Hello world!!</p>") ' Save the PDF to the specified path pdf.SaveAs("result.pdf") $vbLabelText $csharpLabel このコードスニペットは、RenderHtmlAsPdf関数を使用してHTMLテキストをPDFに変換する方法を示しています。 HTMLを文字列に変換する関数は、必要なだけのHTMLコードを受け入れます。 その後、SaveAs機能を使用してドキュメントを保存することで、プロセスを迅速かつ簡単に完了できます。 HTML文字列からの出力PDFファイル 5.0 HTMLファイルからPDFを作成 IronPDF APIライブラリは、HTMLファイルをPDFファイルに迅速に変換することを可能にします。 次のサンプルコードを使用して、任意のHTMLタグをPDFファイルに変換できます。 // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified HTML file to a PDF var pdf = renderer.RenderHtmlFileAsPdf("test.html"); // Save the PDF to the specified path pdf.SaveAs("result.pdf"); // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified HTML file to a PDF var pdf = renderer.RenderHtmlFileAsPdf("test.html"); // Save the PDF to the specified path pdf.SaveAs("result.pdf"); ' Create a new instance of the ChromePdfRenderer class Dim renderer = New IronPdf.ChromePdfRenderer() ' Convert the specified HTML file to a PDF Dim pdf = renderer.RenderHtmlFileAsPdf("test.html") ' Save the PDF to the specified path pdf.SaveAs("result.pdf") $vbLabelText $csharpLabel HTMLテキストは以下の通りです。 <p style="color:red">Hello world</p> <p style="color:red">Hello world</p> HTML HTMLファイルからの出力PDFファイル 6.0 リッチテキストファイルからPDFを作成 IronPDF APIライブラリはまた、リッチテキストファイル(RTF)から迅速にPDFを作成することを可能にします。 RTFからPDFへの変換のためのサンプルコードを使用して、任意の数のRTFを単一のPDFファイルに変換することができます。コードは以下の通りです。 // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified RTF file to a PDF var pdf = renderer.RenderRtfFileAsPdf("test.rtf"); // Save the PDF to the specified path pdf.SaveAs("result.pdf"); // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified RTF file to a PDF var pdf = renderer.RenderRtfFileAsPdf("test.rtf"); // Save the PDF to the specified path pdf.SaveAs("result.pdf"); ' Create a new instance of the ChromePdfRenderer class Dim renderer = New IronPdf.ChromePdfRenderer() ' Convert the specified RTF file to a PDF Dim pdf = renderer.RenderRtfFileAsPdf("test.rtf") ' Save the PDF to the specified path pdf.SaveAs("result.pdf") $vbLabelText $csharpLabel RTFファイルからの出力PDFファイル 上の画像では、左側にソースドキュメントが表示され、右側に変換後のPDFファイルが表示されています。 また、以下のコードを使用して、RTF文字列をPDFに変換できます。 // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified RTF string to a PDF var pdf = renderer.RenderRtfStringAsPdf("{\\rtf1...}"); // Save the PDF to the specified path pdf.SaveAs("result.pdf"); // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified RTF string to a PDF var pdf = renderer.RenderRtfStringAsPdf("{\\rtf1...}"); // Save the PDF to the specified path pdf.SaveAs("result.pdf"); ' Create a new instance of the ChromePdfRenderer class Dim renderer = New IronPdf.ChromePdfRenderer() ' Convert the specified RTF string to a PDF Dim pdf = renderer.RenderRtfStringAsPdf("{\rtf1...}") ' Save the PDF to the specified path pdf.SaveAs("result.pdf") $vbLabelText $csharpLabel 7.0 MarkdownファイルからPDFを作成 IronPDF APIモジュールにより、Markdownファイルからの迅速なPDF生成が可能です。 以下に示す変換用サンプルコードを使用して、MarkdownファイルをPDFファイルに変換できます。 // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified Markdown file to a PDF var pdf = renderer.RenderMarkdownFileAsPdf("Markdown.md"); // Save the PDF to the specified path pdf.SaveAs("Markdown_result.pdf"); // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified Markdown file to a PDF var pdf = renderer.RenderMarkdownFileAsPdf("Markdown.md"); // Save the PDF to the specified path pdf.SaveAs("Markdown_result.pdf"); ' Create a new instance of the ChromePdfRenderer class Dim renderer = New IronPdf.ChromePdfRenderer() ' Convert the specified Markdown file to a PDF Dim pdf = renderer.RenderMarkdownFileAsPdf("Markdown.md") ' Save the PDF to the specified path pdf.SaveAs("Markdown_result.pdf") $vbLabelText $csharpLabel Markdownファイルからの出力PDFファイル 上の画像に示されているように、ソースドキュメントは左側にあり、変換されたPDFファイルは右側にあります。 以下に提供されているコードにより、MD文字列をPDFに変換できます。 HTMLの変換に関する詳細情報については、HTML to PDF Conversion Tutorialをご覧ください。 // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified Markdown string to a PDF var pdf = renderer.RenderMarkdownStringAsPdf("# Hello world\n\nHello world"); // Save the PDF to the specified path pdf.SaveAs("Markdown_result.pdf"); // Create a new instance of the ChromePdfRenderer class var renderer = new IronPdf.ChromePdfRenderer(); // Convert the specified Markdown string to a PDF var pdf = renderer.RenderMarkdownStringAsPdf("# Hello world\n\nHello world"); // Save the PDF to the specified path pdf.SaveAs("Markdown_result.pdf"); Imports Microsoft.VisualBasic ' Create a new instance of the ChromePdfRenderer class Dim renderer = New IronPdf.ChromePdfRenderer() ' Convert the specified Markdown string to a PDF Dim pdf = renderer.RenderMarkdownStringAsPdf("# Hello world" & vbLf & vbLf & "Hello world") ' Save the PDF to the specified path pdf.SaveAs("Markdown_result.pdf") $vbLabelText $csharpLabel IronPDF APIライブラリの使用方法を知りたい場合は、開発者ドキュメントIronPDF Documentation Resourceを参照してください。 8.0 結論 IronPDFライブラリは開発用の無料ライセンスを提供しており、開発者の必要に応じて、製品環境での使用のために購入可能な複数のライセンスがあります。 Liteバンドルは最初にliteLicenseであり、継続的なコストはありません。 ライセンスには、永久ライセンス、30日間の返金保証、1年間の製品サポートとアップグレード、およびSaaSとOEMの再配布の可能性があります。 それらは、一度の購入で、開発、ステージング、プロダクションに使用できます。 IronPDFは、再配布保護のための期間限定の無料ライセンスおよび無料ライセンスも提供しています。 IronPDFの価格とライセンス情報の完全な概要については、IronPDF Licensing Information Pageをご覧ください。 よくある質問 .NET でフォーマットを失わずに HTML を PDF に変換するにはどうすればよいですか? IronPDF を使用して HTML を PDF に変換することで、Chrome エンジンを使用することによりフォーマットを失わずに変換可能です。ライブラリは HTML5、JavaScript、CSS をサポートし、PDF が元のレイアウトとデザインを保持することを保証します。 URL を PDF に変換するための方法は何がありますか? IronPDF は、ChromePdfRenderer クラスを使用して URL を PDF ドキュメントに簡単に変換するための RenderUrlAsPdf メソッドを提供します。 C# で Markdown を PDF に変換する方法はありますか? はい、IronPDF は RenderMarkdownFileAsPdf メソッドを使用して Markdown ファイルを PDF に変換できます。これにより、開発者が効率的に Markdown コンテンツを PDF フォーマットに変換できます。 .NET を使用して RTF ファイルを PDF ドキュメントに変換するにはどうすればよいですか? IronPDF は、RenderRtfFileAsPdf メソッドを使用して RTF ファイルを PDF に変換することができ、リッチテキストファイルを迅速かつ正確に PDF フォーマットに変換します。 PDF ファイルからテキストや画像を抽出できますか? はい、IronPDF は PDF ドキュメントからテキストと画像を簡単に抽出することができ、PDF 内のテキストや画像を検索し操作する機能を提供します。 インタラクティブ PDF フォームを作成するためのオプションは何がありますか? IronPDF はインタラクティブ PDF フォームの作成と編集をサポートし、開発者が PDF ドキュメントにフォームフィールド、グラフィックス、ブックマーク、ウォーターマークを追加することができます。 .NET で PDF ドキュメントを結合または分割するにはどうすればよいですか? IronPDF は PDF ドキュメントの結合および分割の機能を提供し、開発者が複数の PDF を1つに結合したり、1つの PDF を複数のドキュメントに分割したりすることができます。 IronPDF は本番用でどのようなライセンスオプションを提供していますか? IronPDF は本番用に複数のライセンス オプションを提供しており、中には継続的なコストがない Lite バンドルも含まれています。ライセンスには永久使用権、30 日間の返金保証、1 年間の製品の更新およびサポートが含まれています。 IronPDF は ASP.NET Web および Windows アプリケーションで使用できますか? はい、IronPDF は ASP.NET Web アプリケーションと伝統的な Windows アプリケーションの両方に対応しており、異なる環境で作業する開発者に柔軟性を提供します。 IronPDF はパスワード保護された PDF ファイルをサポートしていますか? IronPDF は、必要な資格情報を提供することでパスワード保護された PDF ファイルを読み取りおよび編集できるようにします。 .NET 10: IronPDF は .NET 10 を対象とするプロジェクトを完全にサポートしていますか? はい。IronPDFは、デスクトップ、Web、マイクロサービス、クラウド/コンテナ環境において、新しいランタイムとC#言語の機能強化を含む.NET 10と完全な互換性があります。特別な回避策やカスタムAPIを必要とせず、.NET 10プロジェクトですぐに使用できます。 Curtis Chau 今すぐエンジニアリングチームとチャット テクニカルライター Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。開発以外にも、CurtisはIoT(Internet of Things)への強い関心を持ち、ハードウェアとソフトウェアの統合方法を模索しています。余暇には、ゲームをしたりDiscordボットを作成したりして、技術に対する愛情と創造性を組み合わせています。 関連する記事 公開日 11月 13, 2025 C#で2つのPDFバイト配列をマージする方法 IronPDFを使用してC#で2つのPDFバイト配列をマージします。バイト配列、メモリストリーム、データベースから複数のPDFファイルを組み合わせる方法を簡単なコード例で学びましょう。 詳しく読む 公開日 11月 13, 2025 ASP.NET MVC PDFビューアを作成する方法 ASP.NET MVCアプリケーションのための強力なPDFビューアを構築します。PDFドキュメントを表示し、ビューをPDFに変換し、IronPDFを使用してインタラクティブな機能を追加します。 詳しく読む 公開日 11月 13, 2025 .NET HTMLからPDFへのコンバーターを構築する方法 IronPDFを使用して.NETでHTMLをPDFに変換する方法を学ぶ。 詳しく読む ASP PDFビューアー(開発者向けチュートリアル)C#でPDFファイルをトリミン...
公開日 11月 13, 2025 C#で2つのPDFバイト配列をマージする方法 IronPDFを使用してC#で2つのPDFバイト配列をマージします。バイト配列、メモリストリーム、データベースから複数のPDFファイルを組み合わせる方法を簡単なコード例で学びましょう。 詳しく読む
公開日 11月 13, 2025 ASP.NET MVC PDFビューアを作成する方法 ASP.NET MVCアプリケーションのための強力なPDFビューアを構築します。PDFドキュメントを表示し、ビューをPDFに変換し、IronPDFを使用してインタラクティブな機能を追加します。 詳しく読む