IronPDF vs XFINIUM.PDF: .NET向けHTMLからPDFへのライブラリ比較
IronPDFは、Chromiumエンジンを使用した完全なCSSとJavaScriptのサポートにより、HTMLからPDFへの変換に優れています。一方、XFINIUM.PDFはネイティブHTMLレンダリングを必要とせず、低レベルのPDF操作に特化しているため、.NETアプリケーションにおける最新のWebベースのPDF生成にはIronPDFの方が適しています。
最新のテクノロジーは、ソフトウェア開発プロセスを自動化することで、開発者にとってよりスマートなソリューションを提供します。 C# PDF ファイルの操作は、開発者にとって長い間課題でした。 PDF ファイルのコンテンツを作成するときは複数の要素を考慮する必要がありますが、異なる形式のコンテンツを PDF に変換する場合はさらに多くの要素を考慮する必要があります。 これらの課題は、さまざまな形式の PDF の読み取り、書き込み、作成、変換を支援するように設計されたライブラリを通じて解決されるようになりました。
この記事では、 .NETおよび.NET Core開発者向けの 2 つの一般的な PDF ライブラリを比較します。
- IronPDFライブラリ
- XFINIUM.PDFライブラリ
IronPDF と XFINIUM.PDF はどちらも、.NET および .NET Core でPDF を作成、操作、印刷するためのメソッドを提供します。 以下の 2 つのライブラリとそれぞれのPDF 変換および操作機能の比較を確認することで、情報に基づいた決定を下すことができます。
まず、2 つのライブラリが提供するものを確認し、次に比較に進みます。
XFINIUM.PDF ライブラリの機能は何ですか?
XFINIUM.PDF ライブラリは、初心者から上級者まで、あらゆる PDF 開発者に対応する、クロスプラットフォームの PDF 開発ツールです。 レポートの作成、 PDF フォームへの入力、PDF ポートフォリオの構築、 PDF レポートからの機密データの編集、 PDF レポートの複数ページの TIFF 画像への変換が可能です。
XFINIUM.PDF には、PDF の作成と編集機能を備えた Generator Edition と、 PDF のレンダリングとPDF の表示機能を追加した Viewer Edition の 2 つのエディションがあります。
XFINIUM.PDF は、完全に管理されたコードとして C# で完全に記述されています。 開発者ごとにライセンスが付与され、ロイヤリティフリーで配布されるため、追加費用なしでプログラムを配布できます。
Generator EditionとViewer Editionの違いは何ですか?
Generator EditionはViewer Editionのサブセットです。 PDF を作成および編集するための PDF 機能を提供し、Viewer Edition ではPDF レンダリング機能が追加されます。 Viewer Edition では、PDF ページを RAW、BMP、GIF、JPG、PNG、TIFF 画像に変換できます。
XFINIUM.PDF仕様
主な機能は以下のとおりです:
セキュリティ
- 文書のアクセス権
- 40ビットおよび128ビットのRC4暗号化
- 128ビットおよび256ビットのAES暗号化 -コンテンツの編集
- テキストのコピー/ペーストの無効化
デジタル署名
- X509証明書による承認と認証
- SHA256/384/512を使用したCMSおよびPAdES署名
- 署名のタイムスタンプ
- 署名内のOCSPおよびCRL情報
- 文書のセキュリティストア
- 文書のタイムスタンプ
- LTV対応デジタル署名
- 署名をASN.1オブジェクトにデコードする
- 署名から証明書を抽出する -署名済みのPDFコピーを保存する
バーコード
- ベクターバーコードエンジンを内蔵
- 一次元バーコード:
- Codabar、コード11、コード25、コード39/93/128
- 医薬品: コード 32、Pharmacode、PZN
- 二次元バーコード:
DataMatrix、QR、PDF417、マイクロ PDF417
高度なバーコード機能については、完全なバーコード生成および読み取り機能を提供するIronbarcode Documentation を検討してください。
コンテンツ抽出
- 位置を含む単語としてテキストを抽出
- ユーザー定義領域からの抽出 -メタデータ付き画像を抽出する
低レベルCOS API
- COSオブジェクトの追加、編集、削除
- サポートされている型: 文字列、数値、名前、ブール値、null、配列、辞書、ストリーム
PDFレンダリング(Viewer Editionのみ)
-ページを画像に変換: RAW、BMP、GIF、JPG、PNG、TIFF
- ARGB、RGBA、BGRA、RGB、BGR、グレースケールレイアウト
- CCITT G4 を使用したPDF から複数ページの TIFF への変換
IronPDF の主な機能は何ですか?
IronPDF .NET PDF ライブラリは、 C# プログラマーによる PDF 開発を簡素化します。 このツールを使用すると、.NET 用のコア PDF ライブラリを簡単に構築できます。
IronPDF は、.NET Chromium エンジンを使用してHTML ページを PDF ファイルに変換します。 HTML to PDFを使用して PDF を配置またはデザインするのに複雑な API は必要ありません。 HTML、ASPX、JS、CSS、画像などの標準の Web ドキュメントがサポートされています。
HTML5、CSS、JavaScript、画像を使用して、.NET PDF ライブラリを開発できます。 PDF は編集したり、スタンプを付けたり、ヘッダーやフッターを使用して改善したりできます。 このライブラリは、PDF テキストの読み取りとグラフィックの抽出を効率的に管理します。
IronPDFを無料でダウンロードして、.NETプロジェクトで今日から使用を開始してください。
IronPDF C#ライブラリの卓越した機能
主な機能は以下のとおりです:
PDFを作成する (HTMLからPDFへ)
- HTML4/5、CSS、JavaScript のサポート -ネットワーク資格情報、ユーザーエージェント、プロキシ、 Cookie 、HTTPヘッダーを含むURLを読み込む
既存のPDFドキュメントを編集する
-フォームフィールドの読み取りと入力 -グラフィックとテキストの抽出 -新しいHTMLコンテンツでページを更新する -論理ヘッダー/フッターまたはHTMLヘッダー/フッターを追加する
PDFドキュメントを操作する
-既存のPDFを読み込んで解析する -ドキュメントの結合と分割 -ヘッダー、注釈、ブックマーク、透かし、テキスト、画像を追加する
さまざまなファイル形式を変換
- ASPX WebForms — 3行のコードで変換
- HTMLファイルをPDFに変換する
- アセットアクセス用のカスタムベースURL
- レスポンシブデザインのための仮想ビューポート
- 主要なファイルエンコーディングのサポート(デフォルトはUTF-8 )
印刷して保存
-ファイル、バイナリデータ、MemoryStreamsからの保存/読み込み
IronPDF はすべての主要なオペレーティング システムとフレームワークをサポートしています。
IronPDF C# ライブラリをインストールするにはどうすればよいですか?
IronPDF は、次の 4 つの方法でダウンロードしてインストールできます。
- Visual Studioを使用
- 開発者コマンドプロンプト
- NuGetパッケージを直接ダウンロードする
- IronPDF .DLLライブラリをダウンロード
Visual Studioを使用する
Visual Studio には、プロジェクトにパッケージをインストールするための NuGet パッケージ マネージャーが用意されています。 プロジェクト メニューからアクセスするか、ソリューション エクスプローラーでプロジェクトを右クリックしてアクセスします。

図 1.Visual Studio のプロジェクト メニューを使用した NuGet パッケージ マネージャへのアクセス

