フッターコンテンツにスキップ
移行ガイド

C#でPdfiumからIronPDFに移行する方法

PdfiumからIronPdfへの移行:完全なC#移行ガイド

Pdfium.NETからIronPDFに移行することで、.NET PDFワークフローはネイティブバイナリ依存のレンダリングに特化したライブラリから、プラットフォーム固有の複雑さなしに作成、操作、レンダリングを処理する包括的なPDFソリューションに移行します。 このガイドでは、Pdfiumでは提供できない機能を追加しながら、ネイティブの依存性管理を排除する完全でステップバイステップの移行パスを提供します。

なぜPdfiumからIronPDFに移行するのか

Pdfium.NETを理解する

Pdfium.NETは、GoogleのPDFiumライブラリの.NETラッパーで、PDF文書のレンダリングにおける効率性とスピードで有名です。 C#アプリケーション内でのPDFレンダリングの複雑さを掘り下げている開発者にとって重要なライブラリとして登場し、.NET環境でPDFコンテンツの忠実度の高い複製を提供します。

しかし、Pdfium.NETはレンダリングに長けているものの、PDF文書の作成と操作には限界があります。 主に、PDFコンテンツを正確に表示する必要があり、PDFの修正や新規作成にはあまり重点を置いていないアプリケーション向けに作られています。

重要な Pdfium の制限事項

1.レンダリング専用:HTML、画像、プログラムからPDFを作成することはできません。 Pdfiumの機能は、PDFの表示とレンダリングに制限されています。

2.PDFの操作はできません:PDFコンテンツの結合、分割、変更はできません。 iTextSharpやPdfSharpのような別のライブラリを使用する必要があります。

3.ネイティブバイナリ依存:プラットフォーム固有のPDFiumバイナリが必要です。 開発者はPDFiumのネイティブバイナリを管理する必要がありますが、これはデプロイや配布の際に複雑さを増す側面があります。

4.展開の複雑さ:x86、x64、およびランタイムフォルダを使用して、プラットフォームごとにネイティブDLLをバンドルし、管理する必要があります。

5.限定的なテキスト抽出: フォーマットなしの基本的なテキスト抽出。 テキスト抽出には、Pdfium.NETを使用する必要があります。

6.HTMLからPDFへの変換はできません:ウェブコンテンツをPDFに変換することはできません。 HTMLからPDFへの変換は、Pdfium.NETではネイティブにサポートされていません。

7.ヘッダー/フッターなし:ページ番号や繰り返しのコンテンツを追加することはできません。

8.透かしなし:オーバーレイで文書にスタンプを押すことはできません。

9.フォームをサポートしていません:PDF フォームへの入力や読み取りはできません。

10.セキュリティ機能はありません:PDFの暗号化やパスワード保護はできません。

PdfiumとIronPdfの比較

アスペクトPdfium.NETIronPDF
主な焦点レンダリング/ビューイング完全なPDFソリューション
レンダリング忠実度忠実度の高いレンダリング特にHTML/CSS/JSについては、高いレベルが求められます。
PDFの作成(HTML, URL, 画像)
PDF操作マージ、分割、編集
HTMLからPDFへChromium エンジン
ウォーターマーク
ヘッダー/フッター
フォーム入力
セキュリティ
ネイティブの依存関係必須なし(フルマネージド)
クロスプラットフォーム複雑なセットアップ自動翻訳
展開のしやすさネイティブの依存関係が複雑より簡単に; 依存関係の複雑さを軽減

2025年と2026年まで.NET 10とC# 14の採用を計画しているチームにとって、IronPDFは包括的なPDFの作成と操作機能を追加しながら、ネイティブのバイナリ管理を排除する完全な管理基盤を提供します。


始める前に

前提条件

1..NET環境: .NET Framework 4.6.2+ または .NET Core 3.1+ / .NET 5/6/7/8/9+. 2.NuGetアクセス:NuGetパッケージをインストールする能力。 3.IronPDFライセンスironPdf.comからライセンスキーを取得してください。

NuGetパッケージの変更

