IronPDFとApryse C#の比較
なぜIronPDFとApryse C# PDFライブラリを比較するのか?
IronPDFとApryse C#は、.NET向けの著名なPDFライブラリであり、それぞれ独自の強みを持っています。IronPDFは、完全なBootstrapサポートを備えたHTMLからPDFへの変換や、豊富な編集機能に優れています。一方、Apryseはドキュメントの注釈や墨消しに特化しており、エンタープライズのコンプライアンス要件に対応しています。
C#開発者として、アプリケーションでドキュメントを生成・編集・表示する際に、PDF関連のタスクに直面することがよくあります。信頼できるPDFライブラリは、効率化のために不可欠です。これらのライブラリは、ドキュメントの変換、テキストの編集、PDF内の画像処理など、複雑な操作のための組み込み機能を提供します。これらがなければ、すべての機能を一から実装する必要があり、時間がかかるだけでなくエラーも発生しやすくなります。
この比較では、人気のある2つのPDFライブラリ、IronPDFとApryse C#を取り上げます。IronPDFは、.NET環境でのPDF操作を簡素化する信頼性の高い機能を提供し、HTMLからPDFへの変換から高度なドキュメント編集まで対応します。Apryse C#は、効率性と使いやすさに重点を置いた、シンプルなPDF操作を実現します。本分析では、それぞれのライブラリの具体的な機能を検証し、プロジェクトに最適な選択肢を見極める手助けをします。
Apryse C# PDFライブラリとは?

Apryse C#は、.NETアプリケーション向けに設計された、C#環境でのPDF操作を簡素化するための包括的なPDFライブラリです。以前はPDFTron SDKとして知られており、正確なPDF処理機能を求める開発者のために、幅広い機能とツールを提供しています。
Apryse C#はどのような主な機能を提供していますか?
- .NETプロジェクトへの簡単な統合: ASP.NET Coreや従来の.NET Frameworkアプリケーションを含む.NETとのスムーズな統合が可能です。
- ドキュメントの作成と編集: ゼロからPDFを作成したり、既存のPDFを編集できます。テキスト、画像、フォーム、ページ操作(並べ替え、結合、分割)などに対応しています。
- HTMLからPDFへの変換: 請求書、レポート、ウェブページのドキュメント化のために、HTMLコンテンツを直接PDF形式に変換できます。
- 充実したフォームフィールドサポート: 自動化ワークフローのためのPDFフォームフィールドの作成、編集、プログラムによる入力が信頼性高く行えます。
- テキストとコンテンツの抽出: PDFからテキストやコンテンツを抽出し、分析、検索ツール、コンテンツ管理に活用できます。
- セキュリティと暗号化: ドキュメントの暗号化、権限管理、デジタル署名など、完全なセキュリティ機能を備えています。
- 高度なPDF機能: 注釈、ブックマーク、ハイパーリンクなど、インタラクティブなPDFに対応しています。
IronPDF C#ライブラリとは?

IronPDFは、.NET開発者向けに設計された多機能なPDFライブラリです。複雑なPDF操作を簡素化し、C#アプリケーション内で直接作成、編集、変換を可能にします。Java、Python、C#など複数のプログラミング言語に対応しており、IronPDFは多様なPDF処理ニーズに効率的かつ信頼性高く応えます。
IronPDFはどのような主な機能を提供していますか?
- スムーズな.NET統合: .NET Frameworkおよび.NET Coreの両方をサポートし、ASP.NETプロジェクトにも対応した簡単な統合。
- HTMLからPDFへの変換: HTMLからPDFへの高品質な変換が可能で、HTMLテンプレートからのレポート、領収書、ドキュメント作成に最適。
- 高度なPDF編集: テキストの追加、画像の追加、ベクターグラフィックスの描画など、幅広い編集機能を提供。
- PDFフォームの操作: PDFフォームの作成、編集、入力をプログラムで行い、ドキュメントワークフローを自動化。
- コンテンツ抽出: テキスト、画像、メタデータの抽出により、コンテンツ分析やデータ移行が可能。
- ドキュメントのセキュリティ: パスワード保護、暗号化、権限管理に対応。
- パフォーマンスとスケーラビリティ: 高速化と大規模処理に最適化されており、高負荷アプリケーションにも対応。
- 充実したドキュメント: 豊富なドキュメントと、導入をサポートする迅速なサポートチーム。
- PDF標準への対応: PDF/A、PDF/UAなど、業界標準仕様をサポート。
C#コンソールアプリケーションを作成するには?
Visual Studioでコンソールアプリケーションを作成することで、IronPDFやApryse C#などのPDFライブラリを利用した.NET開発プロジェクトの基盤を構築できます。以下の手順で開始してください。
Visual Studioを起動するには?
お使いのコンピューターでVisual Studioを開きます。まだVisual Studioをインストールしていない場合は、公式Microsoftウェブサイトからダウンロードし、ご自身のニーズに合ったバージョンを選択してインストールしてください。
新しいプロジェクトを作成するには?
Visual Studioが起動したら、最初のダッシュボードから「新しいプロジェクトの作成」を選択します。

どのプロジェクトタイプを選択すればよいですか?
「新しいプロジェクトの作成」ウィンドウでは、さまざまなプロジェクトテンプレートが表示されます。検索ボックスに「Console」と入力するか、リストから「Console Application」を探してください。C#専用のテンプレートを選択します。

プロジェクトはどのように構成しますか?
「Console Application」を選択したら、「次へ」をクリックします。新しいプロジェクトを構成します。
-
プロジェクト名: プロジェクトの説明的な名前を入力します。
-
場所: 保存先を選択します。
-
ソリューション名: デフォルトではプロジェクト名と同じですが、カスタマイズ可能です。

-
フレームワーク: .NETのバージョンを選択します。最新バージョンが特別な要件がない限り推奨されます。

プロジェクト作成を完了するには?
プロジェクト設定を構成したら、「作成」をクリックします。Visual StudioがデフォルトのProgram.csファイルを含む新しいコンソールアプリケーションプロジェクトをセットアップします。
プロジェクト構成はどうなっていますか?
ソリューションエクスプローラーウィンドウで生成されたプロジェクト構成を確認します。コンソールアプリケーションの場合、主にProgram.csファイルで作業し、ここにC#コードを書きます。
IronPDFライブラリはどのようにインストールしますか?
IronPDFを.NETプロジェクトに統合することで、PDF操作の全機能を利用できます。複数のインストール方法があり、ワークフローの好みに応じて柔軟に選択できます。
NuGetパッケージマネージャーを使ったインストール方法は?
Visual StudioのNuGetパッケージマネージャーは、ライブラリ管理用のグラフィカルインターフェースを提供します。
- Visual Studioでプロジェクトを開きます。
- ソリューションエクスプローラーでプロジェクトを右クリックし、「NuGetパッケージの管理」を選択します。
- 「参照」タブをクリックし、「IronPDF」で検索します。
- 検索結果からIronPDFを選択し、「インストール」をクリックします。

コマンドラインでインストールするには?
パッケージマネージャーコンソールを使用すると、コマンドラインから直接インストールできます。
- Visual Studio プロジェクトを開きます。
- ツール > NuGet パッケージマネージャー > パッケージマネージャーコンソールに移動します。
- 次のコマンドを入力します。
このコマンドは、最新のIronPDFバージョンをプロジェクトにインストールします。
NuGetから直接ダウンロードするには?
統合前にパッケージを手動でダウンロードできます。
-
NuGetウェブサイトにアクセスし、「IronPDF」で検索します。
-
IronPDFパッケージページで「Download Package」をクリックし、.nupkgファイルを取得します。

