푸터 콘텐츠로 바로가기
제품 비교

IronPDF와 Apitron PDF Kit의 비교

C#에서 PDF 파일 작업은 개발자에게 도전적인 과제가 될 수 있습니다. 이 파일에 대한 콘텐츠를 만들 때 고려해야 할 많은 요소가 있으며, 특히 다른 형식에서 PDF로 콘텐츠를 변환할 때 더욱 그렇습니다. 자동화는 이제 소프트웨어 개발 프로세스에 중요한 요소가 되었습니다. PDF 문서를 읽고 쓰며 생성하고 수정하는 데 도움을 주고 그 속성을 편집하여 다른 형식으로 변환할 수 있는 라이브러리 개발로 이러한 문제들이 해결되었습니다.

이 블로그 글은 .NET과 .NET Core용 두 개의 PDF 라이브러리를 비교합니다:

  • IronPDF 라이브러리
  • Apitron PDF Kit

IronPDF와 Apitron PDF Kit은 .NET과 .NET Core에 대해 PDF 처리 기능을 제공하는 라이브러리입니다. 둘 다 문서 필드 변환 및 조작 작업에 사용될 수 있습니다. 또한 북마크 생성도 허용합니다. 다음 단계는 우리의 .NET 프로젝트에 가장 적합한 C# PDF .NET 라이브러리를 결정하는 것입니다. 이 비교 기사는 두 개의 PDF 라이브러리 중에서 결정하는 데 도움이 될 것입니다.

먼저, 두 라이브러리가 제공하는 것을 탐색한 다음, 비교 자체로 넘어가겠습니다.

Apitron PDF Kit 라이브러리 및 그 기능들

Apitron PDF Kit은 다양한 방식으로 PDF 파일을 조작하거나 변환할 수 있는 .NET 구성요소입니다. 이미지, 그림, 텍스트를 추가하고, 문서에 서명하는 등 다양한 기능을 제공합니다. 기존 콘텐츠도 편집할 수 있습니다. Apitron PDF Kit .NET 구성 요소는 여러 플랫폼에서 모바일, 데스크톱, 웹, Windows, Cloud 애플리케이션을 생성하는 데 사용할 수 있습니다.

이 PDF SDK를 사용하여 다음을 수행할 수 있습니다:

  • 그래픽(텍스트, 이미지, 그림)을 추출, 수정 및 추가
  • PDF 문서를 분할하거나 병합
  • 암호로 보호된 PDF 양식을 작성 또는 작성하고 FDF 지원
  • 선택적 콘텐츠 그룹(OCG)으로 다계층 PDF 문서 생성
  • 문서에서 필드를 추가하거나 제거
  • 오른쪽에서 왼쪽으로의 텍스트 또는 양방향 텍스트 사용하여 페이지 콘텐츠 생성
  • 문서 내의 리소스를 검사 - 정의된 글꼴, 임베디드 파일
  • PDF 문서에 디지털 서명을 하고 기존 서명을 확인

IronPDF의 주요 기능

개발자, 특히 C# 프로그래머는 IronPDF .NET 라이브러리를 높이 평가할 것입니다. 이 도구를 사용하면 .NET Core PDF 처리 애플리케이션을 쉽게 구축할 수 있습니다.

IronPDF는 .NET Chromium 엔진을 사용하여 HTML 페이지(코드 또는 URL 형태로)를 PDF 파일로 변환합니다. HTML에서 내비게이션 객체를 위치시키거나 PDF를 디자인하기 위해 복잡한 API를 사용할 필요가 없습니다. IronPDF는 HTML, ASPX, JS, CSS 및 그림을 포함한 표준 웹 문서를 지원합니다.

IronPDF는 HTML5, CSS, JS 및 이미지를 사용하여 생성될 수 있습니다. PDF는 쉽게 편집, 스탬프, 헤더 및 푸터 추가가 가능합니다. PDF 텍스트를 읽고 그래픽을 추출하는 것도 간단합니다.

IronPDF 의 주요 특징은 다음과 같습니다.

  • HTML4/5, CSS, JavaScript를 사용하여 PDF 문서 생성
  • URL을 사용자 정의 네트워크 로그인 자격 증명, 사용자 에이전트, 프록시, 쿠키, HTTP 헤더 및 폼 변수와 함께 로딩 (HTML 로그인 폼 뒤에 로그인 가능)
  • PDF 양식 필드 읽기 및 완료
  • PDF에서 텍스트 및 그래픽 추출
  • 새로운 HTML 콘텐츠로 PDF 페이지 업데이트
  • 텍스트 기반 또는 HTML 기반 헤더 및 푸터 생성
  • PDF 문서 콘텐츠 병합 및 분리
  • ASP.NET 웹폼을 출력 가능한 PDF로 변환
  • Adobe Acrobat 소프트웨어 없이 PDF 파일 인쇄

IronPDF는 거의 모든 운영 체제와 C#과 호환되는 프레임워크에서 사용할 수 있습니다:

  • .NET Core 2.1, 3.0, 3.1, .NET 6 & 5
  • 보편적 호환성 for .NET Standard 2.0 준수
  • Azure, AWS, Docker, Linux, Windows

기사의 나머지 부분은 다음과 같습니다.

  1. IronPDF 설치
  2. Apitron PDF Kit 설치
  3. PDF 문서 생성
  4. PDF에 헤더 및 푸터 생성
  5. PDF 디지털 서명
  6. 가격 및 라이선스

1. IronPDF 설치

IronPDF 라이브러리를 다운로드하고 설치하는 네 가지 방법이 있습니다. 다음과 같습니다:

  1. NuGet 패키지 관리자를 사용
  2. 개발자 명령 프롬프트
  3. NuGet 패키지를 직접 다운로드
  4. IronPDF .DLL 라이브러리 다운로드

1.1. NuGet 패키지 관리자를 사용

IronPDF를 설치하려면 솔루션 탐색기에서 프로젝트를 마우스 오른쪽 버튼으로 클릭하십시오. 그러면 NuGet 패키지 관리자가 열립니다.

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 1: 솔루션 탐색기를 사용하여 NuGet 패키지 관리자에 접근하기

솔루션 탐색기를 사용하여 NuGet 패키지 관리자에 접근하기

선택한 후 아래 스크린샷에 표시된 대로 IronPDF 패키지를 찾아 설치하세요.

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 2: NuGet 패키지 관리자를 이용한 IronPDF 라이브러리 설치

NuGet 패키지 관리자를 이용한 IronPDF 라이브러리 설치

1.2. 개발자 명령 프롬프트 사용하기

IronPDF는 개발자 명령 프롬프트를 통해서도 설치할 수 있습니다.

  • 개발자 명령 프롬프트를 엽니다 — 일반적으로 Visual Studio 폴더 아래에 있습니다.
  • 다음 명령을 입력하십시오:
Install-Package IronPdf
  • Enter를 누르십시오
  • 패키지를 다운로드하고 설치합니다
  • 프로젝트를 다시 불러오고 사용을 시작합니다

