PDFmyURL에서 IronPDF로의 마이그레이션 방법 (C#)
PDFmyURL은 URL과 HTML 콘텐츠를 PDF 문서로 변환하기 위해 설계된 클라우드 기반 API 서비스입니다. 이 서비스는 모든 변환을 외부 서버에서 처리하여 최소한의 로컬 인프라로도 쉽게 통합할 수 있는 방법을 제공합니다. 하지만, 클라우드 의존 아키텍처는 민감한 데이터를 처리하거나 오프라인 기능이 필요하거나 지속적인 구독 비용을 피해야 하는 생산 애플리케이션에 상당한 문제를 야기합니다.
이 가이드는 PDFmyURL에서 IronPDF로의 완전한 마이그레이션 경로를 제공하며, 단계별 지침, 코드 비교 및 이 전환을 평가하는 전문 .NET 개발자를 위한 실용적인 예제를 포함합니다.
PDFmyURL에서 마이그레이션해야 하는 이유
PDFmyURL의 클라우드 처리 모델은 개발팀이 고려해야 할 몇 가지 문제를 소개합니다:
프라이버시 및 데이터 보안: 변환하는 모든 문서는 PDFmyURL의 서버로 이동하며, 민감한 계약서, 재무 보고서 및 개인 데이터가 모두 외부에서 처리됩니다.
지속적인 구독 비용: 플랜은 $20/월(스타터, 500 PDFs), $40/월(전문적, 2,000 PDFs), $70/월(고급, 5,000 PDFs)로 시작하며, 어느 티어에서도 소유가 제공되지 않습니다. 이 구독 모델은 사용 패턴에 관계없이 지속적인 지출을 의미합니다.
인터넷 의존성: 모든 변환은 네트워크 연결성을 필요로 합니다. 애플리케이션은 오프라인이나 네트워크 장애 시 PDF를 처리할 수 없습니다.
속도 제한 & 제어: API 호출은 피크 사용 중에 제어될 수 있어 애플리케이션 성능에 영향을 미칠 수 있습니다.
서비스 가용성: 귀하의 애플리케이션은 서드 파티 서비스의 온라인 여부와 작동 여부에 의존합니다.
벤더 종속: API 변경은 통지를 받기 전에 통합을 깨트릴 수 있으며, 반응적인 코드 업데이트가 필요합니다.
IronPDF vs PDFmyURL: 기능 비교
구조적 차이를 이해하면 기술 결정을 내리는데 이주 투자를 평가하는데 도움이 됩니다:
| 측면 | PDFmyURL | IronPDF |
|---|---|---|
| 처리 위치 | 외부 서버 | 로컬(당신의 서버) |
| 유형 | API 래퍼 | .NET 라이브러리 |
| 인증 | 요청당 API 키 | 일회성 라이선스 키 |
| 네트워크 필요 | 모든 변환 | 초기 설정만 |
| 가격 모델 | 월간 구독 ($20–$70+) | 영구 라이선스 제공 |
| 속도 제한 | 예 (계획에 따라 다름) | None |
| 데이터 개인정보 | 외부로 전송된 데이터 | 데이터가 로컬에 남아 있음 |
| HTML/CSS/JS 지원 | 서버 측 렌더링 (W3C 준수) | 전체 Chromium 엔진 |
| 비동기 패턴 | HTTP 요청 (네트워크 기반) | 동기 및 비동기 옵션 |
| PDF 조작 | 제한적 | 전체 도구 (병합, 분할, 편집) |
| 사용 사례 | 저용량 애플리케이션 | 고용량 및 Enterprise |
빠른 시작: PDFmyURL에서 IronPDF로의 마이그레이션
이러한 기본 단계를 통해 즉시 이주를 시작할 수 있습니다.
1단계:IronPDF설치합니다.
PDFmyURL에는 NuGet 패키지가 없습니다 — 서비스는 REST API이며, 선택적 PDFmyURL.NET.dll 구성 요소는 직접 DLL 다운로드로 제공됩니다 (nuget.org에는 없음). 대부분의 통합은 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-to-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는 매 변환 시 https://pdfmyurl.com/api에 대한 HTTP 연결을 열고, 쿼리 (또는 폼) 매개변수로 license 토큰과 대상 url을 첨부하고, 응답 본문을 디스크에 기록해야 합니다. 오류는 HTTP 상태 코드에 따라 WebException로 나타납니다.
IronPDF는 이를 세 줄로 단순화합니다: ChromePdfRenderer을 생성하고, RenderUrlAsPdf()을 호출하고, 내장된 SaveAs() 메서드를 사용합니다. 요청 당 자격 증명이 필요하지 않습니다 — 라이선스는 응용 프로그램 시작 시 한 번 설정됩니다.
고급 URL-to-PDF 시나리오를 위해, URL to PDF 문서를 참조하십시오.
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 to 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는 page_size=A4, orientation=landscape 및 여백 필드 (top, bottom, left, right)과 unit (예: mm, in)와 같은 폼 매개변수를 추가하여 페이지를 구성합니다. IronPDF는 RenderingOptions를 통해 강력한 형식의 속성을 제공하며, PdfPaperSize.A4와 같은 열거형과 밀리미터로 표현된 여백에 대한 정수 값을 제공합니다.
PDFmyURLAPI에서IronPDF매핑 참조
이 매핑은 직접적인 API 대응을 보여주어 마이그레이션을 가속화합니다:
코어 클래스 / 엔트리 포인트
| PDFmyURL | IronPDF |
|---|---|
WebClient / HttpClient를 https://pdfmyurl.com/api에 게시 |
ChromePdfRenderer |
PDFmyURLdotNET.PDFmyURL (PDFmyURL.NET.dll의 선택적 .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 |
|---|---|
모든 API 요청에서 license=<key> 쿼리/폼 매개변수 |
IronPdf.License.LicenseKey = "LICENSE-KEY" |
| 요청 당 라이선스 토큰 | 시작 시 단 한 번 |
| 모든 호출에 필수 | 전역적으로 한 번 설정 |
일반적인 마이그레이션 문제와 해결책
문제 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: [page] 및 [topage]와 같은 토큰을 header / footer 폼 매개변수 내부에서 사용합니다 (정확한 토큰 목록은 실시간 API 레퍼런스를 참조하세요).
Solution: HtmlHeaderFooter.HtmlFragment 내부에서 IronPDF의 플레이스홀더 형식으로 업데이트하세요.
// 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 호출; 일반적으로 HttpClient.PostAsync를 사용하여 pdfmyurl.com/api에 대해 호출됩니다.
솔루션: IronPDF는 기본적으로 동기식이며 프로세스 내에서 작동합니다; 필요시 비동기 랩핑:
// 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의 타입 예외에 대한 catch 블록을 업데이트하세요:
// 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.IronPDF NuGet 패키지를 설치하세요 - 모든 네임스페이스 가져오기를 업데이트하세요
- 요청마다
license토큰을IronPdf.License.LicenseKey로 교체하세요 - 폼/쿼리 매개변수를
RenderingOptions속성으로 변환하세요 - 헤더/푸터의 플레이스홀더 구문을 업데이트하세요 (예:
[page]→{page},[topage]→{total-pages}) - 오류 처리 코드를 업데이트하세요 (
WebException→ 형식화된IronPDF예외) - 시작 시IronPDF라이선스 초기화를 추가하세요
마이그레이션 후 테스트
마이그레이션 후 다음 측면을 검증:
- PDF 출력 품질이 기대에 부합하는지 테스트하세요
- 비동기 패턴이 올바르게 작동하는지 확인하세요
- 이전 출력과 렌더링 충실도를 비교하세요
- 모든 템플릿 변형이 정확하게 렌더링되는지 테스트
- 페이지 설정(크기, 방향, 여백)을 검증하세요
- Linux 서버로 배포할 경우 Linux 종속성을 설치하세요
IronPDF로 마이그레이션할 때의 주요 이점
PDFmyURL에서 IronPDF로 이전하면 여러 중요한 이점이 있습니다:
완벽한 개인정보 보호: 문서가 서버를 떠나지 않습니다. 모든 처리는 로컬에서 이루어지며 민감한 콘텐츠에 대한 데이터 보안 우려를 제거합니다.
일회 요금: 영구 라이선스 옵션으로 반복 구독 요금을 제거합니다. 사용량과 관계없이 월 사용료가 없습니다.
오프라인 기능: 초기 설정 후 인터넷 없이 작동합니다. 네트워크 장애가 PDF 생성에 영향을 미치지 않습니다.
제한 없음: 문서를 무제한으로 처리할 수 있으며 쓰로틀링에 대한 걱정이 없습니다.
낮은 레이턴시: 네트워크 오버헤드가 없어 특히 대용량 애플리케이션의 경우 변환 속도가 빠릅니다.
완전한 제어: 처리 환경을 제3자 서비스가 아닌 스스로 제어합니다.
모던 Chromium 엔진: Chrome 브라우저를 구동하는 동일한 렌더링 엔진으로 전체 CSS3 및 JavaScript를 지원합니다.
적극적 개발: IronPDF의 정기 업데이트는 현재 최신 .NET 버전과의 호환성을 보장합니다.

