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

ActivePDFからIronPDFへの移行:(.NET ガイド)

ActivePDF は、 .NET開発者にとって信頼できる PDF ツールキットです。 PDFTronが2020年6月に取得し2023年2月にApryseと再ブランド化した後、ActivePDFはより広範なApryseポートフォリオ内のいくつかのブランドの1つとして位置付けられています。 このガイドは、ActivePDFからIronPDFへの徹底した段階的な移行パスを提供します—モダンでアクティブに維持されている.NET PDFライブラリで、.NET Framework 4.6.2から.NET 9までをサポートします。

アクティブPDFからの移行を検討する理由は何ですか?

ActivePDFはまだ出荷されており、ActivePDF.Toolkit NuGetパッケージは引き続きApryseの下で更新を受けていますが、その設計やパッケージングのいくつかの側面が、他の選択肢を評価することを促すことがあります。

ブランドおよびロードマップの考慮

ActivePDFは現在、最先端のApryse SDKと共にApryseの中の1ブランドとなっています。 特にサーバーサイド自動化に焦点を当てたActivePDFを選んだチームは、時間をかけてActivePDF SKUを維持するか、より広いApryse SDKに移行するかどうかを検討するかもしれません。

ライセンスモデル

ActivePDFの伝統的なサーバー毎/コア毎のライセンスは、インフラストラクチャ全体で動的にスケールするクラウドおよびコンテナ化された環境でフリクションを引き起こす可能性があります。

レガシーアーキテクチャパターン

ActivePDFのAPI表面はそのCOM/ネイティブの起源を反映しています。 using、例外、非同期といった現代のC#イディオムと必ずしも一致しない明示的なライフサイクル管理を必要とします。

複数SKUの製品構成

HTML/URLからPDFへのレンダリングは、別途ActivePDF.Toolkitにあります。 Toolkit 10から、ネイティブライブラリはシステムフォルダに自動コピーされなくなったため、コンストラクターにはしばしば明示的なCoreLibPath引数が必要です。このパターンはDocker、CI、インストーラーなしの導入を複雑化する可能性があります。

ActivePDFとIronPDFの比較:主な違い

移行プロセスを開始する前に、ActivePDF とIronPDFの基本的な違いを理解しておくと、必要なコード変更に対する期待を設定するのに役立ちます。