1.3. NuGet 패키지 직접 다운로드하기

IronPDF는 IronPDF NuGet Package 사이트를 직접 방문하여 패키지를 다운로드하여 설치할 수도 있습니다. 단계는 다음과 같습니다:

  • IronPDF NuGet Package로 이동하십시오.
  • Download Package를 선택하십시오
  • 다운로드한 패키지를 더블 클릭하십시오
  • 패키지가 설치됩니다
  • Visual Studio 프로젝트를 다시 불러오고 사용을 시작하십시오

IronPDF가 다운로드되어 사용 준비가 되었습니다. 그러나 그 전에 Apitron PDF 라이브러리를 설치해야 합니다.

2. Apitron PDF Kit 설치

.NET Core 애플리케이션의 경우 NuGet 패키지 관리자를 사용하여 Apitron을 설치하거나, Apitron PDF Kit NuGet 웹사이트에서 직접 다운로드하여 설치할 수 있습니다.

  • IronPDF에서 했던 것처럼 Visual Studio에서 NuGet 패키지를 여십시오.
  • Apitron.PDF.Kit을 검색하십시오.
  • 현재 프로젝트에 설치를 클릭하십시오.
A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 3: Apitron PDF Kit 검색

Apitron PDF Kit 검색

NuGet 패키지 관리자 콘솔을 사용하여 Apitron을 설치할 수도 있습니다. IronPDF에서 언급한 '개발자 명령 프롬프트 사용' 단계를 따르고 다음 명령을 입력하십시오:

Install-Package Apitron.PDF.Kit

ENTER를 누르십시오. Apitron.PDF.Kit이 다운로드되고 설치됩니다.

다음 네임스페이스를 추가하세요:

using Apitron.PDF.Kit;
using Apitron.PDF.Kit.FixedLayout.Resources;
using Apitron.PDF.Kit.FixedLayout.Resources.Fonts;
using Apitron.PDF.Kit.FlowLayout.Content;
using Apitron.PDF.Kit.Styles;
using Apitron.PDF.Kit.Styles.Appearance;
using Font = Apitron.PDF.Kit.Styles.Text.Font;
using Apitron.PDF.Kit;
using Apitron.PDF.Kit.FixedLayout.Resources;
using Apitron.PDF.Kit.FixedLayout.Resources.Fonts;
using Apitron.PDF.Kit.FlowLayout.Content;
using Apitron.PDF.Kit.Styles;
using Apitron.PDF.Kit.Styles.Appearance;
using Font = Apitron.PDF.Kit.Styles.Text.Font;
Imports Apitron.PDF.Kit
Imports Apitron.PDF.Kit.FixedLayout.Resources
Imports Apitron.PDF.Kit.FixedLayout.Resources.Fonts
Imports Apitron.PDF.Kit.FlowLayout.Content
Imports Apitron.PDF.Kit.Styles
Imports Apitron.PDF.Kit.Styles.Appearance
Imports Font = Apitron.PDF.Kit.Styles.Text.Font
$vbLabelText   $csharpLabel

이제 IronPDF와 Apitron PDF를 비교해 봅시다.

3. PDF 문서 만들기

3.1. IronPDF 사용

IronPDF는 PDF를 만드는 여러 가지 방법이 있습니다. 중요한 두 가지 방법을 탐색해 봅시다.

기존 PDF URL

IronPDF는 URL을 PDF로 전환하는 것을 쉽게 만들어줍니다. 다음 코드는 URL을 PDF로 변환하는 데 도움이 됩니다.

var Renderer = new IronPdf.ChromePdfRenderer();
// Render a PDF from an existing URL
using var Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/");
// Save the PDF to a file
Pdf.SaveAs("url.pdf");
var Renderer = new IronPdf.ChromePdfRenderer();
// Render a PDF from an existing URL
using var Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/");
// Save the PDF to a file
Pdf.SaveAs("url.pdf");
Dim Renderer = New IronPdf.ChromePdfRenderer()
' Render a PDF from an existing URL
Dim Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/")
' Save the PDF to a file
Pdf.SaveAs("url.pdf")
$vbLabelText   $csharpLabel

HTML 입력 문자열을 PDF로 변환

아래 코드는 HTML 문자열에서 PDF 문서를 렌더링하는 방법을 설명합니다. 단순히 HTML만 사용할 수 있으며, CSS, 이미지, JavaScript와 결합하여 사용할 수도 있습니다.

var Renderer = new IronPdf.ChromePdfRenderer();
// Render a PDF from a simple HTML string
using var PDF = Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>");
PDF.SaveAs("pixel-perfect.pdf");

// Load external HTML assets like images, CSS, and JavaScript
// Set the optional BasePath as the file location to load assets from
using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>Sample Text</h1>", @"C:\site\assets\");
AdvancedPDF.SaveAs("html-with-assets.pdf");
var Renderer = new IronPdf.ChromePdfRenderer();
// Render a PDF from a simple HTML string
using var PDF = Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>");
PDF.SaveAs("pixel-perfect.pdf");

// Load external HTML assets like images, CSS, and JavaScript
// Set the optional BasePath as the file location to load assets from
using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>Sample Text</h1>", @"C:\site\assets\");
AdvancedPDF.SaveAs("html-with-assets.pdf");
Dim Renderer = New IronPdf.ChromePdfRenderer()
' Render a PDF from a simple HTML string
Dim PDF = Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>")
PDF.SaveAs("pixel-perfect.pdf")

' Load external HTML assets like images, CSS, and JavaScript
' Set the optional BasePath as the file location to load assets from
Dim AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>Sample Text</h1>", "C:\site\assets\")
AdvancedPDF.SaveAs("html-with-assets.pdf")
$vbLabelText   $csharpLabel

출력 결과는 다음과 같습니다.

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 4: IronPDF URL과 HTML CSS 문자열에서 PDF 생성

IronPDF URL과 HTML CSS 문자열에서 PDF 생성

3.2. Apitron PDF Kit 사용하기

Apitron PDF는 URL 또는 HTML을 PDF로 변환하는 방법을 제공하지 않습니다. PDF를 HTML로 변환할 수는 있습니다. 그러나 XML 파일을 PDF로 변환하기도 합니다. 사용된 XML 파일은:

