How to Transform PDF Pages Using IronPDF in C# | IronPDF
PDFmyURLは、URLとHTMLコンテンツをPDFドキュメントに変換するために設計されたクラウドベースのAPIサービスです。 このサービスでは、すべての変換を外部サーバーで処理するため、ローカルインフラを最小限に抑えた、わかりやすい統合パスを提供します。 しかし、このようなクラウド依存のアーキテクチャは、機密データを扱ったり、オフライン機能を必要としたり、継続的なサブスクリプションコストを回避する必要がある本番アプリケーションにとって、重大な懸念を生じさせます。
このガイドはPDFmyURLからIronPDFへの完全な移行経路を、移行を検討しているプロ for .NET開発者のために、ステップバイステップの説明、コード比較、実用的な例とともに提供します。
なぜPDFmyURLから移行するのですか?
PDFmyURLのクラウド処理モデルには、開発チームが考慮しなければならないいくつかの課題があります:
プライバシーとデータ セキュリティ:変換するすべてのドキュメントはPDFmyURLのサーバーに送信され、サーバーを通過します。機密性の高い契約書、財務レポート、個人データはすべて外部で処理されます。
継続的なサブスクリプション費用: プランは$20/月(スターター、500 PDFs)、$40/月(プロフェッショナル、2,000 PDFs)、および$70/月(アドバンスト、5,000 PDFs)から始まり、いかなるレベルでも所有権はありません。 このサブスクリプションモデルは、使用パターンに関係なく継続的な支出を意味します。
インターネット依存性:すべての変換にはネットワーク接続が必要です。 アプリケーションは、オフラインまたはネットワーク停止中にPDFを処理することはできません。
レート制限とスロットリング:ピーク使用時には API 呼び出しがスロットリングされ、アプリケーションのパフォーマンスに影響を及ぼす可能性があります。
サービスの可用性:アプリケーションは、サードパーティのサービスがオンラインで機能していることに依存します。
ベンダー ロックイン: API の変更により、予告なしに統合が中断される可能性があり、事後的なコード更新が必要になります。
IronPDFとPDFmyURLの比較:機能の比較
アーキテクチャの違いを理解することは、技術的な意思決定者が移行への投資を評価するのに役立ちます:
| アスペクト | PDFmyURL | IronPDF |
|---|---|---|
| 加工場所 | 外部サーバー | ローカル(お客様のサーバー) |
| タイプ | APIラッパー | .NET ライブラリ |
| 認証。 | リクエストごとのAPIキー | ワンタイムライセンスキー |
| ネットワークが必要です。 | すべての変換 | 初期設定のみ |
| 価格設定モデル | 月間サブスクリプション ($20–$70+) | 永久ライセンスあり |
| 料金の制限 | あり(プランによる) | None |
| データプライバシー | 外部送信データ | データはローカルのまま |
| HTML/CSS/JSサポート。 | サーバーサイドレンダリング (W3C準拠) | フルChromiumエンジン |
| 非同期パターン | HTTPリクエスト (ネットワークバウンド) | 同期と非同期のオプション |
| PDF操作 | 制限的 | フルスイート(マージ、分割、編集) |
| ユースケース | 少量のアプリケーション | 大容量およびエンタープライズ |
クイックスタートPDFmyURLからIronPDFへの移行
これらの基本的なステップを踏めば、すぐにでも移行を開始できます。
ステップ1: IronPDFのインストール
PDFmyURLにはNuGetパッケージがありません。このサービスはREST APIであり、オプションのPDFmyURL.NET.dllコンポーネントはnuget.orgではなく、直接DLLダウンロードとして提供されます。 ほとんどの統合はWebClient / HttpClientでAPIを呼び出すので、移行の主な部分はコードであり、パッケージ参照ではありません。 もしPDFmyURL.NET.dllアセンブリを使用していた場合、移行後にプロジェクトからその参照を削除してください。
# Install IronPDF
dotnet add package IronPdf
# Install IronPDF
dotnet add package IronPdf
ステップ 2: 名前空間の更新
PDFmyURLのインポートをIronPDFに置き換える:
// Before:PDFmyURL— either plain HttpClient/WebClient against pdfmyurl.com/api,
// or the optional .NET component:
using PDFmyURLdotNET; // only if you used PDFmyURL.NET.dll
using System.Net; // WebClient / HttpClient
// After: IronPDF
using IronPdf;
using IronPdf.Rendering;
// Before:PDFmyURL— either plain HttpClient/WebClient against pdfmyurl.com/api,
// or the optional .NET component:
using PDFmyURLdotNET; // only if you used PDFmyURL.NET.dll
using System.Net; // WebClient / HttpClient
// After: IronPDF
using IronPdf;
using IronPdf.Rendering;
Imports PDFmyURLdotNET ' only if you used PDFmyURL.NET.dll
Imports System.Net ' WebClient / HttpClient
' After: IronPDF
Imports IronPdf
Imports IronPdf.Rendering
ステップ 3: ライセンスの初期化
アプリケーション起動時のライセンス初期化を追加します:
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
コード移行の例
URLをPDFに変換する
URLからPDFへの操作はPDFmyURLとIronPDFの基本的なAPIの違いを示します。
PDFmyURLのアプローチ:
//PDFmyURLREST API — no NuGet SDK. Docs: https://pdfmyurl.com/html-to-pdf-api
using System;
using System.Net;
class Example
{
static void Main()
{
string license = "your-license-key";
string url = "https://example.com";
try
{
using (var client = new WebClient())
{
client.QueryString.Add("license", license);
client.QueryString.Add("url", url);
// PDF binary is returned in the response body
client.DownloadFile("https://pdfmyurl.com/api", "output.pdf");
}
}
catch (WebException ex)
{
Console.WriteLine("Error: " + ex.Message);
}
}
}
//PDFmyURLREST API — no NuGet SDK. Docs: https://pdfmyurl.com/html-to-pdf-api
using System;
using System.Net;
class Example
{
static void Main()
{
string license = "your-license-key";
string url = "https://example.com";
try
{
using (var client = new WebClient())
{
client.QueryString.Add("license", license);
client.QueryString.Add("url", url);
// PDF binary is returned in the response body
client.DownloadFile("https://pdfmyurl.com/api", "output.pdf");
}
}
catch (WebException ex)
{
Console.WriteLine("Error: " + ex.Message);
}
}
}
Imports System
Imports System.Net
Module Example
Sub Main()
Dim license As String = "your-license-key"
Dim url As String = "https://example.com"
Try
Using client As New WebClient()
client.QueryString.Add("license", license)
client.QueryString.Add("url", url)
' PDF binary is returned in the response body
client.DownloadFile("https://pdfmyurl.com/api", "output.pdf")
End Using
Catch ex As WebException
Console.WriteLine("Error: " & ex.Message)
End Try
End Sub
End Module
IronPDFのアプローチ:
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Example
{
static void Main()
{
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderUrlAsPdf("https://example.com");
pdf.SaveAs("output.pdf");
}
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Example
{
static void Main()
{
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderUrlAsPdf("https://example.com");
pdf.SaveAs("output.pdf");
}
}
Imports IronPdf
Imports System
Class Example
Shared Sub Main()
Dim renderer As New ChromePdfRenderer()
Dim pdf = renderer.RenderUrlAsPdf("https://example.com")
pdf.SaveAs("output.pdf")
End Sub
End Class
PDFmyURLはすべての変換時にurlをクエリまたはフォームのパラメータとして付け、レスポンスの内容をディスクに書き込みます。 エラーはHTTPステータスコードに基づいてWebExceptionとして表示されます。
IronPDFはこれを3行に簡略化します:SaveAs()メソッドを使用します。 リクエストごとのクレデンシャルは不要です — ライセンスはアプリケーション起動時に一度だけ設定されます。
高度なURL-to-PDFシナリオについては、URL to PDF documentationを参照してください。
HTML文字列をPDFに変換する
HTML文字列変換は、パターンの違いを明確に示します。
PDFmyURLのアプローチ:
//PDFmyURLREST API — no NuGet SDK. Send the raw HTML in the `html` parameter.
// Docs: https://pdfmyurl.com/html-to-pdf-api
using System;
using System.Collections.Specialized;
using System.IO;
using System.Net;
class Example
{
static void Main()
{
string license = "your-license-key";
string html = "<html><body><h1>Hello World</h1></body></html>";
try
{
using (var client = new WebClient())
{
var values = new NameValueCollection
{
{ "license", license },
{ "html", html }
};
// POST form-encoded; response body is the PDF binary
byte[] pdfBytes = client.UploadValues("https://pdfmyurl.com/api", "POST", values);
File.WriteAllBytes("output.pdf", pdfBytes);
}
}
catch (WebException ex)
{
Console.WriteLine("Error: " + ex.Message);
}
}
}
//PDFmyURLREST API — no NuGet SDK. Send the raw HTML in the `html` parameter.
// Docs: https://pdfmyurl.com/html-to-pdf-api
using System;
using System.Collections.Specialized;
using System.IO;
using System.Net;
class Example
{
static void Main()
{
string license = "your-license-key";
string html = "<html><body><h1>Hello World</h1></body></html>";
try
{
using (var client = new WebClient())
{
var values = new NameValueCollection
{
{ "license", license },
{ "html", html }
};
// POST form-encoded; response body is the PDF binary
byte[] pdfBytes = client.UploadValues("https://pdfmyurl.com/api", "POST", values);
File.WriteAllBytes("output.pdf", pdfBytes);
}
}
catch (WebException ex)
{
Console.WriteLine("Error: " + ex.Message);
}
}
}
Imports System
Imports System.Collections.Specialized
Imports System.IO
Imports System.Net
Class Example
Shared Sub Main()
Dim license As String = "your-license-key"
Dim html As String = "<html><body><h1>Hello World</h1></body></html>"
Try
Using client As New WebClient()
Dim values As New NameValueCollection From {
{"license", license},
{"html", html}
}
' POST form-encoded; response body is the PDF binary
Dim pdfBytes As Byte() = client.UploadValues("https://pdfmyurl.com/api", "POST", values)
File.WriteAllBytes("output.pdf", pdfBytes)
End Using
Catch ex As WebException
Console.WriteLine("Error: " & ex.Message)
End Try
End Sub
End Class
IronPDFのアプローチ:
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Example
{
static void Main()
{
var renderer = new ChromePdfRenderer();
string html = "<html><body><h1>Hello World</h1></body></html>";
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("output.pdf");
}
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Example
{
static void Main()
{
var renderer = new ChromePdfRenderer();
string html = "<html><body><h1>Hello World</h1></body></html>";
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("output.pdf");
}
}
Imports IronPdf
Imports System
Class Example
Shared Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim html As String = "<html><body><h1>Hello World</h1></body></html>"
Dim pdf = renderer.RenderHtmlAsPdf(html)
pdf.SaveAs("output.pdf")
End Sub
End Class
PDFmyURLはhtmlフォームパラメータとして生のHTMLをAPIエンドポイントにPOSTし、レンダリングされたPDFをレスポンスの内容として返します。 IronPDFのRenderHtmlAsPdf()は、Chromiumレンダリングエンジンを使用してすべてをローカルで処理します。
その他のオプションについては、HTMLからPDFへの変換ガイドをご覧ください。
ページ設定による HTML ファイルの変換
用紙サイズ、向き、余白を設定するには、各ライブラリで異なるアプローチが必要です。
PDFmyURLのアプローチ:
//PDFmyURLREST API — no NuGet SDK. Page settings are sent as query/form parameters.
// Parameter reference: https://pdfmyurl.com/html-to-pdf-api
using System;
using System.Collections.Specialized;
using System.IO;
using System.Net;
class Example
{
static void Main()
{
string license = "your-license-key";
string html = File.ReadAllText("input.html");
try
{
using (var client = new WebClient())
{
var values = new NameValueCollection
{
{ "license", license },
{ "html", html },
{ "page_size", "A4" },
{ "orientation", "landscape" },
{ "top", "10" },
{ "unit", "mm" }
};
byte[] pdfBytes = client.UploadValues("https://pdfmyurl.com/api", "POST", values);
File.WriteAllBytes("output.pdf", pdfBytes);
}
}
catch (WebException ex)
{
Console.WriteLine("Error: " + ex.Message);
}
}
}
//PDFmyURLREST API — no NuGet SDK. Page settings are sent as query/form parameters.
// Parameter reference: https://pdfmyurl.com/html-to-pdf-api
using System;
using System.Collections.Specialized;
using System.IO;
using System.Net;
class Example
{
static void Main()
{
string license = "your-license-key";
string html = File.ReadAllText("input.html");
try
{
using (var client = new WebClient())
{
var values = new NameValueCollection
{
{ "license", license },
{ "html", html },
{ "page_size", "A4" },
{ "orientation", "landscape" },
{ "top", "10" },
{ "unit", "mm" }
};
byte[] pdfBytes = client.UploadValues("https://pdfmyurl.com/api", "POST", values);
File.WriteAllBytes("output.pdf", pdfBytes);
}
}
catch (WebException ex)
{
Console.WriteLine("Error: " + ex.Message);
}
}
}
Imports System
Imports System.Collections.Specialized
Imports System.IO
Imports System.Net
Class Example
Shared Sub Main()
Dim license As String = "your-license-key"
Dim html As String = File.ReadAllText("input.html")
Try
Using client As New WebClient()
Dim values As New NameValueCollection From {
{"license", license},
{"html", html},
{"page_size", "A4"},
{"orientation", "landscape"},
{"top", "10"},
{"unit", "mm"}
}
Dim pdfBytes As Byte() = client.UploadValues("https://pdfmyurl.com/api", "POST", values)
File.WriteAllBytes("output.pdf", pdfBytes)
End Using
Catch ex As WebException
Console.WriteLine("Error: " & ex.Message)
End Try
End Sub
End Class
IronPDFのアプローチ:
// NuGet: Install-Package IronPdf
using IronPdf;
using IronPdf.Rendering;
using System;
class Example
{
static void Main()
{
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
renderer.RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape;
renderer.RenderingOptions.MarginTop = 10;
var pdf = renderer.RenderHtmlFileAsPdf("input.html");
pdf.SaveAs("output.pdf");
}
}
// NuGet: Install-Package IronPdf
using IronPdf;
using IronPdf.Rendering;
using System;
class Example
{
static void Main()
{
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
renderer.RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape;
renderer.RenderingOptions.MarginTop = 10;
var pdf = renderer.RenderHtmlFileAsPdf("input.html");
pdf.SaveAs("output.pdf");
}
}
Imports IronPdf
Imports IronPdf.Rendering
Imports System
Class Example
Shared Sub Main()
Dim renderer As New ChromePdfRenderer()
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4
renderer.RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape
renderer.RenderingOptions.MarginTop = 10
Dim pdf = renderer.RenderHtmlFileAsPdf("input.html")
pdf.SaveAs("output.pdf")
End Sub
End Class
PDFmyURLは、orientation=landscape、およびマージンフィールド (top, bottom, left, right) などのフォームパラメータを追加し、unit (例: mm, in) を使用してページを構成します。 IronPDFは、RenderingOptionsを介して列挙型のような強く型付けされたプロパティとミリメートル単位の整数値をマージン用に提供します。
PDFmyURLAPIからIronPDFへのマッピングリファレンス
このマッピングは、APIと同等のものを直接示すことで、移行を加速します:
コアクラス / エントリーポイント
| PDFmyURL | IronPDF |
|---|---|
WebClient / HttpClient https://pdfmyurl.com/api にポストする |
ChromePdfRenderer |
PDFmyURLdotNET.PDFmyURL (PDFmyURL.NET.dll からのオプション for .NETコンポーネント) |
ChromePdfRenderer |
| フォーム / クエリパラメータ | ChromePdfRenderOptions |
| HTTP応答ボディのバイト | PdfDocument |
メソッド
| PDFmyURL | IronPDF |
|---|---|
WebClient.DownloadFile(".../api?license=...&url=...", file) |
renderer.RenderUrlAsPdf(url).SaveAs(file) |
html= パラメータ付きでPOSTする |
renderer.RenderHtmlAsPdf(html) |
File.ReadAllText("input.html") 後にhtml=をPOSTする |
renderer.RenderHtmlFileAsPdf(path) |
pdf.ConvertURL(url, file) (PDFmyURL.NET.dll) |
renderer.RenderUrlAsPdf(url).SaveAs(file) |
pdf.ConvertHTML(html, file) (PDFmyURL.NET.dll) |
renderer.RenderHtmlAsPdf(html).SaveAs(file) |
HTTPレスポンスボディ (byte[]) |
pdf.BinaryData |
| HTTP応答ストリーム | new MemoryStream(pdf.BinaryData) |
設定オプション
PDFmyURL設定は、HTTPリクエストでフォーム/クエリパラメータとして渡されます。以下の表は、実際のPDFmyURLパラメータ名をIronPDFのRenderingOptionsにマッピングしています。
| PDFmyURLパラメータ | IronPDF (RenderingOptions) |
|---|---|
page_size=A4 |
.PaperSize = PdfPaperSize.A4 |
page_size=Letter |
.PaperSize = PdfPaperSize.Letter |
orientation=landscape |
.PaperOrientation = PdfPaperOrientation.Landscape |
orientation=portrait |
.PaperOrientation = PdfPaperOrientation.Portrait |
top=10&unit=mm |
.MarginTop = 10 |
bottom=10&unit=mm |
.MarginBottom = 10 |
left=10&unit=mm |
.MarginLeft = 10 |
right=10&unit=mm |
.MarginRight = 10 |
header=<html> |
.HtmlHeader = new HtmlHeaderFooter { HtmlFragment = html } |
footer=<html> |
.HtmlFooter = new HtmlHeaderFooter { HtmlFragment = html } |
javascript_time=500 |
.RenderDelay = 500 |
no_javascript=true |
.EnableJavaScript = false |
css_media_type=print |
.CssMediaType = PdfCssMediaType.Print |
認証の比較
| PDFmyURL | IronPDF |
|---|---|
license=<key> 各APIリクエストのクエリ/フォームパラメータ |
IronPdf.License.LicenseKey = "LICENSE-KEY" |
| リクエストごとのライセンストークン | スタートアップで1回のみ |
| すべての通話に必要 | グローバルに1回設定 |
一般的な移行の問題と解決策
問題1: ライセンストークン vs ライセンスキー
PDFmyURL: すべてのAPIリクエストにlicenseトークンを必要とします。
解決策:アプリケーションの起動時にIronPDFライセンスを一度だけ設定します:
// PDFmyURL: license token per request
client.QueryString.Add("license", "your-license-key");
// IronPDF: One-time license at startup
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
// Set once, typically in Program.cs or Startup.cs
// PDFmyURL: license token per request
client.QueryString.Add("license", "your-license-key");
// IronPDF: One-time license at startup
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
// Set once, typically in Program.cs or Startup.cs
' PDFmyURL: license token per request
client.QueryString.Add("license", "your-license-key")
' IronPDF: One-time license at startup
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
' Set once, typically in Program.vb or Startup.vb
課題2:ヘッダー/フッターのプレースホルダー構文
PDFmyURL: トークンheader / footerフォームパラメータ内で使用します(正規のトークンリストについてはライブAPI参照を参照)。
Solution: IronPDFのプレースホルダ形式にHtmlHeaderFooter.HtmlFragment内で更新します:
// PDFmyURL: "Page [page] of [topage]"
// IronPDF: "Page {page} of {total-pages}"
// PDFmyURL: "Page [page] of [topage]"
// IronPDF: "Page {page} of {total-pages}"
' PDFmyURL: "Page [page] of [topage]"
' IronPDF: "Page {page} of {total-pages}"
第3号:非同期パターン
PDFmyURL: HTTPリモート呼出しです; 通常、pdfmyurl.com/api対して呼び出します。
ソリューション: IronPDFはプロセス内であり、デフォルトで同期しています; 必要であれば、asyncをラップしてください:
// PDFmyURL: HTTP request to the public endpoint
var response = await http.PostAsync("https://pdfmyurl.com/api", form);
// IronPDF: Sync by default, wrap for async
var pdf = await Task.Run(() => renderer.RenderUrlAsPdf(url));
// PDFmyURL: HTTP request to the public endpoint
var response = await http.PostAsync("https://pdfmyurl.com/api", form);
// IronPDF: Sync by default, wrap for async
var pdf = await Task.Run(() => renderer.RenderUrlAsPdf(url));
Imports System.Net.Http
Imports System.Threading.Tasks
' PDFmyURL: HTTP request to the public endpoint
Dim response = Await http.PostAsync("https://pdfmyurl.com/api", form)
' IronPDF: Sync by default, wrap for async
Dim pdf = Await Task.Run(Function() renderer.RenderUrlAsPdf(url))
課題 4: エラー処理
PDFmyURL: HTTPレベルの失敗(無効なライセンス、レート制限、ネットワークエラー、サービス利用不可)はWebException/成功しないステータスコードとして表示されます。
ソリューション: IronPDFの型指定された例外のキャッチブロックを更新:
// PDFmyURL: WebException from the HTTP call
catch (WebException e) { ... }
// IronPDF: Typed exceptions
catch (IronPdf.Exceptions.IronPdfRenderingException e) { ... }
// PDFmyURL: WebException from the HTTP call
catch (WebException e) { ... }
// IronPDF: Typed exceptions
catch (IronPdf.Exceptions.IronPdfRenderingException e) { ... }
第5号:構成パターン
PDFmyURL: 設定はHTTPリクエスト上でのフォーム/クエリパラメータとして渡されます。
解決策: 強く型付けされたRenderingOptionsプロパティを使用してください:
// PDFmyURL: form/query parameters
values.Add("page_size", "A4");
values.Add("orientation", "landscape");
// IronPDF: Properties with enums
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
renderer.RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape;
// PDFmyURL: form/query parameters
values.Add("page_size", "A4");
values.Add("orientation", "landscape");
// IronPDF: Properties with enums
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
renderer.RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape;
' PDFmyURL: form/query parameters
values.Add("page_size", "A4")
values.Add("orientation", "landscape")
' IronPDF: Properties with enums
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4
renderer.RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape
PDFmyURL移行チェックリスト
マイグレーション前のタスク
コードベースを監査して、すべてのPDFmyURLの使用法を特定してください:
# FindPDFmyURLendpoint and component usage
grep -r "pdfmyurl.com/api\|PDFmyURLdotNET\|new PDFmyURL(" --include="*.cs" .
# Find license-token references
grep -r "license=\|licensekey" --include="*.cs" --include="*.json" --include="*.config" .
# Find placeholder patterns to migrate
grep -r "\[page\]\|\[topage\]" --include="*.cs" .
# FindPDFmyURLendpoint and component usage
grep -r "pdfmyurl.com/api\|PDFmyURLdotNET\|new PDFmyURL(" --include="*.cs" .
# Find license-token references
grep -r "license=\|licensekey" --include="*.cs" --include="*.json" --include="*.config" .
# Find placeholder patterns to migrate
grep -r "\[page\]\|\[topage\]" --include="*.cs" .
現在使用されている構成パラメータ(ページ サイズ、向き、余白、ヘッダー/フッターなど)を文書化します。 環境変数を使用してライセンスキーの保存を計画する。
コード更新タスク
- もし使用していた場合、オプションの
PDFmyURL.NET.dll参照を削除してください(アンインストールするNuGetパッケージは存在しません) 2.IronPDFNuGetパッケージをインストール 3.すべての名前空間インポートの更新 - 各リクエストの
IronPdf.License.LicenseKeyに置き換えます。 - フォーム/クエリパラメータを
RenderingOptionsプロパティに変換します。 - ヘッダやフッタ内のプレースホルダ構文を更新します (例:
[page]→{page},[topage]→{total-pages}) - エラーハンドリングコードを更新します (
WebException→ 型付けされたIronPDF例外) 8.起動時にIronPDFライセンスの初期化を追加する
移行後のテスト
移行後、これらの点を検証してください:
- PDF出力の品質が期待に沿うかテスト
- 非同期パターンが正しく動作することを確認する
- レンダリングの忠実度を以前の出力と比較する
- すべてのテンプレートバリエーションが正しくレンダリングされることをテストする
- ページ設定の検証(サイズ、向き、余白)
- Linuxサーバーにデプロイする場合は、Linuxの依存関係をインストールしてください。
IronPDFに移行する主な利点
PDFmyURLからIronPDFに移行することで、いくつかの重要な利点が得られます:
完全なプライバシー:ドキュメントはサーバーから外部に漏れることはありません。 すべての処理はローカルで行われるため、機密性の高いコンテンツに対するデータセキュリティの懸念はありません。
一度限りのコスト:永久ライセンス オプションにより、定期的なサブスクリプション料金が不要になります。 使用量に関係なく、毎月の支払いはもう必要ありません。
オフライン機能:初期設定後はインターネットに接続しなくても動作します。ネットワークが切断されてもPDF生成には影響しません。
レート制限なし:スロットルを気にすることなく、無制限のドキュメントを処理できます。
低レイテンシ:ネットワーク オーバーヘッドがないため、特に大容量アプリケーションの場合、変換が高速になります。
完全な制御:サードパーティのサービスではなく、処理環境を制御します。
最新の Chromium エンジン: Chrome ブラウザと同じレンダリング エンジンで、CSS3 とJavaScript を完全にサポートします。
アクティブ開発: IronPDFの定期的な更新により、現代 for .NETバージョンとの互換性が確保されます。