アスペクト アクティブPDF IronPDF
ベンダー Apryse(旧PDFTron, 2020年6月にActivePDFを取得) Iron Software, 独立した
製品構成 複数SKU(Toolkit, WebGrabber, DocConverter, Server, Meridian) 単一の IronPdf NuGetパッケージ
インストール NuGetパッケージ + ネイティブランタイムパス(v10以降CoreLibPath 単一のNuGetパッケージ; natives bundled
APIパターン ステートフル (CloseOutputFile)、COM由来 流暢で機能的なAPI
ライセンスモデル サーバー毎 / コア毎 コードベースのキー
.NETサポート .NET Framework 4.5+ / .NET Standard 1.0+ / .NET Core .NET Framework 4.6.2から.NET 9へ
エラー処理 整数リターンコード (0 = 成功) .NET Standardの例外
非同期サポートについて ネイティブではない 完全なasync/awaitのサポート

移行前の準備

コードベースの監査

移行を開始する前に、ソリューション全体にわたるすべてのActivePDFの使用状況を確認してください。 実際の名前空間はAPToolkitNET (Toolkit) と APWebGrabber (WebGrabber) です; いくつかのレガシープロジェクトもCOM相互運用アセンブリを通じてActivePDF.Toolkitを参照します。 ソリューションディレクトリで以下のコマンドを実行してください:

grep -r "using APToolkitNET" --include="*.cs" .
grep -r "using APWebGrabber" --include="*.cs" .
grep -r "ActivePDF" --include="*.csproj" .
grep -r "using APToolkitNET" --include="*.cs" .
grep -r "using APWebGrabber" --include="*.cs" .
grep -r "ActivePDF" --include="*.csproj" .
SHELL

ドキュメントの変更

基本的なAPIの違いを理解することは、移行戦略の立案に役立ちます:

カテゴリ ActivePDF の動作 IronPDF の動作 移行作業
製品分割 Toolkit(操作)+ WebGrabber(HTMLレンダリング)別売 単一のIronPdfパッケージ 両方を一つのライブラリに統合
オブジェクトモデル PDF用APWebGrabber.WebGrabber ChromePdfRenderer + PdfDocument 懸念事項
ファイル操作 CloseOutputFile() 直接SaveAs() open/closeコールの削除
ネイティブランタイム v10以降CoreLibPath引数 NuGetがネイティブを供給 パス構成を削除
ページ作成 NewPage()メソッド HTMLからの自動翻訳 ページ作成コールの削除
戻り値 整数エラーコード 例外 try/catchの実装
ページサイズ単位 ポイント (612x792 = 文字) 列挙型またはミリメートル 測定値の更新

前提条件

あなたの環境がこれらの要件を満たしていることを確認してください:

  • .NET Framework 4.6.2+または.NET Core 3.1 / .NET 5-9
  • Visual Studio 2019+またはJetBrains Rider
  • NuGetパッケージマネージャへのアクセス
  • IronPDFライセンスキー (ironpdf.com にて無料トライアル可能)

ステップごとの移行プロセス

ステップ 1: NuGet パッケージを更新する

nuget.org上のパッケージはActivePDF.Toolkitです(現行バージョン11.4.4、2025年12月発行)。 HTMLレンダリングはActivePDF.WebGrabberとして別途提供されています。アクティブPDFSKUを削除してIronPDFをインストールします:

# RemoveアクティブPDFpackages
dotnet remove package ActivePDF.Toolkit
dotnet remove package ActivePDF.WebGrabber

# Install IronPDF
dotnet add package IronPdf
# RemoveアクティブPDFpackages
dotnet remove package ActivePDF.Toolkit
dotnet remove package ActivePDF.WebGrabber

# Install IronPDF
dotnet add package IronPdf
SHELL

または、Visual Studioパッケージマネージャーコンソールを使用してください:

Uninstall-Package ActivePDF.Toolkit
Uninstall-Package ActivePDF.WebGrabber
Install-Package IronPdf

手動でDLL参照を行っているプロジェクトの場合、.csprojファイルから参照を削除してください:


<Reference Include="APToolkitNET">
    <HintPath>path\to\APToolkitNET.dll</HintPath>
</Reference>

<Reference Include="APToolkitNET">
    <HintPath>path\to\APToolkitNET.dll</HintPath>
</Reference>
XML

ステップ 2: ライセンス キーの設定

IronPDFライセンスキーはアプリケーション起動時、PDF操作の前に追加してください:

// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";

// Verify license status
bool isLicensed = IronPdf.License.IsLicensed;
// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";

// Verify license status
bool isLicensed = IronPdf.License.IsLicensed;
' Add at application startup (Program.vb or Startup.vb)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"

' Verify license status
Dim isLicensed As Boolean = IronPdf.License.IsLicensed
$vbLabelText   $csharpLabel

ステップ 3: 名前空間参照の更新

ソリューション全体でグローバルな検索と置換を実行してください:

検索 置換対象
using APToolkitNET; using IronPdf;
using APWebGrabber; using IronPdf;
APToolkitNET.Toolkit ChromePdfRenderer (レンダリング) / PdfDocument (操作)
APWebGrabber.WebGrabber ChromePdfRenderer

完全な API 移行のリファレンス

ドキュメント作成方法

ActivePDFメソッド IronPDF 同等物 ノート
new APToolkitNET.Toolkit() new ChromePdfRenderer() / new PdfDocument(...) IronPDFはレンダリングと操作を分離
new Toolkit(CoreLibPath: path) new ChromePdfRenderer() NuGetはネイティブを出荷します—CoreLibPathはありません
toolkit.OpenOutputFile(path) 同等のものは不要 終了時にSaveAsを呼び出すだけです
toolkit.CloseOutputFile() 同等のものは不要 usingはクリーンアップを担当します
webGrabber.URL = html; webGrabber.ConvertToPDF() renderer.RenderHtmlAsPdf(html) WebGrabber, Toolkitではない
webGrabber.URL = url; webGrabber.ConvertToPDF() renderer.RenderUrlAsPdf(url) WebGrabber, Toolkitではない

ファイル操作

ActivePDFメソッド IronPDF 同等物 ノート
toolkit.OpenInputFile(path) PdfDocument.FromFile(path) 既存のPDFを読み込む
toolkit.MergeFile(path, startPage, endPage) PdfDocument.Merge(pdfs) ActivePDFはオープンな出力ファイルに直接マージ、 IronPDFは新しいマージされたドキュメントを返します。
toolkit.NumPages (プロパティ) pdf.PageCount ページ数
toolkit.GetPageText(page, 0) pdf.Pages[i].Text / pdf.ExtractAllText() テキスト抽出

ページ構成

ActivePDFメソッド IronPDF 同等物
toolkit.SetPageSize(612, 792) RenderingOptions.PaperSize = PdfPaperSize.Letter
toolkit.SetOrientation("Landscape") RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape
toolkit.SetMargins(t, b, l, r) RenderingOptions.MarginTop/Bottom/Left/Right

セキュリティ手法

ActivePDFメソッド IronPDF 同等物
toolkit.SetEncryption(user, owner, 128, 0) pdf.SecuritySettings.OwnerPassword / UserPassword
toolkit.SetPermissions(flags) pdf.SecuritySettings.AllowUserXxx
toolkit.PrintText(x, y, text) (ページごとのウォーターマーク) pdf.ApplyWatermark(html)

コード移行の例

HTMLからPDFへの変換

HTML文字列をPDF文書に変換することは、最も一般的なPDF生成シナリオの1つです。 ActivePDFでは、HTMLのレンダリングは別途ライセンスされたWebGrabber製品に存在し、Toolkitにはなく、WebGrabberはインメモリの文字列ではなくURLまたはファイルパスからレンダリングします。

ActivePDF実装 (WebGrabber):

// NuGet: Install-Package ActivePDF.WebGrabber
using APWebGrabber;
using System;
using System.IO;

class Program
{
    static void Main()
    {
        WebGrabber wg = new WebGrabber();

        string htmlContent = "<html><body><h1>Hello World</h1></body></html>";
        string tempHtml = Path.Combine(Path.GetTempPath(), "input.html");
        File.WriteAllText(tempHtml, htmlContent);

        wg.URL = tempHtml;
        wg.OutputDirectory = Directory.GetCurrentDirectory();
        wg.OutputFilename = "output.pdf";

        if (wg.ConvertToPDF() == 0)
        {
            Console.WriteLine("PDF created successfully");
        }
    }
}
// NuGet: Install-Package ActivePDF.WebGrabber
using APWebGrabber;
using System;
using System.IO;

class Program
{
    static void Main()
    {
        WebGrabber wg = new WebGrabber();

        string htmlContent = "<html><body><h1>Hello World</h1></body></html>";
        string tempHtml = Path.Combine(Path.GetTempPath(), "input.html");
        File.WriteAllText(tempHtml, htmlContent);

        wg.URL = tempHtml;
        wg.OutputDirectory = Directory.GetCurrentDirectory();
        wg.OutputFilename = "output.pdf";

        if (wg.ConvertToPDF() == 0)
        {
            Console.WriteLine("PDF created successfully");
        }
    }
}
Imports APWebGrabber
Imports System
Imports System.IO

Module Program
    Sub Main()
        Dim wg As New WebGrabber()

        Dim htmlContent As String = "<html><body><h1>Hello World</h1></body></html>"
        Dim tempHtml As String = Path.Combine(Path.GetTempPath(), "input.html")
        File.WriteAllText(tempHtml, htmlContent)

        wg.URL = tempHtml
        wg.OutputDirectory = Directory.GetCurrentDirectory()
        wg.OutputFilename = "output.pdf"

        If wg.ConvertToPDF() = 0 Then
            Console.WriteLine("PDF created successfully")
        End If
    End Sub
End Module
$vbLabelText   $csharpLabel

IronPDFの実装:

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

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        string htmlContent = "<html><body><h1>Hello World</h1></body></html>";

        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 = "<html><body><h1>Hello World</h1></body></html>";

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

        Console.WriteLine("PDF created successfully");
    }
}
Imports IronPdf
Imports System