# Remove Pdfium packages
dotnet remove package Pdfium.NET
dotnet remove package Pdfium.Net.SDK
dotnet remove package PdfiumViewer

# Install IronPDF
dotnet add package IronPdf
# Remove Pdfium packages
dotnet remove package Pdfium.NET
dotnet remove package Pdfium.Net.SDK
dotnet remove package PdfiumViewer

# Install IronPDF
dotnet add package IronPdf
SHELL

ライセンス構成

// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

Pdfiumの使用法を特定する。

# Find Pdfium usage
grep -r "Pdfium\|PdfDocument\.Load\|\.Render\(" --include="*.cs" .

# Find native binary references
grep -r "pdfium\.dll\|pdfium\.so\|pdfium\.dylib" --include="*.csproj" --include="*.config" .

# Find platform-specific code
grep -r "#if.*64\|WIN32\|WIN64\|LINUX\|OSX" --include="*.cs" .
# Find Pdfium usage
grep -r "Pdfium\|PdfDocument\.Load\|\.Render\(" --include="*.cs" .

# Find native binary references
grep -r "pdfium\.dll\|pdfium\.so\|pdfium\.dylib" --include="*.csproj" --include="*.config" .

# Find platform-specific code
grep -r "#if.*64\|WIN32\|WIN64\|LINUX\|OSX" --include="*.cs" .
SHELL

完全な API リファレンス

名前空間の変更

// Pdfium.NET
using Pdfium;
using Pdfium.Net;
using PdfiumViewer;

// IronPDF
using IronPdf;
using IronPdf.Rendering;
using IronPdf.Editing;
// Pdfium.NET
using Pdfium;
using Pdfium.Net;
using PdfiumViewer;

// IronPDF
using IronPdf;
using IronPdf.Rendering;
using IronPdf.Editing;
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

コア クラス マッピング

Pdfium.NETIronPDFノート
<コード>PdfDocument</コード<コード>PdfDocument</コード同じ名前、異なる機能
<コード>PdfPage</コード<コード>PdfPage</コード類似インターフェース
<コード>PdfPageCollection</コード<コード>PdfPageCollection</コード類似インターフェース
(利用できません)<コード>ChromePdfRenderer</コードPDF作成
(利用できません)<コード>HtmlHeaderFooter</コードヘッダー/フッター

ドキュメント読み込みマッピング

Pdfium.NETIronPDFノート
PdfDocument.Load(パス)PdfDocument.FromFile(パス)ファイルから読み込む
PdfDocument.Load(stream)を実行します。<コード>PdfDocument.FromStream(stream)</コード><コード>PdfDocument.FromStream(stream)ストリームから読み込む
PdfDocument.Load(bytes).<コード>PdfDocument.FromBinaryData(bytes)</コード><コード>PdfDocument.FromBinaryData(bytes)バイトから読み込む
new PdfDocument(path).PdfDocument.FromFile(パス)コンストラクタのパターン

ドキュメント プロパティのマッピング

Pdfium.NETIronPDFノート
<コード>document.PageCount</コード<コード>document.PageCount</コード同じ
<コード>ドキュメント.ページ</コード<コード>ドキュメント.ページ</コード類似コレクション
ドキュメント.ページ[インデックス]ドキュメント.ページ[インデックス]ゼロベース
document.GetPageSize(インデックス)document.Pages[index].Width/Height直接プロパティ

テキスト抽出マッピング

Pdfium.NETIronPDFノート
document.GetPdfText(pageIndex)ドキュメント.ページ[index].テキストページあたり
(マニュアルループ)document.ExtractAllText()を実行します。全ページ一括
<コード>page.GetTextBounds()</コード<コード>ページ.テキスト</コード簡略化

ドキュメント マッピングの保存

Pdfium.NETIronPDFノート
document.Save(パス)を実行します。document.SaveAs(path)を実行します。異なるメソッド名
document.Save(stream)を実行します。<コード>ドキュメント.ストリーム</コードアクセスストリーム
(利用できません)<コード>document.BinaryData</コードバイト

ページ レンダリング マッピング