<?xml version="1.0" encoding="utf-8"?>
<FlowDocument xmlns="Apitron.PDF.Kit.FlowLayout.v1">
  <Resources>
    <Image resourceId="logo" fileName="../../images/logo.png" />
  </Resources>
  <Styles>
    <Style selector="flowdocument">
      <Color value="Black" />
    </Style>
    <Style selector="grid">
      <InnerBorder thickness="1" />
      <InnerBorderColor value="Black" />
    </Style>
  </Styles>
  <Elements>
    <Image>
      <Properties>
        <Class value="logo" />
        <ResourceId value="logo" />
      </Properties>
    </Image>
    <TextBlock>
      <Properties>
        <Class value="header" />
        <Text value="Sample Interview Questions for Candidates" />
      </Properties>
    </TextBlock>
    <Br />
    <TextBlock>
      <Properties>
        <Class value="headerNote" />
        <Text value="To help facilitate the interview process, the Human Resources Department has compiled a list of questions that might be used during the phone and/or on-campus interviews. Some of the questions deal with the same content, but are phrased differently while other questions may not pertain to a specific discipline; however all of the questions are unbiased and appropriate to ask. We hope you'll find this helpful." />
      </Properties>
    </TextBlock>
  </Elements>
  <Properties>
    <Margin value="30,20,30,20" />
  </Properties>
</FlowDocument>
<?xml version="1.0" encoding="utf-8"?>
<FlowDocument xmlns="Apitron.PDF.Kit.FlowLayout.v1">
  <Resources>
    <Image resourceId="logo" fileName="../../images/logo.png" />
  </Resources>
  <Styles>
    <Style selector="flowdocument">
      <Color value="Black" />
    </Style>
    <Style selector="grid">
      <InnerBorder thickness="1" />
      <InnerBorderColor value="Black" />
    </Style>
  </Styles>
  <Elements>
    <Image>
      <Properties>
        <Class value="logo" />
        <ResourceId value="logo" />
      </Properties>
    </Image>
    <TextBlock>
      <Properties>
        <Class value="header" />
        <Text value="Sample Interview Questions for Candidates" />
      </Properties>
    </TextBlock>
    <Br />
    <TextBlock>
      <Properties>
        <Class value="headerNote" />
        <Text value="To help facilitate the interview process, the Human Resources Department has compiled a list of questions that might be used during the phone and/or on-campus interviews. Some of the questions deal with the same content, but are phrased differently while other questions may not pertain to a specific discipline; however all of the questions are unbiased and appropriate to ask. We hope you'll find this helpful." />
      </Properties>
    </TextBlock>
  </Elements>
  <Properties>
    <Margin value="30,20,30,20" />
  </Properties>
</FlowDocument>
XML

이 XML 템플릿을 PDF로 변환하는 코드는 다음과 같습니다:

// Use Apitron's FlowDocument to convert XML to PDF
using (Stream stream = File.OpenRead("C:\PLACE YOUR EXACT PATH HERE\template.xml"), 
               outputStream = File.Create("fromTemplate.pdf"))
{
    ResourceManager resourceManager = new ResourceManager();
    FlowDocument doc = FlowDocument.LoadFromXml(stream, resourceManager);

    doc.Write(outputStream, resourceManager);
}
// Use Apitron's FlowDocument to convert XML to PDF
using (Stream stream = File.OpenRead("C:\PLACE YOUR EXACT PATH HERE\template.xml"), 
               outputStream = File.Create("fromTemplate.pdf"))
{
    ResourceManager resourceManager = new ResourceManager();
    FlowDocument doc = FlowDocument.LoadFromXml(stream, resourceManager);

    doc.Write(outputStream, resourceManager);
}
' Use Apitron's FlowDocument to convert XML to PDF
Using stream As Stream = File.OpenRead("C:\PLACE YOUR EXACT PATH HERE\template.xml"),
      outputStream As Stream = File.Create("fromTemplate.pdf")

    Dim resourceManager As New ResourceManager()
    Dim doc As FlowDocument = FlowDocument.LoadFromXml(stream, resourceManager)

    doc.Write(outputStream, resourceManager)
End Using
$vbLabelText   $csharpLabel

출력 결과는 다음과 같습니다.

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 5: Apitron PDF 문서

Apitron PDF 문서

IronPDF와 Apitron의 출력을 비교하면 IronPDF가 HTML 렌더링을 통해 이미지 크기 조정 없이 인상적인 문서를 생성함을 명확히 알 수 있습니다. 한편, Apitron은 XML 파일에 등록된 스타일이 있는 경우에만 IronPDF와 유사한 출력을 제공합니다.

4. PDF 문서에 머리글과 바닥글 추가하기

4.1. IronPDF 사용

IronPDF로 머리글과 바닥글을 추가하는 것은 간단합니다. IronPDF를 사용하면 페이지 번호 및 페이지 구분, 표지, 여백 등을 추가할 수 있습니다.

헤더와 푸터를 추가하는 코드 아래에 있습니다:

var Renderer = new ChromePdfRenderer();

// Add a header
Renderer.RenderingOptions.FirstPageNumber = 1; // Use 2 if a cover page will be appended
Renderer.RenderingOptions.TextHeader.DrawDividerLine = true;
Renderer.RenderingOptions.TextHeader.CenterText = "This is the header text";
Renderer.RenderingOptions.TextHeader.Font = IronPdf.Font.FontTypes.Helvetica;
Renderer.RenderingOptions.TextHeader.FontSize = 12;
Renderer.RenderingOptions.MarginTop = 25; // Create 25mm space for header

// Add a footer too
Renderer.RenderingOptions.TextFooter.DrawDividerLine = true;
Renderer.RenderingOptions.TextFooter.Font = IronPdf.Font.FontTypes.Arial;
Renderer.RenderingOptions.TextFooter.FontSize = 12;
Renderer.RenderingOptions.TextFooter.LeftText = "{date} {time}";
Renderer.RenderingOptions.TextFooter.RightText = "{page} of {total-pages}";
Renderer.RenderingOptions.MarginTop = 25; // Create 25mm space for footer

using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>This is header and footer generated pdf file</h1>", @"C:\site\assets\");
AdvancedPDF.SaveAs("html-with-assets.pdf");
var Renderer = new ChromePdfRenderer();

// Add a header
Renderer.RenderingOptions.FirstPageNumber = 1; // Use 2 if a cover page will be appended
Renderer.RenderingOptions.TextHeader.DrawDividerLine = true;
Renderer.RenderingOptions.TextHeader.CenterText = "This is the header text";
Renderer.RenderingOptions.TextHeader.Font = IronPdf.Font.FontTypes.Helvetica;
Renderer.RenderingOptions.TextHeader.FontSize = 12;
Renderer.RenderingOptions.MarginTop = 25; // Create 25mm space for header

// Add a footer too
Renderer.RenderingOptions.TextFooter.DrawDividerLine = true;
Renderer.RenderingOptions.TextFooter.Font = IronPdf.Font.FontTypes.Arial;
Renderer.RenderingOptions.TextFooter.FontSize = 12;
Renderer.RenderingOptions.TextFooter.LeftText = "{date} {time}";
Renderer.RenderingOptions.TextFooter.RightText = "{page} of {total-pages}";
Renderer.RenderingOptions.MarginTop = 25; // Create 25mm space for footer

using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>This is header and footer generated pdf file</h1>", @"C:\site\assets\");
AdvancedPDF.SaveAs("html-with-assets.pdf");
Dim Renderer = New ChromePdfRenderer()