Module Program
    Sub Main()
        Dim renderer As New ChromePdfRenderer()

        Dim htmlContent As String = "<html><body><h1>Hello World</h1></body></html>"

        Dim pdf = renderer.RenderHtmlAsPdf(htmlContent)
        pdf.SaveAs("output.pdf")

        Console.WriteLine("PDF created successfully")
    End Sub
End Module
$vbLabelText   $csharpLabel

IronPDFのアプローチは、よりクリーンで読みやすいコードを提供しながら、明示的なファイルハンドル管理を排除します。 高度なHTMLからPDFへのシナリオでは、IronPDFのChromePdfRendererはピクセル単位の正確なCSSとJavaScriptのサポートを提供するChromiumベースのレンダリングエンジンを使用します。

URLからPDFへの変換

HTMLドキュメントをPDFドキュメントとしてキャプチャすることもWebGrabberにあり、Toolkitにはありません。

ActivePDF実装 (WebGrabber):

// NuGet: Install-Package ActivePDF.WebGrabber
using APWebGrabber;
using System;
using System.IO;

class Program
{
    static void Main()
    {
        WebGrabber wg = new WebGrabber();

        wg.URL = "https://www.example.com";
        wg.OutputDirectory = Directory.GetCurrentDirectory();
        wg.OutputFilename = "webpage.pdf";

        if (wg.ConvertToPDF() == 0)
        {
            Console.WriteLine("PDF from URL created successfully");
        }
    }
}
// NuGet: Install-Package ActivePDF.WebGrabber
using APWebGrabber;
using System;
using System.IO;

class Program
{
    static void Main()
    {
        WebGrabber wg = new WebGrabber();

        wg.URL = "https://www.example.com";
        wg.OutputDirectory = Directory.GetCurrentDirectory();
        wg.OutputFilename = "webpage.pdf";

        if (wg.ConvertToPDF() == 0)
        {
            Console.WriteLine("PDF from URL created successfully");
        }
    }
}
Imports APWebGrabber
Imports System
Imports System.IO

Module Program
    Sub Main()
        Dim wg As New WebGrabber()

        wg.URL = "https://www.example.com"
        wg.OutputDirectory = Directory.GetCurrentDirectory()
        wg.OutputFilename = "webpage.pdf"

        If wg.ConvertToPDF() = 0 Then
            Console.WriteLine("PDF from URL created successfully")
        End If
    End Sub
End Module
$vbLabelText   $csharpLabel

IronPDFの実装:

using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        string url = "https://www.example.com";

        var pdf = renderer.RenderUrlAsPdf(url);
        pdf.SaveAs("webpage.pdf");

        Console.WriteLine("PDF from URL created successfully");
    }
}
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        string url = "https://www.example.com";

        var pdf = renderer.RenderUrlAsPdf(url);
        pdf.SaveAs("webpage.pdf");

        Console.WriteLine("PDF from URL created successfully");
    }
}
Imports IronPdf
Imports System

Class Program
    Shared Sub Main()
        Dim renderer = New ChromePdfRenderer()

        Dim url As String = "https://www.example.com"

        Dim pdf = renderer.RenderUrlAsPdf(url)
        pdf.SaveAs("webpage.pdf")

        Console.WriteLine("PDF from URL created successfully")
    End Sub
End Class
$vbLabelText   $csharpLabel

複数のPDFをマージする

複数のPDFドキュメントを1つのファイルに結合することで、IronPDFのドキュメント操作に対する機能的なアプローチを示しています。

ActivePDF実装 (Toolkit):

// NuGet: Install-Package ActivePDF.Toolkit
using APToolkitNET;
using System;

class Program
{
    static void Main()
    {
        using (Toolkit toolkit = new Toolkit())
        {
            if (toolkit.OpenOutputFile("merged.pdf") == 0)
            {
                // MergeFile(FileName, StartPage, EndPage); -1 = end of file
                toolkit.MergeFile("document1.pdf", 1, -1);
                toolkit.MergeFile("document2.pdf", 1, -1);
                toolkit.CloseOutputFile();
                Console.WriteLine("PDFs merged successfully");
            }
        }
    }
}
// NuGet: Install-Package ActivePDF.Toolkit
using APToolkitNET;
using System;

class Program
{
    static void Main()
    {
        using (Toolkit toolkit = new Toolkit())
        {
            if (toolkit.OpenOutputFile("merged.pdf") == 0)
            {
                // MergeFile(FileName, StartPage, EndPage); -1 = end of file
                toolkit.MergeFile("document1.pdf", 1, -1);
                toolkit.MergeFile("document2.pdf", 1, -1);
                toolkit.CloseOutputFile();
                Console.WriteLine("PDFs merged successfully");
            }
        }
    }
}
Imports APToolkitNET
Imports System

Module Program
    Sub Main()
        Using toolkit As New Toolkit()
            If toolkit.OpenOutputFile("merged.pdf") = 0 Then
                ' MergeFile(FileName, StartPage, EndPage); -1 = end of file
                toolkit.MergeFile("document1.pdf", 1, -1)
                toolkit.MergeFile("document2.pdf", 1, -1)
                toolkit.CloseOutputFile()
                Console.WriteLine("PDFs merged successfully")
            End If
        End Using
    End Sub
End Module
$vbLabelText   $csharpLabel

IronPDFの実装:

using IronPdf;
using System;
using System.Collections.Generic;

class Program
{
    static void Main()
    {
        var pdf1 = PdfDocument.FromFile("document1.pdf");
        var pdf2 = PdfDocument.FromFile("document2.pdf");

        var merged = PdfDocument.Merge(pdf1, pdf2);
        merged.SaveAs("merged.pdf");

        Console.WriteLine("PDFs merged successfully");
    }
}
using IronPdf;
using System;
using System.Collections.Generic;

class Program
{
    static void Main()
    {
        var pdf1 = PdfDocument.FromFile("document1.pdf");
        var pdf2 = PdfDocument.FromFile("document2.pdf");

        var merged = PdfDocument.Merge(pdf1, pdf2);
        merged.SaveAs("merged.pdf");

        Console.WriteLine("PDFs merged successfully");
    }
}
Imports IronPdf
Imports System
Imports System.Collections.Generic