Pdfium.NETIronPDFノート
<コード>page.Render(width, height)pdf.RasterizeToImageFiles(path, dpi).ラスタライズ
<コード>page.Render(width, height, flags)DPIパラメータ品質管理
document.Render(index, width, height).pdf.RasterizeToImageFiles()バッチレンダー
page.RenderToScale(scale)のようにします。DPI:72 * scaleスケールからDPIへの変換

Pdfiumでは利用できない新機能

IronPDFの特徴翻訳内容
ChromePdfRenderer.RenderHtmlAsPdf()のようになります。HTMLから作成
ChromePdfRenderer.RenderUrlAsPdf()のようにします。URLから作成
<コード>ChromePdfRenderer.RenderHtmlFileAsPdf()</コードHTMLファイルから作成
PdfDocument.Merge()を使用してください。PDFの結合
<コード>pdf.CopyPages()</コードページの抜粋
<コード>pdf.RemovePages()</コード></コードページの削除
<コード>pdf.InsertPdf()</コード位置にPDFを挿入
<コード>pdf.ApplyWatermark()</コード></コード透かしの追加
<コード>pdf.AddHtmlHeaders()</コード></コードヘッダーの追加
<コード>pdf.AddHtmlFooters()</コード></コードフッターの追加
<コード>pdf.SecuritySettings</コードパスワード保護
pdf.SignWithDigitalSignature()を使用してください。デジタル署名
<コード>pdf.Form</コードフォーム入力

コード移行の例

例1: PDFからのテキスト抽出

翻訳前 (Pdfium):

// NuGet: Install-Package PdfiumViewer
using PdfiumViewer;
using System;
using System.IO;
using System.Text;

class Program
{
    static void Main()
    {
        string pdfPath = "document.pdf";

        using (var document = PdfDocument.Load(pdfPath))
        {
            StringBuilder text = new StringBuilder();

            for (int i = 0; i < document.PageCount; i++)
            {
                // Note: PdfiumViewer has limited text extraction capabilities
                // Text extraction requires additional work with Pdfium.NET
                string pageText = document.GetPdfText(i);
                text.AppendLine(pageText);
            }

            Console.WriteLine(text.ToString());
        }
    }
}
// NuGet: Install-Package PdfiumViewer
using PdfiumViewer;
using System;
using System.IO;
using System.Text;

