푸터 콘텐츠로 바로가기
마이그레이션 가이드

C#에서 MuPDF에서 IronPDF로 마이그레이션하는 방법

MuPDF에서 IronPDF로 마이그레이션해야 하는 이유

MuPDF의 문제점

MuPDF는 우수한 PDF 렌더러이지만, AGPL 라이선스와 렌더링 전용으로 제한되어 .NET 개발자가 상용 응용 프로그램을 구축하는 데 큰 제약을 초래합니다:

  1. AGPL 라이선스 함정: MuPDF의 바이럴 라이선스는 전체 응용 프로그램을 AGPL 하에 오픈소스로 만들거나 불투명한 가격의 비싼 상용 라이선스를 구매해야 합니다.

  2. 렌더링 전용 초점: MuPDF는 뷰어/렌더러로 HTML에서 PDF 생성, 문서 생성 작업 흐름, 양식 채우기, 워터마크 및 헤더/풋터 추가를 위해 설계되지 않았습니다.

  3. HTML 지원 불가: MuPDF는 직접적인 HTML에서 PDF로의 변환을 지원하지 않습니다. HTML을 지원되는 형식으로 먼저 변환하기 위해 다른 라이브러리를 사용해야 합니다. 이는 근본적인 한계이며, MuPDF는 주로 PDF 렌더러/뷰어입니다.

  4. 네이티브 종속성: 플랫폼별 바이너리는 Windows, Linux, 및 macOS에 대해 수동 관리를 요구합니다. 네이티브 라이브러리 요건으로 인해 Docker 배포가 복잡해지고 배포 패키징은 문제를 야기합니다.

  5. 제한된 조작: PDF 병합/분할, 페이지 회전 또는 순서 변경, 워터마크 또는 주석, 디지털 서명에 대한 내장 지원이 없습니다.

  6. C 상호 운용 복잡성: 네이티브 바인딩은 메모리 관리 문제, 플랫폼별 버그, 및 마샬링 오버헤드를 초래합니다.

MuPDF와IronPDF비교

기능 MuPDF IronPDF
라이선스 AGPL (전염성) 또는 높은 비용의 상업적 투명한 가격의 상용
주된 초점 렌더링/보기 완전한 PDF 솔루션
HTML to PDF 지원되지 않음 전체 Chromium 엔진
PDF 생성 지원되지 않음 HTML, URL, 이미지
PDF 조작 제한적 통합 (병합, 분할, 편집)
종속성 네이티브 바이너리 완전 관리됨
플랫폼 지원 플랫폼별 수동 자동
비동기 지원 제한적 완전한 async/await
.NET 통합 C 상호 운용 네이티브 .NET

.NET 10 및 C# 14를 2025년과 2026년까지 채택할 계획이 있는 팀을 위한 IronPDF는 네이티브 상호 운용 복잡성이 없는 완전 관리 .NET 라이브러리로, 미래를 보장하는 기본을 제공합니다.


마이그레이션 복잡성 평가

기능별 예상 노력

기능 마이그레이션 복잡성
문서 로딩 매우 낮음
텍스트 추출 매우 낮음
PDF 병합 낮음
이미지 렌더링 낮음
HTML to PDF N/A (새로운 기능)
보안/워터마크 N/A (새로운 기능)

패러다임 전환

이MuPDF마이그레이션에 있어서의 근본적인 변화는 렌더링 전용 뷰어에서 완전한 PDF 솔루션:으로 입니다.

MuPDF:   MuPDFContext → MuPDFDocument → 페이지 반복 → 렌더링/추출만
IronPDF: PdfDocument.FromFile() → 전체 조작 → 생성/편집/병합/보안

시작하기 전에

필수 조건

  1. .NET 환경: .NET Framework 4.6.2+ 또는 .NET Core 3.1+ / .NET 5/6/7/8/9+
  2. NuGet 접근 권한: NuGet 패키지를 설치할 수 있는 능력
  3. IronPDF 라이선스: ironpdf.com에서 라이선스 키를 획득하세요

NuGet 패키지 변경 사항

# RemoveMuPDFpackages
dotnet remove package MuPDF.NET
dotnet remove package MuPDFCore
dotnet remove package MuPDFCore.MuPDFWrapper

# Install IronPDF
dotnet add package IronPdf
# RemoveMuPDFpackages
dotnet remove package MuPDF.NET
dotnet remove package MuPDFCore
dotnet remove package MuPDFCore.MuPDFWrapper