Module Program
    Sub Main()
        Dim pdf1 = PdfDocument.FromFile("document1.pdf")
        Dim pdf2 = PdfDocument.FromFile("document2.pdf")

        Dim merged = PdfDocument.Merge(pdf1, pdf2)
        merged.SaveAs("merged.pdf")

        Console.WriteLine("PDFs merged successfully")
    End Sub
End Module
$vbLabelText   $csharpLabel

選択的なページ抽出を含む、より高度なマージシナリオについては、PDFマージドキュメントを参照してください。

ヘッダーとフッターの追加

ActivePDF実装 (WebGrabber):

using APWebGrabber;
using System.IO;

public void CreatePdfWithHeaderFooter(string html, string outputPath)
{
    var wg = new WebGrabber();
    string tempHtml = Path.Combine(Path.GetTempPath(), "input.html");
    File.WriteAllText(tempHtml, html);

    wg.URL = tempHtml;
    wg.HeaderText = "My Document";
    wg.FooterText = "Page [page] of [pages]";
    wg.OutputDirectory = Path.GetDirectoryName(outputPath);
    wg.OutputFilename = Path.GetFileName(outputPath);
    wg.ConvertToPDF();
}
using APWebGrabber;
using System.IO;

public void CreatePdfWithHeaderFooter(string html, string outputPath)
{
    var wg = new WebGrabber();
    string tempHtml = Path.Combine(Path.GetTempPath(), "input.html");
    File.WriteAllText(tempHtml, html);

    wg.URL = tempHtml;
    wg.HeaderText = "My Document";
    wg.FooterText = "Page [page] of [pages]";
    wg.OutputDirectory = Path.GetDirectoryName(outputPath);
    wg.OutputFilename = Path.GetFileName(outputPath);
    wg.ConvertToPDF();
}
Imports APWebGrabber
Imports System.IO

Public Sub CreatePdfWithHeaderFooter(html As String, outputPath As String)
    Dim wg As New WebGrabber()
    Dim tempHtml As String = Path.Combine(Path.GetTempPath(), "input.html")
    File.WriteAllText(tempHtml, html)

    wg.URL = tempHtml
    wg.HeaderText = "My Document"
    wg.FooterText = "Page [page] of [pages]"
    wg.OutputDirectory = Path.GetDirectoryName(outputPath)
    wg.OutputFilename = Path.GetFileName(outputPath)
    wg.ConvertToPDF()
End Sub
$vbLabelText   $csharpLabel

IronPDFの実装:

using IronPdf;

public void CreatePdfWithHeaderFooter(string html, string outputPath)
{
    var renderer = new ChromePdfRenderer();

    renderer.RenderingOptions.TextHeader = new TextHeaderFooter
    {
        CenterText = "My Document",
        FontSize = 12,
        FontFamily = "Arial"
    };

    renderer.RenderingOptions.TextFooter = new TextHeaderFooter
    {
        CenterText = "Page {page} of {total-pages}",
        FontSize = 10,
        FontFamily = "Arial"
    };

    using var pdf = renderer.RenderHtmlAsPdf(html);
    pdf.SaveAs(outputPath);
}
using IronPdf;

public void CreatePdfWithHeaderFooter(string html, string outputPath)
{
    var renderer = new ChromePdfRenderer();

    renderer.RenderingOptions.TextHeader = new TextHeaderFooter
    {
        CenterText = "My Document",
        FontSize = 12,
        FontFamily = "Arial"
    };

    renderer.RenderingOptions.TextFooter = new TextHeaderFooter
    {
        CenterText = "Page {page} of {total-pages}",
        FontSize = 10,
        FontFamily = "Arial"
    };

    using var pdf = renderer.RenderHtmlAsPdf(html);
    pdf.SaveAs(outputPath);
}
Imports IronPdf

Public Sub CreatePdfWithHeaderFooter(html As String, outputPath As String)
    Dim renderer = New ChromePdfRenderer()

    renderer.RenderingOptions.TextHeader = New TextHeaderFooter With {
        .CenterText = "My Document",
        .FontSize = 12,
        .FontFamily = "Arial"
    }

    renderer.RenderingOptions.TextFooter = New TextHeaderFooter With {
        .CenterText = "Page {page} of {total-pages}",
        .FontSize = 10,
        .FontFamily = "Arial"
    }

    Using pdf = renderer.RenderHtmlAsPdf(html)
        pdf.SaveAs(outputPath)
    End Using
End Sub
$vbLabelText   $csharpLabel

IronPDFはテキストベースとHTMLヘッダーとフッターの両方をサポートし、柔軟なデザインを提供します。

パスワード保護とセキュリティ

ActivePDF実装 (Toolkit):

using APToolkitNET;

public void ProtectPdf(string inputPath, string outputPath, string password)
{
    using (Toolkit toolkit = new Toolkit())
    {
        if (toolkit.OpenOutputFile(outputPath) == 0
            && toolkit.OpenInputFile(inputPath) == 0)
        {
            toolkit.SetEncryption(password, password, 128, 0);
            toolkit.CopyForm(0, 0);
            toolkit.CloseInputFile();
            toolkit.CloseOutputFile();
        }
    }
}
using APToolkitNET;

public void ProtectPdf(string inputPath, string outputPath, string password)
{
    using (Toolkit toolkit = new Toolkit())
    {
        if (toolkit.OpenOutputFile(outputPath) == 0
            && toolkit.OpenInputFile(inputPath) == 0)
        {
            toolkit.SetEncryption(password, password, 128, 0);
            toolkit.CopyForm(0, 0);
            toolkit.CloseInputFile();
            toolkit.CloseOutputFile();
        }
    }
}
Imports APToolkitNET

Public Sub ProtectPdf(inputPath As String, outputPath As String, password As String)
    Using toolkit As New Toolkit()
        If toolkit.OpenOutputFile(outputPath) = 0 AndAlso toolkit.OpenInputFile(inputPath) = 0 Then
            toolkit.SetEncryption(password, password, 128, 0)
            toolkit.CopyForm(0, 0)
            toolkit.CloseInputFile()
            toolkit.CloseOutputFile()
        End If
    End Using
End Sub
$vbLabelText   $csharpLabel

IronPDFの実装:

using IronPdf;