' Add a header
Renderer.RenderingOptions.FirstPageNumber = 1 ' Use 2 if a cover page will be appended
Renderer.RenderingOptions.TextHeader.DrawDividerLine = True
Renderer.RenderingOptions.TextHeader.CenterText = "This is the header text"
Renderer.RenderingOptions.TextHeader.Font = IronPdf.Font.FontTypes.Helvetica
Renderer.RenderingOptions.TextHeader.FontSize = 12
Renderer.RenderingOptions.MarginTop = 25 ' Create 25mm space for header

' Add a footer too
Renderer.RenderingOptions.TextFooter.DrawDividerLine = True
Renderer.RenderingOptions.TextFooter.Font = IronPdf.Font.FontTypes.Arial
Renderer.RenderingOptions.TextFooter.FontSize = 12
Renderer.RenderingOptions.TextFooter.LeftText = "{date} {time}"
Renderer.RenderingOptions.TextFooter.RightText = "{page} of {total-pages}"
Renderer.RenderingOptions.MarginTop = 25 ' Create 25mm space for footer

Dim AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>This is header and footer generated pdf file</h1>", "C:\site\assets\")
AdvancedPDF.SaveAs("html-with-assets.pdf")
$vbLabelText   $csharpLabel

출력 결과는 다음과 같습니다.

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 6: IronPDF 헤더와 푸터

IronPDF 헤더와 푸터

4.2. Apitron PDF Kit 사용하기

Apitron PDF Kit은 XML 구조 형식의 콘텐츠를 PDF로 변환하여 PDF를 생성합니다. Apitron PDF Kit에서는 PageHeaderPageFooter 속성을 사용하여 머리글 및 바닥글을 추가할 수 있습니다. 이 작업을 수행하는 코드는 다음과 같습니다:

// Register document resources first
ResourceManager resourceManager = new ResourceManager();
resourceManager.RegisterResource(new Apitron.PDF.Kit.FixedLayout.Resources.XObjects.Image("logo", "../../data/logo.png"));

// Create the document
FlowDocument doc = new FlowDocument() { Margin = new Thickness(10) };

// Register styles
doc.StyleManager.RegisterStyle(".pageHeader", new Style() { Font = new Font(StandardFonts.TimesBold, 20) });
doc.StyleManager.RegisterStyle(".pageFooter", new Style() { Align = Align.Right });
doc.StyleManager.RegisterStyle("hr", new Style() { Height = 2, Margin = new Thickness(0, 5, 0, 5) });
doc.StyleManager.RegisterStyle(".content", new Style() { Align = Align.Left, Display = Display.InlineBlock });

// Fill the header section
doc.PageHeader.Class = "pageHeader";
doc.PageHeader.Add(new Image("logo") { Width = 100, Height = 50 });
doc.PageHeader.Add(new TextBlock("This document is intended for internal use only") { TextIndent = 20 });
doc.PageHeader.Add(new Hr());

// Fill the footer section
doc.PageFooter.Class = "pageFooter";
doc.PageFooter.Add(new Hr());
doc.PageFooter.Add(new TextBlock((ctx) => string.Format("Page {0} from&nbsp;", ctx.CurrentPage + 1)));
doc.PageFooter.Add(new PageCount(3) { Display = Display.Inline });

// Add pages
for (int i = 0; i < 2; ++i)
{
    doc.Add(new TextBlock("This is header and footer generation pdf file.") { Class = "content" });
    doc.Add(new PageBreak());
}

// Generate PDF
using (Stream stream = File.Create("out.pdf"))
{
    doc.Write(stream, resourceManager);
}

Process.Start("out.pdf");
// Register document resources first
ResourceManager resourceManager = new ResourceManager();
resourceManager.RegisterResource(new Apitron.PDF.Kit.FixedLayout.Resources.XObjects.Image("logo", "../../data/logo.png"));

// Create the document
FlowDocument doc = new FlowDocument() { Margin = new Thickness(10) };

// Register styles
doc.StyleManager.RegisterStyle(".pageHeader", new Style() { Font = new Font(StandardFonts.TimesBold, 20) });
doc.StyleManager.RegisterStyle(".pageFooter", new Style() { Align = Align.Right });
doc.StyleManager.RegisterStyle("hr", new Style() { Height = 2, Margin = new Thickness(0, 5, 0, 5) });
doc.StyleManager.RegisterStyle(".content", new Style() { Align = Align.Left, Display = Display.InlineBlock });

// Fill the header section
doc.PageHeader.Class = "pageHeader";
doc.PageHeader.Add(new Image("logo") { Width = 100, Height = 50 });
doc.PageHeader.Add(new TextBlock("This document is intended for internal use only") { TextIndent = 20 });
doc.PageHeader.Add(new Hr());

// Fill the footer section
doc.PageFooter.Class = "pageFooter";
doc.PageFooter.Add(new Hr());
doc.PageFooter.Add(new TextBlock((ctx) => string.Format("Page {0} from&nbsp;", ctx.CurrentPage + 1)));
doc.PageFooter.Add(new PageCount(3) { Display = Display.Inline });

// Add pages
for (int i = 0; i < 2; ++i)
{
    doc.Add(new TextBlock("This is header and footer generation pdf file.") { Class = "content" });
    doc.Add(new PageBreak());
}

// Generate PDF
using (Stream stream = File.Create("out.pdf"))
{
    doc.Write(stream, resourceManager);
}

Process.Start("out.pdf");
' Register document resources first
Dim resourceManager As New ResourceManager()
resourceManager.RegisterResource(New Apitron.PDF.Kit.FixedLayout.Resources.XObjects.Image("logo", "../../data/logo.png"))

' Create the document
Dim doc As New FlowDocument() With {.Margin = New Thickness(10)}

' Register styles
doc.StyleManager.RegisterStyle(".pageHeader", New Style() With {.Font = New Font(StandardFonts.TimesBold, 20)})
doc.StyleManager.RegisterStyle(".pageFooter", New Style() With {.Align = Align.Right})
doc.StyleManager.RegisterStyle("hr", New Style() With {
	.Height = 2,
	.Margin = New Thickness(0, 5, 0, 5)
})
doc.StyleManager.RegisterStyle(".content", New Style() With {
	.Align = Align.Left,
	.Display = Display.InlineBlock
})

' Fill the header section
doc.PageHeader.Class = "pageHeader"
doc.PageHeader.Add(New Image("logo") With {
	.Width = 100,
	.Height = 50
})
doc.PageHeader.Add(New TextBlock("This document is intended for internal use only") With {.TextIndent = 20})
doc.PageHeader.Add(New Hr())

' Fill the footer section
doc.PageFooter.Class = "pageFooter"
doc.PageFooter.Add(New Hr())
doc.PageFooter.Add(New TextBlock(Function(ctx) String.Format("Page {0} from&nbsp;", ctx.CurrentPage + 1)))
doc.PageFooter.Add(New PageCount(3) With {.Display = Display.Inline})