図 2.Visual Studio のコンテキスト メニューを使用した NuGet パッケージ マネージャへのアクセス
選択したら、IronPDF パッケージを参照してインストールします。

図3.Visual StudioのNuGetパッケージマネージャを使用したIronPDFライブラリのインストール
開発者コマンドプロンプトを使用
開発者コマンドプロンプトからIronPDF NuGet パッケージをインストールします。
-開発者コマンドプロンプトを開きます
次のコマンドを入力:
nuget install IronPdfnuget install IronPdfSHELL- Enterキーを押します
- パッケージがダウンロードされインストールされます
- Visual Studioプロジェクトを再読み込みします
NuGetパッケージを直接ダウンロード
NuGet から直接 IronPDF をダウンロードしてインストールします。
- IronPdf NuGetページへ移動
- ダウンロードパッケージを選択
- ダウンロードしたパッケージをダブルクリック
- パッケージをインストールする
- Visual Studioプロジェクトを再読み込みします
ライブラリをダウンロードしてIronPDFをインストール
IronPDFダウンロードから IronPDF .DLL ファイルを直接ダウンロードします。

図4.IronPDFのウェブサイトからIronPDFライブラリDLLをダウンロードする
プロジェクトでライブラリを参照:
- ソリューションエクスプローラーでソリューションを右クリックします
- 参照を選択
- IronPDF.dllライブラリをブラウズ
- "OK"をクリック
IronPDF が使用できるようになりました。 次にXFINIUM.PDFをインストールしましょう。
XFINIUM.PDF をインストールするにはどうすればよいですか?
.NET Core で、Xfinium PDF を Cake アドインまたはツールとしてインストールします。
# Install Xfinium.Pdf.NetCore as a Cake Addin
#addin nuget:?package=Xfinium.Pdf.NetCore&version=10.2.0# Install Xfinium.Pdf.NetCore as a Cake Addin
#addin nuget:?package=Xfinium.Pdf.NetCore&version=10.2.0# Install Xfinium.Pdf.NetCore as a Cake Tool
#tool nuget:?package=Xfinium.Pdf.NetCore&version=10.2.0# Install Xfinium.Pdf.NetCore as a Cake Tool
#tool nuget:?package=Xfinium.Pdf.NetCore&version=10.2.0それでは、IronPDF と XFINIUM.PDF を比較してみましょう。
.NET Core でシンプルな PDF ドキュメントを作成するにはどうすればよいですか?
ソフトウェア開発者は、C# を使用してPDF ファイルを動的に作成する方法を知っておく必要があります。 ユーザー入力からレポートを生成したり、ユーザーテキストを PDF として保存したり、 HTML 情報を抽出して PDF に変換したりするには、PDF 作成が必要になる場合があります。
どちらのライブラリもHTML Web ページを PDF に変換できます。 各ライブラリのアプローチを調べてみましょう。
IronPDFを使用する
IronPDF は PDF ファイルを作成するための複数の方法を提供します。
既存のURLをPDFに変換
IronPDF を使用すると、既存の URL から HTML を PDF ドキュメントに簡単に変換できます。 JavaScript 、画像、フォーム、CSS が完全にサポートされます。
実装では URL レンダリングが自動的に処理されます。
// Create an instance of the ChromePdfRenderer
IronPdf.ChromePdfRenderer Renderer = new IronPdf.ChromePdfRenderer();
// Configure rendering options for better performance
Renderer.RenderingOptions.WaitFor.RenderDelay = 500; // Wait for JavaScript to load
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print;
// Render a URL to PDF
using var Pdf = Renderer.RenderUrlAsPdf("___PROTECTED_URL_134___");
// Save the PDF with metadata
Pdf.MetaData.Author = "IronPDF";
Pdf.MetaData.Title = "Website to PDF Conversion";
Pdf.SaveAs("url.pdf");// Create an instance of the ChromePdfRenderer
IronPdf.ChromePdfRenderer Renderer = new IronPdf.ChromePdfRenderer();
// Configure rendering options for better performance
Renderer.RenderingOptions.WaitFor.RenderDelay = 500; // Wait for JavaScript to load
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print;
// Render a URL to PDF
using var Pdf = Renderer.RenderUrlAsPdf("___PROTECTED_URL_134___");
// Save the PDF with metadata
Pdf.MetaData.Author = "IronPDF";
Pdf.MetaData.Title = "Website to PDF Conversion";
Pdf.SaveAs("url.pdf");HTML入力文字列をPDFに変換
HTML 文字列から PDF ページをレンダリングするための次のコード例を検討してください。 HTML を単独で使用することも、CSS、画像、JavaScript と組み合わせて使用することもできます。
// Create an instance of the ChromePdfRenderer
var Renderer = new IronPdf.ChromePdfRenderer();
// Configure rendering options
Renderer.RenderingOptions.MarginTop = 50; // millimeters
Renderer.RenderingOptions.MarginBottom = 50;
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print;
// Render a simple HTML string to PDF
using var PDF = Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>");
// Add document properties
PDF.MetaData.Author = "Development Team";
PDF.MetaData.Keywords = "HTML, PDF, C#";
PDF.MetaData.ModifiedDate = DateTime.Now;
// Save the PDF
PDF.SaveAs("pixel-perfect.pdf");
// Load external HTML assets: images, CSS, and javascript
// An optional BasePath 'C:\site\assets\' is set as the file location to load assets from
using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", @"C:\site\assets\");
// Apply security settings
AdvancedPDF.Password = "pass123";
AdvancedPDF.SecuritySettings.AllowUserPrinting = IronPdf.Security.PdfPrintSecurity.FullPrintRights;
// Save the advanced PDF with external assets
AdvancedPDF.SaveAs("html-with-assets.pdf");// Create an instance of the ChromePdfRenderer
var Renderer = new IronPdf.ChromePdfRenderer();
// Configure rendering options
Renderer.RenderingOptions.MarginTop = 50; // millimeters
Renderer.RenderingOptions.MarginBottom = 50;
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print;
// Render a simple HTML string to PDF
using var PDF = Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>");
// Add document properties
PDF.MetaData.Author = "Development Team";
PDF.MetaData.Keywords = "HTML, PDF, C#";
PDF.MetaData.ModifiedDate = DateTime.Now;
// Save the PDF
PDF.SaveAs("pixel-perfect.pdf");
// Load external HTML assets: images, CSS, and javascript
// An optional BasePath 'C:\site\assets\' is set as the file location to load assets from
using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", @"C:\site\assets\");
// Apply security settings
AdvancedPDF.Password = "pass123";
AdvancedPDF.SecuritySettings.AllowUserPrinting = IronPdf.Security.PdfPrintSecurity.FullPrintRights;
// Save the advanced PDF with external assets
AdvancedPDF.SaveAs("html-with-assets.pdf");高度な HTML から PDF への変換テクニックについては、 HTML から PDF へのチュートリアルを参照してください。
XFINIUM.PDFの使用
XFINIUM.PDF を使用して空の PDF ドキュメントを作成するには、ドキュメントの作成、ページの作成、保存の 3 行が必要です。
// Create a new PDF document
PdfFixedDocument document = new PdfFixedDocument();
// Add a page to the document
PdfPage page = document.Pages.Add();
// Save the document as a PDF file
document.Save("empty.pdf");// Create a new PDF document
PdfFixedDocument document = new PdfFixedDocument();
// Add a page to the document
PdfPage page = document.Pages.Add();
// Save the document as a PDF file
document.Save("empty.pdf");テキスト コンテンツを追加するには、フォントの作成、色用のブラシの作成、テキストの描画という 3 つの追加行が必要です。
// Create a new PDF document
PdfFixedDocument document = new PdfFixedDocument();
PdfPage page = document.Pages.Add();
// Create a standard font with Helvetica face and 24 point size
PdfStandardFont helvetica = new PdfStandardFont(PdfStandardFontFace.Helvetica, 24);
// Create a solid RGB red brush.
PdfBrush brush = new PdfBrush(PdfRgbColor.Red);
// Draw the text on the page.
page.Graphics.DrawString("Hello World", helvetica, brush, 100, 100);
// Save the document as a PDF file
document.Save("helloworld.pdf");// Create a new PDF document
PdfFixedDocument document = new PdfFixedDocument();
PdfPage page = document.Pages.Add();
// Create a standard font with Helvetica face and 24 point size
PdfStandardFont helvetica = new PdfStandardFont(PdfStandardFontFace.Helvetica, 24);
// Create a solid RGB red brush.
PdfBrush brush = new PdfBrush(PdfRgbColor.Red);
// Draw the text on the page.
page.Graphics.DrawString("Hello World", helvetica, brush, 100, 100);
// Save the document as a PDF file
document.Save("helloworld.pdf");オブジェクト モデルは PDF 標準によく似ています。 このアプローチは、フロードキュメントのような複雑な抽象化を構築する場合に明らかな利点を提供します。## 入力可能な PDF ファイルを作成する方法
XFINIUM.PDFの使用
XFINIUM.PDF を使用すると、新しい PDF フォームを作成したり、既存の PDF フォームに入力したりできます。
各 PDF フォーム フィールド タイプには対応するクラスがあります。
PdfTextBoxField– テキストボックスフィールドPdfCheckBoxField– チェックボックスPdfRadioButtonField– ラジオボタンセットPdfComboboxField– コンボボックスPdfListboxField– リストボックスPdfPushbuttonField– プッシュボタン- PdfSignatureField – 署名フィールド
フォーム フィールドを作成するには、フィールド名とページの場所を指定します。 フィールド オブジェクトを作成したら、それをページに追加して属性を設定します。
// Create a text box field named "firstname"
PdfTextBoxField firstNameTextBox = new PdfTextBoxField("firstname");
// Add the field to a PDF page
pdfpage.Fields.Add(firstNameTextBox);
// Set the position of the field on the PDF page
firstNameTextBox.Widgets[0].VisualRectangle = new PdfVisualRectangle(150, 45, 200, 20);// Create a text box field named "firstname"
PdfTextBoxField firstNameTextBox = new PdfTextBoxField("firstname");
// Add the field to a PDF page
pdfpage.Fields.Add(firstNameTextBox);
// Set the position of the field on the PDF page
firstNameTextBox.Widgets[0].VisualRectangle = new PdfVisualRectangle(150, 45, 200, 20);既存の PDF フォームに入力するには、それらをPdfFixedDocumentオブジェクトに読み込みます。 ドキュメントのフィールド コレクションは自動的に入力されます。 インデックスまたは名前でフィールドを検索し、値のプロパティを設定してフィールドを埋めることができます。
// Load an existing PDF document with forms
PdfFixedDocument document = new PdfFixedDocument("form.pdf");
// Fill form fields with values
(document.Form.Fields["firstname"] as PdfTextBoxField).Text = "John";
(document.Form.Fields["lastname"] as PdfTextBoxField).Value = "Doe";
(document.Form.Fields["sex"].Widgets[0] as PdfRadioButtonWidget).Checked = true;
(document.Form.Fields["firstcar"] as PdfComboBoxField).SelectedIndex = 0;
(document.Form.Fields["secondcar"] as PdfListBoxField).SelectedIndex = 1;
(document.Form.Fields["agree"] as PdfCheckBoxField).Checked = true;
// Save the filled form as a new PDF file
document.Save("form_filled.pdf");// Load an existing PDF document with forms
PdfFixedDocument document = new PdfFixedDocument("form.pdf");
// Fill form fields with values
(document.Form.Fields["firstname"] as PdfTextBoxField).Text = "John";
(document.Form.Fields["lastname"] as PdfTextBoxField).Value = "Doe";
(document.Form.Fields["sex"].Widgets[0] as PdfRadioButtonWidget).Checked = true;
(document.Form.Fields["firstcar"] as PdfComboBoxField).SelectedIndex = 0;
(document.Form.Fields["secondcar"] as PdfListBoxField).SelectedIndex = 1;
(document.Form.Fields["agree"] as PdfCheckBoxField).Checked = true;
// Save the filled form as a new PDF file
document.Save("form_filled.pdf");IronPDFを使用する
IronPDF を使用して入力可能な PDF を作成する方法は次のとおりです。
// PM> Install-Package IronPdf
using IronPdf;
using IronPdf.Rendering;
// Step 1. Creating a PDF with editable forms from HTML using form and input tags
var FormHtml = @"
<html>
<head>
<style>
body { font-family: Arial, sans-serif; margin: 40px; }
h2 { color: #333; }
form { background: #f4f4f4; padding: 20px; border-radius: 8px; }
input[type='text'] {
width: 100%;
padding: 8px;
margin: 10px 0;
border: 1px solid #ddd;
border-radius: 4px;
}
input[type='checkbox'] { margin-right: 10px; }
select { width: 100%; padding: 8px; margin: 10px 0; }
</style>
</head>
<body>
<h2>Editable PDF Form</h2>
<form>
First name:<br> <input type='text' name='firstname' value=''> <br>
Last name:<br> <input type='text' name='lastname' value=''>
<br><br>
Email:<br> <input type='text' name='email' value=''>
<br><br>
Subscribe to newsletter: <input type='checkbox' name='newsletter' value='yes'>
<br><br>
Country:
<select name='country'>
<option value='usa'>United States</option>
<option value='uk'>United Kingdom</option>
<option value='canada'>Canada</option>
</select>
</form>
</body>
</html>";
// Create a PDF renderer with form creation enabled
IronPdf.ChromePdfRenderer Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
Renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print;
Renderer.RenderingOptions.MarginTop = 20;
Renderer.RenderingOptions.MarginBottom = 20;
// Render the HTML as a PDF and save it
var pdfDocument = Renderer.RenderHtmlAsPdf(FormHtml);
pdfDocument.SaveAs("BasicForm.pdf");
// Step 2. Reading and Writing PDF form values.
var FormDocument = PdfDocument.FromFile("BasicForm.pdf");
// Get form field collection
var form = FormDocument.Form;
// Set and Read the value of the "firstname" field
var FirstNameField = form.FindFormField("firstname");
FirstNameField.Value = "Minnie";
Console.WriteLine("FirstNameField value: {0}", FirstNameField.Value);
// Set and Read the value of the "lastname" field
var LastNameField = form.FindFormField("lastname");
LastNameField.Value = "Mouse";
Console.WriteLine("LastNameField value: {0}", LastNameField.Value);
// Set email field
var EmailField = form.FindFormField("email");
EmailField.Value = "minnie.mouse@example.com";
// Set checkbox
var NewsletterField = form.FindFormField("newsletter");
NewsletterField.Value = "yes";
// Set dropdown selection
var CountryField = form.FindFormField("country");
CountryField.Value = "usa";
// Save the form with filled values
FormDocument.SaveAs("FilledForm.pdf");
// Step 3. Flattening the form (making it non-editable)
FormDocument.Form.Flatten();
FormDocument.SaveAs("FlattenedForm.pdf");// PM> Install-Package IronPdf
using IronPdf;
using IronPdf.Rendering;
// Step 1. Creating a PDF with editable forms from HTML using form and input tags
var FormHtml = @"
<html>
<head>
<style>
body { font-family: Arial, sans-serif; margin: 40px; }
h2 { color: #333; }
form { background: #f4f4f4; padding: 20px; border-radius: 8px; }
input[type='text'] {
width: 100%;
padding: 8px;
margin: 10px 0;
border: 1px solid #ddd;
border-radius: 4px;
}
input[type='checkbox'] { margin-right: 10px; }
select { width: 100%; padding: 8px; margin: 10px 0; }
</style>
</head>
<body>
<h2>Editable PDF Form</h2>
<form>
First name:<br> <input type='text' name='firstname' value=''> <br>
Last name:<br> <input type='text' name='lastname' value=''>
<br><br>
Email:<br> <input type='text' name='email' value=''>
<br><br>
Subscribe to newsletter: <input type='checkbox' name='newsletter' value='yes'>
<br><br>
Country:
<select name='country'>
<option value='usa'>United States</option>
<option value='uk'>United Kingdom</option>
<option value='canada'>Canada</option>
</select>
</form>
</body>
</html>";
// Create a PDF renderer with form creation enabled
IronPdf.ChromePdfRenderer Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
Renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print;
Renderer.RenderingOptions.MarginTop = 20;
Renderer.RenderingOptions.MarginBottom = 20;
// Render the HTML as a PDF and save it
var pdfDocument = Renderer.RenderHtmlAsPdf(FormHtml);
pdfDocument.SaveAs("BasicForm.pdf");
// Step 2. Reading and Writing PDF form values.
var FormDocument = PdfDocument.FromFile("BasicForm.pdf");
// Get form field collection
var form = FormDocument.Form;
// Set and Read the value of the "firstname" field
var FirstNameField = form.FindFormField("firstname");
FirstNameField.Value = "Minnie";
Console.WriteLine("FirstNameField value: {0}", FirstNameField.Value);
// Set and Read the value of the "lastname" field
var LastNameField = form.FindFormField("lastname");
LastNameField.Value = "Mouse";
Console.WriteLine("LastNameField value: {0}", LastNameField.Value);
// Set email field
var EmailField = form.FindFormField("email");
EmailField.Value = "minnie.mouse@example.com";
// Set checkbox
var NewsletterField = form.FindFormField("newsletter");
NewsletterField.Value = "yes";
// Set dropdown selection
var CountryField = form.FindFormField("country");
CountryField.Value = "usa";
// Save the form with filled values
FormDocument.SaveAs("FilledForm.pdf");
// Step 3. Flattening the form (making it non-editable)
FormDocument.Form.Flatten();
FormDocument.SaveAs("FlattenedForm.pdf");まず、HTML フォーマット タグを使用してフォームを作成します。 ライブラリは PDF として保存する際の複雑な処理を処理します。 フォーム値の読み取りと書き込みは、 FindFormField関数を使用して行われます。 アプリケーションでは、この機能をすぐに使用して、プログラムでフォームに入力できます。
デジタル署名を含む高度なフォーム処理については、 "PDF フォームの作成"チュートリアルを参照してください。
PDFファイルにデジタル署名する方法
リモートワークでは効率的なドキュメント処理が必要です。 フォームへの記入と署名、ファイルの送信、文書の処理は日常的な業務活動です。 PDF ドキュメント、ポートフォリオ、フォームに署名することで、紙のドキュメントが置き換えられます。 デジタル署名により、企業は契約書に署名したり、PDF フォームをオンラインで共有したりできるようになります。
XFINIUM.PDFの使用
署名フィールドは、PDF ファイルにデジタル署名を適用します ( PdfSignatureFieldクラス)。 署名フィールドは 1 ページに表示されますが、デジタル署名はドキュメント全体に署名します。
署名プロセスでは、 PdfDigitalSignatureオブジェクトを使用して署名属性を設定します。 署名は、PDF ファイルのバイナリ レイアウトに基づいてドキュメントを保存するときに形成されます。
PdfDigitalSignature 、すべての XFINIUM 署名の基盤を提供します。
PdfCmsDigitalSignature– CMS 標準署名(PdfDigitalSignatureから継承)PdfPadesDigitalSignature– PADES標準署名(PdfCmsDigitalSignatureから継承)PdfInteractiveCmsDigitalSignature–ハードウェアスマートカードを使用したCMS署名PdfInteractivePadesDigitalSignature– ハードウェアスマートカードをサポートするPADESPdfDocumentTimeStamp– ドキュメントレベルのタイムスタンプ(PdfDigitalSignatureから継承)
IronPDFを使用する
開発者から、IronPDF と C# を使用してプログラムでPDF に署名を追加する方法についてよく質問を受けます。 これは次のことを意味します:
- ファイルからグラフィカル署名画像を追加する
- 改ざん防止のための暗号署名
- 暗号署名による手書き署名アイコンの追加
最初のアプローチでは、既存の PDF ページに署名 PNG をスタンプします。 署名や会社の印鑑に使用します。
// Open an existing PDF document or create a new one
var Pdf = PdfDocument.FromFile(@"C:\Path\To\ASPX to PDF.pdf");
// Define an HTML stamp with a signature image
var SignatureStamp = new HtmlStamp()
{
Html = "<img src='signature.png' />",
Width = 150,
Height = 50,
Bottom = 300,
Left = 85,
ZIndex = HtmlStamp.StampLayer.OnTopOfExistingPDFContent
};
// Advanced stamp with styling
var StyledSignatureStamp = new HtmlStamp()
{
Html = @"<div style='border: 2px solid #000; padding: 10px; background: rgba(255,255,255,0.9);'>
<img src='signature.png' style='width: 120px;' />
<p style='margin: 5px 0 0 0; font-size: 10px;'>Digitally Signed</p>
<p style='margin: 0; font-size: 8px;'>{date}</p>
</div>",
Width = 150,
Height = 100,
Bottom = 50,
Right = 50,
ZIndex = HtmlStamp.StampLayer.OnTopOfExistingPDFContent
};
// Stamp the signature on the first page of the PDF
Pdf.StampHTML(SignatureStamp, 1);
// Or apply to all pages
Pdf.StampHTML(StyledSignatureStamp);
// Save the stamped PDF
Pdf.SaveAs(@"C:\Path\To\Stamped_PDF.pdf");// Open an existing PDF document or create a new one
var Pdf = PdfDocument.FromFile(@"C:\Path\To\ASPX to PDF.pdf");
// Define an HTML stamp with a signature image
var SignatureStamp = new HtmlStamp()
{
Html = "<img src='signature.png' />",
Width = 150,
Height = 50,
Bottom = 300,
Left = 85,
ZIndex = HtmlStamp.StampLayer.OnTopOfExistingPDFContent
};
// Advanced stamp with styling
var StyledSignatureStamp = new HtmlStamp()
{
Html = @"<div style='border: 2px solid #000; padding: 10px; background: rgba(255,255,255,0.9);'>
<img src='signature.png' style='width: 120px;' />
<p style='margin: 5px 0 0 0; font-size: 10px;'>Digitally Signed</p>
<p style='margin: 0; font-size: 8px;'>{date}</p>
</div>",
Width = 150,
Height = 100,
Bottom = 50,
Right = 50,
ZIndex = HtmlStamp.StampLayer.OnTopOfExistingPDFContent
};
// Stamp the signature on the first page of the PDF
Pdf.StampHTML(SignatureStamp, 1);
// Or apply to all pages
Pdf.StampHTML(StyledSignatureStamp);
// Save the stamped PDF
Pdf.SaveAs(@"C:\Path\To\Stamped_PDF.pdf");1 行で .pfx および .p12 X509Certificate2 デジタル証明書を使用してPDF に暗号署名します。
// 123456 below represents the signature password
new IronPdf.PdfSignature("CertificateFile.p12", "123456").SignPdfFile("ASPX to PDF.pdf");
// Or with more control
var signature = new IronPdf.PdfSignature("CertificateFile.p12", "123456")
{
SigningContact = "john@example.com",
SigningLocation = "New York, USA",
SigningReason = "Contract Agreement"
};
// Load the PDF
var pdf = PdfDocument.FromFile("contract.pdf");
// Sign and save
pdf.SignPdfWithDigitalSignature(signature);
pdf.SaveAs("signed-contract.pdf");// 123456 below represents the signature password
new IronPdf.PdfSignature("CertificateFile.p12", "123456").SignPdfFile("ASPX to PDF.pdf");
// Or with more control
var signature = new IronPdf.PdfSignature("CertificateFile.p12", "123456")
{
SigningContact = "john@example.com",
SigningLocation = "New York, USA",
SigningReason = "Contract Agreement"
};
// Load the PDF
var pdf = PdfDocument.FromFile("contract.pdf");
// Sign and save
pdf.SignPdfWithDigitalSignature(signature);
pdf.SaveAs("signed-contract.pdf");この高度な例では、.pfx / .p12 X509Certificate2 デジタル ID 署名と手書き署名を組み合わせます。
// Create a digital signature using a certificate file
var Signature = new IronPdf.PdfSignature("Iron.pfx", "123456");
// Render a PDF document to be signed
var Renderer = new ChromePdfRenderer();
Renderer.RenderingOptions.MarginBottom = 0;
Renderer.RenderingOptions.MarginTop = 0;
Renderer.RenderingOptions.EnableJavaScript = true;
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print;
// Create PDF with security features
string html = @"<h1>Contract Agreement</h1>
<p>This document is digitally signed and encrypted.</p>
<p>Agreement Date: " + DateTime.Now.ToString("yyyy-MM-dd") + @"</p>";
PdfDocument doc = Renderer.RenderHtmlAsPdf(html);
// Configure optional signing options and a handwritten signature graphic
Signature.SigningContact = "support@ironsoftware.com";
Signature.SigningLocation = "Chicago, USA";
Signature.SigningReason = "To show how to sign a PDF";
// Load a handwritten signature image
Signature.LoadSignatureImageFromFile("handwriting.png");
// Advanced security: Set permissions
doc.SecuritySettings.AllowUserPrinting = IronPdf.Security.PdfPrintSecurity.NoPrint;
doc.SecuritySettings.AllowUserEdits = IronPdf.Security.PdfEditSecurity.NoEdit;
doc.SecuritySettings.AllowUserCopyPasteContent = false;
// Sign the PDF document with the digital signature
doc.SignPdfWithDigitalSignature(Signature);
// Add password protection
doc.Password = "userpassword";
doc.OwnerPassword = "ownerpassword";
// Save the signed PDF document
doc.SaveAs("Signed_ASPX_to_PDF.pdf");// Create a digital signature using a certificate file
var Signature = new IronPdf.PdfSignature("Iron.pfx", "123456");
// Render a PDF document to be signed
var Renderer = new ChromePdfRenderer();
Renderer.RenderingOptions.MarginBottom = 0;
Renderer.RenderingOptions.MarginTop = 0;
Renderer.RenderingOptions.EnableJavaScript = true;
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print;
// Create PDF with security features
string html = @"<h1>Contract Agreement</h1>
<p>This document is digitally signed and encrypted.</p>
<p>Agreement Date: " + DateTime.Now.ToString("yyyy-MM-dd") + @"</p>";
PdfDocument doc = Renderer.RenderHtmlAsPdf(html);
// Configure optional signing options and a handwritten signature graphic
Signature.SigningContact = "support@ironsoftware.com";
Signature.SigningLocation = "Chicago, USA";
Signature.SigningReason = "To show how to sign a PDF";
// Load a handwritten signature image
Signature.LoadSignatureImageFromFile("handwriting.png");
// Advanced security: Set permissions
doc.SecuritySettings.AllowUserPrinting = IronPdf.Security.PdfPrintSecurity.NoPrint;
doc.SecuritySettings.AllowUserEdits = IronPdf.Security.PdfEditSecurity.NoEdit;
doc.SecuritySettings.AllowUserCopyPasteContent = false;
// Sign the PDF document with the digital signature
doc.SignPdfWithDigitalSignature(Signature);
// Add password protection
doc.Password = "userpassword";
doc.OwnerPassword = "ownerpassword";
// Save the signed PDF document
doc.SaveAs("Signed_ASPX_to_PDF.pdf");完全なセキュリティ実装については、高度なドキュメント保護機能に関するIronsecuredoc ドキュメントを参照してください。## 各ライブラリは最新の CSS フレームワークと Bootstrap をどのように処理しますか?
最新の Web アプリケーションでは、迅速な UI 開発とレスポンシブ デザインを実現するために、Bootstrap などの CSS フレームワークが利用されることが多いです。 PDF 生成ツールは、プロフェッショナルなドキュメント品質を確保するために、これらのフレームワーク レイアウトを正確に保持する必要があります。
IronPDF: 完全なBootstrapフレームワークサポート
IronPDF の Chromium レンダリング エンジンは、最新の CSS フレームワークを完全にサポートしています。
- Bootstrap 5:レスポンシブなコンポーネントを備えた完全なフレックスボックスとCSSグリッドレンダリング
- Bootstrap 4:完全なカードシステム、ナビゲーションバー、ユーティリティクラス
- Tailwind CSS:すべてのユーティリティファーストクラスとレスポンシブバリアント
- Foundationおよびその他のフレームワーク: CSS3の完全なサポートにより、すべての最新のフレームワークが正しく動作します。 -高度な CSS: Flexbox、CSS グリッド、カスタム プロパティ、アニメーション、変換
実際の検証: Bootstrap のホームページとテンプレートは、ブラウザと同等の忠実度で変換されます。
コード例:Bootstrapカードを用いたイベントスケジュール
using IronPdf;
var renderer = new ChromePdfRenderer();
// Configure rendering for optimal Bootstrap output
renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print;
renderer.RenderingOptions.EnableJavaScript = true;
renderer.RenderingOptions.RenderDelay = 500; // Allow JS to fully load
renderer.RenderingOptions.ViewPortWidth = 1280; // Desktop viewport
renderer.RenderingOptions.MarginTop = 10;
renderer.RenderingOptions.MarginBottom = 10;
renderer.RenderingOptions.MarginLeft = 10;
renderer.RenderingOptions.MarginRight = 10;
string bootstrapSchedule = @"
<!DOCTYPE html>
<html>
<head>
<link href='___PROTECTED_URL_135___ rel='stylesheet'>
<style>
@media print {
.pagebreak { page-break-after: always; }
}
</style>
</head>
<body>
<div class='container my-5'>
<h1 class='text-center mb-5'>Tech Conference 2025 - Schedule</h1>
<div class='row g-4'>
<div class='col-md-6'>
<div class='card border-primary'>
<div class='card-header bg-primary text-white d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Keynote Session</h5>
<span class='badge bg-light text-primary'>9:00 AM</span>
</div>
<div class='card-body'>
<h6 class='card-subtitle mb-2 text-muted'>Main Auditorium</h6>
<p class='card-text'><strong>The Future of AI in Software Development</strong></p>
<p class='card-text'>Join us for an exploration of how artificial intelligence is transforming the software development environment.</p>
<div class='d-flex align-items-center'>
<img src='___PROTECTED_URL_136___ class='rounded-circle me-2' alt='Speaker'>
<div>
<div class='fw-bold'>Dr. Sarah Chen</div>
<small class='text-muted'>AI Research Lead</small>
</div>
</div>
</div>
</div>
</div>
<div class='col-md-6'>
<div class='card border-success'>
<div class='card-header bg-success text-white d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Workshop</h5>
<span class='badge bg-light text-success'>10:30 AM</span>
</div>
<div class='card-body'>
<h6 class='card-subtitle mb-2 text-muted'>Workshop Room A</h6>
<p class='card-text'><strong>Hands-On: Cloud-Native Architecture</strong></p>
<p class='card-text'>Learn practical techniques for building flexible, cloud-native applications with modern frameworks.</p>
<div class='d-flex align-items-center'>
<img src='___PROTECTED_URL_137___ class='rounded-circle me-2' alt='Speaker'>
<div>
<div class='fw-bold'>Michael Rodriguez</div>
<small class='text-muted'>Cloud Architect</small>
</div>
</div>
</div>
</div>
</div>
<div class='col-md-6'>
<div class='card border-warning'>
<div class='card-header bg-warning text-dark d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Panel Discussion</h5>
<span class='badge bg-dark'>2:00 PM</span>
</div>
<div class='card-body'>
<h6 class='card-subtitle mb-2 text-muted'>Main Auditorium</h6>
<p class='card-text'><strong>Security in Modern Web Applications</strong></p>
<p class='card-text'>Industry experts discuss current security challenges and best practices for protecting user data.</p>
<small class='text-muted'>Featuring 4 industry experts</small>
</div>
</div>
</div>
<div class='col-md-6'>
<div class='card border-info'>
<div class='card-header bg-info text-white d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Technical Talk</h5>
<span class='badge bg-light text-info'>3:30 PM</span>
</div>
<div class='card-body'>
<h6 class='card-subtitle mb-2 text-muted'>Room B</h6>
<p class='card-text'><strong>Performance Optimization Strategies</strong></p>
<p class='card-text'>Deep dive into advanced techniques for improve application performance and reducing latency.</p>
<div class='d-flex align-items-center'>
<img src='___PROTECTED_URL_138___ class='rounded-circle me-2' alt='Speaker'>
<div>
<div class='fw-bold'>Alex Kim</div>
<small class='text-muted'>Performance Engineer</small>
</div>
</div>
</div>
</div>
</div>
</div>
<div class='pagebreak'></div>
<h2 class='mt-5'>Additional Sessions</h2>
<div class='table-responsive'>
<table class='table table-striped'>
<thead>
<tr>
<th>Time</th>
<th>Session</th>
<th>Speaker</th>
<th>Location</th>
</tr>
</thead>
<tbody>
<tr>
<td>11:45 AM</td>
<td>Lightning Talks</td>
<td>Various</td>
<td>Room C</td>
</tr>
<tr>
<td>1:00 PM</td>
<td>Networking Lunch</td>
<td>-</td>
<td>Cafeteria</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>";
// Generate the PDF
var pdf = renderer.RenderHtmlAsPdf(bootstrapSchedule);
// Add metadata
pdf.MetaData.Author = "Tech Conference Team";
pdf.MetaData.Title = "Conference Schedule 2025";
pdf.MetaData.Subject = "Event Schedule";
// Save the PDF
pdf.SaveAs("conference-schedule.pdf");
// Example: Generate responsive invoice with Bootstrap
string bootstrapInvoice = @"
<!DOCTYPE html>
<html>
<head>
<link href='___PROTECTED_URL_139___ rel='stylesheet'>
<link href='___PROTECTED_URL_140___ rel='stylesheet'>
</head>
<body>
<div class='container mt-5'>
<div class='row'>
<div class='col-12'>
<div class='card'>
<div class='card-body'>
<div class='row mb-4'>
<div class='col-sm-6'>
<h2 class='text-primary'><i class='fas fa-file-invoice'></i> INVOICE</h2>
<p class='mb-1'><strong>Invoice #:</strong> INV-2025-001</p>
<p class='mb-1'><strong>Date:</strong> " + DateTime.Now.ToString("MMMM dd, yyyy") + @"</p>
</div>
<div class='col-sm-6 text-sm-end'>
<h4>Your Company Name</h4>
<p class='mb-1'>123 Business St</p>
<p class='mb-1'>City, State 12345</p>
<p>contact@company.com</p>
</div>
</div>
<hr>
<div class='row mb-4'>
<div class='col-sm-6'>
<h5>Bill To:</h5>
<p class='mb-1'><strong>Client Company</strong></p>
<p class='mb-1'>456 Client Ave</p>
<p>City, State 67890</p>
</div>
</div>
<div class='table-responsive'>
<table class='table table-bordered'>
<thead class='table-primary'>
<tr>
<th>Description</th>
<th class='text-center'>Quantity</th>
<th class='text-end'>Price</th>
<th class='text-end'>Total</th>
</tr>
</thead>
<tbody>
<tr>
<td>Web Development Services</td>
<td class='text-center'>40</td>
<td class='text-end'>$150.00</td>
<td class='text-end'>$6,000.00</td>
</tr>
<tr>
<td>UI/UX Design</td>
<td class='text-center'>20</td>
<td class='text-end'>$125.00</td>
<td class='text-end'>$2,500.00</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan='3' class='text-end'><strong>Subtotal:</strong></td>
<td class='text-end'><strong>$8,500.00</strong></td>
</tr>
<tr>
<td colspan='3' class='text-end'>Tax (10%):</td>
<td class='text-end'>$850.00</td>
</tr>
<tr class='table-primary'>
<td colspan='3' class='text-end'><strong>Total Due:</strong></td>
<td class='text-end'><strong>$9,350.00</strong></td>
</tr>
</tfoot>
</table>
</div>
<div class='alert alert-info mt-4'>
<i class='fas fa-info-circle'></i> Payment is due within 30 days. Thank you for your business!
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>";
var invoicePdf = renderer.RenderHtmlAsPdf(bootstrapInvoice);
invoicePdf.SaveAs("bootstrap-invoice.pdf");using IronPdf;
var renderer = new ChromePdfRenderer();
// Configure rendering for optimal Bootstrap output
renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print;
renderer.RenderingOptions.EnableJavaScript = true;
renderer.RenderingOptions.RenderDelay = 500; // Allow JS to fully load
renderer.RenderingOptions.ViewPortWidth = 1280; // Desktop viewport
renderer.RenderingOptions.MarginTop = 10;
renderer.RenderingOptions.MarginBottom = 10;
renderer.RenderingOptions.MarginLeft = 10;
renderer.RenderingOptions.MarginRight = 10;
string bootstrapSchedule = @"
<!DOCTYPE html>
<html>
<head>
<link href='___PROTECTED_URL_135___ rel='stylesheet'>
<style>
@media print {
.pagebreak { page-break-after: always; }
}
</style>
</head>
<body>
<div class='container my-5'>
<h1 class='text-center mb-5'>Tech Conference 2025 - Schedule</h1>
<div class='row g-4'>
<div class='col-md-6'>
<div class='card border-primary'>
<div class='card-header bg-primary text-white d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Keynote Session</h5>
<span class='badge bg-light text-primary'>9:00 AM</span>
</div>
<div class='card-body'>
<h6 class='card-subtitle mb-2 text-muted'>Main Auditorium</h6>
<p class='card-text'><strong>The Future of AI in Software Development</strong></p>
<p class='card-text'>Join us for an exploration of how artificial intelligence is transforming the software development environment.</p>
<div class='d-flex align-items-center'>
<img src='___PROTECTED_URL_136___ class='rounded-circle me-2' alt='Speaker'>
<div>
<div class='fw-bold'>Dr. Sarah Chen</div>
<small class='text-muted'>AI Research Lead</small>
</div>
</div>
</div>
</div>
</div>
<div class='col-md-6'>
<div class='card border-success'>
<div class='card-header bg-success text-white d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Workshop</h5>
<span class='badge bg-light text-success'>10:30 AM</span>
</div>
<div class='card-body'>
<h6 class='card-subtitle mb-2 text-muted'>Workshop Room A</h6>
<p class='card-text'><strong>Hands-On: Cloud-Native Architecture</strong></p>
<p class='card-text'>Learn practical techniques for building flexible, cloud-native applications with modern frameworks.</p>
<div class='d-flex align-items-center'>
<img src='___PROTECTED_URL_137___ class='rounded-circle me-2' alt='Speaker'>
<div>
<div class='fw-bold'>Michael Rodriguez</div>
<small class='text-muted'>Cloud Architect</small>
</div>
</div>
</div>
</div>
</div>
<div class='col-md-6'>
<div class='card border-warning'>
<div class='card-header bg-warning text-dark d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Panel Discussion</h5>
<span class='badge bg-dark'>2:00 PM</span>
</div>
<div class='card-body'>
<h6 class='card-subtitle mb-2 text-muted'>Main Auditorium</h6>
<p class='card-text'><strong>Security in Modern Web Applications</strong></p>
<p class='card-text'>Industry experts discuss current security challenges and best practices for protecting user data.</p>
<small class='text-muted'>Featuring 4 industry experts</small>
</div>
</div>
</div>
<div class='col-md-6'>
<div class='card border-info'>
<div class='card-header bg-info text-white d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Technical Talk</h5>
<span class='badge bg-light text-info'>3:30 PM</span>
</div>
<div class='card-body'>
<h6 class='card-subtitle mb-2 text-muted'>Room B</h6>
<p class='card-text'><strong>Performance Optimization Strategies</strong></p>
<p class='card-text'>Deep dive into advanced techniques for improve application performance and reducing latency.</p>
<div class='d-flex align-items-center'>
<img src='___PROTECTED_URL_138___ class='rounded-circle me-2' alt='Speaker'>
<div>
<div class='fw-bold'>Alex Kim</div>
<small class='text-muted'>Performance Engineer</small>
</div>
</div>
</div>
</div>
</div>
</div>
<div class='pagebreak'></div>
<h2 class='mt-5'>Additional Sessions</h2>
<div class='table-responsive'>
<table class='table table-striped'>
<thead>
<tr>
<th>Time</th>
<th>Session</th>
<th>Speaker</th>
<th>Location</th>
</tr>
</thead>
<tbody>
<tr>
<td>11:45 AM</td>
<td>Lightning Talks</td>
<td>Various</td>
<td>Room C</td>
</tr>
<tr>
<td>1:00 PM</td>
<td>Networking Lunch</td>
<td>-</td>
<td>Cafeteria</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>";
// Generate the PDF
var pdf = renderer.RenderHtmlAsPdf(bootstrapSchedule);
// Add metadata
pdf.MetaData.Author = "Tech Conference Team";
pdf.MetaData.Title = "Conference Schedule 2025";
pdf.MetaData.Subject = "Event Schedule";
// Save the PDF
pdf.SaveAs("conference-schedule.pdf");
// Example: Generate responsive invoice with Bootstrap
string bootstrapInvoice = @"
<!DOCTYPE html>
<html>
<head>
<link href='___PROTECTED_URL_139___ rel='stylesheet'>
<link href='___PROTECTED_URL_140___ rel='stylesheet'>
</head>
<body>
<div class='container mt-5'>
<div class='row'>
<div class='col-12'>
<div class='card'>
<div class='card-body'>
<div class='row mb-4'>
<div class='col-sm-6'>
<h2 class='text-primary'><i class='fas fa-file-invoice'></i> INVOICE</h2>
<p class='mb-1'><strong>Invoice #:</strong> INV-2025-001</p>
<p class='mb-1'><strong>Date:</strong> " + DateTime.Now.ToString("MMMM dd, yyyy") + @"</p>
</div>
<div class='col-sm-6 text-sm-end'>
<h4>Your Company Name</h4>
<p class='mb-1'>123 Business St</p>
<p class='mb-1'>City, State 12345</p>
<p>contact@company.com</p>
</div>
</div>
<hr>
<div class='row mb-4'>
<div class='col-sm-6'>
<h5>Bill To:</h5>
<p class='mb-1'><strong>Client Company</strong></p>
<p class='mb-1'>456 Client Ave</p>
<p>City, State 67890</p>
</div>
</div>
<div class='table-responsive'>
<table class='table table-bordered'>
<thead class='table-primary'>
<tr>
<th>Description</th>
<th class='text-center'>Quantity</th>
<th class='text-end'>Price</th>
<th class='text-end'>Total</th>
</tr>
</thead>
<tbody>
<tr>
<td>Web Development Services</td>
<td class='text-center'>40</td>
<td class='text-end'>$150.00</td>
<td class='text-end'>$6,000.00</td>
</tr>
<tr>
<td>UI/UX Design</td>
<td class='text-center'>20</td>
<td class='text-end'>$125.00</td>
<td class='text-end'>$2,500.00</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan='3' class='text-end'><strong>Subtotal:</strong></td>
<td class='text-end'><strong>$8,500.00</strong></td>
</tr>
<tr>
<td colspan='3' class='text-end'>Tax (10%):</td>
<td class='text-end'>$850.00</td>
</tr>
<tr class='table-primary'>
<td colspan='3' class='text-end'><strong>Total Due:</strong></td>
<td class='text-end'><strong>$9,350.00</strong></td>
</tr>
</tfoot>
</table>
</div>
<div class='alert alert-info mt-4'>
<i class='fas fa-info-circle'></i> Payment is due within 30 days. Thank you for your business!
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>";
var invoicePdf = renderer.RenderHtmlAsPdf(bootstrapInvoice);
invoicePdf.SaveAs("bootstrap-invoice.pdf");出力: Bootstrap のカード グリッド、フレックスボックスの配置、バッジ コンポーネント、レスポンシブ レイアウトを備えたプロフェッショナルな会議スケジュールがすべて PDF で正確にレンダリングされます。
XFINIUM.PDF:HTMLとフレームワークのサポートが限られている
XFINIUM.PDF は、HTML から PDF への変換ではなく、PDF の生成と操作に重点を置いています。 ライブラリはBootstrapおよびモダンCSSフレームワークに関して重大な制限があります:
-ネイティブHTMLレンダリングなし: XFINIUM.PDFにはHTMLからPDFへの変換エンジンが組み込まれていません。 -基本的な HTML のみのサポート:高度な CSS のないシンプルな HTML 構造に限定されます
- Bootstrap のサポートなし: Flexbox と CSS Grid を備えた最新の Bootstrap フレームワーク (4/5) はサポートされていません。 -必要な回避策:開発者は低レベルのPDF APIを使用して手動でレイアウトを再作成する必要があります -必要な外部ツール:外部 HTML レンダリング エンジンとの統合が必要になる場合があります
開発への影響: Bootstrap または最新の CSS フレームワークを使用するアプリケーションは、XFINIUM.PDF を使用して UI を PDF に直接変換できません。 開発者は次のいずれかを行う必要があります:
- XFINIUM.PDFの低レベル描画APIを使用してレイアウトを再現する(開発時間が大幅に増加)
- 外部のHTMLレンダリングツールを統合する(追加の複雑さと依存関係)
- Web UIに平行して分離されたPDFレイアウトコードを維持する(保守のオーバーヘッド)
最新のフレームワークを使用して HTML から PDF への変換を必要とするプロジェクトの場合、XFINIUM.PDF の制限により、大幅な追加開発が必要になります。
完全な Bootstrap および最新の CSS フレームワークのサポートについては、Bootstrap & Flexbox CSS ガイドを参照してください。
価格とライセンスのオプションは何ですか?
XFINIUM.PDFの価格とライセンスについて
各パッケージには、PDF 作成/編集用の Generator エディションと、すべての Generator 機能に加えて PDF レンダリングおよび表示機能を備えた Viewer エディションの 2 つのエディションがあります。
- 開発者ごとにライセンスが必要です。
- 無制限のデスクトップ/サーバーにロイヤリティフリーで配布できます。
- アシスタンス サブスクリプションには 1 年間のアップデート/サポートが含まれます。
価格は年間 290.00 ドルから 872.00 ドルの範囲です。
IronPDFの価格とライセンス
IronPDFは開発には無料で、いつでも商用ライセンスを取得できます。オプションには、単一プロジェクトライセンス、単一開発者ライセンス、代理店ライセンス、多国籍組織ライセンス、SaaS/OEM再配布ライセンスなどがあります。 すべてのライセンスには、30 日間の返金保証、1 年間のサポート/アップグレード、開発/ステージング/本番環境での有効期間、および永久ライセンス (1 回限りの購入) が含まれます。 Lite パッケージは$799から始まり、定期的な費用は発生しません。
どの PDF ライブラリを選択すればよいですか?
IronPDF ライブラリは、独自の API を使用せずに PDF 作成を簡素化します。"HTML-To-PDF"は、HTML、JS、CSS、JPG、PNG、GIF、SVG などのオープン標準ドキュメントをピクセルパーフェクトな PDF に変換します。 既存の開発者のスキルを基盤としています。 ドキュメントをダウンロードしたり、電子メールで送信したり、クラウドに保存したりして、請求書、見積書、レポート、契約書、その他の書類を作成できます。 ASP.NET、ASP.NET Core、Webフォーム、MVC、.NET Framework、.NET Core Web APIで動作します。
XFINIUM.PDF は、初心者から上級者まで PDF 開発者向けの機能を提供します。 レポートの作成、PDF フォームへの入力、ポートフォリオの構築、情報の編集、PDF から複数ページの TIFF への変換など、必要なツールが提供されます。 基本的なオブジェクト モデルは PDF 仕様に従います。 コードは変更なしですべてのプラットフォームでコンパイルされます。
XFINIUM.PDF のライセンスは、ジェネレーター版が 290 ドル、ビューアー版が 387 ドルから始まります。 IronPDF は$799から始まります。 IronPDF ではシングルユーザー ライセンスとマルチユーザー ライセンスの両方が提供されていますが、XFINIUM.PDF では開発者ごとにライセンスが必要です。 IronPDF のプロフェッショナル ライセンス (799 ドル) は、無制限のユーザーをサポートします。
IronPDF では、XFINIUM.PDF よりも PDF 操作に必要なコード行数が少なくなり、プログラマーの作業負荷が軽減されます。
Iron Software は、2 回のクリックで完全なスイートを提供します。 ライブラリ 2 つの料金で、現在、継続的なサポート付きのライブラリ 5 つすべてを入手できます。
--BRACKET-i-OPEN--XFINIUM.PDFは各所有者の登録商標です。 このサイトは、XFINIUM.PDFと関連がなく、支持されておらず、支援されていません。 すべての製品名、ロゴ、およびブランドは各所有者の所有物です。 比較は情報提供のみを目的としており、執筆時点で公開されている情報を反映しています。
よくある質問
HTMLからPDFへの変換におけるIronPDFの主な機能は何ですか?
IronPDFは.NETのChromiumエンジンを活用してHTMLをPDFに変換します。HTML5、CSS、JavaScript、および画像の統合をサポートしており、WebコンテンツからPDFを作成するための包括的なソリューションです。
XFINIUM.PDFは.NET用の他のPDFライブラリとどのように比較されますか?
XFINIUM.PDFはGeneratorとViewerの2つのエディションを提供するクロスプラットフォームライブラリです。PDFの作成、編集、レンダリングで優れ、セキュリティ、デジタル署名、バーコードのサポートなどの機能を含んでいます。
IronPDFはAzureやAWSのようなクラウドプラットフォームで使用できますか?
はい、IronPDFはAzureやAWSを含むさまざまなプラットフォームと互換性があり、クラウド環境でのPDFソリューションの柔軟な展開を可能にします。
.NETプロジェクトにおけるIronPDFのインストールオプションは何ですか?
IronPDFはVisual StudioのNuGetパッケージマネージャ、開発者コマンドプロンプトを使用してインストールするか、直接NuGetパッケージまたはライブラリDLLをダウンロードしてインストールできます。
IronPDFのPDF編集機能は何ですか?
IronPDFはフォームフィールドの入力、文書のマージ、テキストおよび画像の抽出を含む広範なPDF編集を可能にします。また、ヘッダー、フッター、注釈の追加をサポートしています。
IronPDFとXFINIUM.PDFのライセンスオプションの違いは何ですか?
XFINIUM.PDFはロイヤリティフリーの配布で開発者1人あたり$290からライセンスを提供しています。IronPDFは無制限のユーザー用のプロフェッショナルライセンスを含む、より広範なライセンスオプションを提供しています。
XFINIUM.PDFはどのようなセキュリティ機能を提供していますか?
XFINIUM.PDFはユーザーおよびオーナーパスワード、文書アクセス権、RC4およびAES暗号化、コンテンツの削除をサポートしており、文書の安全性を確保します。
なぜ開発者はプロジェクトにIronPDFを選ぶのですか?
開発者は、IronPDF を選ぶことでコード行数が減り、シングルおよびマルチユーザーライセンスに柔軟に対応できます。
IronPDFはPDF内のフォーム入力をどのように処理しますか?
IronPDFはPDF内のフォームフィールドを入力するためのツールを提供し、動的な文書作成やユーザーインタラクションを可能にします。
これらのPDFライブラリにおけるデジタル署名の能力は何ですか?
IronPDFとXFINIUM.PDFの両方は、文書の真正性と整合性を安全に検証するためにデジタル署名をサポートしています。