public void ProtectPdf(string inputPath, string outputPath, string password)
{
    using var pdf = PdfDocument.FromFile(inputPath);

    pdf.SecuritySettings.OwnerPassword = password;
    pdf.SecuritySettings.UserPassword = password;
    pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;
    pdf.SecuritySettings.AllowUserCopyPasteContent = false;
    pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.NoEdit;

    pdf.SaveAs(outputPath);
}
using IronPdf;

public void ProtectPdf(string inputPath, string outputPath, string password)
{
    using var pdf = PdfDocument.FromFile(inputPath);

    pdf.SecuritySettings.OwnerPassword = password;
    pdf.SecuritySettings.UserPassword = password;
    pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;
    pdf.SecuritySettings.AllowUserCopyPasteContent = false;
    pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.NoEdit;

    pdf.SaveAs(outputPath);
}
Imports IronPdf

Public Sub ProtectPdf(inputPath As String, outputPath As String, password As String)
    Using pdf = PdfDocument.FromFile(inputPath)
        pdf.SecuritySettings.OwnerPassword = password
        pdf.SecuritySettings.UserPassword = password
        pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights
        pdf.SecuritySettings.AllowUserCopyPasteContent = False
        pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.NoEdit

        pdf.SaveAs(outputPath)
    End Using
End Sub
$vbLabelText   $csharpLabel

IronPDFのセキュリティ設定APIは、整数フラグの代わりに強く型付けされた列挙型を使って、ドキュメントのパーミッションをきめ細かく制御します。

テキスト抽出

ActivePDF実装 (Toolkit):

using APToolkitNET;
using System.Text;

public string ExtractText(string pdfPath)
{
    var sb = new StringBuilder();

    using (Toolkit toolkit = new Toolkit())
    {
        if (toolkit.OpenInputFile(pdfPath) == 0)
        {
            int pageCount = toolkit.NumPages;
            for (int i = 1; i <= pageCount; i++)
            {
                sb.AppendLine(toolkit.GetPageText(i, 0));
            }
            toolkit.CloseInputFile();
        }
    }

    return sb.ToString();
}
using APToolkitNET;
using System.Text;

public string ExtractText(string pdfPath)
{
    var sb = new StringBuilder();

    using (Toolkit toolkit = new Toolkit())
    {
        if (toolkit.OpenInputFile(pdfPath) == 0)
        {
            int pageCount = toolkit.NumPages;
            for (int i = 1; i <= pageCount; i++)
            {
                sb.AppendLine(toolkit.GetPageText(i, 0));
            }
            toolkit.CloseInputFile();
        }
    }

    return sb.ToString();
}
Imports APToolkitNET
Imports System.Text

Public Function ExtractText(pdfPath As String) As String
    Dim sb As New StringBuilder()

    Using toolkit As New Toolkit()
        If toolkit.OpenInputFile(pdfPath) = 0 Then
            Dim pageCount As Integer = toolkit.NumPages
            For i As Integer = 1 To pageCount
                sb.AppendLine(toolkit.GetPageText(i, 0))
            Next
            toolkit.CloseInputFile()
        End If
    End Using

    Return sb.ToString()
End Function
$vbLabelText   $csharpLabel

IronPDFの実装:

using IronPdf;

public string ExtractText(string pdfPath)
{
    using var pdf = PdfDocument.FromFile(pdfPath);
    return pdf.ExtractAllText();
}
using IronPdf;

public string ExtractText(string pdfPath)
{
    using var pdf = PdfDocument.FromFile(pdfPath);
    return pdf.ExtractAllText();
}
Imports IronPdf

Public Function ExtractText(pdfPath As String) As String
    Using pdf = PdfDocument.FromFile(pdfPath)
        Return pdf.ExtractAllText()
    End Using
End Function
$vbLabelText   $csharpLabel

IronPDFの実装は、複数行のテキスト抽出を単一のメソッド呼び出しに削減します。

透かしの追加

ActivePDF実装 (Toolkit — ページごとのページテキストとして描画):

using APToolkitNET;

public void AddWatermark(string inputPath, string outputPath, string watermarkText)
{
    using (Toolkit toolkit = new Toolkit())
    {
        if (toolkit.OpenOutputFile(outputPath) == 0
            && toolkit.OpenInputFile(inputPath) == 0)
        {
            int pageCount = toolkit.NumPages;
            for (int i = 1; i <= pageCount; i++)
            {
                toolkit.CopyForm(i, 0);
                toolkit.SetFont("Helvetica", 72);
                toolkit.SetTextColor(200, 200, 200);
                toolkit.PrintText(150, 400, watermarkText);
            }
            toolkit.CloseInputFile();
            toolkit.CloseOutputFile();
        }
    }
}
using APToolkitNET;

public void AddWatermark(string inputPath, string outputPath, string watermarkText)
{
    using (Toolkit toolkit = new Toolkit())
    {
        if (toolkit.OpenOutputFile(outputPath) == 0
            && toolkit.OpenInputFile(inputPath) == 0)
        {
            int pageCount = toolkit.NumPages;
            for (int i = 1; i <= pageCount; i++)
            {
                toolkit.CopyForm(i, 0);
                toolkit.SetFont("Helvetica", 72);
                toolkit.SetTextColor(200, 200, 200);
                toolkit.PrintText(150, 400, watermarkText);
            }
            toolkit.CloseInputFile();
            toolkit.CloseOutputFile();
        }
    }
}
Imports APToolkitNET

Public Sub AddWatermark(inputPath As String, outputPath As String, watermarkText As String)
    Using toolkit As New Toolkit()
        If toolkit.OpenOutputFile(outputPath) = 0 AndAlso toolkit.OpenInputFile(inputPath) = 0 Then
            Dim pageCount As Integer = toolkit.NumPages
            For i As Integer = 1 To pageCount
                toolkit.CopyForm(i, 0)
                toolkit.SetFont("Helvetica", 72)
                toolkit.SetTextColor(200, 200, 200)
                toolkit.PrintText(150, 400, watermarkText)
            Next
            toolkit.CloseInputFile()
            toolkit.CloseOutputFile()
        End If
    End Using
End Sub
$vbLabelText   $csharpLabel

IronPDFの実装:

using IronPdf;

public void AddWatermark(string inputPath, string outputPath, string watermarkText)
{
    using var pdf = PdfDocument.FromFile(inputPath);

    pdf.ApplyWatermark(
        $"<h1 style='color:lightgray;font-size:72px;'>{watermarkText}</h1>",
        rotation: 45,
        opacity: 50);

    pdf.SaveAs(outputPath);
}
using IronPdf;