' Add pages
For i As Integer = 0 To 1
	doc.Add(New TextBlock("This is header and footer generation pdf file.") With {.Class = "content"})
	doc.Add(New PageBreak())
Next i

' Generate PDF
Using stream As Stream = File.Create("out.pdf")
	doc.Write(stream, resourceManager)
End Using

Process.Start("out.pdf")
$vbLabelText   $csharpLabel

출력 결과는 다음과 같습니다.

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 7: Apitron 헤더와 푸터

Apitron 헤더와 푸터

5. PDF 디지털 서명하기

5.1. IronPDF 사용

PDF 처리 기능 중 가장 중요한 것 중 하나는 PDF 문서를 디지털로 서명할 수 있는 기능입니다. IronPDF는 이를 수행하는 데 필요한 모든 도구를 제공합니다.

using IronPdf;

// Cryptographically sign an existing PDF in 1 line of code!
new IronPdf.Signing.PdfSignature("Iron.p12", "123456").SignPdfFile("any.pdf");

/***** Advanced example for more control *****/

// 1. Create a PDF
var Renderer = new IronPdf.ChromePdfRenderer();
var doc = Renderer.RenderHtmlAsPdf("<h1>Testing 2048 bit digital security</h1>");

// 2. Create a Signature.
// You may create a .pfx or .p12 PDF signing certificate using Adobe Acrobat Reader.

var signature = new IronPdf.Signing.PdfSignature("Iron.pfx", "123456");

// 3. Handwritten signature graphic
signature.LoadSignatureImageFromFile("handwriting.png");

// 4. Sign the PDF with the PdfSignature. Multiple signing certificates may be used
doc.SignPdfWithDigitalSignature(signature);

// 5. The PDF is not signed until saved to file, stream or byte array.
doc.SaveAs("signed.pdf");
using IronPdf;

// Cryptographically sign an existing PDF in 1 line of code!
new IronPdf.Signing.PdfSignature("Iron.p12", "123456").SignPdfFile("any.pdf");

/***** Advanced example for more control *****/

// 1. Create a PDF
var Renderer = new IronPdf.ChromePdfRenderer();
var doc = Renderer.RenderHtmlAsPdf("<h1>Testing 2048 bit digital security</h1>");

// 2. Create a Signature.
// You may create a .pfx or .p12 PDF signing certificate using Adobe Acrobat Reader.

var signature = new IronPdf.Signing.PdfSignature("Iron.pfx", "123456");

// 3. Handwritten signature graphic
signature.LoadSignatureImageFromFile("handwriting.png");

// 4. Sign the PDF with the PdfSignature. Multiple signing certificates may be used
doc.SignPdfWithDigitalSignature(signature);

// 5. The PDF is not signed until saved to file, stream or byte array.
doc.SaveAs("signed.pdf");
Imports IronPdf

' Cryptographically sign an existing PDF in 1 line of code!
Call (New IronPdf.Signing.PdfSignature("Iron.p12", "123456")).SignPdfFile("any.pdf")