-
ダウンロードしたパッケージを、ソリューションエクスプローラー > プロジェクトを右クリック > 「追加 > 参照」から手動で追加します。
どちらの方法でもIronPDFが正常に統合され、強力なPDF処理機能を利用できるようになります。
Apryse C#をインストールするには?
Apryse C#のプロジェクトへの統合方法は、.NET Frameworkまたは.NET Core環境によって異なります。以下は一般的なインストール手順です。
.NET Framework用Apryseのインストール方法
-
Apryse SDK for Windowsをダウンロード: [.NET Frameworkアプリケーション向けのSDKをダウンロードするには、Apryse SDK for Windowsページにアクセスしてください。

-
SDKを展開: ダウンロード後、SDKをシステム上の分かりやすい場所に展開します。
-
Apryseトライアルキーを取得: Apryseプラットフォームに登録し、トライアル機能を有効化するためのトライアルキーを取得します。
-
プロジェクトのセットアップ: Visual Studioで新しい.NET Frameworkコンソールアプリケーションを作成し、展開したSDKのLibフォルダーをプロジェクトディレクトリに追加します。
-
参照の追加: プロジェクト内の参照を右クリックし、「参照の追加」を選択して、コピーしたPDFNetLoader.dllおよびアーキテクチャ(x86またはx64)に適したPDFNet.dllがあるLibフォルダーを指定します。PDFNet.dllの「ローカルコピー」プロパティはfalseに設定してください。
-
App.configの設定: App.configファイルでloadFromRemoteSources設定がtrueになっていることを確認します。
SDKにはサンプルフォルダーが含まれており、直接ソリューションとして開いて実行できます。## IronPDFの高度な機能
HTMLからPDFへの変換
IronPDFは、HTMLをPDFドキュメントに変換する際に非常に効果的です。これは、レポート、請求書、またはウェブページのスナップショットを生成するウェブアプリケーションにとって重要な機能です。このライブラリは、HTML、CSS、JavaScriptを正確にレンダリングし、生成されたPDF内でウェブコンテンツのレイアウトやスタイルを保持します。
HTML文字列からPDFへの変換
HTML文字列を直接PDFに変換することで、アプリケーションが生成したコンテンツや保存された変数から動的にドキュメントを作成できます。この方法は、ユーザー入力に基づいたカスタマイズされたレポート、領収書、またはドキュメントの作成に役立ちます。
using IronPdf;
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Instantiate a PDF renderer
var renderer = new ChromePdfRenderer();
// Define a simple HTML string to convert to PDF
string htmlContent = @"
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>My PDF</title>
<style>
body {
font-family: Arial, sans-serif;
}
h1 {
color: #333;
text-align: center;
}
p {
color: #666;
text-align: justify;
}
</style>
</head>
<body>
<h1>Welcome to My PDF</h1>
<p>This is a sample paragraph demonstrating how to create a PDF from HTML using IronPdf in C#.</p>
<p>You can add more content here as needed.</p>
</body>
</html>";
// Render the HTML string as a PDF
var pdf = renderer.RenderHtmlAsPdf(htmlContent);
// Save the resulting PDF to a file
pdf.SaveAs("output.pdf");Imports IronPdf
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Instantiate a PDF renderer
Dim renderer = New ChromePdfRenderer()
' Define a simple HTML string to convert to PDF
Dim htmlContent As String = "
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>My PDF</title>
<style>
body {
font-family: Arial, sans-serif;
}
h1 {
color: #333;
text-align: center;
}
p {
color: #666;
text-align: justify;
}
</style>
</head>
<body>
<h1>Welcome to My PDF</h1>
<p>This is a sample paragraph demonstrating how to create a PDF from HTML using IronPdf in C#.</p>
<p>You can add more content here as needed.</p>
</body>
</html>"
' Render the HTML string as a PDF
Dim pdf = renderer.RenderHtmlAsPdf(htmlContent)
' Save the resulting PDF to a file
pdf.SaveAs("output.pdf")Imports IronPdf
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Instantiate a PDF renderer
Dim renderer = New ChromePdfRenderer()
' Define a simple HTML string to convert to PDF
Dim htmlContent As String = "
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>My PDF</title>
<style>
body {
font-family: Arial, sans-serif;
}
h1 {
color: #333;
text-align: center;
}
p {
color: #666;
text-align: justify;
}
</style>
</head>
<body>
<h1>Welcome to My PDF</h1>
<p>This is a sample paragraph demonstrating how to create a PDF from HTML using IronPdf in C#.</p>
<p>You can add more content here as needed.</p>
</body>
</html>"
' Render the HTML string as a PDF
Dim pdf = renderer.RenderHtmlAsPdf(htmlContent)
' Save the resulting PDF to a file
pdf.SaveAs("output.pdf")HTMLファイルからPDFへの変換
ディスク上に保存されているHTMLファイルがある場合、IronPDFはこれらのファイルをPDFドキュメントに変換できます。この方法は、既存のHTMLドキュメント、テンプレート、またはプロジェクトやサーバーに保存されたレポートに最適です。
using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate a PDF renderer
var renderer = new ChromePdfRenderer();
// Render the HTML file as a PDF
var pdf = renderer.RenderHtmlFileAsPdf("invoice.html");
// Save the resulting PDF to a file
pdf.SaveAs("file.pdf");using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate a PDF renderer
var renderer = new ChromePdfRenderer();
// Render the HTML file as a PDF
var pdf = renderer.RenderHtmlFileAsPdf("invoice.html");
// Save the resulting PDF to a file
pdf.SaveAs("file.pdf");Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Instantiate a PDF renderer
Dim renderer = New ChromePdfRenderer()
' Render the HTML file as a PDF
Dim pdf = renderer.RenderHtmlFileAsPdf("invoice.html")
' Save the resulting PDF to a file
pdf.SaveAs("file.pdf")Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Instantiate a PDF renderer
Dim renderer = New ChromePdfRenderer()
' Render the HTML file as a PDF
Dim pdf = renderer.RenderHtmlFileAsPdf("invoice.html")
' Save the resulting PDF to a file
pdf.SaveAs("file.pdf")URLからPDFへの変換
IronPDFは、URLを指定することでライブウェブページをPDFドキュメントに変換できます。この機能は、複雑なレイアウト、CSS、JavaScriptで生成されたコンテンツを含む、現在のウェブページの状態をキャプチャします。
using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate a PDF renderer
var renderer = new ChromePdfRenderer();
// Render the URL as a PDF
var pdf = renderer.RenderUrlAsPdf("https://dotnet.microsoft.com/en-us/download/dotnet-framework");
// Save the resulting PDF to a file
pdf.SaveAs("url.pdf");using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate a PDF renderer
var renderer = new ChromePdfRenderer();
// Render the URL as a PDF
var pdf = renderer.RenderUrlAsPdf("https://dotnet.microsoft.com/en-us/download/dotnet-framework");
// Save the resulting PDF to a file
pdf.SaveAs("url.pdf");Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Instantiate a PDF renderer
Dim renderer = New ChromePdfRenderer()
' Render the URL as a PDF
Dim pdf = renderer.RenderUrlAsPdf("https://dotnet.microsoft.com/en-us/download/dotnet-framework")
' Save the resulting PDF to a file
pdf.SaveAs("url.pdf")Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Instantiate a PDF renderer
Dim renderer = New ChromePdfRenderer()
' Render the URL as a PDF
Dim pdf = renderer.RenderUrlAsPdf("https://dotnet.microsoft.com/en-us/download/dotnet-framework")
' Save the resulting PDF to a file
pdf.SaveAs("url.pdf")Bootstrapおよび最新CSSフレームワークのサポート
最新のウェブアプリケーションからPDFを生成する際、BootstrapやCSSフレームワークへの完全な対応は不可欠です。多くの組織がウェブインターフェースにBootstrapを利用しているため、PDFへの正確な変換はレポート、請求書、ドキュメント作成において重要です。
IronPDFがサポートするBootstrapの機能
IronPDF:完全なBootstrapサポート
- Bootstrap 5: フレックスボックスレイアウト、CSS Grid、ユーティリティクラス、レスポンシブコンポーネントを完全サポート
- Bootstrap 4: カードシステム、ナビゲーションコンポーネント、フレックスユーティリティを完全サポート
- Tailwind CSS: すべてのユーティリティクラスを正確にレンダリング
- Foundation: グリッドシステムおよびコンポーネントを完全サポート
- 最新CSS3: フルフレックスボックス、CSS Grid、カスタムプロパティ、アニメーション、トランジション
IronPDFは、Bootstrapのホームページおよびすべての公式サンプルをピクセル単位で正確にレンダリングします。
コード例:ビジネスメトリクスダッシュボード
using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
var renderer = new ChromePdfRenderer();
string bootstrapDashboard = @"
<!DOCTYPE html>
<html>
<head>
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'>
<style>
.metric-card { transition: transform 0.2s; }
.metric-card:hover { transform: translateY(-5px); }
.trend-up { color: #28a745; }
.trend-down { color: #dc3545; }
</style>
</head>
<body>
<div class='container-fluid py-4'>
<div class='d-flex justify-content-between align-items-center mb-4'>
<h1 class='display-5'>Business Performance Dashboard</h1>
<div class='text-muted'>Last updated: March 2025</div>
</div>
<div class='row g-4 mb-4'>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-primary border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Total Revenue</h6>
<span class='badge bg-primary'>Q1 2025</span>
</div>
<h2 class='mb-1'>$2.4M</h2>
<div class='trend-up'>
<i>↑</i> <strong>+18.5%</strong> from last quarter
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-success border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>New Customers</h6>
<span class='badge bg-success'>Active</span>
</div>
<h2 class='mb-1'>1,284</h2>
<div class='trend-up'>
<i>↑</i> <strong>+24.3%</strong> growth rate
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-warning border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Avg Order Value</h6>
<span class='badge bg-warning text-dark'>Updated</span>
</div>
<h2 class='mb-1'>$1,847</h2>
<div class='trend-up'>
<i>↑</i> <strong>+5.2%</strong> increase
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-info border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Satisfaction Rate</h6>
<span class='badge bg-info'>Excellent</span>
</div>
<h2 class='mb-1'>94.7%</h2>
<div class='trend-up'>
<i>↑</i> <strong>+2.1pts</strong> improvement
</div>
</div>
</div>
</div>
</div>
<div class='row g-4'>
<div class='col-md-8'>
<div class='card shadow-sm'>
<div class='card-header bg-white d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Revenue Breakdown by Category</h5>
<div class='btn-group btn-group-sm' role='group'>
<button type='button' class='btn btn-outline-primary active'>Monthly</button>
<button type='button' class='btn btn-outline-primary'>Quarterly</button>
<button type='button' class='btn btn-outline-primary'>Annual</button>
</div>
</div>
<div class='card-body'>
<div class='table-responsive'>
<table class='table table-hover mb-0'>
<thead class='table-light'>
<tr>
<th>Category</th>
<th>Revenue</th>
<th>Orders</th>
<th>Avg Value</th>
<th class='text-end'>Trend</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class='badge bg-primary me-2'>A</span>Enterprise Solutions</td>
<td><strong>$1,245,000</strong></td>
<td>142</td>
<td>$8,768</td>
<td class='text-end'><span class='badge bg-success'>+12%</span></td>
</tr>
<tr>
<td><span class='badge bg-success me-2'>B</span>Professional Services</td>
<td><strong>$687,500</strong></td>
<td>458</td>
<td>$1,501</td>
<td class='text-end'><span class='badge bg-success'>+18%</span></td>
</tr>
<tr>
<td><span class='badge bg-info me-2'>C</span>Standard Packages</td>
<td><strong>$412,300</strong></td>
<td>891</td>
<td>$463</td>
<td class='text-end'><span class='badge bg-success'>+8%</span></td>
</tr>
<tr>
<td><span class='badge bg-warning me-2'>D</span>Custom Development</td>
<td><strong>$55,200</strong></td>
<td>12</td>
<td>$4,600</td>
<td class='text-end'><span class='badge bg-danger'>-3%</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class='col-md-4'>
<div class='card shadow-sm'>
<div class='card-header bg-white'>
<h5 class='mb-0'>Quick Actions</h5>
</div>
<div class='card-body'>
<div class='d-grid gap-2'>
<button class='btn btn-primary'>Generate Full Report</button>
<button class='btn btn-outline-primary'>Export to Excel</button>
<button class='btn btn-outline-secondary'>Schedule Email</button>
<button class='btn btn-outline-info'>Share Dashboard</button>
</div>
</div>
</div>
<div class='card shadow-sm mt-3'>
<div class='card-header bg-white'>
<h5 class='mb-0'>Key Insights</h5>
</div>
<div class='card-body'>
<div class='alert alert-success mb-2'>
<small><strong>Top Performer:</strong> Enterprise Solutions leading revenue growth</small>
</div>
<div class='alert alert-info mb-2'>
<small><strong>Growth Driver:</strong> Professional Services showing strongest customer acquisition</small>
</div>
<div class='alert alert-warning mb-0'>
<small><strong>Attention Needed:</strong> Custom Development segment requires review</small>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>";
var pdf = renderer.RenderHtmlAsPdf(bootstrapDashboard);
pdf.SaveAs("business-dashboard.pdf");using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
var renderer = new ChromePdfRenderer();
string bootstrapDashboard = @"
<!DOCTYPE html>
<html>
<head>
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'>
<style>
.metric-card { transition: transform 0.2s; }
.metric-card:hover { transform: translateY(-5px); }
.trend-up { color: #28a745; }
.trend-down { color: #dc3545; }
</style>
</head>
<body>
<div class='container-fluid py-4'>
<div class='d-flex justify-content-between align-items-center mb-4'>
<h1 class='display-5'>Business Performance Dashboard</h1>
<div class='text-muted'>Last updated: March 2025</div>
</div>
<div class='row g-4 mb-4'>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-primary border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Total Revenue</h6>
<span class='badge bg-primary'>Q1 2025</span>
</div>
<h2 class='mb-1'>$2.4M</h2>
<div class='trend-up'>
<i>↑</i> <strong>+18.5%</strong> from last quarter
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-success border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>New Customers</h6>
<span class='badge bg-success'>Active</span>
</div>
<h2 class='mb-1'>1,284</h2>
<div class='trend-up'>
<i>↑</i> <strong>+24.3%</strong> growth rate
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-warning border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Avg Order Value</h6>
<span class='badge bg-warning text-dark'>Updated</span>
</div>
<h2 class='mb-1'>$1,847</h2>
<div class='trend-up'>
<i>↑</i> <strong>+5.2%</strong> increase
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-info border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Satisfaction Rate</h6>
<span class='badge bg-info'>Excellent</span>
</div>
<h2 class='mb-1'>94.7%</h2>
<div class='trend-up'>
<i>↑</i> <strong>+2.1pts</strong> improvement
</div>
</div>
</div>
</div>
</div>
<div class='row g-4'>
<div class='col-md-8'>
<div class='card shadow-sm'>
<div class='card-header bg-white d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Revenue Breakdown by Category</h5>
<div class='btn-group btn-group-sm' role='group'>
<button type='button' class='btn btn-outline-primary active'>Monthly</button>
<button type='button' class='btn btn-outline-primary'>Quarterly</button>
<button type='button' class='btn btn-outline-primary'>Annual</button>
</div>
</div>
<div class='card-body'>
<div class='table-responsive'>
<table class='table table-hover mb-0'>
<thead class='table-light'>
<tr>
<th>Category</th>
<th>Revenue</th>
<th>Orders</th>
<th>Avg Value</th>
<th class='text-end'>Trend</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class='badge bg-primary me-2'>A</span>Enterprise Solutions</td>
<td><strong>$1,245,000</strong></td>
<td>142</td>
<td>$8,768</td>
<td class='text-end'><span class='badge bg-success'>+12%</span></td>
</tr>
<tr>
<td><span class='badge bg-success me-2'>B</span>Professional Services</td>
<td><strong>$687,500</strong></td>
<td>458</td>
<td>$1,501</td>
<td class='text-end'><span class='badge bg-success'>+18%</span></td>
</tr>
<tr>
<td><span class='badge bg-info me-2'>C</span>Standard Packages</td>
<td><strong>$412,300</strong></td>
<td>891</td>
<td>$463</td>
<td class='text-end'><span class='badge bg-success'>+8%</span></td>
</tr>
<tr>
<td><span class='badge bg-warning me-2'>D</span>Custom Development</td>
<td><strong>$55,200</strong></td>
<td>12</td>
<td>$4,600</td>
<td class='text-end'><span class='badge bg-danger'>-3%</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class='col-md-4'>
<div class='card shadow-sm'>
<div class='card-header bg-white'>
<h5 class='mb-0'>Quick Actions</h5>
</div>
<div class='card-body'>
<div class='d-grid gap-2'>
<button class='btn btn-primary'>Generate Full Report</button>
<button class='btn btn-outline-primary'>Export to Excel</button>
<button class='btn btn-outline-secondary'>Schedule Email</button>
<button class='btn btn-outline-info'>Share Dashboard</button>
</div>
</div>
</div>
<div class='card shadow-sm mt-3'>
<div class='card-header bg-white'>
<h5 class='mb-0'>Key Insights</h5>
</div>
<div class='card-body'>
<div class='alert alert-success mb-2'>
<small><strong>Top Performer:</strong> Enterprise Solutions leading revenue growth</small>
</div>
<div class='alert alert-info mb-2'>
<small><strong>Growth Driver:</strong> Professional Services showing strongest customer acquisition</small>
</div>
<div class='alert alert-warning mb-0'>
<small><strong>Attention Needed:</strong> Custom Development segment requires review</small>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>";
var pdf = renderer.RenderHtmlAsPdf(bootstrapDashboard);
pdf.SaveAs("business-dashboard.pdf");Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
Dim renderer = New ChromePdfRenderer()
Dim bootstrapDashboard As String = "
<!DOCTYPE html>
<html>
<head>
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'>
<style>
.metric-card { transition: transform 0.2s; }
.metric-card:hover { transform: translateY(-5px); }
.trend-up { color: #28a745; }
.trend-down { color: #dc3545; }
</style>
</head>
<body>
<div class='container-fluid py-4'>
<div class='d-flex justify-content-between align-items-center mb-4'>
<h1 class='display-5'>Business Performance Dashboard</h1>
<div class='text-muted'>Last updated: March 2025</div>
</div>
<div class='row g-4 mb-4'>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-primary border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Total Revenue</h6>
<span class='badge bg-primary'>Q1 2025</span>
</div>
<h2 class='mb-1'>$2.4M</h2>
<div class='trend-up'>
<i>↑</i> <strong>+18.5%</strong> from last quarter
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-success border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>New Customers</h6>
<span class='badge bg-success'>Active</span>
</div>
<h2 class='mb-1'>1,284</h2>
<div class='trend-up'>
<i>↑</i> <strong>+24.3%</strong> growth rate
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-warning border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Avg Order Value</h6>
<span class='badge bg-warning text-dark'>Updated</span>
</div>
<h2 class='mb-1'>$1,847</h2>
<div class='trend-up'>
<i>↑</i> <strong>+5.2%</strong> increase
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-info border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Satisfaction Rate</h6>
<span class='badge bg-info'>Excellent</span>
</div>
<h2 class='mb-1'>94.7%</h2>
<div class='trend-up'>
<i>↑</i> <strong>+2.1pts</strong> improvement
</div>
</div>
</div>
</div>
</div>
<div class='row g-4'>
<div class='col-md-8'>
<div class='card shadow-sm'>
<div class='card-header bg-white d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Revenue Breakdown by Category</h5>
<div class='btn-group btn-group-sm' role='group'>
<button type='button' class='btn btn-outline-primary active'>Monthly</button>
<button type='button' class='btn btn-outline-primary'>Quarterly</button>
<button type='button' class='btn btn-outline-primary'>Annual</button>
</div>
</div>
<div class='card-body'>
<div class='table-responsive'>
<table class='table table-hover mb-0'>
<thead class='table-light'>
<tr>
<th>Category</th>
<th>Revenue</th>
<th>Orders</th>
<th>Avg Value</th>
<th class='text-end'>Trend</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class='badge bg-primary me-2'>A</span>Enterprise Solutions</td>
<td><strong>$1,245,000</strong></td>
<td>142</td>
<td>$8,768</td>
<td class='text-end'><span class='badge bg-success'>+12%</span></td>
</tr>
<tr>
<td><span class='badge bg-success me-2'>B</span>Professional Services</td>
<td><strong>$687,500</strong></td>
<td>458</td>
<td>$1,501</td>
<td class='text-end'><span class='badge bg-success'>+18%</span></td>
</tr>
<tr>
<td><span class='badge bg-info me-2'>C</span>Standard Packages</td>
<td><strong>$412,300</strong></td>
<td>891</td>
<td>$463</td>
<td class='text-end'><span class='badge bg-success'>+8%</span></td>
</tr>
<tr>
<td><span class='badge bg-warning me-2'>D</span>Custom Development</td>
<td><strong>$55,200</strong></td>
<td>12</td>
<td>$4,600</td>
<td class='text-end'><span class='badge bg-danger'>-3%</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class='col-md-4'>
<div class='card shadow-sm'>
<div class='card-header bg-white'>
<h5 class='mb-0'>Quick Actions</h5>
</div>
<div class='card-body'>
<div class='d-grid gap-2'>
<button class='btn btn-primary'>Generate Full Report</button>
<button class='btn btn-outline-primary'>Export to Excel</button>
<button class='btn btn-outline-secondary'>Schedule Email</button>
<button class='btn btn-outline-info'>Share Dashboard</button>
</div>
</div>
</div>
<div class='card shadow-sm mt-3'>
<div class='card-header bg-white'>
<h5 class='mb-0'>Key Insights</h5>
</div>
<div class='card-body'>
<div class='alert alert-success mb-2'>
<small><strong>Top Performer:</strong> Enterprise Solutions leading revenue growth</small>
</div>
<div class='alert alert-info mb-2'>
<small><strong>Growth Driver:</strong> Professional Services showing strongest customer acquisition</small>
</div>
<div class='alert alert-warning mb-0'>
<small><strong>Attention Needed:</strong> Custom Development segment requires review</small>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>"
Dim pdf = renderer.RenderHtmlAsPdf(bootstrapDashboard)
pdf.SaveAs("business-dashboard.pdf")Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
Dim renderer = New ChromePdfRenderer()
Dim bootstrapDashboard As String = "
<!DOCTYPE html>
<html>
<head>
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'>
<style>
.metric-card { transition: transform 0.2s; }
.metric-card:hover { transform: translateY(-5px); }
.trend-up { color: #28a745; }
.trend-down { color: #dc3545; }
</style>
</head>
<body>
<div class='container-fluid py-4'>
<div class='d-flex justify-content-between align-items-center mb-4'>
<h1 class='display-5'>Business Performance Dashboard</h1>
<div class='text-muted'>Last updated: March 2025</div>
</div>
<div class='row g-4 mb-4'>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-primary border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Total Revenue</h6>
<span class='badge bg-primary'>Q1 2025</span>
</div>
<h2 class='mb-1'>$2.4M</h2>
<div class='trend-up'>
<i>↑</i> <strong>+18.5%</strong> from last quarter
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-success border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>New Customers</h6>
<span class='badge bg-success'>Active</span>
</div>
<h2 class='mb-1'>1,284</h2>
<div class='trend-up'>
<i>↑</i> <strong>+24.3%</strong> growth rate
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-warning border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Avg Order Value</h6>
<span class='badge bg-warning text-dark'>Updated</span>
</div>
<h2 class='mb-1'>$1,847</h2>
<div class='trend-up'>
<i>↑</i> <strong>+5.2%</strong> increase
</div>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card metric-card shadow-sm border-start border-info border-4'>
<div class='card-body'>
<div class='d-flex justify-content-between align-items-center mb-2'>
<h6 class='text-muted text-uppercase mb-0'>Satisfaction Rate</h6>
<span class='badge bg-info'>Excellent</span>
</div>
<h2 class='mb-1'>94.7%</h2>
<div class='trend-up'>
<i>↑</i> <strong>+2.1pts</strong> improvement
</div>
</div>
</div>
</div>
</div>
<div class='row g-4'>
<div class='col-md-8'>
<div class='card shadow-sm'>
<div class='card-header bg-white d-flex justify-content-between align-items-center'>
<h5 class='mb-0'>Revenue Breakdown by Category</h5>
<div class='btn-group btn-group-sm' role='group'>
<button type='button' class='btn btn-outline-primary active'>Monthly</button>
<button type='button' class='btn btn-outline-primary'>Quarterly</button>
<button type='button' class='btn btn-outline-primary'>Annual</button>
</div>
</div>
<div class='card-body'>
<div class='table-responsive'>
<table class='table table-hover mb-0'>
<thead class='table-light'>
<tr>
<th>Category</th>
<th>Revenue</th>
<th>Orders</th>
<th>Avg Value</th>
<th class='text-end'>Trend</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class='badge bg-primary me-2'>A</span>Enterprise Solutions</td>
<td><strong>$1,245,000</strong></td>
<td>142</td>
<td>$8,768</td>
<td class='text-end'><span class='badge bg-success'>+12%</span></td>
</tr>
<tr>
<td><span class='badge bg-success me-2'>B</span>Professional Services</td>
<td><strong>$687,500</strong></td>
<td>458</td>
<td>$1,501</td>
<td class='text-end'><span class='badge bg-success'>+18%</span></td>
</tr>
<tr>
<td><span class='badge bg-info me-2'>C</span>Standard Packages</td>
<td><strong>$412,300</strong></td>
<td>891</td>
<td>$463</td>
<td class='text-end'><span class='badge bg-success'>+8%</span></td>
</tr>
<tr>
<td><span class='badge bg-warning me-2'>D</span>Custom Development</td>
<td><strong>$55,200</strong></td>
<td>12</td>
<td>$4,600</td>
<td class='text-end'><span class='badge bg-danger'>-3%</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class='col-md-4'>
<div class='card shadow-sm'>
<div class='card-header bg-white'>
<h5 class='mb-0'>Quick Actions</h5>
</div>
<div class='card-body'>
<div class='d-grid gap-2'>
<button class='btn btn-primary'>Generate Full Report</button>
<button class='btn btn-outline-primary'>Export to Excel</button>
<button class='btn btn-outline-secondary'>Schedule Email</button>
<button class='btn btn-outline-info'>Share Dashboard</button>
</div>
</div>
</div>
<div class='card shadow-sm mt-3'>
<div class='card-header bg-white'>
<h5 class='mb-0'>Key Insights</h5>
</div>
<div class='card-body'>
<div class='alert alert-success mb-2'>
<small><strong>Top Performer:</strong> Enterprise Solutions leading revenue growth</small>
</div>
<div class='alert alert-info mb-2'>
<small><strong>Growth Driver:</strong> Professional Services showing strongest customer acquisition</small>
</div>
<div class='alert alert-warning mb-0'>
<small><strong>Attention Needed:</strong> Custom Development segment requires review</small>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>"
Dim pdf = renderer.RenderHtmlAsPdf(bootstrapDashboard)
pdf.SaveAs("business-dashboard.pdf")出力例: Bootstrap 5のフレックスボックスベースのグリッドシステム、ボーダーユーティリティ付きカードコンポーネント、バッジ要素、レスポンシブテーブル、色分けされたメトリクスを備えたプロフェッショナルなビジネスダッシュボードPDF。すべてのレイアウトとタイポグラフィが完璧に保持されてレンダリングされます。
ApryseのCSSフレームワークの制限
ApryseのHTML2PDFモジュールは、独自のレンダリングエンジン(Chromiumではありません)を使用しており、以下のような制限が文書化されています。
- Flexboxの部分的なサポート: Bootstrap 4/5のレイアウトが正しく表示されない場合があります
- CSS Gridの制限: モダンなグリッドベースのデザインは多くの場合失敗します
- JavaScriptの制約: ブラウザ環境と比べて実行が最小限です
- フレームワーク互換性: Bootstrapコンポーネントには広範なテストが必要です
HTML2PDFのドキュメントでは、複雑なCSSが期待通りにレンダリングされない可能性があると明記されています。開発者からは、ナビゲーションバー、flexベースのカードレイアウト、レスポンシブユーティリティに関する問題が報告されています。
開発への影響: Apryseを使用するチームは、「PDF対応」CSSを並行して作成するか、Bootstrapレイアウトを大幅に簡素化する必要があり、開発工数が増加し、WebとPDF出力間のデザイン一貫性が制限されます。
完全なBootstrapフレームワークサポートとCSS3レンダリングについては、Bootstrap & Flexbox CSSガイドをご覧ください。
PDFの結合と分割
IronPDFを使えば、複数のPDFドキュメントを結合したり、PDFを小さなファイルに分割したりすることが簡単にできます。この機能は、PDFコンテンツの構造を整理する必要があるドキュメント管理システムにとって不可欠です。
using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Define HTML content for two PDFs to merge
var htmlA = @"
<h1>PDF A</h1>
<p>This is the content of PDF A.</p>
<p>This is the first page of PDF A.</p>
<div style='page-break-after: always;'></div>
<p>This is the second page of PDF A.</p>";
var htmlB = @"
<h1>PDF B</h1>
<p>This is the content of PDF B.</p>
<p>This is the first page of PDF B.</p>
<div style='page-break-after: always;'></div>
<p>This is the second page of PDF B.</p>";
// Instantiate a PDF renderer
var renderer = new ChromePdfRenderer();
// Render the HTML content as separate PDF documents
var pdfDocA = renderer.RenderHtmlAsPdf(htmlA);
var pdfDocB = renderer.RenderHtmlAsPdf(htmlB);
// Merge the two PDFs into one
var mergedPdf = PdfDocument.Merge(pdfDocA, pdfDocB);
// Save the merged PDF to a file
mergedPdf.SaveAs("Merged.pdf");using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Define HTML content for two PDFs to merge
var htmlA = @"
<h1>PDF A</h1>
<p>This is the content of PDF A.</p>
<p>This is the first page of PDF A.</p>
<div style='page-break-after: always;'></div>
<p>This is the second page of PDF A.</p>";
var htmlB = @"
<h1>PDF B</h1>
<p>This is the content of PDF B.</p>
<p>This is the first page of PDF B.</p>
<div style='page-break-after: always;'></div>
<p>This is the second page of PDF B.</p>";
// Instantiate a PDF renderer
var renderer = new ChromePdfRenderer();
// Render the HTML content as separate PDF documents
var pdfDocA = renderer.RenderHtmlAsPdf(htmlA);
var pdfDocB = renderer.RenderHtmlAsPdf(htmlB);
// Merge the two PDFs into one
var mergedPdf = PdfDocument.Merge(pdfDocA, pdfDocB);
// Save the merged PDF to a file
mergedPdf.SaveAs("Merged.pdf");Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Define HTML content for two PDFs to merge
Dim htmlA = "
<h1>PDF A</h1>
<p>This is the content of PDF A.</p>
<p>This is the first page of PDF A.</p>
<div style='page-break-after: always;'></div>
<p>This is the second page of PDF A.</p>"
Dim htmlB = "
<h1>PDF B</h1>
<p>This is the content of PDF B.</p>
<p>This is the first page of PDF B.</p>
<div style='page-break-after: always;'></div>
<p>This is the second page of PDF B.</p>"
' Instantiate a PDF renderer
Dim renderer = New ChromePdfRenderer()
' Render the HTML content as separate PDF documents
Dim pdfDocA = renderer.RenderHtmlAsPdf(htmlA)
Dim pdfDocB = renderer.RenderHtmlAsPdf(htmlB)
' Merge the two PDFs into one
Dim mergedPdf = PdfDocument.Merge(pdfDocA, pdfDocB)
' Save the merged PDF to a file
mergedPdf.SaveAs("Merged.pdf")Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Define HTML content for two PDFs to merge
Dim htmlA = "
<h1>PDF A</h1>
<p>This is the content of PDF A.</p>
<p>This is the first page of PDF A.</p>
<div style='page-break-after: always;'></div>
<p>This is the second page of PDF A.</p>"
Dim htmlB = "
<h1>PDF B</h1>
<p>This is the content of PDF B.</p>
<p>This is the first page of PDF B.</p>
<div style='page-break-after: always;'></div>
<p>This is the second page of PDF B.</p>"
' Instantiate a PDF renderer
Dim renderer = New ChromePdfRenderer()
' Render the HTML content as separate PDF documents
Dim pdfDocA = renderer.RenderHtmlAsPdf(htmlA)
Dim pdfDocB = renderer.RenderHtmlAsPdf(htmlB)
' Merge the two PDFs into one
Dim mergedPdf = PdfDocument.Merge(pdfDocA, pdfDocB)
' Save the merged PDF to a file
mergedPdf.SaveAs("Merged.pdf")PDFへのウォーターマーク追加
IronPDFを使用すると、PDFページにウォーターマークを追加してブランディングや機密文書のマーキングが可能です。ライブラリがテキストおよび画像ウォーターマークの複雑さを管理し、柔軟な適用と表示を実現します。
using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate a PDF renderer
var renderer = new ChromePdfRenderer();
// Render a URL as a PDF
var pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");
// Apply a watermark to the PDF
pdf.ApplyWatermark("<h2 style='color:red'>SAMPLE</h2>", 30, IronPdf.Editing.VerticalAlignment.Middle, IronPdf.Editing.HorizontalAlignment.Center);
// Save the watermarked PDF to a file
pdf.SaveAs("Watermarked.pdf");using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate a PDF renderer
var renderer = new ChromePdfRenderer();
// Render a URL as a PDF
var pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");
// Apply a watermark to the PDF
pdf.ApplyWatermark("<h2 style='color:red'>SAMPLE</h2>", 30, IronPdf.Editing.VerticalAlignment.Middle, IronPdf.Editing.HorizontalAlignment.Center);
// Save the watermarked PDF to a file
pdf.SaveAs("Watermarked.pdf");Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Instantiate a PDF renderer
Dim renderer As New ChromePdfRenderer()
' Render a URL as a PDF
Dim pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf")
' Apply a watermark to the PDF
pdf.ApplyWatermark("<h2 style='color:red'>SAMPLE</h2>", 30, IronPdf.Editing.VerticalAlignment.Middle, IronPdf.Editing.HorizontalAlignment.Center)
' Save the watermarked PDF to a file
pdf.SaveAs("Watermarked.pdf")Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Instantiate a PDF renderer
Dim renderer As New ChromePdfRenderer()
' Render a URL as a PDF
Dim pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf")
' Apply a watermark to the PDF
pdf.ApplyWatermark("<h2 style='color:red'>SAMPLE</h2>", 30, IronPdf.Editing.VerticalAlignment.Middle, IronPdf.Editing.HorizontalAlignment.Center)
' Save the watermarked PDF to a file
pdf.SaveAs("Watermarked.pdf")PDFフォームを操作するには?
IronPDFは、インタラクティブなPDFフォームの完全な操作をサポートしています。フォームの作成、入力、送信をプログラムで行うことができ、フォーム処理の自動化やワークフローへのフォームデータ収集の統合に特に便利です。
using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Define HTML content with form elements
const string formHtml = @"
<html>
<body>
<h2>Employee Information Form</h2>
<form>
First name: <br>
Last name: <br>
<br>
<p>Please select your department:</p>
<select name='department'>
<option value='HR'>HR</option>
<option value='Finance'>Finance</option>
<option value='IT'>IT</option>
<option value='Marketing'>Marketing</option>
</select>
<br>
<br>
<p>Please select your employment status:</p>
<label for='fulltime'>Full-time</label> <br>
<label for='parttime'>Part-time</label> <br>
<br>
<p>Please select your skills:</p>
<label for='skill1'> Programming</label><br>
<label for='skill2'> Design</label><br>
<label for='skill3'> Marketing</label><br>
</form>
</body>
</html>";
// Instantiate a PDF renderer
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
// Render the HTML form content as a PDF
renderer.RenderHtmlAsPdf(formHtml).SaveAs("EmployeeInfoForm.pdf");using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Define HTML content with form elements
const string formHtml = @"
<html>
<body>
<h2>Employee Information Form</h2>
<form>
First name: <br>
Last name: <br>
<br>
<p>Please select your department:</p>
<select name='department'>
<option value='HR'>HR</option>
<option value='Finance'>Finance</option>
<option value='IT'>IT</option>
<option value='Marketing'>Marketing</option>
</select>
<br>
<br>
<p>Please select your employment status:</p>
<label for='fulltime'>Full-time</label> <br>
<label for='parttime'>Part-time</label> <br>
<br>
<p>Please select your skills:</p>
<label for='skill1'> Programming</label><br>
<label for='skill2'> Design</label><br>
<label for='skill3'> Marketing</label><br>
</form>
</body>
</html>";
// Instantiate a PDF renderer
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
// Render the HTML form content as a PDF
renderer.RenderHtmlAsPdf(formHtml).SaveAs("EmployeeInfoForm.pdf");Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Define HTML content with form elements
Const formHtml As String = "
<html>
<body>
<h2>Employee Information Form</h2>
<form>
First name: <br>
Last name: <br>
<br>
<p>Please select your department:</p>
<select name='department'>
<option value='HR'>HR</option>
<option value='Finance'>Finance</option>
<option value='IT'>IT</option>
<option value='Marketing'>Marketing</option>
</select>
<br>
<br>
<p>Please select your employment status:</p>
<label for='fulltime'>Full-time</label> <br>
<label for='parttime'>Part-time</label> <br>
<br>
<p>Please select your skills:</p>
<label for='skill1'> Programming</label><br>
<label for='skill2'> Design</label><br>
<label for='skill3'> Marketing</label><br>
</form>
</body>
</html>"
' Instantiate a PDF renderer
Dim renderer = New ChromePdfRenderer()
renderer.RenderingOptions.CreatePdfFormsFromHtml = True
' Render the HTML form content as a PDF
renderer.RenderHtmlAsPdf(formHtml).SaveAs("EmployeeInfoForm.pdf")Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Define HTML content with form elements
Const formHtml As String = "
<html>
<body>
<h2>Employee Information Form</h2>
<form>
First name: <br>
Last name: <br>
<br>
<p>Please select your department:</p>
<select name='department'>
<option value='HR'>HR</option>
<option value='Finance'>Finance</option>
<option value='IT'>IT</option>
<option value='Marketing'>Marketing</option>
</select>
<br>
<br>
<p>Please select your employment status:</p>
<label for='fulltime'>Full-time</label> <br>
<label for='parttime'>Part-time</label> <br>
<br>
<p>Please select your skills:</p>
<label for='skill1'> Programming</label><br>
<label for='skill2'> Design</label><br>
<label for='skill3'> Marketing</label><br>
</form>
</body>
</html>"
' Instantiate a PDF renderer
Dim renderer = New ChromePdfRenderer()
renderer.RenderingOptions.CreatePdfFormsFromHtml = True
' Render the HTML form content as a PDF
renderer.RenderHtmlAsPdf(formHtml).SaveAs("EmployeeInfoForm.pdf")
PDFのセキュリティと暗号化はどうする?
IronPDFは、暗号化、権限設定、デジタル署名など、PDFドキュメントのセキュリティ機能を提供します。これにより、機密情報の保護やドキュメントの完全性維持が可能です。
using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Load an existing PDF file
var pdf = PdfDocument.FromFile("invoice.pdf");
// Set document security settings
pdf.SecuritySettings.OwnerPassword = "top-secret"; // Password to edit the PDF
pdf.SecuritySettings.UserPassword = "sharable"; // Password to open the PDF
// Save the secured PDF to a file
pdf.SaveAs("secured.pdf");using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Load an existing PDF file
var pdf = PdfDocument.FromFile("invoice.pdf");
// Set document security settings
pdf.SecuritySettings.OwnerPassword = "top-secret"; // Password to edit the PDF
pdf.SecuritySettings.UserPassword = "sharable"; // Password to open the PDF
// Save the secured PDF to a file
pdf.SaveAs("secured.pdf");Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Load an existing PDF file
Dim pdf = PdfDocument.FromFile("invoice.pdf")
' Set document security settings
pdf.SecuritySettings.OwnerPassword = "top-secret" ' Password to edit the PDF
pdf.SecuritySettings.UserPassword = "sharable" ' Password to open the PDF
' Save the secured PDF to a file
pdf.SaveAs("secured.pdf")Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Load an existing PDF file
Dim pdf = PdfDocument.FromFile("invoice.pdf")
' Set document security settings
pdf.SecuritySettings.OwnerPassword = "top-secret" ' Password to edit the PDF
pdf.SecuritySettings.UserPassword = "sharable" ' Password to open the PDF
' Save the secured PDF to a file
pdf.SaveAs("secured.pdf")
高度な編集オプションにはどのようなものがありますか?
IronPDFは、基本的な修正を超えた高度な編集機能を提供しています。これには、ヘッダーとフッターの追加、ページレイアウトのカスタマイズ、画像やフォントの埋め込みなどが含まれます。これらの機能により、アプリケーションの要件に合わせた動的なPDF生成やカスタマイズが可能になります。
using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate a PDF renderer
var renderer = new IronPdf.ChromePdfRenderer();
// Define multi-page HTML content with page breaks
var multiPageHtml = @"
<p> This is 1st Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 2nd Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 3rd Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 4th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 5th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 6th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 7th Page</p>";
// Render the HTML content as a PDF
var pdfDoc = renderer.RenderHtmlAsPdf(multiPageHtml);
// Create a header for the first page only
var firstPageHeader = new HtmlHeaderFooter();
firstPageHeader.HtmlFragment = "This is the First Page Header";
pdfDoc.AddHtmlHeaders(firstPageHeader, 1);
// Save the resulting PDF with headers to a file
pdfDoc.SaveAs("PagesWithHeaders.pdf");using IronPdf;
// Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here";
// Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate a PDF renderer
var renderer = new IronPdf.ChromePdfRenderer();
// Define multi-page HTML content with page breaks
var multiPageHtml = @"
<p> This is 1st Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 2nd Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 3rd Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 4th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 5th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 6th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 7th Page</p>";
// Render the HTML content as a PDF
var pdfDoc = renderer.RenderHtmlAsPdf(multiPageHtml);
// Create a header for the first page only
var firstPageHeader = new HtmlHeaderFooter();
firstPageHeader.HtmlFragment = "This is the First Page Header";
pdfDoc.AddHtmlHeaders(firstPageHeader, 1);
// Save the resulting PDF with headers to a file
pdfDoc.SaveAs("PagesWithHeaders.pdf");Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Instantiate a PDF renderer
Dim renderer = New IronPdf.ChromePdfRenderer()
' Define multi-page HTML content with page breaks
Dim multiPageHtml = "
<p> This is 1st Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 2nd Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 3rd Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 4th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 5th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 6th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 7th Page</p>"
' Render the HTML content as a PDF
Dim pdfDoc = renderer.RenderHtmlAsPdf(multiPageHtml)
' Create a header for the first page only
Dim firstPageHeader = New HtmlHeaderFooter()
firstPageHeader.HtmlFragment = "This is the First Page Header"
pdfDoc.AddHtmlHeaders(firstPageHeader, 1)
' Save the resulting PDF with headers to a file
pdfDoc.SaveAs("PagesWithHeaders.pdf")Imports IronPdf
' Set your IronPDF license key
IronPdf.License.LicenseKey = "License-Key goes here"
' Secure the server environment to disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Instantiate a PDF renderer
Dim renderer = New IronPdf.ChromePdfRenderer()
' Define multi-page HTML content with page breaks
Dim multiPageHtml = "
<p> This is 1st Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 2nd Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 3rd Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 4th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 5th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 6th Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 7th Page</p>"
' Render the HTML content as a PDF
Dim pdfDoc = renderer.RenderHtmlAsPdf(multiPageHtml)
' Create a header for the first page only
Dim firstPageHeader = New HtmlHeaderFooter()
firstPageHeader.HtmlFragment = "This is the First Page Header"
pdfDoc.AddHtmlHeaders(firstPageHeader, 1)
' Save the resulting PDF with headers to a file
pdfDoc.SaveAs("PagesWithHeaders.pdf")
Apryse C#の高度な機能とは?
注釈やマークアップを追加するには?
Apryse C#では、PDFドキュメントに注釈やマークアップをプログラムで追加できます。これにはテキスト注釈、ハイライト、下線、図形などが含まれ、ドキュメントのレビューや補足情報の追加に不可欠です。
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
static void Main()
{
// Initialize the PDFNet library with your license key
PDFNet.Initialize("License");
// Open an existing PDF document
using (PDFDoc doc = new PDFDoc("input.pdf"))
{
// Access the first page of the document
Page page = doc.GetPage(1);
// Create a text annotation on the document
Text txt = Text.Create(doc, new Rect(10, 20, 30, 40));
txt.SetIcon("UserIcon");
txt.SetContents("It's an annotation!");
page.AnnotPushBack(txt);
// Save the modified document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
}
}
}using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
static void Main()
{
// Initialize the PDFNet library with your license key
PDFNet.Initialize("License");
// Open an existing PDF document
using (PDFDoc doc = new PDFDoc("input.pdf"))
{
// Access the first page of the document
Page page = doc.GetPage(1);
// Create a text annotation on the document
Text txt = Text.Create(doc, new Rect(10, 20, 30, 40));
txt.SetIcon("UserIcon");
txt.SetContents("It's an annotation!");
page.AnnotPushBack(txt);
// Save the modified document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
}
}
}Imports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Friend Class Program
Shared Sub Main()
' Initialize the PDFNet library with your license key
PDFNet.Initialize("License")
' Open an existing PDF document
Using doc As New PDFDoc("input.pdf")
' Access the first page of the document
Dim page As Page = doc.GetPage(1)
' Create a text annotation on the document
Dim txt As Text = Text.Create(doc, New Rect(10, 20, 30, 40))
txt.SetIcon("UserIcon")
txt.SetContents("It's an annotation!")
page.AnnotPushBack(txt)
' Save the modified document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
End Using
End Sub
End ClassImports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Friend Class Program
Shared Sub Main()
' Initialize the PDFNet library with your license key
PDFNet.Initialize("License")
' Open an existing PDF document
Using doc As New PDFDoc("input.pdf")
' Access the first page of the document
Dim page As Page = doc.GetPage(1)
' Create a text annotation on the document
Dim txt As Text = Text.Create(doc, New Rect(10, 20, 30, 40))
txt.SetIcon("UserIcon")
txt.SetContents("It's an annotation!")
page.AnnotPushBack(txt)
' Save the modified document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
End Using
End Sub
End Class
ドキュメントをPDFに変換するには?
Apryse C#は、さまざまなドキュメント形式のPDFへの変換を可能にします。これにはOfficeドキュメント、画像、HTMLなどが含まれます。この機能により、アーカイブ、共有、表示のためにドキュメント形式を統一できます。
using pdftron;
using pdftron.PDF;
class Program
{
static void Main()
{
// Initialize the PDFNet library
PDFNet.Initialize();
// Create a new PDF document
PDFDoc pdfdoc = new PDFDoc();
// Convert a Word document to PDF and add it to the PDF document
Convert.ToPdf(pdfdoc, "input.docx");
// Save the newly created PDF document
pdfdoc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
}
}using pdftron;
using pdftron.PDF;
class Program
{
static void Main()
{
// Initialize the PDFNet library
PDFNet.Initialize();
// Create a new PDF document
PDFDoc pdfdoc = new PDFDoc();
// Convert a Word document to PDF and add it to the PDF document
Convert.ToPdf(pdfdoc, "input.docx");
// Save the newly created PDF document
pdfdoc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
}
}Imports pdftron
Imports pdftron.PDF
Friend Class Program
Shared Sub Main()
' Initialize the PDFNet library
PDFNet.Initialize()
' Create a new PDF document
Dim pdfdoc As New PDFDoc()
' Convert a Word document to PDF and add it to the PDF document
Convert.ToPdf(pdfdoc, "input.docx")
' Save the newly created PDF document
pdfdoc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
End Sub
End ClassImports pdftron
Imports pdftron.PDF
Friend Class Program
Shared Sub Main()
' Initialize the PDFNet library
PDFNet.Initialize()
' Create a new PDF document
Dim pdfdoc As New PDFDoc()
' Convert a Word document to PDF and add it to the PDF document
Convert.ToPdf(pdfdoc, "input.docx")
' Save the newly created PDF document
pdfdoc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
End Sub
End ClassPDFからコンテンツを抽出するには?
Apryse C#は、PDFドキュメントからテキスト、画像、その他のコンテンツの抽出に優れています。この機能は、コンテンツ分析、データ抽出、情報検索アプリケーションをサポートし、効率的なPDFコンテンツ処理を実現します。
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
static void Main()
{
// Initialize the PDFNet library
PDFNet.Initialize();
// Open an existing PDF document
using (PDFDoc doc = new PDFDoc("input.pdf"))
{
// Iterate through each page of the document
PageIterator itr = doc.GetPageIterator();
for (; itr.HasNext(); itr.Next())
{
Page page = itr.Current();
// Extract text from the page
TextExtractor txt = new TextExtractor();
txt.Begin(page);
// Print the extracted text to the console
Console.WriteLine(txt.GetAsText());
}
}
}
}using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
static void Main()
{
// Initialize the PDFNet library
PDFNet.Initialize();
// Open an existing PDF document
using (PDFDoc doc = new PDFDoc("input.pdf"))
{
// Iterate through each page of the document
PageIterator itr = doc.GetPageIterator();
for (; itr.HasNext(); itr.Next())
{
Page page = itr.Current();
// Extract text from the page
TextExtractor txt = new TextExtractor();
txt.Begin(page);
// Print the extracted text to the console
Console.WriteLine(txt.GetAsText());
}
}
}
}Imports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Friend Class Program
Shared Sub Main()
' Initialize the PDFNet library
PDFNet.Initialize()
' Open an existing PDF document
Using doc As New PDFDoc("input.pdf")
' Iterate through each page of the document
Dim itr As PageIterator = doc.GetPageIterator()
Do While itr.HasNext()
Dim page As Page = itr.Current()
' Extract text from the page
Dim txt As New TextExtractor()
txt.Begin(page)
' Print the extracted text to the console
Console.WriteLine(txt.GetAsText())
itr.Next()
Loop
End Using
End Sub
End ClassImports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Friend Class Program
Shared Sub Main()
' Initialize the PDFNet library
PDFNet.Initialize()
' Open an existing PDF document
Using doc As New PDFDoc("input.pdf")
' Iterate through each page of the document
Dim itr As PageIterator = doc.GetPageIterator()
Do While itr.HasNext()
Dim page As Page = itr.Current()
' Extract text from the page
Dim txt As New TextExtractor()
txt.Begin(page)
' Print the extracted text to the console
Console.WriteLine(txt.GetAsText())
itr.Next()
Loop
End Using
End Sub
End Class
ApryseでPDFを保護するには?
Apryse C#は、PDFドキュメントのセキュリティ確保のための完全なツールを提供します。パスワード保護の適用、ドキュメントの暗号化、ユーザー権限の管理により、機密情報を安全に保護できます。
using pdftron;
using pdftron.SDF;
using pdftron.PDF;
class Program
{
static void Main()
{
// Initialize the PDFNet library
PDFNet.Initialize();
// Open an existing PDF document
using (PDFDoc doc = new PDFDoc("input.pdf"))
{
// Initialize the security handler
doc.InitSecurityHandler();
// Create a new security handler
SecurityHandler newHandler = new SecurityHandler();
// Set the user password for the document
newHandler.ChangeUserPassword("new_password");
// Grant permission to print the document
newHandler.SetPermission(SecurityHandler.Permission.e_print, true);
// Apply the security handler to the document
doc.SetSecurityHandler(newHandler);
// Save the secured document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
}
}
}using pdftron;
using pdftron.SDF;
using pdftron.PDF;
class Program
{
static void Main()
{
// Initialize the PDFNet library
PDFNet.Initialize();
// Open an existing PDF document
using (PDFDoc doc = new PDFDoc("input.pdf"))
{
// Initialize the security handler
doc.InitSecurityHandler();
// Create a new security handler
SecurityHandler newHandler = new SecurityHandler();
// Set the user password for the document
newHandler.ChangeUserPassword("new_password");
// Grant permission to print the document
newHandler.SetPermission(SecurityHandler.Permission.e_print, true);
// Apply the security handler to the document
doc.SetSecurityHandler(newHandler);
// Save the secured document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
}
}
}Imports pdftron
Imports pdftron.SDF
Imports pdftron.PDF
Friend Class Program
Shared Sub Main()
' Initialize the PDFNet library
PDFNet.Initialize()
' Open an existing PDF document
Using doc As New PDFDoc("input.pdf")
' Initialize the security handler
doc.InitSecurityHandler()
' Create a new security handler
Dim newHandler As New SecurityHandler()
' Set the user password for the document
newHandler.ChangeUserPassword("new_password")
' Grant permission to print the document
newHandler.SetPermission(SecurityHandler.Permission.e_print, True)
' Apply the security handler to the document
doc.SetSecurityHandler(newHandler)
' Save the secured document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
End Using
End Sub
End ClassImports pdftron
Imports pdftron.SDF
Imports pdftron.PDF
Friend Class Program
Shared Sub Main()
' Initialize the PDFNet library
PDFNet.Initialize()
' Open an existing PDF document
Using doc As New PDFDoc("input.pdf")
' Initialize the security handler
doc.InitSecurityHandler()
' Create a new security handler
Dim newHandler As New SecurityHandler()
' Set the user password for the document
newHandler.ChangeUserPassword("new_password")
' Grant permission to print the document
newHandler.SetPermission(SecurityHandler.Permission.e_print, True)
' Apply the security handler to the document
doc.SetSecurityHandler(newHandler)
' Save the secured document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
End Using
End Sub
End Class機密情報を墨消しするには?
Apryse C#は、PDFドキュメントから機密情報の墨消しをサポートしています。これはコンプライアンスやプライバシーの観点から不可欠な機能であり、PDF内のテキストや画像を完全に削除または隠すことができます。
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
static void Main()
{
// Initialize the PDFNet library
PDFNet.Initialize();
// Open an existing PDF document
using (PDFDoc doc = new PDFDoc("input.pdf"))
{
// Define redaction areas on specific pages
Redactor.Redaction[] redactions = {
new Redactor.Redaction(1, new Rect(100, 100, 200, 200), false, "redacted"),
};
// Apply redactions to the document
Redactor.Redact(doc, redactions);
// Save the redacted document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
}
}
}using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
static void Main()
{
// Initialize the PDFNet library
PDFNet.Initialize();
// Open an existing PDF document
using (PDFDoc doc = new PDFDoc("input.pdf"))
{
// Define redaction areas on specific pages
Redactor.Redaction[] redactions = {
new Redactor.Redaction(1, new Rect(100, 100, 200, 200), false, "redacted"),
};
// Apply redactions to the document
Redactor.Redact(doc, redactions);
// Save the redacted document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
}
}
}Imports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Friend Class Program
Shared Sub Main()
' Initialize the PDFNet library
PDFNet.Initialize()
' Open an existing PDF document
Using doc As New PDFDoc("input.pdf")
' Define redaction areas on specific pages
Dim redactions() As Redactor.Redaction = { New Redactor.Redaction(1, New Rect(100, 100, 200, 200), False, "redacted")}
' Apply redactions to the document
Redactor.Redact(doc, redactions)
' Save the redacted document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
End Using
End Sub
End ClassImports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Friend Class Program
Shared Sub Main()
' Initialize the PDFNet library
PDFNet.Initialize()
' Open an existing PDF document
Using doc As New PDFDoc("input.pdf")
' Define redaction areas on specific pages
Dim redactions() As Redactor.Redaction = { New Redactor.Redaction(1, New Rect(100, 100, 200, 200), False, "redacted")}
' Apply redactions to the document
Redactor.Redact(doc, redactions)
' Save the redacted document
doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
End Using
End Sub
End Class利用可能なドキュメントとサポートは?
IronPDFはどのようなサポートを提供していますか?
ドキュメント: IronPDFは、完全なドキュメントを提供しており、はじめにガイドから、HTMLからPDFへの変換、PDF編集、結合、分割、セキュリティなどの高度な機能まで幅広くカバーしています。ドキュメントは、豊富なコード例と解説を交え、さまざまなPDF機能の実装方法を分かりやすく案内しています。
サポート: IronPDFは、メールサポート、チケットサポート、ライブのエンジニアリングサポートチャットなど、複数のチャネルを通じて支援を提供しています。技術チームと直接つながり、特定の問題について相談できます。アプリケーションは、フィードバックシステムを通じて即座に恩恵を受けることができます。

Apryse C#はどのようなサポートを提供していますか?
ドキュメント: Apryse C#(旧PDFTron for .NET)は、完全なAPIリファレンス、開発者ガイド、多様なPDF操作タスク向けのサンプルコードを含む詳細なドキュメントを提供しています。
サポート: Apryseは、技術チームとの直接メールによるコミュニケーションを通じて、トラブルシューティングや実装に関する質問に対応しています。また、Stack Overflowで質問することも可能です。
ライセンスオプションと価格は?
IronPDFのライセンスオプションは?
IronPDFは、さまざまなプロジェクトニーズに合わせたライセンスオプションを複数提供しています。価格はLiteライセンスで$999から始まります。これらのライセンスは、開発者数、拠点数、対象プロジェクト数によって異なります。IronPDFは、ロイヤリティフリーの再配布オプションや、アドオンごとの特定価格による拡張サポートも提供しています。
IronPDFの永続ライセンスオプションには以下が含まれます:
- Lite Edition: 価格は$999で、1開発者、1拠点、1プロジェクトに適しており、メールサポートが含まれます。
- Plus Edition: $1,499で、最大3開発者、3拠点、3プロジェクトをカバーし、24時間メール・チャットサポート、電話サポートが利用可能です。
- Professional Edition: $2,999で、最大10開発者、10拠点、10プロジェクトに対応し、メール、チャット、電話、画面共有サポートなど包括的なサポートを提供します。
また、月額$500で10,000APIコールを含むサブスクリプションも提供しており、追加コールは1回あたり$0.02です。無制限利用の場合は、見積もりベースの価格によるエンタープライズソリューションも用意されています。このソリューションには、無制限の永続ライセンスやAPIコールなど、さまざまな機能が含まれます。
Apryse C#のライセンスオプションとは?
Apryse C#は、機能、ドキュメントのボリューム、導入シナリオなど、特定のプロジェクト要件に基づいたカスタマイズ可能な価格設定を提供しています。Apryseの価格情報については、必ず営業チームにお問い合わせください。

どのPDFライブラリを選ぶべきですか?
IronPDFとApryse C#の両方が、PDFを扱う.NET開発者に効果的な機能を提供します。IronPDFは、豊富なPDF操作機能で優位性を発揮します。高度な編集やIronPDFによるPDF結合など、完全な機能を備えている点が特長です。Iron Suiteパッケージを利用すれば、コストパフォーマンスに優れた価格で複数のツールにアクセスでき、さまざまなニーズに対応する信頼性の高いユーティリティを開発に導入できます。
IronPDFは、ほとんどのPDF処理シナリオにおいて、総合的な汎用性と価値提案で際立っています。最終的な選択は、プロジェクト要件や開発に必要な特定の機能に合わせて決定してください。
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。
関連記事