移行ガイド C#でAspose.PDFからIronPDFへ移行する方法 カーティス・チャウ 公開日:2026年1月11日 IronPDF をダウンロード NuGet ダウンロード DLL ダウンロード Windows 版 無料トライアル LLM向けのコピー LLM向けのコピー LLM 用の Markdown としてページをコピーする ChatGPTで開く このページについてChatGPTに質問する ジェミニで開く このページについてGeminiに問い合わせる Grokで開く このページについてGrokに質問する 困惑の中で開く このページについてPerplexityに問い合わせる 共有する Facebook で共有 Xでシェア(Twitter) LinkedIn で共有 URLをコピー 記事をメールで送る なぜAspose.PDFから移行するのですか? Aspose.PDFはエンタープライズグレードの機能を提供しますが、開発チームがPDF生成のニーズに対して最新の選択肢を求めるようになったのには、いくつかの要因があります。 コスト比較 Aspose.PDFは、従来のエンタープライズライセンスモデルを採用しており、年ごとの更新が必要です: アスペクト Aspose.PDF IronPDF 開始価格 1,199ドル/開発者/年 1回749ドル(Lite) ライセンスモデル 年間サブスクリプション+更新 永久ライセンス OEMライセンス 5,997ドル以上 上位層に含まれるもの サポート 追加料金 含まれるもの 3年間の総費用 開発者1名あたり3,597ドル以上 749ドル HTMLレンダリングエンジンの比較 Aspose.PDFはFlying Saucer CSSエンジンを使用しているため、最新のWeb標準に対応していません。 IronPdfは完全なChromiumレンダリングエンジンを利用しています: フィーチャー Aspose.PDF(フライングソーサー) IronPDF (Chromium) CSS3のサポート。 制限あり(古いCSS) 完全なCSS3 フレックスボックス/グリッド サポートされていません フルサポート JavaScript(ジャバスクリプト 非常に限定的 フルサポート ウェブフォント 部分的 完了 モダンHTML5。 制限的 完了 レンダリング品質について 変数 ピクセルパーフェクト 文書化されたパフォーマンスの問題 ユーザーは、2つのライブラリの間に大きなパフォーマンスの違いがあることを報告しています: メトリック Aspose.PDF IronPDF HTMLレンダリング。 文書化された速度低下(場合によっては30倍の速度低下) 最適化されたChromiumエンジン 大型文書 報告されたメモリの問題 効率的なストリーミング Linuxのパフォーマンス。 高 CPU、メモリリークの報告 安定性 Aspose.PDFとIronPDFの比較:主な違い アスペクト Aspose.PDF IronPDF 価格について 1,199ドル/開発者/年(サブスクリプション) 1回749ドル(Lite) HTMLエンジン フライングソーサー(限定CSS) Chromium (フルCSS3/JS) パフォーマンス 文書化された速度低下 最適化 ライセンスモデル 年間更新+.licファイル 永久+コードベースのキー Linuxのサポート。 報告された問題(CPU、メモリ) 安定性 ページ索引。 1ベース(ページ[1]) 0ベース(`ページ[0]</code) 移行前の準備 前提条件 あなたの環境がこれらの要件を満たしていることを確認してください: .NET Framework 4.6.2+または.NET Core 3.1 / .NET 5-9 Visual Studio 2019+またはC#拡張機能付きVS Code NuGetパッケージマネージャへのアクセス IronPDFライセンスキー (ironpdf.com にて無料トライアル可能) Aspose.PDFの使用法を監査する ソリューションディレクトリでこれらのコマンドを実行し、すべてのAspose.PDF参照を特定します: # Find all Aspose.Pdf using statements grep -r "using Aspose.Pdf" --include="*.cs" . # Find HtmlLoadOptions usage grep -r "HtmlLoadOptions\|HtmlFragment" --include="*.cs" . # Find Facades usage grep -r "PdfFileEditor\|PdfFileMend\|PdfFileStamp" --include="*.cs" . # Find TextAbsorber usage grep -r "TextAbsorber\|TextFragmentAbsorber" --include="*.cs" . # Find all Aspose.Pdf using statements grep -r "using Aspose.Pdf" --include="*.cs" . # Find HtmlLoadOptions usage grep -r "HtmlLoadOptions\|HtmlFragment" --include="*.cs" . # Find Facades usage grep -r "PdfFileEditor\|PdfFileMend\|PdfFileStamp" --include="*.cs" . # Find TextAbsorber usage grep -r "TextAbsorber\|TextFragmentAbsorber" --include="*.cs" . SHELL 予想される画期的な変更 Aspose.PDFパターン 必要な変更 new Document() + Pages.Add()とします。 HTMLレンダリングを使用する HtmlLoadOptions|ChromePdfRenderer.RenderHtmlAsPdf()`のようになります。 TextFragment+手動ポジショニング CSSベースのポジショニング PdfFileEditor.Concatenate()を使用してください。 PdfDocument.Merge()を使用してください。 TextFragmentAbsorber pdf.ExtractAllText()を使用してください。 イメージスタンプ HTMLベースの透かし .licファイルのライセンシング コードベースのライセンスキー 1ベースのページインデックス 0ベースのページインデックス ステップごとの移行プロセス ステップ 1: NuGet パッケージを更新する Aspose.PDFを削除し、IronPDFをインストールしてください: # Remove Aspose.PDF dotnet remove package Aspose.PDF # Install IronPDF dotnet add package IronPdf # Remove Aspose.PDF dotnet remove package Aspose.PDF # Install IronPDF dotnet add package IronPdf SHELL またはパッケージマネージャーコンソールから: Uninstall-Package Aspose.PDF Install-Package IronPdf ステップ 2: 名前空間参照の更新 Aspose.PDFの名前空間をIronPdf.PDFに置き換えてください: // Remove these using Aspose.Pdf; using Aspose.Pdf.Text; using Aspose.Pdf.Facades; using Aspose.Pdf.Generator; // Add these using IronPdf; using IronPdf.Rendering; using IronPdf.Editing; // Remove these using Aspose.Pdf; using Aspose.Pdf.Text; using Aspose.Pdf.Facades; using Aspose.Pdf.Generator; // Add these using IronPdf; using IronPdf.Rendering; using IronPdf.Editing; $vbLabelText $csharpLabel ステップ 3: ライセンス構成の更新 Aspose.PDFは.licファイルライセンスを使用しています。 IronPDFはシンプルなコードベースのキーを使用しています。 Aspose.PDFの実装: var license = new Aspose.Pdf.License(); license.SetLicense("Aspose.Pdf.lic"); var license = new Aspose.Pdf.License(); license.SetLicense("Aspose.Pdf.lic"); $vbLabelText $csharpLabel IronPDFの実装:。 IronPdf.License.LicenseKey = "YOUR-IRONPDF-LICENSE-KEY"; IronPdf.License.LicenseKey = "YOUR-IRONPDF-LICENSE-KEY"; $vbLabelText $csharpLabel 完全な API 移行のリファレンス コア クラス マッピング Aspose.PDFクラス IronPDF 同等物 ノート ドキュメント PdfDocument 主なドキュメントクラス HtmlLoadOptions ChromePdfRenderer HTML to PDF. TextFragmentAbsorber PdfDocument.ExtractAllText()。 テキスト抽出。 PdfFileEditor PdfDocument.Merge()を使用してください。 マージ/分割操作 テキストスタンプ</code> / <code>イメージスタンプ PdfDocument.ApplyWatermark()。 透かし ライセンス IronPdf.ライセンス ライセンス ドキュメント操作 Aspose.PDFメソッド IronPDF メソッド ノート new Document(). new PdfDocument(). 空のドキュメント new Document(path) とします。 PdfDocument.FromFile(パス)。 ファイルから読み込む doc.Save(パス)を実行します。 pdf.SaveAs(path)のようにします。 ファイルに保存 doc.Pages.Count pdf.PageCount ページ数 doc.Pages.Delete(インデックス)。 pdf.RemovePage(インデックス)。 ページを削除 HTMLからPDFへの変換 Aspose.PDFメソッド IronPDF メソッド ノート new HtmlLoadOptions(). new ChromePdfRenderer(). HTMLレンダラー new Document(stream, htmlOptions). renderer.RenderHtmlAsPdf(html). HTML文字列 new Document(path, htmlOptions). renderer.RenderHtmlFileAsPdf(path)のようにします。 HTMLファイル コード移行の例 HTML文字列をPDFに変換 Aspose.PDFはHTMLをMemoryStreamでラップする必要がありますが、IronPDFは文字列を直接受け取ります。 Aspose.PDFの実装: // NuGet: Install-Package Aspose.PDF using Aspose.Pdf; using System; using System.IO; using System.Text; class Program { static void Main() { string htmlContent = "<html><body><h1>Hello World</h1><p>This is a PDF from HTML string.</p></body></html>"; using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(htmlContent))) { var htmlLoadOptions = new HtmlLoadOptions(); var document = new Document(stream, htmlLoadOptions); document.Save("output.pdf"); } Console.WriteLine("PDF created from HTML string"); } } // NuGet: Install-Package Aspose.PDF using Aspose.Pdf; using System; using System.IO; using System.Text; class Program { static void Main() { string htmlContent = "<html><body><h1>Hello World</h1><p>This is a PDF from HTML string.</p></body></html>"; using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(htmlContent))) { var htmlLoadOptions = new HtmlLoadOptions(); var document = new Document(stream, htmlLoadOptions); document.Save("output.pdf"); } Console.WriteLine("PDF created from HTML string"); } } $vbLabelText $csharpLabel IronPDFの実装:。 // NuGet: Install-Package IronPdf using IronPdf; using System; class Program { static void Main() { string htmlContent = "<html><body><h1>Hello World</h1><p>This is a PDF from HTML string.</p></body></html>"; var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf(htmlContent); pdf.SaveAs("output.pdf"); Console.WriteLine("PDF created from HTML string"); } } // NuGet: Install-Package IronPdf using IronPdf; using System; class Program { static void Main() { string htmlContent = "<html><body><h1>Hello World</h1><p>This is a PDF from HTML string.</p></body></html>"; var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf(htmlContent); pdf.SaveAs("output.pdf"); Console.WriteLine("PDF created from HTML string"); } } $vbLabelText $csharpLabel IronPDFはMemoryStreamラッパーを完全に排除し、よりクリーンで直感的なAPIを提供します。 HTMLファイルからPDFへ Aspose.PDFの実装: // NuGet: Install-Package Aspose.PDF using Aspose.Pdf; using System; class Program { static void Main() { var htmlLoadOptions = new HtmlLoadOptions(); var document = new Document("input.html", htmlLoadOptions); document.Save("output.pdf"); Console.WriteLine("PDF created successfully"); } } // NuGet: Install-Package Aspose.PDF using Aspose.Pdf; using System; class Program { static void Main() { var htmlLoadOptions = new HtmlLoadOptions(); var document = new Document("input.html", htmlLoadOptions); document.Save("output.pdf"); Console.WriteLine("PDF created successfully"); } } $vbLabelText $csharpLabel IronPDFの実装:。 // NuGet: Install-Package IronPdf using IronPdf; using System; class Program { static void Main() { var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlFileAsPdf("input.html"); 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(); var pdf = renderer.RenderHtmlFileAsPdf("input.html"); pdf.SaveAs("output.pdf"); Console.WriteLine("PDF created successfully"); } } $vbLabelText $csharpLabel 複数のPDFをマージする Aspose.PDFでは、手作業でページを反復する必要があります。 IronPDFは静的なMergeメソッドを提供します。 Aspose.PDFの実装: // NuGet: Install-Package Aspose.PDF using Aspose.Pdf; using System; class Program { static void Main() { var document1 = new Document("file1.pdf"); var document2 = new Document("file2.pdf"); foreach (Page page in document2.Pages) { document1.Pages.Add(page); } document1.Save("merged.pdf"); Console.WriteLine("PDFs merged successfully"); } } // NuGet: Install-Package Aspose.PDF using Aspose.Pdf; using System; class Program { static void Main() { var document1 = new Document("file1.pdf"); var document2 = new Document("file2.pdf"); foreach (Page page in document2.Pages) { document1.Pages.Add(page); } document1.Save("merged.pdf"); Console.WriteLine("PDFs merged successfully"); } } $vbLabelText $csharpLabel IronPDFの実装:。 // NuGet: Install-Package IronPdf using IronPdf; using System; using System.Collections.Generic; class Program { static void Main() { var pdf1 = PdfDocument.FromFile("file1.pdf"); var pdf2 = PdfDocument.FromFile("file2.pdf"); var merged = PdfDocument.Merge(pdf1, pdf2); merged.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() { var pdf1 = PdfDocument.FromFile("file1.pdf"); var pdf2 = PdfDocument.FromFile("file2.pdf"); var merged = PdfDocument.Merge(pdf1, pdf2); merged.SaveAs("merged.pdf"); Console.WriteLine("PDFs merged successfully"); } } $vbLabelText $csharpLabel テキスト抽出 Aspose.PDFの実装: using Aspose.Pdf; using Aspose.Pdf.Text; var document = new Document("document.pdf"); var absorber = new TextAbsorber(); foreach (Page page in document.Pages) { page.Accept(absorber); } string extractedText = absorber.Text; Console.WriteLine(extractedText); using Aspose.Pdf; using Aspose.Pdf.Text; var document = new Document("document.pdf"); var absorber = new TextAbsorber(); foreach (Page page in document.Pages) { page.Accept(absorber); } string extractedText = absorber.Text; Console.WriteLine(extractedText); $vbLabelText $csharpLabel IronPDFの実装:。 using IronPdf; var pdf = PdfDocument.FromFile("document.pdf"); // Extract all text - one line! string allText = pdf.ExtractAllText(); Console.WriteLine(allText); // Or extract from specific page string page1Text = pdf.ExtractTextFromPage(0); using IronPdf; var pdf = PdfDocument.FromFile("document.pdf"); // Extract all text - one line! string allText = pdf.ExtractAllText(); Console.WriteLine(allText); // Or extract from specific page string page1Text = pdf.ExtractTextFromPage(0); $vbLabelText $csharpLabel IronPdfはテキスト抽出を複数のステップから単一のメソッド呼び出しに簡素化します。 透かしの追加 Aspose.PDFの実装: using Aspose.Pdf; using Aspose.Pdf.Text; var document = new Document("document.pdf"); var textStamp = new TextStamp("CONFIDENTIAL"); textStamp.Background = true; textStamp.XIndent = 100; textStamp.YIndent = 100; textStamp.Rotate = Rotation.on45; textStamp.Opacity = 0.5; textStamp.TextState.Font = FontRepository.FindFont("Arial"); textStamp.TextState.FontSize = 72; textStamp.TextState.ForegroundColor = Color.Red; foreach (Page page in document.Pages) { page.AddStamp(textStamp); } document.Save("watermarked.pdf"); using Aspose.Pdf; using Aspose.Pdf.Text; var document = new Document("document.pdf"); var textStamp = new TextStamp("CONFIDENTIAL"); textStamp.Background = true; textStamp.XIndent = 100; textStamp.YIndent = 100; textStamp.Rotate = Rotation.on45; textStamp.Opacity = 0.5; textStamp.TextState.Font = FontRepository.FindFont("Arial"); textStamp.TextState.FontSize = 72; textStamp.TextState.ForegroundColor = Color.Red; foreach (Page page in document.Pages) { page.AddStamp(textStamp); } document.Save("watermarked.pdf"); $vbLabelText $csharpLabel IronPDFの実装:。 using IronPdf; using IronPdf.Editing; var pdf = PdfDocument.FromFile("document.pdf"); // HTML-based watermark with full styling control string watermarkHtml = @" <div style=' color: red; opacity: 0.5; font-family: Arial; font-size: 72px; font-weight: bold; text-align: center; '>CONFIDENTIAL</div>"; pdf.ApplyWatermark(watermarkHtml, rotation: 45, verticalAlignment: VerticalAlignment.Middle, horizontalAlignment: HorizontalAlignment.Center); pdf.SaveAs("watermarked.pdf"); using IronPdf; using IronPdf.Editing; var pdf = PdfDocument.FromFile("document.pdf"); // HTML-based watermark with full styling control string watermarkHtml = @" <div style=' color: red; opacity: 0.5; font-family: Arial; font-size: 72px; font-weight: bold; text-align: center; '>CONFIDENTIAL</div>"; pdf.ApplyWatermark(watermarkHtml, rotation: 45, verticalAlignment: VerticalAlignment.Middle, horizontalAlignment: HorizontalAlignment.Center); pdf.SaveAs("watermarked.pdf"); $vbLabelText $csharpLabel IronPDF はHTML/CSS ベースの透かしを使用しており、使い慣れた Web テクノロジーを通じて完全なスタイル制御を提供します。 パスワード保護 Aspose.PDFの実装: using Aspose.Pdf; var document = new Document("document.pdf"); document.Encrypt("userPassword", "ownerPassword", DocumentPrivilege.ForbidAll, CryptoAlgorithm.AESx256); document.Save("protected.pdf"); using Aspose.Pdf; var document = new Document("document.pdf"); document.Encrypt("userPassword", "ownerPassword", DocumentPrivilege.ForbidAll, CryptoAlgorithm.AESx256); document.Save("protected.pdf"); $vbLabelText $csharpLabel IronPDFの実装:。 using IronPdf; var pdf = PdfDocument.FromFile("document.pdf"); // Set passwords pdf.SecuritySettings.UserPassword = "userPassword"; pdf.SecuritySettings.OwnerPassword = "ownerPassword"; // Set permissions pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights; pdf.SecuritySettings.AllowUserCopyPasteContent = false; pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.NoEdit; pdf.SaveAs("protected.pdf"); using IronPdf; var pdf = PdfDocument.FromFile("document.pdf"); // Set passwords pdf.SecuritySettings.UserPassword = "userPassword"; pdf.SecuritySettings.OwnerPassword = "ownerPassword"; // Set permissions pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights; pdf.SecuritySettings.AllowUserCopyPasteContent = false; pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.NoEdit; pdf.SaveAs("protected.pdf"); $vbLabelText $csharpLabel IronPdfは強く型付けされたプロパティを通してパーミッションのきめ細かなコントロールを提供します。 その他のオプションについては、暗号化のドキュメントを参照してください。 ヘッダーとフッター IronPDFの実装:。 using IronPdf; var renderer = new ChromePdfRenderer(); renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter { HtmlFragment = @" <div style='text-align:center; font-family:Arial; font-size:12px;'> Company Header </div>", DrawDividerLine = true, MaxHeight = 30 }; renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter { HtmlFragment = @" <div style='text-align:center; font-family:Arial; font-size:10px;'> Page {page} of {total-pages} </div>", DrawDividerLine = true, MaxHeight = 25 }; var pdf = renderer.RenderHtmlAsPdf("<h1>Content here</h1>"); pdf.SaveAs("with_headers.pdf"); using IronPdf; var renderer = new ChromePdfRenderer(); renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter { HtmlFragment = @" <div style='text-align:center; font-family:Arial; font-size:12px;'> Company Header </div>", DrawDividerLine = true, MaxHeight = 30 }; renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter { HtmlFragment = @" <div style='text-align:center; font-family:Arial; font-size:10px;'> Page {page} of {total-pages} </div>", DrawDividerLine = true, MaxHeight = 25 }; var pdf = renderer.RenderHtmlAsPdf("<h1>Content here</h1>"); pdf.SaveAs("with_headers.pdf"); $vbLabelText $csharpLabel IronPDFは{page}や{total-pages}のようなプレースホルダートークンをサポートしています。 その他のオプションについては、headers and footers documentationを参照してください。 重要な移行に関する注意事項 ページのインデックス変更 Aspose.PDFは1ベースのインデックスを使用しています。 IronPDFは0ベースのインデックスを使用しています: // Aspose.PDF - 1-based indexing var firstPage = doc.Pages[1]; // First page var thirdPage = doc.Pages[3]; // Third page //IronPDF- 0-based indexing var firstPage = pdf.Pages[0]; // First page var thirdPage = pdf.Pages[2]; // Third page // Aspose.PDF - 1-based indexing var firstPage = doc.Pages[1]; // First page var thirdPage = doc.Pages[3]; // Third page //IronPDF- 0-based indexing var firstPage = pdf.Pages[0]; // First page var thirdPage = pdf.Pages[2]; // Third page $vbLabelText $csharpLabel ライセンス ファイルからコード キーへ .licファイルのライセンシングをコードベースのアクティベーションに置き換えてください: // Aspose.PDF var license = new Aspose.Pdf.License(); license.SetLicense("Aspose.Pdf.lic"); // IronPDF IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"; // Or from environment variable IronPdf.License.LicenseKey = Environment.GetEnvironmentVariable("IRONPDF_LICENSE_KEY"); // Aspose.PDF var license = new Aspose.Pdf.License(); license.SetLicense("Aspose.Pdf.lic"); // IronPDF IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"; // Or from environment variable IronPdf.License.LicenseKey = Environment.GetEnvironmentVariable("IRONPDF_LICENSE_KEY"); $vbLabelText $csharpLabel .NETコアの統合 IronPDFパターン: [ApiController] [Route("[controller]")] public class PdfController : ControllerBase { [HttpGet("generate")] public IActionResult GeneratePdf() { var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf("<h1>Report</h1>"); return File(pdf.BinaryData, "application/pdf", "report.pdf"); } [HttpGet("generate-async")] public async Task<IActionResult> GeneratePdfAsync() { var renderer = new ChromePdfRenderer(); var pdf = await renderer.RenderHtmlAsPdfAsync("<h1>Report</h1>"); return File(pdf.Stream, "application/pdf", "report.pdf"); } } [ApiController] [Route("[controller]")] public class PdfController : ControllerBase { [HttpGet("generate")] public IActionResult GeneratePdf() { var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf("<h1>Report</h1>"); return File(pdf.BinaryData, "application/pdf", "report.pdf"); } [HttpGet("generate-async")] public async Task<IActionResult> GeneratePdfAsync() { var renderer = new ChromePdfRenderer(); var pdf = await renderer.RenderHtmlAsPdfAsync("<h1>Report</h1>"); return File(pdf.Stream, "application/pdf", "report.pdf"); } } $vbLabelText $csharpLabel 依存性注入の構成 // Program.cs public void ConfigureServices(IServiceCollection services) { // Set license once IronPdf.License.LicenseKey = Configuration["IronPdf:LicenseKey"]; // Register renderer as scoped service services.AddScoped<ChromePdfRenderer>(); } // Program.cs public void ConfigureServices(IServiceCollection services) { // Set license once IronPdf.License.LicenseKey = Configuration["IronPdf:LicenseKey"]; // Register renderer as scoped service services.AddScoped<ChromePdfRenderer>(); } $vbLabelText $csharpLabel パフォーマンスの最適化 // 1. Reuse renderer instance private static readonly ChromePdfRenderer SharedRenderer = new ChromePdfRenderer(); // 2. Disable unnecessary features for speed var renderer = new ChromePdfRenderer(); renderer.RenderingOptions.EnableJavaScript = false; // If not needed renderer.RenderingOptions.WaitFor.RenderDelay(0); // No delay renderer.RenderingOptions.Timeout = 30000; // 30s max // 3. Proper disposal using (var pdf = renderer.RenderHtmlAsPdf(html)) { pdf.SaveAs("output.pdf"); } // 1. Reuse renderer instance private static readonly ChromePdfRenderer SharedRenderer = new ChromePdfRenderer(); // 2. Disable unnecessary features for speed var renderer = new ChromePdfRenderer(); renderer.RenderingOptions.EnableJavaScript = false; // If not needed renderer.RenderingOptions.WaitFor.RenderDelay(0); // No delay renderer.RenderingOptions.Timeout = 30000; // 30s max // 3. Proper disposal using (var pdf = renderer.RenderHtmlAsPdf(html)) { pdf.SaveAs("output.pdf"); } $vbLabelText $csharpLabel よくある移行の問題のトラブルシューティング 問題HtmlLoadOptions が見つかりません ChromePdfRendererと置き換えてください: // Remove this var doc = new Document(stream, new HtmlLoadOptions()); // Use this var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf(htmlString); // Remove this var doc = new Document(stream, new HtmlLoadOptions()); // Use this var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf(htmlString); $vbLabelText $csharpLabel 課題TextFragmentAbsorber が見つかりません 直接テキスト抽出を使用します: // Remove this var absorber = new TextFragmentAbsorber(); page.Accept(absorber); string text = absorber.Text; // Use this var pdf = PdfDocument.FromFile("doc.pdf"); string text = pdf.ExtractAllText(); // Remove this var absorber = new TextFragmentAbsorber(); page.Accept(absorber); string text = absorber.Text; // Use this var pdf = PdfDocument.FromFile("doc.pdf"); string text = pdf.ExtractAllText(); $vbLabelText $csharpLabel 課題PdfFileEditor.Concatenate が使用できません PdfDocument.Merge()を使用してください: // Remove this var editor = new PdfFileEditor(); editor.Concatenate(files, output); // Use this var pdfs = files.Select(PdfDocument.FromFile).ToList(); var merged = PdfDocument.Merge(pdfs); merged.SaveAs(output); // Remove this var editor = new PdfFileEditor(); editor.Concatenate(files, output); // Use this var pdfs = files.Select(PdfDocument.FromFile).ToList(); var merged = PdfDocument.Merge(pdfs); merged.SaveAs(output); $vbLabelText $csharpLabel 移行後のチェックリスト コードの移行が完了したら、以下を確認してください: Aspose.PDF ライセンス ファイル (.lic) を削除します。 HTML レンダリング品質を確認します (CSS グリッド、Flexbox が正しく動作するはずです) 大きなドキュメントと複雑な CSS を含むエッジケースをテストする ページインデックス参照を更新(1 ベースから 0 ベースへ) 該当する場合はDocker構成を更新します 新しいライセンスキー設定でCI/CDパイプラインを更新する チームの新しいパターンを文書化する PDFインフラストラクチャの将来性を確保する .NET 10が目前に迫り、C# 14が新しい言語機能を導入する中、最新のレンダリング機能を備えたPDFライブラリを選択することで、進化するWeb標準との互換性を確保することができます。 IronPdfのChromiumエンジンはモダンブラウザと同じHTML/CSSをレンダリングするため、Aspose.PDFのFlying SaucerエンジンのようなCSSの制限を受けることなく、プロジェクトが2025年や2026年に拡張されてもPDFテンプレートは最新のままです。 その他のリソース IronPDFドキュメント. HTMLからPDFへのチュートリアル。 APIリファレンス. NuGetパッケージ。 ライセンスオプション。 Aspose.PDFからIronPdfへの移行は、あなたのPDFコードベースを時代遅れのHTMLレンダリングエンジンから最新のChromiumベースのレンダリングに変換します。 MemoryStreamラッパーを排除し、テキスト抽出を簡素化し、優れたCSS3をサポートすることで、生産性を即座に向上させると同時に、長期的なライセンス費用を年間サブスクリプションから1回限りの投資に削減します。 カーティス・チャウ 今すぐエンジニアリングチームとチャット テクニカルライター Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。開発以外にも、CurtisはIoT(Internet of Things)への強い関心を持ち、ハードウェアとソフトウェアの統合方法を模索しています。余暇には、ゲームをしたりDiscordボットを作成したりして、技術に対する愛情と創造性を組み合わせています。 関連する記事 公開日 2026年2月1日 C#でZetPDFからIronPDFに移行する方法 この完全なC#ガイドでZetPDFからIronPDFへの移行をマスターしてください。座標ベースのライブラリから最新のHTML-to-PDFソリューションに切り替えます。HTML変換、PDFのマージ、PDFSharpの依存関係の削除のコード例が含まれています。 詳しく読む 公開日 2026年2月1日 C#でScryber.CoreからIronPDFに移行する方法 この完全なC#ガイドでScryber.CoreからIronPDFへの移行をマスターしてください。カスタムXML/HTMLパースから最新のChromiumレンダラーに切り替えます。HTML変換、URLレンダリング、独自のバインディングを置き換えるコード例を含みます。 詳しく読む 公開日 2026年2月1日 C#でXFINIUM.PDFからIronPdfへ移行する方法 この完全なC#ガイドでXFINIUM.PDFからIronPDFへの移行をマスターしてください。座標ベースの手動ポジショニングから宣言的なHTML/CSSレンダリングに切り替えます。グラフィックスプリミティブの置き換えと自動レイアウトのコード例を含みます。 詳しく読む C#でBitMiracle Docotic PDFからIronPDFに移行する方法C#でApryse PDFからIronPDFへ移...
公開日 2026年2月1日 C#でZetPDFからIronPDFに移行する方法 この完全なC#ガイドでZetPDFからIronPDFへの移行をマスターしてください。座標ベースのライブラリから最新のHTML-to-PDFソリューションに切り替えます。HTML変換、PDFのマージ、PDFSharpの依存関係の削除のコード例が含まれています。 詳しく読む
公開日 2026年2月1日 C#でScryber.CoreからIronPDFに移行する方法 この完全なC#ガイドでScryber.CoreからIronPDFへの移行をマスターしてください。カスタムXML/HTMLパースから最新のChromiumレンダラーに切り替えます。HTML変換、URLレンダリング、独自のバインディングを置き換えるコード例を含みます。 詳しく読む
公開日 2026年2月1日 C#でXFINIUM.PDFからIronPdfへ移行する方法 この完全なC#ガイドでXFINIUM.PDFからIronPDFへの移行をマスターしてください。座標ベースの手動ポジショニングから宣言的なHTML/CSSレンダリングに切り替えます。グラフィックスプリミティブの置き換えと自動レイアウトのコード例を含みます。 詳しく読む