class Program
{
    static void Main()
    {
        string pdfPath = "document.pdf";

        using (var document = PdfDocument.Load(pdfPath))
        {
            StringBuilder text = new StringBuilder();

            for (int i = 0; i < document.PageCount; i++)
            {
                // Note: PdfiumViewer has limited text extraction capabilities
                // Text extraction requires additional work with Pdfium.NET
                string pageText = document.GetPdfText(i);
                text.AppendLine(pageText);
            }

            Console.WriteLine(text.ToString());
        }
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

翻訳後(IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        string pdfPath = "document.pdf";

        var pdf = PdfDocument.FromFile(pdfPath);
        string text = pdf.ExtractAllText();

        Console.WriteLine(text);
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        string pdfPath = "document.pdf";

        var pdf = PdfDocument.FromFile(pdfPath);
        string text = pdf.ExtractAllText();

        Console.WriteLine(text);
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

ここでの違いは重要です。 Pdfiumでは、GetPdfText(pageIndex)で各ページを手動でループし、StringBuilderを構築し、usingステートメントを適切に廃棄できるように管理する必要があります。 コードには、"PdfiumViewerのテキスト抽出機能には制限があります"、"テキスト抽出には追加作業が必要です "と書かれています。

IronPDFはこれを3行に単純化します: PdfDocument.FromFile()で読み込み、ExtractAllText()で抽出し、出力します。 ExtractAllText()メソッドは、より高度なテキスト抽出機能ですべてのページを自動的に処理します。 ページごとの抽出が必要な場合は、pdf.Pages[index].Textを使用できます。 その他のオプションについては、テキスト抽出ドキュメントを参照してください。

例 2: PDF のマージ

翻訳前 (Pdfium):

// NuGet: Install-Package PdfiumViewer
using PdfiumViewer;
using System;
using System.IO;
using System.Collections.Generic;

// Note: PdfiumViewer does not have native PDF merging functionality
// You would need to use additional libraries or implement custom logic
class Program
{
    static void Main()
    {
        List<string> pdfFiles = new List<string> 
        { 
            "document1.pdf", 
            "document2.pdf", 
            "document3.pdf" 
        };

        // PdfiumViewer is primarily for rendering/viewing
        // PDF merging is not natively supported
        // You would need to use another library like iTextSharp or PdfSharp

        Console.WriteLine("PDF merging not natively supported in PdfiumViewer");
    }
}
// NuGet: Install-Package PdfiumViewer
using PdfiumViewer;
using System;
using System.IO;
using System.Collections.Generic;

// Note: PdfiumViewer does not have native PDF merging functionality
// You would need to use additional libraries or implement custom logic
class Program
{
    static void Main()
    {
        List<string> pdfFiles = new List<string> 
        { 
            "document1.pdf", 
            "document2.pdf", 
            "document3.pdf" 
        };

        // PdfiumViewer is primarily for rendering/viewing
        // PDF merging is not natively supported
        // You would need to use another library like iTextSharp or PdfSharp

        Console.WriteLine("PDF merging not natively supported in PdfiumViewer");
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

翻訳後(IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;
using System;
using System.Collections.Generic;

class Program
{
    static void Main()
    {
        List<string> pdfFiles = new List<string> 
        { 
            "document1.pdf", 
            "document2.pdf", 
            "document3.pdf" 
        };

        var pdf = PdfDocument.Merge(pdfFiles);
        pdf.SaveAs("merged.pdf");

        Console.WriteLine("PDFs merged successfully");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
using System.Collections.Generic;

class Program
{
    static void Main()
    {
        List<string> pdfFiles = new List<string> 
        { 
            "document1.pdf", 
            "document2.pdf", 
            "document3.pdf" 
        };

        var pdf = PdfDocument.Merge(pdfFiles);
        pdf.SaveAs("merged.pdf");

        Console.WriteLine("PDFs merged successfully");
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

この例は、基本的な機能のギャップを浮き彫りにしています。PdfiumはPDFをマージすることができません。コードには "PDFマージはPdfiumViewerではネイティブにサポートされていません。"、"iTextSharpやPdfSharpのような別のライブラリを使用する必要があります。"と明記されています。

IronPDFは静的なPdfDocument.Merge()メソッドでネイティブのマージ機能を提供します。 結果は、SaveAs()で保存する新しいPdfDocumentです。 PDFのマージと分割については、こちらをご覧ください。

例3: HTMLからPDFへの変換

翻訳前 (Pdfium):

// NuGet: Install-Package PdfiumViewer
using PdfiumViewer;
using System.IO;
using System.Drawing.Printing;

// Note: PdfiumViewer is primarily for viewing/rendering PDFs, not creating them from HTML
// For HTML to PDF with Pdfium.NET, you would need additional libraries
// This example shows a limitation of Pdfium.NET
class Program
{
    static void Main()
    {
        // Pdfium.NET does not have native HTML to PDF conversion
        // You would need to use a separate library to convert HTML to PDF
        // then use Pdfium for manipulation
        string htmlContent = "<h1>Hello World</h1>";

        // This functionality is not directly available in Pdfium.NET
        Console.WriteLine("HTML to PDF conversion not natively supported in Pdfium.NET");
    }
}
// NuGet: Install-Package PdfiumViewer
using PdfiumViewer;
using System.IO;
using System.Drawing.Printing;

// Note: PdfiumViewer is primarily for viewing/rendering PDFs, not creating them from HTML
// For HTML to PDF with Pdfium.NET, you would need additional libraries
// This example shows a limitation of Pdfium.NET
class Program
{
    static void Main()
    {
        // Pdfium.NET does not have native HTML to PDF conversion
        // You would need to use a separate library to convert HTML to PDF
        // then use Pdfium for manipulation
        string htmlContent = "<h1>Hello World</h1>";

        // This functionality is not directly available in Pdfium.NET
        Console.WriteLine("HTML to PDF conversion not natively supported in Pdfium.NET");
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

翻訳後(IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        string htmlContent = "<h1>Hello World</h1>";

        var pdf = renderer.RenderHtmlAsPdf(htmlContent);
        pdf.SaveAs("output.pdf");

        Console.WriteLine("PDF created successfully");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        string htmlContent = "<h1>Hello World</h1>";

        var pdf = renderer.RenderHtmlAsPdf(htmlContent);
        pdf.SaveAs("output.pdf");

        Console.WriteLine("PDF created successfully");
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

この例は、最も大きな能力の違いを示しています。 Pdfiumは、"HTMLからPDFへの変換は、Pdfium.NETではネイティブにサポートされていません。"と "HTMLをPDFに変換するには、別のライブラリを使用する必要があります。"と明確に述べています。

IronPDFはChromePdfRendererを通してネイティブのHTMLからPDFへの変換を提供し、HTML、CSS、JavaScriptの正確なレンダリングのために内部でChromiumエンジンを使用しています。 RenderHtmlAsPdf()メソッドは、HTML文字列を直接PDF文書に変換します。 IronPDFはRenderUrlAsPdf()でURLを、RenderHtmlFileAsPdf()でHTMLファイルをレンダリングすることもできます。 包括的な例については、HTML to PDF documentationを参照してください。


ネイティブ依存性の除去

PdfiumからIronPdfへの移行の最も大きな利点の一つは、ネイティブのバイナリ管理が不要になることです。

ビフォア (Pdfium) - 複雑なデプロイメント

MyApp/
├── bin/
│ ├──MyApp.dll
│ ├──Pdfium.NET.dll
│ ├── x86/
│ └── pdfium.dll
│ └── x64/
└─ pdfium.dll
ランタイム
│ ├── win-x86/native/
│ └── pdfium.dll
│ └── win-x64/native/
└─ pdfium.dll

翻訳後 (IronPDF) - クリーンなデプロイメント

MyApp/
├── bin/
│ ├──MyApp.dll
│ └─ IronPdf.dll # 含まれるものすべて

ネイティブ バイナリ参照の削除

# Delete native PDFium binaries
rm -rf x86/ x64/ runtimes/

# Remove from .csproj
# Delete any <Content Include="pdfium.dll" /> entries
# Delete any <None Include="x86/pdfium.dll" /> entries
# Delete native PDFium binaries
rm -rf x86/ x64/ runtimes/

# Remove from .csproj
# Delete any <Content Include="pdfium.dll" /> entries
# Delete any <None Include="x86/pdfium.dll" /> entries
SHELL

重要な移行に関する注意事項

スケールからDPIへの変換

Pdfiumはスケールファクターを使用しています; IronPDFはDPIを使用しています:

// Formula:IronPDFDPI = 72 × Pdfium scale
// Pdfium scale 2.0 →IronPDFDPI 144
pdf.RasterizeToImageFiles("*.png", DPI: 144);
// Formula:IronPDFDPI = 72 × Pdfium scale
// Pdfium scale 2.0 →IronPDFDPI 144
pdf.RasterizeToImageFiles("*.png", DPI: 144);
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

ドキュメント読み込み方法の変更

// Pdfium
PdfDocument.Load(path)

// IronPDF
PdfDocument.FromFile(path)
// Pdfium
PdfDocument.Load(path)

// IronPDF
PdfDocument.FromFile(path)
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

保存メソッドの変更

// Pdfium
document.Save(path)

// IronPDF
pdf.SaveAs(path)
// Pdfium
document.Save(path)

// IronPDF
pdf.SaveAs(path)
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

廃棄パターンの簡略化

// Pdfium:必須explicit disposal
using (var document = PdfDocument.Load(path))
using (var page = document.Pages[0])
using (var bitmap = page.Render(1024, 768))
{
    bitmap.Save("output.png");
}

// IronPDF: Simplified
var pdf = PdfDocument.FromFile(path);
pdf.RasterizeToImageFiles("output.png");
// Pdfium:必須explicit disposal
using (var document = PdfDocument.Load(path))
using (var page = document.Pages[0])
using (var bitmap = page.Render(1024, 768))
{
    bitmap.Save("output.png");
}

// IronPDF: Simplified
var pdf = PdfDocument.FromFile(path);
pdf.RasterizeToImageFiles("output.png");
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

プラットフォーム固有のコードの削除

// Pdfium:必須platform detection
#if WIN64
    // Load x64 pdfium.dll
#else
    // Load x86 pdfium.dll
#endif

// IronPDF: Remove all platform-specific code
// Just use the API directly
// Pdfium:必須platform detection
#if WIN64
    // Load x64 pdfium.dll
#else
    // Load x86 pdfium.dll
#endif

// IronPDF: Remove all platform-specific code
// Just use the API directly
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

機能比較の概要

フィーチャーPdfium.NETIronPDF
PDFを読み込む
画像にレンダリング
テキストの抽出基本上級
ページ情報
HTMLから作成
URLから作成
PDFのマージ
PDFの分割
透かしの追加
ヘッダー/フッター
フォーム入力
デジタル署名
パスワード保護
ネイティブの依存関係必須なし
クロスプラットフォーム複雑自動翻訳
メモリ管理マニュアルの廃棄簡略化

移行チェックリスト

移行前

  • [コードベース内のすべてのPdfiumの使用法を特定する。
  • [現在使用されているレンダリング寸法/スケールを文書化してください。
  • [プロジェクト内のネイティブ・バイナリの場所をリストする
  • [プラットフォーム固有のローディングコードのチェック
  • [現在、別のツールを使用していますか?
  • [変換のための廃棄パターンのレビュー
  • [IronPDF ライセンスキーの取得

パッケージの変更

  • [ ] Pdfium.NET, Pdfium.Net.SDK, PdfiumViewer NuGet パッケージを削除する。
  • [ ] x86/、x64/、runtimes/フォルダからpdfium.dllのネイティブバイナリを削除する。
  • [ ] プラットフォーム固有の条件付きコンパイルを削除する
  • [ ] ネイティブ・バイナリ参照を削除するために.csprojを更新する
  • [ ] IronPdf NuGetパッケージをインストールします:dotnet add package IronPdf NuGetパッケージをインストールします。

コードの変更

  • [ ] 起動時にライセンスキー設定を追加する
  • [ ] PdfDocument.Load()PdfDocument.FromFile()に置き換えてください。
  • [ ] document.Save()pdf.SaveAs()に置き換えてください。
  • [ ] document.GetPdfText(i)ループをpdf.ExtractAllText()に置き換えてください。
  • [DPI = 72 × スケール)。
  • [ ] 処分パターンの簡素化(入れ子になった using 文の削除)
  • [プラットフォーム固有のコードの削除

移行後

  • [レンダリング出力品質のテスト
  • [テキスト抽出結果の比較
  • [クロスプラットフォーム展開のテスト
  • [新機能の追加(HTML to PDF、マージ、透かし、セキュリティ)
  • [ドキュメントの更新

結論

PdfiumからIronPdfに移行することで、PDFワークフローはネイティブ依存の複雑さを持つレンダリングに特化したライブラリから、作成、操作、レンダリング機能を持つ包括的なPDFソリューションに変わります。

この移行における主な変更点は以下のとおりです: 1.範囲:レンダリングのみ → 完全なPDFソリューション 2.依存関係: ネイティブバイナリが必要 → 完全に管理される 3.読み込みPdfDocument.Load()PdfDocument.FromFile() 4.保存Save()SaveAs() です。 5.テキスト抽出GetPdfText()による手動ループ → 単一のExtractAllText()呼び出し 6.レンダリング: スケールベース → DPIベース (DPI = 72 × スケール) 7.新機能:HTMLからPDFへの変換、マージ、透かし、セキュリティ、フォームなど。

IronPDFドキュメントチュートリアルAPIリファレンスをご覧いただき、IronPDFへの移行を促進してください。

カーティス・チャウ
テクニカルライター

Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。

開発以外にも、CurtisはIoT(Internet of Things)への強い関心を持ち、ハードウェアとソフトウェアの統合方法を模索しています。余暇には、ゲームをしたりDiscordボットを作成したりして、技術に対する愛情と創造性を組み合わせています。