# Install IronPDF
dotnet add package IronPdf
SHELL

배포에서 네이티브MuPDF바이너리도 제거하세요:

  • mupdf.dll, libmupdf.so, libmupdf.dylib 삭제
  • 플랫폼별 폴더 제거 (runtimes/*/native/)
  • Docker 파일을 업데이트하여MuPDF설치 제거

라이선스 구성

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

MuPDF사용 식별

# Find allMuPDFreferences
grep -r "MuPDF\|MuPDFCore\|MuPDFDocument" --include="*.cs" .
# Find allMuPDFreferences
grep -r "MuPDF\|MuPDFCore\|MuPDFDocument" --include="*.cs" .
SHELL

완전한 API 참조

문서 로딩

MuPDF IronPDF
new MuPDFDocument(path) PdfDocument.FromFile(path)
new MuPDFDocument(stream) PdfDocument.FromStream(stream)
document.Dispose() pdf.Dispose()

페이지 액세스

MuPDF IronPDF
document.Pages.Count pdf.PageCount
document.Pages[index] pdf.Pages[index]
page.GetText() page.Text

텍스트 추출

MuPDF IronPDF
document.Pages[i].GetText()을(를) 반복 실행 pdf.ExtractAllText()

PDF 생성 (MuPDF에서 사용 불가)

MuPDF IronPDF
(지원되지 않음) ChromePdfRenderer.RenderHtmlAsPdf(html)
(지원되지 않음) ChromePdfRenderer.RenderUrlAsPdf(url)

PDF 조작 (MuPDF에서 제한됨)

MuPDF IronPDF
수동 페이지 복사 반복문 PdfDocument.Merge(pdf1, pdf2)
(지원되지 않음) pdf.ApplyWatermark(html)
(지원되지 않음) pdf.SecuritySettings

코드 마이그레이션 예제

예제 1: HTML에서 PDF로 변환 (MuPDF에서 불가능)

이전 (MuPDF):

// NuGet: Install-Package MuPDF.NET
using MuPDFCore;
using System.IO;

class Program
{
    static void Main()
    {
        //MuPDFdoesn't supportHTML to PDFconversion directly
        // You would need to use another library to convert HTML to a supported format first
        // This is a limitation -MuPDFis primarily a PDF renderer/viewer

        // Alternative: Use a browser engine or intermediate conversion
        string html = "<html><body><h1>Hello World</h1></body></html>";

        // Not natively supported in MuPDF
        throw new NotSupportedException("MuPDF does not support directHTML to PDFconversion");
    }
}
// NuGet: Install-Package MuPDF.NET
using MuPDFCore;
using System.IO;

class Program
{
    static void Main()
    {
        //MuPDFdoesn't supportHTML to PDFconversion directly
        // You would need to use another library to convert HTML to a supported format first
        // This is a limitation -MuPDFis primarily a PDF renderer/viewer

        // Alternative: Use a browser engine or intermediate conversion
        string html = "<html><body><h1>Hello World</h1></body></html>";

        // Not natively supported in MuPDF
        throw new NotSupportedException("MuPDF does not support directHTML to PDFconversion");
    }
}
Imports MuPDFCore
Imports System.IO

Class Program
    Shared Sub Main()
        'MuPDF doesn't support HTML to PDF conversion directly
        ' You would need to use another library to convert HTML to a supported format first
        ' This is a limitation - MuPDF is primarily a PDF renderer/viewer

        ' Alternative: Use a browser engine or intermediate conversion
        Dim html As String = "<html><body><h1>Hello World</h1></body></html>"

        ' Not natively supported in MuPDF
        Throw New NotSupportedException("MuPDF does not support direct HTML to PDF conversion")
    End Sub
End Class
$vbLabelText   $csharpLabel

이후 (IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    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;

class Program
{
    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

Class Program
    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
$vbLabelText   $csharpLabel

이 예는 MuPDF의 가장 큰 제한 사항을 강조합니다: HTML을 PDF로 전혀 변환할 수 없습니다.MuPDF코드가 명확하게 NotSupportedException을(를) 던지는 이유는 HTML을 PDF로 변환하는 기능이 MuPDF에 없기 때문입니다. MuPDF에 이 기능이 필요했다면, wkhtmltopdf와 같은 별도의 라이브러리 또는 브라우저 엔진을 사용하고, 결과 PDF를 MuPDF로 로드하여 시청해야 했습니다.

IronPDF의 ChromePdfRenderer는 전체 CSS3, JavaScript 및 최신 웹 표준을 지원하는 완전한 Chromium 엔진을 사용해 HTML을 렌더링합니다. 이 RenderHtmlAsPdf() 메소드는 HTML 문자열을 직접 받아들입니다. URL 렌더링 및 HTML 파일 변환 포함 추가 렌더링 옵션에 대해서는 HTML에서 PDF로 문서를 참조하십시오.

예제 2: 텍스트 추출

이전 (MuPDF):

// NuGet: Install-Package MuPDF.NET
using MuPDFCore;
using System;
using System.Text;

class Program
{
    static void Main()
    {
        using (MuPDFDocument document = new MuPDFDocument("input.pdf"))
        {
            StringBuilder allText = new StringBuilder();

            for (int i = 0; i < document.Pages.Count; i++)
            {
                string pageText = document.Pages[i].GetText();
                allText.AppendLine(pageText);
            }

            Console.WriteLine(allText.ToString());
        }
    }
}
// NuGet: Install-Package MuPDF.NET
using MuPDFCore;
using System;
using System.Text;

class Program
{
    static void Main()
    {
        using (MuPDFDocument document = new MuPDFDocument("input.pdf"))
        {
            StringBuilder allText = new StringBuilder();

            for (int i = 0; i < document.Pages.Count; i++)
            {
                string pageText = document.Pages[i].GetText();
                allText.AppendLine(pageText);
            }

            Console.WriteLine(allText.ToString());
        }
    }
}
Imports MuPDFCore
Imports System
Imports System.Text

Class Program
    Shared Sub Main()
        Using document As New MuPDFDocument("input.pdf")
            Dim allText As New StringBuilder()

            For i As Integer = 0 To document.Pages.Count - 1
                Dim pageText As String = document.Pages(i).GetText()
                allText.AppendLine(pageText)
            Next

            Console.WriteLine(allText.ToString())
        End Using
    End Sub
End Class
$vbLabelText   $csharpLabel

이후 (IronPDF):

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

class Program
{
    static void Main()
    {
        var pdf = PdfDocument.FromFile("input.pdf");
        string text = pdf.ExtractAllText();

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

class Program
{
    static void Main()
    {
        var pdf = PdfDocument.FromFile("input.pdf");
        string text = pdf.ExtractAllText();

        Console.WriteLine(text);
    }
}
Imports IronPdf
Imports System

Class Program
    Shared Sub Main()
        Dim pdf = PdfDocument.FromFile("input.pdf")
        Dim text As String = pdf.ExtractAllText()

        Console.WriteLine(text)
    End Sub
End Class
$vbLabelText   $csharpLabel

MuPDF 접근법에서는 using 블록을 생성하고, MuPDFDocument와 함께 수동으로 for 루프를 통해 document.Pages.Count을(를) 반복하며 각 페이지에 document.Pages[i].GetText()을(를) 호출하고, StringBuilder으로 텍스트를 구성해야 합니다. 간단한 텍스트 추출을 위한 12줄의 코드입니다.

IronPDF는 이 작업을 3줄로 줄입니다: PdfDocument.FromFile()으로 문서를 로드하고, ExtractAllText()을 호출하여 결과를 출력합니다. 이 간단한 작업에 대해 수동 반복, StringBuilder 없음, using 블록을 통한 명시적 자원 관리 없음 PDF에서 텍스트 추출에 대해 더 알아보기.

예제 3: 여러 PDFs 병합하기

이전 (MuPDF):

// NuGet: Install-Package MuPDF.NET
using MuPDFCore;
using System.IO;

class Program
{
    static void Main()
    {
        using (MuPDFDocument doc1 = new MuPDFDocument("file1.pdf"))
        using (MuPDFDocument doc2 = new MuPDFDocument("file2.pdf"))
        {
            // Create a new document
            using (MuPDFDocument mergedDoc = MuPDFDocument.Create())
            {
                // Copy pages from first document
                for (int i = 0; i < doc1.Pages.Count; i++)
                {
                    mergedDoc.CopyPage(doc1, i);
                }

                // Copy pages from second document
                for (int i = 0; i < doc2.Pages.Count; i++)
                {
                    mergedDoc.CopyPage(doc2, i);
                }

                mergedDoc.Save("merged.pdf");
            }
        }
    }
}
// NuGet: Install-Package MuPDF.NET
using MuPDFCore;
using System.IO;

class Program
{
    static void Main()
    {
        using (MuPDFDocument doc1 = new MuPDFDocument("file1.pdf"))
        using (MuPDFDocument doc2 = new MuPDFDocument("file2.pdf"))
        {
            // Create a new document
            using (MuPDFDocument mergedDoc = MuPDFDocument.Create())
            {
                // Copy pages from first document
                for (int i = 0; i < doc1.Pages.Count; i++)
                {
                    mergedDoc.CopyPage(doc1, i);
                }

                // Copy pages from second document
                for (int i = 0; i < doc2.Pages.Count; i++)
                {
                    mergedDoc.CopyPage(doc2, i);
                }

                mergedDoc.Save("merged.pdf");
            }
        }
    }
}
Imports MuPDFCore
Imports System.IO

Class Program
    Shared Sub Main()
        Using doc1 As New MuPDFDocument("file1.pdf"),
              doc2 As New MuPDFDocument("file2.pdf")

            ' Create a new document
            Using mergedDoc As MuPDFDocument = MuPDFDocument.Create()
                ' Copy pages from first document
                For i As Integer = 0 To doc1.Pages.Count - 1
                    mergedDoc.CopyPage(doc1, i)
                Next

                ' Copy pages from second document
                For i As Integer = 0 To doc2.Pages.Count - 1
                    mergedDoc.CopyPage(doc2, i)
                Next

                mergedDoc.Save("merged.pdf")
            End Using
        End Using
    End Sub
End Class
$vbLabelText   $csharpLabel

이후 (IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;

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");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;

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");
    }
}
Imports IronPdf

Class Program
    Shared Sub Main()
        Dim pdf1 = PdfDocument.FromFile("file1.pdf")
        Dim pdf2 = PdfDocument.FromFile("file2.pdf")

        Dim merged = PdfDocument.Merge(pdf1, pdf2)
        merged.SaveAs("merged.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

MuPDF 병합 작업은 특히 장황합니다. 소스 문서를 모두 중첩된 using 블록에서 열고, MuPDFDocument.Create()으로 새로운 빈 문서를 만들고, 첫 번째 문서의 각 페이지를 반복하며 CopyPage()을 호출하고, 두 번째 문서의 각 페이지를 반복하며 CopyPage()을 호출한 후 저장해야 합니다. 복잡한 중첩으로 20줄 이상의 코드가 필요합니다.

IronPDF의 정적 PdfDocument.Merge() 메소드는 다수의 PDF 문서를 받아 하나의 병합된 문서를 반환합니다. 전체 작업은 읽기 쉬운 네 줄의 코드입니다. 다수의 문서를 병합하려면, 목록을 전달할 수 있습니다: PdfDocument.Merge(pdfList). 추가 옵션은 PDF 병합 및 분할 문서를 참조하세요.


중요한 마이그레이션 노트

네이티브 이진 파일 제거

MuPDF는 플랫폼 특유의 네이티브 라이브러리가 필요합니다. IronPDF로 마이그레이션한 후 모든MuPDF네이티브 바이너리를 제거하세요:

# Delete native libraries
rm -f mupdf*.dll libmupdf*.so libmupdf*.dylib

# Remove runtime folders
rm -rf runtimes/*/native/

# Update Docker files to removeMuPDFinstallation
# Delete native libraries
rm -f mupdf*.dll libmupdf*.so libmupdf*.dylib

# Remove runtime folders
rm -rf runtimes/*/native/

# Update Docker files to removeMuPDFinstallation
SHELL

IronPDF는 완전히 관리되는 .NET 코드이며, 플랫폼 간에 관리해야 할 네이티브 바이너리가 없습니다.

Dispose 패턴 간소화

MuPDF는 명시적 컨텍스트와 문서 관리가 필요합니다:

// MuPDF: Nested using blocks required
using (MuPDFDocument document = new MuPDFDocument("input.pdf"))
{
    // Work with document
}

// IronPDF: Simpler pattern
var pdf = PdfDocument.FromFile("input.pdf");
// Work with pdf
// MuPDF: Nested using blocks required
using (MuPDFDocument document = new MuPDFDocument("input.pdf"))
{
    // Work with document
}

// IronPDF: Simpler pattern
var pdf = PdfDocument.FromFile("input.pdf");
// Work with pdf
Imports MuPDF

Using document As New MuPDFDocument("input.pdf")
    ' Work with document
End Using

Dim pdf = PdfDocument.FromFile("input.pdf")
' Work with pdf
$vbLabelText   $csharpLabel

페이지 반복 패턴 변경

MuPDF는 명시적인 페이지 수를 포함한 인덱스 기반 반복을 사용합니다:

// MuPDF
for (int i = 0; i < document.Pages.Count; i++)
{
    var pageText = document.Pages[i].GetText();
}

//IronPDF(foreach supported)
foreach (var page in pdf.Pages)
{
    var pageText = page.Text;
}
// MuPDF
for (int i = 0; i < document.Pages.Count; i++)
{
    var pageText = document.Pages[i].GetText();
}

//IronPDF(foreach supported)
foreach (var page in pdf.Pages)
{
    var pageText = page.Text;
}
' MuPDF
For i As Integer = 0 To document.Pages.Count - 1
    Dim pageText = document.Pages(i).GetText()
Next

' IronPDF (foreach supported)
For Each page In pdf.Pages
    Dim pageText = page.Text
Next
$vbLabelText   $csharpLabel

새로운 기능 제공

IronPDF로 마이그레이션한 후 MuPDF가 제공할 수 없는 기능을 활용할 수 있습니다:

//PDF 생성from HTML (not possible in MuPDF)
var pdf = renderer.RenderHtmlAsPdf("<h1>Hello</h1>");

// Watermarks (not possible in MuPDF)
pdf.ApplyWatermark("<div style='color:red;opacity:0.3;'>DRAFT</div>");

// Password Protection (not possible in MuPDF)
pdf.SecuritySettings.OwnerPassword = "admin";
pdf.SecuritySettings.UserPassword = "user";

// Headers and Footers (not possible in MuPDF)
pdf.AddTextHeader("Document Title");
pdf.AddTextFooter("Page {page} of {total-pages}");
//PDF 생성from HTML (not possible in MuPDF)
var pdf = renderer.RenderHtmlAsPdf("<h1>Hello</h1>");

// Watermarks (not possible in MuPDF)
pdf.ApplyWatermark("<div style='color:red;opacity:0.3;'>DRAFT</div>");

// Password Protection (not possible in MuPDF)
pdf.SecuritySettings.OwnerPassword = "admin";
pdf.SecuritySettings.UserPassword = "user";

// Headers and Footers (not possible in MuPDF)
pdf.AddTextHeader("Document Title");
pdf.AddTextFooter("Page {page} of {total-pages}");
' PDF 생성from HTML (not possible in MuPDF)
Dim pdf = renderer.RenderHtmlAsPdf("<h1>Hello</h1>")

' Watermarks (not possible in MuPDF)
pdf.ApplyWatermark("<div style='color:red;opacity:0.3;'>DRAFT</div>")

' Password Protection (not possible in MuPDF)
pdf.SecuritySettings.OwnerPassword = "admin"
pdf.SecuritySettings.UserPassword = "user"

' Headers and Footers (not possible in MuPDF)
pdf.AddTextHeader("Document Title")
pdf.AddTextFooter("Page {page} of {total-pages}")
$vbLabelText   $csharpLabel

문제 해결

문제 1: MuPDFDocument를 찾을 수 없음

문제: IronPDF에는 MuPDFDocument 클래스가 존재하지 않습니다.

해결책: PdfDocument.FromFile() 사용:

// MuPDF
using (MuPDFDocument document = new MuPDFDocument("input.pdf"))

// IronPDF
var pdf = PdfDocument.FromFile("input.pdf");
// MuPDF
using (MuPDFDocument document = new MuPDFDocument("input.pdf"))

// IronPDF
var pdf = PdfDocument.FromFile("input.pdf");
Imports MuPDF
Imports IronPDF

Using document As New MuPDFDocument("input.pdf")
End Using

Dim pdf = PdfDocument.FromFile("input.pdf")
$vbLabelText   $csharpLabel

문제 2: Pages.Count를 찾을 수 없음

문제: document.Pages.Count 패턴이 작동하지 않습니다.

해결책: pdf.PageCount 사용:

// MuPDF
for (int i = 0; i < document.Pages.Count; i++)

// IronPDF
for (int i = 0; i < pdf.PageCount; i++)
// Or use: foreach (var page in pdf.Pages)
// MuPDF
for (int i = 0; i < document.Pages.Count; i++)

// IronPDF
for (int i = 0; i < pdf.PageCount; i++)
// Or use: foreach (var page in pdf.Pages)
' MuPDF
For i As Integer = 0 To document.Pages.Count - 1

' IronPDF
For i As Integer = 0 To pdf.PageCount - 1
' Or use: For Each page In pdf.Pages
$vbLabelText   $csharpLabel

문제 3: GetText()를 찾을 수 없음

문제: page.GetText() 메소드가 존재하지 않습니다.

해결책: page.Text 속성 또는 pdf.ExtractAllText() 사용:

// MuPDF
string pageText = document.Pages[i].GetText();

// IronPDF
string pageText = pdf.Pages[i].Text;
// Or for all text:
string allText = pdf.ExtractAllText();
// MuPDF
string pageText = document.Pages[i].GetText();

// IronPDF
string pageText = pdf.Pages[i].Text;
// Or for all text:
string allText = pdf.ExtractAllText();
' MuPDF
Dim pageText As String = document.Pages(i).GetText()

' IronPDF
Dim pageText As String = pdf.Pages(i).Text
' Or for all text:
Dim allText As String = pdf.ExtractAllText()
$vbLabelText   $csharpLabel

문제 4: CopyPage를 찾을 수 없음

문제: 병합을 위한 수동 페이지 복사 패턴.

해결책: 정적 PdfDocument.Merge() 사용:

// MuPDF
mergedDoc.CopyPage(doc1, i);

// IronPDF
var merged = PdfDocument.Merge(pdf1, pdf2);
// MuPDF
mergedDoc.CopyPage(doc1, i);

// IronPDF
var merged = PdfDocument.Merge(pdf1, pdf2);
' MuPDF
mergedDoc.CopyPage(doc1, i)

' IronPDF
Dim merged = PdfDocument.Merge(pdf1, pdf2)
$vbLabelText   $csharpLabel

마이그레이션 체크리스트

사전 마이그레이션

  • 코드베이스 내MuPDF사용 전부 목록화
  • 모든 렌더링 작업 문서화 (DPI, 스케일 팩터)
  • PDF 생성 요구 사항 식별 (현재 외부 도구 사용)
  • 텍스트 추출 요구 사항 목록화
  • 네이티브 바이너리 처리를 위한 배포 스크립트 검토 -IronPDF라이센스 키를 받으세요

패키지 변경 사항

  • MuPDF.NET 패키지 제거
  • MuPDFCore 패키지 제거
  • MuPDFCore.MuPDFWrapper 패키지 제거
  • IronPdf NuGet Install-Package: dotnet add package IronPdf
  • 네임스페이스 가져오기 업데이트

코드 변경 사항

  • 시작 시 라이선스 키 구성 추가
  • MuPDFDocument을(를) PdfDocument.FromFile()으로(로) 교체
  • document.Pages.Count을(를) pdf.PageCount으로(로) 교체
  • page.GetText()을(를) page.Text 또는 pdf.ExtractAllText()으로(로) 교체
  • 수동 CopyPage 루프를 PdfDocument.Merge()으로(로) 교체
  • 컨텍스트 관리를 위한 중첩된 using 블록 제거
  • 필요한 경우 PDF 생성 코드 추가 (HTML to PDF)

마이그레이션 이후

  • 프로젝트에서 네이티브MuPDF바이너리 제거
  • Docker 파일을 업데이트하여MuPDF설치 제거
  • 플랫폼 특유의 런타임 폴더 제거
  • 렌더링된 출력 비교 회귀 테스트 실행
  • 모든 대상 플랫폼(Windows, Linux, macOS)에서 테스트
  • 새로운 기능 추가 고려(워터마크, 보안, 헤더/푸터)

커티스 차우
기술 문서 작성자

커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.

커티스는 개발 분야 외에도 사물 인터넷(IoT)에 깊은 관심을 가지고 있으며, 하드웨어와 소프트웨어를 통합하는 혁신적인 방법을 연구합니다. 여가 시간에는 게임을 즐기거나 디스코드 봇을 만들면서 기술에 대한 애정과 창의성을 결합합니다.

아이언 서포트 팀

저희는 주 5일, 24시간 온라인으로 운영합니다.
채팅
이메일
전화해