public void AddWatermark(string inputPath, string outputPath, string watermarkText)
{
    using var pdf = PdfDocument.FromFile(inputPath);

    pdf.ApplyWatermark(
        $"<h1 style='color:lightgray;font-size:72px;'>{watermarkText}</h1>",
        rotation: 45,
        opacity: 50);

    pdf.SaveAs(outputPath);
}
Imports IronPdf

Public Sub AddWatermark(inputPath As String, outputPath As String, watermarkText As String)
    Using pdf = PdfDocument.FromFile(inputPath)
        pdf.ApplyWatermark(
            $"<h1 style='color:lightgray;font-size:72px;'>{watermarkText}</h1>",
            rotation:=45,
            opacity:=50)

        pdf.SaveAs(outputPath)
    End Using
End Sub
$vbLabelText   $csharpLabel

IronPDFのHTMLベースの透かしはCSSスタイリングを可能にし、ページごとの反復作業なしにデザインを完全にコントロールします。

.NETコアの統合

最新のウェブアプリケーションはIronPDFのすっきりとした統合パターンから大きな恩恵を受けています。

ActivePDFパターン (WebGrabber):

[HttpPost]
public IActionResult GeneratePdf([FromBody] ReportRequest request)
{
    var wg = new APWebGrabber.WebGrabber();
    string tempHtml = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + ".html");
    System.IO.File.WriteAllText(tempHtml, request.Html);

    wg.URL = tempHtml;
    wg.OutputDirectory = Path.GetTempPath();
    wg.OutputFilename = "temp.pdf";

    if (wg.ConvertToPDF() == 0)
    {
        byte[] bytes = System.IO.File.ReadAllBytes(Path.Combine(Path.GetTempPath(), "temp.pdf"));
        return File(bytes, "application/pdf", "report.pdf");
    }

    return BadRequest("PDF generation failed");
}
[HttpPost]
public IActionResult GeneratePdf([FromBody] ReportRequest request)
{
    var wg = new APWebGrabber.WebGrabber();
    string tempHtml = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + ".html");
    System.IO.File.WriteAllText(tempHtml, request.Html);

    wg.URL = tempHtml;
    wg.OutputDirectory = Path.GetTempPath();
    wg.OutputFilename = "temp.pdf";

    if (wg.ConvertToPDF() == 0)
    {
        byte[] bytes = System.IO.File.ReadAllBytes(Path.Combine(Path.GetTempPath(), "temp.pdf"));
        return File(bytes, "application/pdf", "report.pdf");
    }

    return BadRequest("PDF generation failed");
}
Imports System
Imports System.IO
Imports Microsoft.AspNetCore.Mvc

<HttpPost>
Public Function GeneratePdf(<FromBody> request As ReportRequest) As IActionResult
    Dim wg As New APWebGrabber.WebGrabber()
    Dim tempHtml As String = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() & ".html")
    System.IO.File.WriteAllText(tempHtml, request.Html)

    wg.URL = tempHtml
    wg.OutputDirectory = Path.GetTempPath()
    wg.OutputFilename = "temp.pdf"

    If wg.ConvertToPDF() = 0 Then
        Dim bytes As Byte() = System.IO.File.ReadAllBytes(Path.Combine(Path.GetTempPath(), "temp.pdf"))
        Return File(bytes, "application/pdf", "report.pdf")
    End If

    Return BadRequest("PDF generation failed")
End Function
$vbLabelText   $csharpLabel

IronPDFパターン:

[HttpPost]
public IActionResult GeneratePdf([FromBody] ReportRequest request)
{
    var renderer = new ChromePdfRenderer();
    using var pdf = renderer.RenderHtmlAsPdf(request.Html);

    return File(pdf.BinaryData, "application/pdf", "report.pdf");
}
[HttpPost]
public IActionResult GeneratePdf([FromBody] ReportRequest request)
{
    var renderer = new ChromePdfRenderer();
    using var pdf = renderer.RenderHtmlAsPdf(request.Html);

    return File(pdf.BinaryData, "application/pdf", "report.pdf");
}
<HttpPost>
Public Function GeneratePdf(<FromBody> request As ReportRequest) As IActionResult
    Dim renderer As New ChromePdfRenderer()
    Using pdf = renderer.RenderHtmlAsPdf(request.Html)
        Return File(pdf.BinaryData, "application/pdf", "report.pdf")
    End Using
End Function
$vbLabelText   $csharpLabel

IronPDFは一時ファイルの必要性をなくし、PDFバイナリデータをメモリから直接返します。

ウェブ アプリケーションの非同期サポート

ActivePDFはネイティブの非同期サポートがありません。 IronPDFはスケーラブルなWebアプリケーションに不可欠な完全な非同期/待機機能を提供します:

using IronPdf;

public async Task<byte[]> GeneratePdfAsync(string html)
{
    var renderer = new ChromePdfRenderer();
    using var pdf = await renderer.RenderHtmlAsPdfAsync(html);
    return pdf.BinaryData;
}
using IronPdf;

public async Task<byte[]> GeneratePdfAsync(string html)
{
    var renderer = new ChromePdfRenderer();
    using var pdf = await renderer.RenderHtmlAsPdfAsync(html);
    return pdf.BinaryData;
}
Imports IronPdf

Public Async Function GeneratePdfAsync(html As String) As Task(Of Byte())
    Dim renderer As New ChromePdfRenderer()
    Using pdf = Await renderer.RenderHtmlAsPdfAsync(html)
        Return pdf.BinaryData
    End Using
End Function
$vbLabelText   $csharpLabel

依存性注入の構成

.NET 6+アプリケーションでは、IronPDFサービスをDIコンテナに登録してください:

// Program.cs (.NET 6+)
builder.Services.AddSingleton<ChromePdfRenderer>();

// Service wrapper
public interface IPdfService
{
    Task<byte[]> GeneratePdfAsync(string html);
    Task<byte[]> GeneratePdfFromUrlAsync(string url);
}

public class IronPdfService : IPdfService
{
    private readonly ChromePdfRenderer _renderer;

    public IronPdfService()
    {
        _renderer = new ChromePdfRenderer();
        _renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
    }