'''*** Advanced example for more control ****

' 1. Create a PDF
Dim Renderer = New IronPdf.ChromePdfRenderer()
Dim doc = Renderer.RenderHtmlAsPdf("<h1>Testing 2048 bit digital security</h1>")

' 2. Create a Signature.
' You may create a .pfx or .p12 PDF signing certificate using Adobe Acrobat Reader.

Dim signature = New IronPdf.Signing.PdfSignature("Iron.pfx", "123456")

' 3. Handwritten signature graphic
signature.LoadSignatureImageFromFile("handwriting.png")

' 4. Sign the PDF with the PdfSignature. Multiple signing certificates may be used
doc.SignPdfWithDigitalSignature(signature)

' 5. The PDF is not signed until saved to file, stream or byte array.
doc.SaveAs("signed.pdf")
$vbLabelText   $csharpLabel

5.2 Apitron PDF Kit 사용하기

Apitron PDF Kit을 사용하여 PDF에 서명을 스탬프하는 것은 길고 기술적인 과정입니다.

static void Main(string[] args)
{
    string fileName = "signedTwice.pdf";

    using (Stream stream = File.Create(fileName))
    {
        FlowDocument doc = new FlowDocument() { Margin = new Thickness(10) };
        doc.Add(new TextBlock("Signed using Apitron PDF Kit for .NET"));
        doc.Write(stream, new ResourceManager());
    }

    // Save
    Sign(fileName, "../../data/certs/JohnDoe.pfx", "password", "../../data/images/signatureImage.png", new Boundary(10, 750, 110, 800));
}

// Implementation of Sign Method
private static void Sign(string pathToDocument, string pathToCertificate, string password, string pathToSignatureImage, Boundary signatureViewLocation)
{
    // Open existing document and sign once
    using (Stream inputStream = new FileStream(pathToDocument, FileMode.Open, FileAccess.ReadWrite))
    {
        using (FixedDocument doc = new FixedDocument(inputStream))
        {
            string imageResourceId = Guid.NewGuid().ToString("N");
            string signatureFieldId = Guid.NewGuid().ToString("N");

            // Register signature image resource
            doc.ResourceManager.RegisterResource(new Image(imageResourceId, pathToSignatureImage));

            // Create first signature field and initialize it using a stored certificate
            SignatureField signatureField = new SignatureField(signatureFieldId);
            using (Stream signatureDataStream = File.OpenRead(pathToCertificate))
            {
                signatureField.Signature = Signature.Create(new Pkcs12Store(signatureDataStream, password));
            }

            // Add signature fields to the document
doc.AcroForm.Fields.Add(signatureField);

            // Create first signature view using the image resource
            SignatureFieldView signatureView = new SignatureFieldView(signatureField, signatureViewLocation);
            signatureView.ViewSettings.Graphic = Graphic.Image;
            signatureView.ViewSettings.GraphicResourceID = imageResourceId;
            signatureView.ViewSettings.Description = Description.None;

            // Add views to page annotations collection
doc.Pages[0].Annotations.Add(signatureView);

            // Save as incremental update
doc.Save();
        }
    }
}
static void Main(string[] args)
{
    string fileName = "signedTwice.pdf";

    using (Stream stream = File.Create(fileName))
    {
        FlowDocument doc = new FlowDocument() { Margin = new Thickness(10) };
        doc.Add(new TextBlock("Signed using Apitron PDF Kit for .NET"));
        doc.Write(stream, new ResourceManager());
    }

    // Save
    Sign(fileName, "../../data/certs/JohnDoe.pfx", "password", "../../data/images/signatureImage.png", new Boundary(10, 750, 110, 800));
}

// Implementation of Sign Method
private static void Sign(string pathToDocument, string pathToCertificate, string password, string pathToSignatureImage, Boundary signatureViewLocation)
{
    // Open existing document and sign once
    using (Stream inputStream = new FileStream(pathToDocument, FileMode.Open, FileAccess.ReadWrite))
    {
        using (FixedDocument doc = new FixedDocument(inputStream))
        {
            string imageResourceId = Guid.NewGuid().ToString("N");
            string signatureFieldId = Guid.NewGuid().ToString("N");

            // Register signature image resource
            doc.ResourceManager.RegisterResource(new Image(imageResourceId, pathToSignatureImage));

            // Create first signature field and initialize it using a stored certificate
            SignatureField signatureField = new SignatureField(signatureFieldId);
            using (Stream signatureDataStream = File.OpenRead(pathToCertificate))
            {
                signatureField.Signature = Signature.Create(new Pkcs12Store(signatureDataStream, password));
            }

            // Add signature fields to the document
doc.AcroForm.Fields.Add(signatureField);

            // Create first signature view using the image resource
            SignatureFieldView signatureView = new SignatureFieldView(signatureField, signatureViewLocation);
            signatureView.ViewSettings.Graphic = Graphic.Image;
            signatureView.ViewSettings.GraphicResourceID = imageResourceId;
            signatureView.ViewSettings.Description = Description.None;

            // Add views to page annotations collection
doc.Pages[0].Annotations.Add(signatureView);

            // Save as incremental update
doc.Save();
        }
    }
}
Imports System
Imports System.IO
Imports Apitron.PDF.Rasterizer
Imports Apitron.PDF.Kit.FixedLayout
Imports Apitron.PDF.Kit
Imports Apitron.PDF.Kit.Styles
Imports Apitron.PDF.Kit.Signatures
Imports Apitron.PDF.Kit.Interactive.Annotations

Module Module1
    Sub Main(args As String())
        Dim fileName As String = "signedTwice.pdf"

        Using stream As Stream = File.Create(fileName)
            Dim doc As New FlowDocument() With {.Margin = New Thickness(10)}
            doc.Add(New TextBlock("Signed using Apitron PDF Kit for .NET"))
            doc.Write(stream, New ResourceManager())
        End Using

        ' Save
        Sign(fileName, "../../data/certs/JohnDoe.pfx", "password", "../../data/images/signatureImage.png", New Boundary(10, 750, 110, 800))
    End Sub

    ' Implementation of Sign Method
    Private Sub Sign(pathToDocument As String, pathToCertificate As String, password As String, pathToSignatureImage As String, signatureViewLocation As Boundary)
        ' Open existing document and sign once
        Using inputStream As Stream = New FileStream(pathToDocument, FileMode.Open, FileAccess.ReadWrite)
            Using doc As New FixedDocument(inputStream)
                Dim imageResourceId As String = Guid.NewGuid().ToString("N")
                Dim signatureFieldId As String = Guid.NewGuid().ToString("N")

                ' Register signature image resource
                doc.ResourceManager.RegisterResource(New Image(imageResourceId, pathToSignatureImage))

                ' Create first signature field and initialize it using a stored certificate
                Dim signatureField As New SignatureField(signatureFieldId)
                Using signatureDataStream As Stream = File.OpenRead(pathToCertificate)
                    signatureField.Signature = Signature.Create(New Pkcs12Store(signatureDataStream, password))
                End Using

                ' Add signature fields to the document
                doc.AcroForm.Fields.Add(signatureField)

                ' Create first signature view using the image resource
                Dim signatureView As New SignatureFieldView(signatureField, signatureViewLocation)
                signatureView.ViewSettings.Graphic = Graphic.Image
                signatureView.ViewSettings.GraphicResourceID = imageResourceId
                signatureView.ViewSettings.Description = Description.None

                ' Add views to page annotations collection
                doc.Pages(0).Annotations.Add(signatureView)

                ' Save as incremental update
                doc.Save()
            End Using
        End Using
    End Sub
End Module
$vbLabelText   $csharpLabel

라이브러리들의 출력은 거의 동일합니다. IronPDF가 PDF 콘텐츠를 조작하기에는 더 쉽고 편리하다는 것을 명확히 볼 수 있습니다. 출력 PDF는 인증서와 서명이 찍혀있습니다.

포트폴리오 갤러리에 IronPDF와 Bootstrap 5 사용하기

IronPDF의 Chrome V8 렌더링 엔진은 최신 Bootstrap 5 구성 요소를 완벽히 지원하여 전문가 포트폴리오 갤러리와 함께 시각적으로 놀라운 PDF 문서를 생성할 수 있습니다. 이 예제는 그리드 레이아웃, 호버 효과, 그라디언트 오버레이, 카테고리 배지를 구현하는 예로, Apitron PDF SDK와 같은 전통적인 PDF 라이브러리로 구현하기에는 어려운 기능들입니다.

using IronPdf;

var renderer = new ChromePdfRenderer();

string portfolioGallery = @"
<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'>
    <style>
        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .gallery-item img {
            width: 100%;
            height: 250px;
            object-fit: cover;
            transition: transform 0.3s;
        }
        .gallery-item:hover img {
            transform: scale(1.1);
        }
        .gallery-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
            padding: 20px;
            color: white;
        }
        .category-badge {
            position: absolute;
            top: 10px;
            right: 10px;
        }
        @media print {
            .gallery-item { page-break-inside: avoid; }
        }
    </style>
</head>
<body>
    <div class='container py-5'>
        <div class='text-center mb-5'>
            <h1 class='display-4'>Design Portfolio</h1>
            <p class='lead text-muted'>Showcase of PDF Document Designs</p>
        </div>

        <div class='row mb-4'>
            <div class='col-12'>
                <div class='btn-group' role='group'>
                    <button class='btn btn-primary'>All Projects</button>
                    <button class='btn btn-outline-primary'>Invoices</button>
                    <button class='btn btn-outline-primary'>Reports</button>
                    <button class='btn btn-outline-primary'>Forms</button>
                    <button class='btn btn-outline-primary'>Certificates</button>
                </div>
            </div>
        </div>

        <div class='row g-4'>
            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-primary category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📄</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Professional Invoice Template</h5>
                        <small>Corporate billing with itemized details</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-success category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📊</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Analytics Dashboard Report</h5>
                        <small>Data visualization and metrics</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-warning category-badge'>Certificate</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>🏆</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Award Certificate</h5>
                        <small>Professional achievement recognition</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-info category-badge'>Form</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #fa709a 0%, #fee140 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📝</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Application Form</h5>
                        <small>Multi-page data collection</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-danger category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #30cfd0 0%, #330867 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>💰</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Payment Receipt</h5>
                        <small>Transaction confirmation document</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-secondary category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📈</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Financial Statement</h5>
                        <small>Quarterly performance overview</small>
                    </div>
                </div>
            </div>
        </div>

        <div class='text-center mt-5'>
            <p class='text-muted'>All templates rendered with IronPDF's Chromium engine</p>
            <div class='d-flex justify-content-center gap-2'>
                <span class='badge bg-primary'>Bootstrap 5</span>
                <span class='badge bg-success'>Responsive</span>
                <span class='badge bg-info'>Print-Ready</span>
            </div>
        </div>
    </div>
</body>
</html>";

var pdf = renderer.RenderHtmlAsPdf(portfolioGallery);
pdf.SaveAs("portfolio-gallery.pdf");
using IronPdf;

var renderer = new ChromePdfRenderer();

string portfolioGallery = @"
<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'>
    <style>
        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .gallery-item img {
            width: 100%;
            height: 250px;
            object-fit: cover;
            transition: transform 0.3s;
        }
        .gallery-item:hover img {
            transform: scale(1.1);
        }
        .gallery-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
            padding: 20px;
            color: white;
        }
        .category-badge {
            position: absolute;
            top: 10px;
            right: 10px;
        }
        @media print {
            .gallery-item { page-break-inside: avoid; }
        }
    </style>
</head>
<body>
    <div class='container py-5'>
        <div class='text-center mb-5'>
            <h1 class='display-4'>Design Portfolio</h1>
            <p class='lead text-muted'>Showcase of PDF Document Designs</p>
        </div>

        <div class='row mb-4'>
            <div class='col-12'>
                <div class='btn-group' role='group'>
                    <button class='btn btn-primary'>All Projects</button>
                    <button class='btn btn-outline-primary'>Invoices</button>
                    <button class='btn btn-outline-primary'>Reports</button>
                    <button class='btn btn-outline-primary'>Forms</button>
                    <button class='btn btn-outline-primary'>Certificates</button>
                </div>
            </div>
        </div>

        <div class='row g-4'>
            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-primary category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📄</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Professional Invoice Template</h5>
                        <small>Corporate billing with itemized details</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-success category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📊</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Analytics Dashboard Report</h5>
                        <small>Data visualization and metrics</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-warning category-badge'>Certificate</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>🏆</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Award Certificate</h5>
                        <small>Professional achievement recognition</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-info category-badge'>Form</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #fa709a 0%, #fee140 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📝</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Application Form</h5>
                        <small>Multi-page data collection</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-danger category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #30cfd0 0%, #330867 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>💰</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Payment Receipt</h5>
                        <small>Transaction confirmation document</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-secondary category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📈</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Financial Statement</h5>
                        <small>Quarterly performance overview</small>
                    </div>
                </div>
            </div>
        </div>

        <div class='text-center mt-5'>
            <p class='text-muted'>All templates rendered with IronPDF's Chromium engine</p>
            <div class='d-flex justify-content-center gap-2'>
                <span class='badge bg-primary'>Bootstrap 5</span>
                <span class='badge bg-success'>Responsive</span>
                <span class='badge bg-info'>Print-Ready</span>
            </div>
        </div>
    </div>
</body>
</html>";

var pdf = renderer.RenderHtmlAsPdf(portfolioGallery);
pdf.SaveAs("portfolio-gallery.pdf");
Imports IronPdf

Dim renderer As New ChromePdfRenderer()

Dim portfolioGallery As String = "
<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'>
    <style>
        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .gallery-item img {
            width: 100%;
            height: 250px;
            object-fit: cover;
            transition: transform 0.3s;
        }
        .gallery-item:hover img {
            transform: scale(1.1);
        }
        .gallery-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
            padding: 20px;
            color: white;
        }
        .category-badge {
            position: absolute;
            top: 10px;
            right: 10px;
        }
        @media print {
            .gallery-item { page-break-inside: avoid; }
        }
    </style>
</head>
<body>
    <div class='container py-5'>
        <div class='text-center mb-5'>
            <h1 class='display-4'>Design Portfolio</h1>
            <p class='lead text-muted'>Showcase of PDF Document Designs</p>
        </div>

        <div class='row mb-4'>
            <div class='col-12'>
                <div class='btn-group' role='group'>
                    <button class='btn btn-primary'>All Projects</button>
                    <button class='btn btn-outline-primary'>Invoices</button>
                    <button class='btn btn-outline-primary'>Reports</button>
                    <button class='btn btn-outline-primary'>Forms</button>
                    <button class='btn btn-outline-primary'>Certificates</button>
                </div>
            </div>
        </div>

        <div class='row g-4'>
            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-primary category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📄</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Professional Invoice Template</h5>
                        <small>Corporate billing with itemized details</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-success category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📊</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Analytics Dashboard Report</h5>
                        <small>Data visualization and metrics</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-warning category-badge'>Certificate</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>🏆</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Award Certificate</h5>
                        <small>Professional achievement recognition</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-info category-badge'>Form</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #fa709a 0%, #fee140 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📝</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Application Form</h5>
                        <small>Multi-page data collection</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-danger category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #30cfd0 0%, #330867 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>💰</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Payment Receipt</h5>
                        <small>Transaction confirmation document</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-secondary category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📈</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Financial Statement</h5>
                        <small>Quarterly performance overview</small>
                    </div>
                </div>
            </div>
        </div>

        <div class='text-center mt-5'>
            <p class='text-muted'>All templates rendered with IronPDF's Chromium engine</p>
            <div class='d-flex justify-content-center gap-2'>
                <span class='badge bg-primary'>Bootstrap 5</span>
                <span class='badge bg-success'>Responsive</span>
                <span class='badge bg-info'>Print-Ready</span>
            </div>
        </div>
    </div>
</body>
</html>"

Dim pdf = renderer.RenderHtmlAsPdf(portfolioGallery)
pdf.SaveAs("portfolio-gallery.pdf")
$vbLabelText   $csharpLabel

이 코드는 반응형 그리드 레이아웃, 시각적 카테고리 배지, 그라디언트 오버레이, 호버 효과가 포함된 전문 PDF 포트폴리오를 생성합니다. Chrome 렌더링 엔진은 모든 Bootstrap 스타일링, CSS 그리드 레이아웃, 사용자 정의 CSS 속성을 유지합니다. 이는 전통적인 PDF 라이브러리가 복제하기 어려운 기능입니다.

Apitron PDF SDK 대비 주요 장점:

  • 변환 없이 기본적인 Bootstrap 5 지원
  • CSS 그리드 및 Flexbox 레이아웃 완벽 렌더링
  • 그라디언트 배경 및 최신 CSS 효과
  • 간단한 코드와 고품질 출력

Bootstrap PDF 생성에 대한 완전한 가이드는 HTML to PDF Bootstrap Guide를 참조하세요.

6. 가격 및 라이선스

IronPDF 가격 및 라이선스

IronPDF는 개발을 위해 무료로 사용할 수 있는 C# 라이브러리이며 상업적 사용을 위한 라이선스를 언제든지 구입할 수 있습니다. 단일 개발자, 에이전시, 다국적 기업을 위한 프로젝트 라이선스, SaaS 및 OEM 재배포를 위한 라이선스도 모두 가능합니다. 모든 라이선스는 30일 환불 보장, 1년 지원 및 업그레이드, 개발/스테이징/프로덕션 유효성, 영구 라이선스를 제공합니다(일회성 구매).

Lite 패키지는 계속되는 비용 없이 $799을(를) 위해 사용할 수 있습니다. 가장 적합한 라이선스를 선택하는 데 대한 자세한 정보와 지원은 IronPDF 제품 라이선스 페이지에서 확인 가능합니다.

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 8: IronPDF 라이선싱

IronPDF 라이선싱

Apitron PDF Kit 가격 및 라이선싱

현재 사용 중인 라이선스 체계는 두 가지 - Modern과 Legacy입니다. 이미 라이선스를 가지고 있는 경우, 라이선스가 만료될 때까지 레거시 라이선스 체계는 계속 유효합니다. 그 이후에는 전환을 위해 고객 지원에 문의해야 합니다. 모던 라이선스 체계는 새로운 고객에게만 적용됩니다.

모던 체계에서는 세 가지 라이선스 등급이 있습니다:

  • 평가판 - 3개월 동안 완전히 기능하는 제품 사용 평가기간. NuGet에서 패키지를 다운로드하고 개발을 시작하기만 하면 됩니다.
  • 커뮤니티 - 비상업적 프로젝트에서 완전히 기능하는 제품을 무료로 사용하십시오. 승인이 필요합니다.
  • 상업적 - 위에 설명되지 않은 모든 사용 사례. 가격은 사용 패턴에 따라 다릅니다.

결론

IronPDF 라이브러리는 HTML, JS, CSS, JPG, PNG, GIF, SVG와 같은 문서 유형에서 픽셀 단위로 정확한 PDF를 생성합니다. Chromium 엔진은 HTML 파일 또는 URL을 렌더링하여 완벽한 PDF를 출력하는 데 도움을 줍니다.

Apitron은 100% PDF 사양 호환성을 갖춘 고정 레이아웃 API를 사용하여 PDF를 생성할 수 있습니다. HTML과 CSS와 유사한 스타일 중심의 콘텐츠 생성 방법으로 이 고정 레이아웃 API는 놀라운 보고서, 청구서, 카탈로그 등을 몇 분 안에 생성할 수 있게 해줍니다. 또한 XML 템플릿 생성을 지원합니다.

Apitron PDF의 라이선스 가격은 웹사이트에 없으며, 사용에 따라 견적을 받기 위해 지원에 문의해야 합니다. 반면, IronPDF는 웹사이트에 매우 명확한 라이선스 패키지가 표시되어 있습니다. 이는 IronPDF가 경쟁사와 차별화되며, 사용자들이 필요에 따라 현명하게 선택할 수 있게 해줍니다.

IronPDF를 사용하면 Apitron PDF보다 PDF 파일을 더 쉽게 작업할 수 있습니다. IronPDF는 사용자가 복잡한 PDF 작업을 위해 더 적은 코드를 작성할 수 있도록 합니다. IronPDF는 여러 파일 유형에서 PDF를 생성하는 다양한 방법을 제공하며, Apitron은 XML 문서를 PDF 문서로 변환할 수만 있습니다. IronPDF는 Apitron에 비해 기술적 옵션을 추가하지 않고도 완벽한 출력을 제공합니다.

모든 Iron Software 고객은 회사의 제품 5개 모두를 2개의 가격으로 구매할 수 있는 옵션이 있습니다. IronPDF의 무료 30일 체험판을 시도하여 전체 기능을 테스트하십시오. IronSoftware.com에서 Iron Software 제품 전체 스위트를 구매하세요.

참고해 주세요Apitron PDF Kit는 해당 소유자의 등록 상표입니다. 이 사이트는 Apitron PDF Kit와 제휴하거나, 허가받거나, 후원받은 것이 아닙니다. 모든 제품명, 로고 및 브랜드는 해당 소유자의 자산입니다. 비교는 정보 제공 목적으로만 사용되며, 작성 시점에 공개적으로 이용 가능한 정보를 반영합니다.

자주 묻는 질문

C#에서 HTML을 PDF로 변환하는 방법은 무엇입니까?

IronPDF의 RenderHtmlAsPdf 메서드를 사용하여 HTML 문자열을 PDF로 변환할 수 있습니다. 또한 RenderHtmlFileAsPdf 사용하여 HTML 파일을 PDF로 변환할 수도 있습니다.

PDF 생성에서 IronPDF가 제공하는 기능은 무엇입니까?

IronPDF는 HTML, CSS 및 JavaScript에서 PDF를 생성하고 URL을 불러오고, 텍스트 및 그래픽을 추출하고, PDF를 병합하는 등의 기능을 지원합니다. .NET Core, Azure, AWS, Docker, Linux 및 Windows와 호환됩니다.

C#에서 PDF를 디지털 서명하는 방법은 무엇입니까?

IronPDF를 사용하면 몇 줄의 코드를 통해 PDF 서명 인증서를 사용하여 PDF를 디지털 서명할 수 있습니다.

IronPDF의 설치 옵션은 무엇입니까?

IronPDF는 NuGet 패키지 관리자, 개발자 명령 프롬프트를 사용하거나 NuGet 패키지 또는 IronPDF .DLL 라이브러리를 직접 다운로드하여 설치할 수 있습니다.

IronPDF의 무료 버전이 있습니까?

예, IronPDF는 무료 개발 버전과 상용 라이선스를 제공합니다. 30일 환불 보장 정책을 포함한 자세한 가격 정보는 웹사이트에서 확인할 수 있습니다.

Apitron PDF Kit은 HTML을 PDF로 변환하는 방법을 어떻게 처리합니까?

Apitron PDF Kit은 HTML을 PDF로 직접 변환하는 것을 지원하지 않지만 XML 파일을 PDF로 변환할 수 있습니다.

Apitron PDF Kit의 두드러진 기능은 무엇입니까?

Apitron PDF Kit은 이미지 추가, 그림, 텍스트 서명 문서, PDF 병합 또는 분할 등을 포함한 포괄적인 PDF 조작을 허용합니다. 그러나 직접적인 HTML에서 PDF 변환 기능은 없습니다.

C#에서 PDF에 헤더와 푸터를 추가하는 방법은 무엇입니까?

IronPDF는 AddTextHeaderAddTextFooter와 같은 메서드를 사용하여 PDF에 쉽게 헤더와 푸터를 추가할 수 있습니다.

Apitron PDF Kit의 라이선스 옵션은 무엇입니까?

Apitron PDF Kit은 3개월 평가 기간과 비상업 프로젝트를 위한 커뮤니티 라이선스를 제공합니다. 상업적 사용을 위해서는 직접 연락하여 견적을 받아야 합니다.

.NET 개발을 위한 PDF 라이브러리 중 더 사용하기 쉬운 것은 무엇입니까?

IronPDF는 일반적으로 .NET 개발을 위해 더 사용하기 쉽고, 간단한 API를 제공하며 복잡한 작업을 위한 코드 라인 수가 Apitron PDF Kit에 비해 적습니다.

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

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

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

아이언 서포트 팀

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