    public async Task<byte[]> GeneratePdfAsync(string html)
    {
        using var pdf = await _renderer.RenderHtmlAsPdfAsync(html);
        return pdf.BinaryData;
    }

    public async Task<byte[]> GeneratePdfFromUrlAsync(string url)
    {
        using var pdf = await _renderer.RenderUrlAsPdfAsync(url);
        return pdf.BinaryData;
    }
}
// Program.cs (.NET 6+)
builder.Services.AddSingleton<ChromePdfRenderer>();

// Service wrapper
public interface IPdfService
{
    Task<byte[]> GeneratePdfAsync(string html);
    Task<byte[]> GeneratePdfFromUrlAsync(string url);
}

public class IronPdfService : IPdfService
{
    private readonly ChromePdfRenderer _renderer;

    public IronPdfService()
    {
        _renderer = new ChromePdfRenderer();
        _renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
    }

    public async Task<byte[]> GeneratePdfAsync(string html)
    {
        using var pdf = await _renderer.RenderHtmlAsPdfAsync(html);
        return pdf.BinaryData;
    }

    public async Task<byte[]> GeneratePdfFromUrlAsync(string url)
    {
        using var pdf = await _renderer.RenderUrlAsPdfAsync(url);
        return pdf.BinaryData;
    }
}
Imports Microsoft.Extensions.DependencyInjection
Imports System.Threading.Tasks

' Program.vb (.NET 6+)
builder.Services.AddSingleton(Of ChromePdfRenderer)()

' Service wrapper
Public Interface IPdfService
    Function GeneratePdfAsync(html As String) As Task(Of Byte())
    Function GeneratePdfFromUrlAsync(url As String) As Task(Of Byte())
End Interface

Public Class IronPdfService
    Implements IPdfService

    Private ReadOnly _renderer As ChromePdfRenderer

    Public Sub New()
        _renderer = New ChromePdfRenderer()
        _renderer.RenderingOptions.PaperSize = PdfPaperSize.A4
    End Sub

    Public Async Function GeneratePdfAsync(html As String) As Task(Of Byte()) Implements IPdfService.GeneratePdfAsync
        Using pdf = Await _renderer.RenderHtmlAsPdfAsync(html)
            Return pdf.BinaryData
        End Using
    End Function

    Public Async Function GeneratePdfFromUrlAsync(url As String) As Task(Of Byte()) Implements IPdfService.GeneratePdfFromUrlAsync
        Using pdf = Await _renderer.RenderUrlAsPdfAsync(url)
            Return pdf.BinaryData
        End Using
    End Function
End Class
$vbLabelText   $csharpLabel

エラー処理の移行

ActivePDFは、ルックアップテーブルを必要とする整数のリターンコードを使用します。 IronPDFは最新の例外処理を使用します:

ActivePDFのエラー処理

using APToolkitNET;

using (var toolkit = new Toolkit())
{
    int result = toolkit.OpenOutputFile(path);

    if (result != 0)
    {
        // Error - look up the code in "Toolkit Return Results and Error Codes"
        Console.WriteLine($"Error code: {result}");
    }
}
using APToolkitNET;

using (var toolkit = new Toolkit())
{
    int result = toolkit.OpenOutputFile(path);

    if (result != 0)
    {
        // Error - look up the code in "Toolkit Return Results and Error Codes"
        Console.WriteLine($"Error code: {result}");
    }
}
Imports APToolkitNET

Using toolkit As New Toolkit()
    Dim result As Integer = toolkit.OpenOutputFile(path)

    If result <> 0 Then
        ' Error - look up the code in "Toolkit Return Results and Error Codes"
        Console.WriteLine($"Error code: {result}")
    End If
End Using
$vbLabelText   $csharpLabel

IronPDFのエラーハンドリング:

try
{
    var renderer = new ChromePdfRenderer();
    using var pdf = renderer.RenderHtmlAsPdf(html);
    pdf.SaveAs(path);
}
catch (IronPdf.Exceptions.IronPdfProductException ex)
{
    Console.WriteLine($"IronPDF Error: {ex.Message}");
}
catch (Exception ex)
{
    Console.WriteLine($"General Error: {ex.Message}");
}
try
{
    var renderer = new ChromePdfRenderer();
    using var pdf = renderer.RenderHtmlAsPdf(html);
    pdf.SaveAs(path);
}
catch (IronPdf.Exceptions.IronPdfProductException ex)
{
    Console.WriteLine($"IronPDF Error: {ex.Message}");
}
catch (Exception ex)
{
    Console.WriteLine($"General Error: {ex.Message}");
}
Imports IronPdf.Exceptions

Try
    Dim renderer = New ChromePdfRenderer()
    Using pdf = renderer.RenderHtmlAsPdf(html)
        pdf.SaveAs(path)
    End Using
Catch ex As IronPdfProductException
    Console.WriteLine($"IronPDF Error: {ex.Message}")
Catch ex As Exception
    Console.WriteLine($"General Error: {ex.Message}")
End Try
$vbLabelText   $csharpLabel

パフォーマンス最適化のヒント

レンダラー インスタンスの再利用

新しいChromePdfRendererの作成には初期化のオーバーヘッドがあります。 バッチ処理では、単一のインスタンスを再利用します:

var renderer = new ChromePdfRenderer();
foreach (var html in htmlList)
{
    using var pdf = renderer.RenderHtmlAsPdf(html);
    pdf.SaveAs($"output_{i}.pdf");
}
var renderer = new ChromePdfRenderer();
foreach (var html in htmlList)
{
    using var pdf = renderer.RenderHtmlAsPdf(html);
    pdf.SaveAs($"output_{i}.pdf");
}
Imports IronPdf

Dim renderer As New ChromePdfRenderer()
For Each html In htmlList
    Using pdf = renderer.RenderHtmlAsPdf(html)
        pdf.SaveAs($"output_{i}.pdf")
    End Using
Next
$vbLabelText   $csharpLabel

Webアプリケーションで非同期を使用する

.NET Coreアプリケーションでは、非同期PDF生成によりスループットが向上します:

public async Task<IActionResult> GenerateReport()
{
    var renderer = new ChromePdfRenderer();
    using var pdf = await renderer.RenderHtmlAsPdfAsync(html);
    return File(pdf.BinaryData, "application/pdf");
}
public async Task<IActionResult> GenerateReport()
{
    var renderer = new ChromePdfRenderer();
    using var pdf = await renderer.RenderHtmlAsPdfAsync(html);
    return File(pdf.BinaryData, "application/pdf");
}
Imports System.Threading.Tasks
Imports Microsoft.AspNetCore.Mvc

Public Class ReportController
    Inherits Controller

    Public Async Function GenerateReport() As Task(Of IActionResult)
        Dim renderer As New ChromePdfRenderer()
        Using pdf = Await renderer.RenderHtmlAsPdfAsync(html)
            Return File(pdf.BinaryData, "application/pdf")
        End Using
    End Function
End Class
$vbLabelText   $csharpLabel

適切なリソースの処分

適切なクリーンアップを保証するために常にusingステートメントを使用してください:

using var pdf = renderer.RenderHtmlAsPdf(html);
return pdf.BinaryData;
using var pdf = renderer.RenderHtmlAsPdf(html);
return pdf.BinaryData;
$vbLabelText   $csharpLabel

画像圧縮

画像圧縮で出力ファイルサイズを削減する:

using var pdf = renderer.RenderHtmlAsPdf(html);
pdf.CompressImages(85); // 85% quality
pdf.SaveAs("compressed.pdf");
using var pdf = renderer.RenderHtmlAsPdf(html);
pdf.CompressImages(85); // 85% quality
pdf.SaveAs("compressed.pdf");
$vbLabelText   $csharpLabel

よくある移行の問題のトラブルシューティング

課題ページサイズの違い

ActivePDF WebGrabberはポイント (612x792 = Letter) を使用しますが、IronPDFは列挙型またはミリメートルを使用します。

//アクティブPDFWebGrabber: Points
wg.PageWidth = 612;
wg.PageHeight = 792;

// IronPDF: Use enum
renderer.RenderingOptions.PaperSize = PdfPaperSize.Letter;
// Or custom in mm:
renderer.RenderingOptions.SetCustomPaperSizeInMillimeters(215.9, 279.4);
//アクティブPDFWebGrabber: Points
wg.PageWidth = 612;
wg.PageHeight = 792;

// IronPDF: Use enum
renderer.RenderingOptions.PaperSize = PdfPaperSize.Letter;
// Or custom in mm:
renderer.RenderingOptions.SetCustomPaperSizeInMillimeters(215.9, 279.4);
'アクティブPDFWebGrabber: Points
wg.PageWidth = 612
wg.PageHeight = 792

' IronPDF: Use enum
renderer.RenderingOptions.PaperSize = PdfPaperSize.Letter
' Or custom in mm:
renderer.RenderingOptions.SetCustomPaperSizeInMillimeters(215.9, 279.4)
$vbLabelText   $csharpLabel

問題CloseOutputFile と同等のものがありません

IronPDFは明示的なファイルハンドル管理のない最新のパラダイムを使用しています:

//アクティブPDFToolkit
toolkit.OpenOutputFile(path);
// ... operations ...
toolkit.CloseOutputFile(); // Required!

//IronPDF- no open/close needed
using var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs(path); // 'using' handles cleanup
//アクティブPDFToolkit
toolkit.OpenOutputFile(path);
// ... operations ...
toolkit.CloseOutputFile(); // Required!

//IronPDF- no open/close needed
using var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs(path); // 'using' handles cleanup
'アクティブPDFToolkit
toolkit.OpenOutputFile(path)
' ... operations ...
toolkit.CloseOutputFile() ' Required!

'IronPDF- no open/close needed
Using pdf = renderer.RenderHtmlAsPdf(html)
    pdf.SaveAs(path) ' 'Using' handles cleanup
End Using
$vbLabelText   $csharpLabel

問題です:PDFが真っ白にレンダリングされる

JavaScriptに依存するコンテンツが空白でレンダリングされる場合は、レンダリング遅延を設定してください:

var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.WaitFor.RenderDelay(2000);
// Or wait for element:
renderer.RenderingOptions.WaitFor.HtmlElementById("content-loaded");
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.WaitFor.RenderDelay(2000);
// Or wait for element:
renderer.RenderingOptions.WaitFor.HtmlElementById("content-loaded");
Dim renderer = New ChromePdfRenderer()
renderer.RenderingOptions.WaitFor.RenderDelay(2000)
' Or wait for element:
renderer.RenderingOptions.WaitFor.HtmlElementById("content-loaded")
$vbLabelText   $csharpLabel

課題CSS/画像が読み込まれない

相対パス解決用にベースURLを設定します:

renderer.RenderingOptions.BaseUrl = new Uri("https://yourdomain.com/assets/");
renderer.RenderingOptions.BaseUrl = new Uri("https://yourdomain.com/assets/");
renderer.RenderingOptions.BaseUrl = New Uri("https://yourdomain.com/assets/")
$vbLabelText   $csharpLabel

移行後のチェックリスト

コードの移行が完了したら、以下を確認してください:

  • 既存のユニットテストと統合テストをすべて実行する
  • PDF出力を以前のバージョンと視覚的に比較する
  • ステージング環境ですべてのPDFワークフローをテストする
  • ライセンスが正しく機能することを確認してください(IronPdf.License.IsLicensed
  • 以前の実装と比較したパフォーマンスのベンチマーク
  • 古いActivePDFインストールファイルとDLL参照を削除します
  • CI/CDパイプラインの依存関係を更新する
  • 開発チーム向けにIronPDFパターンを文書化する

その他のリソース


ActivePDFからIronPDFへの移行は、よりクリーンなAPI、より優れた.NET統合、積極的な長期サポートによってPDF生成インフラを近代化します。 移行への投資は、コードの保守性の向上、非同期機能、そしてPDFライブラリの継続的な開発への信頼という形で報われます。

ご注意ActivePDFとApryseはそれぞれの所有者の登録商標です。 このサイトは、ActivePDFやApryseとの関係がなく、承認もされておらず、スポンサーでもありません。 すべての製品名、ロゴ、およびブランドは各所有者の所有物です。 比較は情報提供のみを目的としており、執筆時点で公開されている情報を反映しています。

Curtis Chau
テクニカルライター

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

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

アイアンサポートチーム

私たちは週5日、24時間オンラインで対応しています。
チャット
メール
電話してね