푸터 콘텐츠로 바로가기
IRONPDF 사용하기

ASP.NET에서 C# 및 IronPDF를 사용하여 PDF 파일을 보는 방법

대부분의 사람들은 전용 데스크톱 애플리케이션을 사용하여 컴퓨터에서 PDF를 열지만, 소프트웨어 엔지니어들은 C#을 사용하여 IronPDF로 PDF 콘텐츠를 만들고, 보고, 열고, 읽고, 수정할 수도 있습니다.

IronPDF는 ASP.NET과 C#에서 PDF 파일을 읽는 데 매우 유용한 플러그인으로 판명되었습니다.

ASP.NET PDF 데모 프로젝트를 다운로드할 수 있습니다.

IronPDF를 사용하여 C#으로 PDF 문서를 빠르고 쉽게 작성할 수 있습니다.

PDF 문서의 디자인과 레이아웃의 대부분은 기존 HTML 파일을 사용하거나 웹 디자인 직원에게 과업을 위임함으로써 수행될 수 있습니다; 애플리케이션에 PDF 생성 통합의 번거로운 작업을 처리하며, 준비된 문서를 PDF로 변환하는 작업을 자동화합니다. .NET을 사용하여:

  • 웹 양식, 로컬 HTML 페이지 및 기타 웹사이트를 PDF 형식으로 변환합니다.
  • 사용자가 문서를 다운로드하거나 이메일로 다른 사람과 공유하거나 클라우드에 저장할 수 있도록 허용합니다.
  • 고객에게 청구서를 발행하고 견적을 제공합니다; 보고서를 준비합니다; 계약 및 기타 서류를 협상합니다.
  • .NET Framework 및 .NET Core에서 ASP.NET, ASP.NET Core, 웹 양식, MVC, 웹 API와 함께 작업합니다.

IronPDF 라이브러리 설정하기

라이브러리를 설치하는 방법에는 두 가지가 있습니다;

NuGet 패키지 관리자 사용하여 설치하기

IronPDF는 Visual Studio 애드인이나 명령줄에서 NuGet 패키지 관리자를 통해 설치할 수 있습니다. 콘솔로 이동하여 Visual Studio에서 다음 명령을 입력하세요:

Install-Package IronPdf

DLL 파일을 웹사이트에서 직접 다운로드

또한, 웹사이트에서 직접 DLL을 가져올 수 있습니다.

IronPDF를 사용하는 모든 cs 클래스 파일의 상단에 다음 지시문을 포함해야 합니다:

using IronPdf;
using IronPdf;
Imports IronPdf
$vbLabelText   $csharpLabel

IronPDF 상세 기능 개요 를 확인하세요.

IronPDF는 필수 플러그인입니다. 지금 구입하여 IronPDF NuGet 패키지로 시도하세요.

Create a PDF File From an HTML String in .NET C

C#에서 HTML 문자열에서 PDF 파일을 생성하는 것은 C#에서 새로운 PDF 파일을 생성하는 효율적이고 보람 있는 방법입니다.

IronPDF DLL 내에 포함된 Google Chromium 엔진 덕분에 RenderHtmlAsPdf 함수는 ChromePdfRenderer에서 간편하게 HTML(HTML5) 문자열을 PDF 문서로 변환할 수 있는 방법을 제공합니다.

// Create a renderer to convert HTML to PDF
var renderer = new ChromePdfRenderer();

// Convert an HTML string to a PDF
using var renderedPdf = renderer.RenderHtmlAsPdf("<h1>My First HTML to Pdf</h1>");

// Define the output path for the PDF
var outputPath = "My_First_Html.pdf";

// Save the rendered PDF to the specified path
renderedPdf.SaveAs(outputPath);

// Automatically open the newly created PDF
System.Diagnostics.Process.Start(outputPath);
// Create a renderer to convert HTML to PDF
var renderer = new ChromePdfRenderer();

// Convert an HTML string to a PDF
using var renderedPdf = renderer.RenderHtmlAsPdf("<h1>My First HTML to Pdf</h1>");

// Define the output path for the PDF
var outputPath = "My_First_Html.pdf";

// Save the rendered PDF to the specified path
renderedPdf.SaveAs(outputPath);

// Automatically open the newly created PDF
System.Diagnostics.Process.Start(outputPath);
' Create a renderer to convert HTML to PDF
Dim renderer = New ChromePdfRenderer()

' Convert an HTML string to a PDF
Dim renderedPdf = renderer.RenderHtmlAsPdf("<h1>My First HTML to Pdf</h1>")

' Define the output path for the PDF
Dim outputPath = "My_First_Html.pdf"

' Save the rendered PDF to the specified path
renderedPdf.SaveAs(outputPath)

' Automatically open the newly created PDF
System.Diagnostics.Process.Start(outputPath)
$vbLabelText   $csharpLabel

RenderHtmlAsPdf은 CSS, JavaScript 및 이미지를 전반적으로 지원하는 강력한 도구입니다. 이 자료가 하드 디스크에 저장된 경우 RenderHtmlAsPdf의 두 번째 인수를 설정해야 할 수 있습니다.

다음 코드는 PDF 파일을 생성할 것입니다:

// Render HTML to PDF with a base path for local assets
var renderPdf = renderer.RenderHtmlAsPdf("<img src='image_1.png'/>", @"C:\Newproject");
// Render HTML to PDF with a base path for local assets
var renderPdf = renderer.RenderHtmlAsPdf("<img src='image_1.png'/>", @"C:\Newproject");
' Render HTML to PDF with a base path for local assets
Dim renderPdf = renderer.RenderHtmlAsPdf("<img src='image_1.png'/>", "C:\Newproject")
$vbLabelText   $csharpLabel

모든 CSS 스타일시트, 이미지, JavaScript 파일은 BaseUrlPath을 기준으로 하므로 더 체계적이고 논리적인 구조를 유지할 수 있습니다. 물론, 웹 폰트, Google 폰트, 그리고 심지어 jQuery와 같은 인터넷에서 사용할 수 있는 그림, 스타일시트 및 자산을 사용할 수 있습니다.

기존 HTML URL을 사용하여 PDF 문서 생성

기존 URL은 C#으로 PDF로 효율적으로 렌더될 수 있습니다; 이것은 또한 팀이 다양한 섹션에 걸쳐 PDF 디자인과 백엔드 PDF 렌더링 작업을 나눌 수 있어 유익합니다.

아래 코드는 해당 URL에서 endeavorcreative.com 페이지를 렌더링하는 방법을 보여줍니다:

// Create a renderer for converting URLs to PDF
var renderer = new ChromePdfRenderer();

// Convert the specified URL to a PDF
using var renderedPdf = renderer.RenderUrlAsPdf("https://endeavorcreative.com/setting-up-wordpress-website-from-scratch/");

// Specify the output path for the PDF
var outputPath = "Url_pdf.pdf";

// Save the PDF to the specified path
renderedPdf.SaveAs(outputPath);

// Open the newly created PDF
System.Diagnostics.Process.Start(outputPath);
// Create a renderer for converting URLs to PDF
var renderer = new ChromePdfRenderer();

// Convert the specified URL to a PDF
using var renderedPdf = renderer.RenderUrlAsPdf("https://endeavorcreative.com/setting-up-wordpress-website-from-scratch/");

// Specify the output path for the PDF
var outputPath = "Url_pdf.pdf";

// Save the PDF to the specified path
renderedPdf.SaveAs(outputPath);

// Open the newly created PDF
System.Diagnostics.Process.Start(outputPath);
' Create a renderer for converting URLs to PDF
Dim renderer = New ChromePdfRenderer()

' Convert the specified URL to a PDF
Dim renderedPdf = renderer.RenderUrlAsPdf("https://endeavorcreative.com/setting-up-wordpress-website-from-scratch/")

' Specify the output path for the PDF
Dim outputPath = "Url_pdf.pdf"

' Save the PDF to the specified path
renderedPdf.SaveAs(outputPath)

' Open the newly created PDF
System.Diagnostics.Process.Start(outputPath)
$vbLabelText   $csharpLabel

결과적으로 모든 하이퍼링크(HTML 링크) 및 심지어 HTML 폼까지도 생성된 PDF에 유지됩니다.

기존 HTML 문서에서 PDF 문서 생성

이 섹션에서는 로컬 HTML 파일을 렌더링하는 방법을 보여줍니다. CSS, 그림 및 JavaScript와 같은 모든 상대적 자산에 대해 파일:/ 프로토콜을 사용하여 파일이 열려 있는 것처럼 보일 것입니다.

// Create a renderer for existing HTML files
var renderer = new ChromePdfRenderer();

// Render an HTML file to PDF
using var renderedPdf = renderer.RenderHtmlFileAsPdf("Assets/test1.html");

// Specify the output path for the PDF
var outputPath = "test1_pdf.pdf";

// Save the PDF to the specified path
renderedPdf.SaveAs(outputPath);

// Open the newly created PDF
System.Diagnostics.Process.Start(outputPath);
// Create a renderer for existing HTML files
var renderer = new ChromePdfRenderer();

// Render an HTML file to PDF
using var renderedPdf = renderer.RenderHtmlFileAsPdf("Assets/test1.html");

// Specify the output path for the PDF
var outputPath = "test1_pdf.pdf";

// Save the PDF to the specified path
renderedPdf.SaveAs(outputPath);

// Open the newly created PDF
System.Diagnostics.Process.Start(outputPath);
' Create a renderer for existing HTML files
Dim renderer = New ChromePdfRenderer()

' Render an HTML file to PDF
Dim renderedPdf = renderer.RenderHtmlFileAsPdf("Assets/test1.html")

' Specify the output path for the PDF
Dim outputPath = "test1_pdf.pdf"

' Save the PDF to the specified path
renderedPdf.SaveAs(outputPath)

' Open the newly created PDF
System.Diagnostics.Process.Start(outputPath)
$vbLabelText   $csharpLabel

이 전략의 장점은 개발자가 HTML 콘텐츠를 생성하는 동안 브라우저에서 테스트할 수 있도록 한다는 것입니다. IronPDF의 렌더링 엔진은 Chrome 웹 브라우저를 기반으로 구축되었습니다. 따라서 XML 콘텐츠를 PDF로 인쇄할 수 있는 XSLT 템플릿을 사용하여 XML을 PDF로 변환하는 것이 권장됩니다.

ASP.NET 웹 폼을 PDF 파일로 변환

단 한 줄의 코드로 ASP.NET 온라인 폼을 HTML 대신 PDF 형식으로 변환할 수 있습니다. 해당 코드를 페이지의 코드 비하인드 파일의 Page_Load 메소드에 넣어 페이지에 나타나도록 하세요.

ASP.NET 웹 폼 애플리케이션은 처음부터 생성하거나 이전 버전에서 열 수 있습니다.

NuGet 패키지가 아직 설치되어 있지 않으면 설치하십시오.

using 키워드는 IronPdf 네임스페이스를 가져오는 데 사용되어야 합니다.

PDF로 변환하려는 페이지의 코드 숨김으로 이동하십시오. 예를 들어, ASP.NET을 사용하는 파일 Default.aspx.cs입니다.

RenderThisPageAsPdfAspxToPdf 클래스의 메소드입니다.

using IronPdf;
using System;
using System.Web.UI;

namespace WebApplication7
{
    public partial class _Default : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // Render the current page as a PDF in the browser
            AspxToPdf.RenderThisPageAsPdf(AspxToPdf.FileBehavior.InBrowser);
        }
    }
}
using IronPdf;
using System;
using System.Web.UI;

namespace WebApplication7
{
    public partial class _Default : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // Render the current page as a PDF in the browser
            AspxToPdf.RenderThisPageAsPdf(AspxToPdf.FileBehavior.InBrowser);
        }
    }
}
Imports IronPdf
Imports System
Imports System.Web.UI

Namespace WebApplication7
	Partial Public Class _Default
		Inherits Page

		Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
			' Render the current page as a PDF in the browser
			AspxToPdf.RenderThisPageAsPdf(AspxToPdf.FileBehavior.InBrowser)
		End Sub
	End Class
End Namespace
$vbLabelText   $csharpLabel

이 작업에는 IronPdf.Extensions.ASPX NuGet 패키지가 설치되어야 합니다. .NET Core에서는 ASPX가 MVC 모델로 대체되었기 때문에 사용할 수 없습니다.

HTML 템플릿 적용

인트라넷 및 웹사이트 개발자들에게 템플릿화 또는 "배치 생산" PDF의 기능은 기본적인 필요성입니다.

PDF 문서에 대한 템플릿을 생성하는 대신, IronPDF 라이브러리는 기존의 잘 테스트된 기술을 활용하여 HTML의 템플릿을 생성할 수 있는 방법을 제공합니다.

아래와 같이 HTML 템플릿에 쿼리 문자열 또는 데이터베이스의 데이터를 보충하면 동적으로 생성된 PDF 파일이 생성됩니다.

예를 들어, C# String 클래스와 그 속성을 고려하십시오. Format 메서드는 기본 "메일 병합" 작업에 적합하게 작동합니다.

// Basic HTML String Formatting
string formattedString = String.Format("<h1>Hello {0}!</h1>", "World");
// Basic HTML String Formatting
string formattedString = String.Format("<h1>Hello {0}!</h1>", "World");
' Basic HTML String Formatting
Dim formattedString As String = String.Format("<h1>Hello {0}!</h1>", "World")
$vbLabelText   $csharpLabel

HTML 파일이 상당히 광범위할 수 있기 때문에 임의의 자리 표시자인 [[NAME]]을 사용하여 이를 실제 데이터로 대체하는 것이 일반적입니다.

다음 예제에서는 세 가지 PDF 문서를 생성하며, 각각 다른 사용자에게 맞춤화됩니다.

// Define an HTML template with a placeholder
var htmlTemplate = "<p>[[NAME]]</p>";

// Sample data to replace placeholders
var names = new[] { "John", "James", "Jenny" };

// Create a new PDF for each name
foreach (var name in names)
{
    // Replace placeholder with actual name
    var htmlInstance = htmlTemplate.Replace("[[NAME]]", name);

    // Create a renderer and render the HTML as PDF
    var renderer = new ChromePdfRenderer();
    using var pdf = renderer.RenderHtmlAsPdf(htmlInstance);

    // Save the PDF with the name in the filename
    pdf.SaveAs($"{name}.pdf");
}
// Define an HTML template with a placeholder
var htmlTemplate = "<p>[[NAME]]</p>";

// Sample data to replace placeholders
var names = new[] { "John", "James", "Jenny" };

// Create a new PDF for each name
foreach (var name in names)
{
    // Replace placeholder with actual name
    var htmlInstance = htmlTemplate.Replace("[[NAME]]", name);

    // Create a renderer and render the HTML as PDF
    var renderer = new ChromePdfRenderer();
    using var pdf = renderer.RenderHtmlAsPdf(htmlInstance);

    // Save the PDF with the name in the filename
    pdf.SaveAs($"{name}.pdf");
}
' Define an HTML template with a placeholder
Dim htmlTemplate = "<p>[[NAME]]</p>"

' Sample data to replace placeholders
Dim names = { "John", "James", "Jenny" }

' Create a new PDF for each name
For Each name In names
	' Replace placeholder with actual name
	Dim htmlInstance = htmlTemplate.Replace("[[NAME]]", name)

	' Create a renderer and render the HTML as PDF
	Dim renderer = New ChromePdfRenderer()
	Dim pdf = renderer.RenderHtmlAsPdf(htmlInstance)

	' Save the PDF with the name in the filename
	pdf.SaveAs($"{name}.pdf")
Next name
$vbLabelText   $csharpLabel

ASP.NET MVC 라우팅: 이 페이지의 PDF 버전 다운로드

ASP.NET MVC 프레임워크를 사용하면 사용자를 PDF 파일로 안내할 수 있습니다.

새로운 ASP.NET MVC 애플리케이션을 빌드하거나 기존 애플리케이션에 기존 MVC 컨트롤러를 추가할 때 이 옵션을 선택하십시오. 드롭다운 메뉴에서 ASP.NET 웹 애플리케이션 (.NET Framework) > MVC를 선택하여 Visual Studio 새 프로젝트 마법사를 시작합니다. 또는 기존 MVC 프로젝트를 열 수 있습니다. Controllers 폴더의 HomeController 파일에서 Index 메서드를 교체하거나 Controllers 폴더에 새 컨트롤러를 생성하십시오.

다음은 코드가 작성되어야 하는 예제입니다:

using IronPdf;
using System;
using System.Web.Mvc;

namespace WebApplication8.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            // Render a URL as PDF and return it in the response
            using var pdf = HtmlToPdf.StaticRenderUrlAsPdf(new Uri("https://en.wikipedia.org"));
            return File(pdf.BinaryData, "application/pdf", "Wiki.Pdf");
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";
            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";
            return View();
        }
    }
}
using IronPdf;
using System;
using System.Web.Mvc;

namespace WebApplication8.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            // Render a URL as PDF and return it in the response
            using var pdf = HtmlToPdf.StaticRenderUrlAsPdf(new Uri("https://en.wikipedia.org"));
            return File(pdf.BinaryData, "application/pdf", "Wiki.Pdf");
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";
            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";
            return View();
        }
    }
}
Imports IronPdf
Imports System
Imports System.Web.Mvc

Namespace WebApplication8.Controllers
	Public Class HomeController
		Inherits Controller

		Public Function Index() As ActionResult
			' Render a URL as PDF and return it in the response
			Dim pdf = HtmlToPdf.StaticRenderUrlAsPdf(New Uri("https://en.wikipedia.org"))
			Return File(pdf.BinaryData, "application/pdf", "Wiki.Pdf")
		End Function

		Public Function About() As ActionResult
			ViewBag.Message = "Your application description page."
			Return View()
		End Function

		Public Function Contact() As ActionResult
			ViewBag.Message = "Your contact page."
			Return View()
		End Function
	End Class
End Namespace
$vbLabelText   $csharpLabel

PDF 문서에 표지 추가

ASP.NET에서 C# 및 IronPDF를 사용하여 PDF 파일을 보는 방법, 그림 1: PDF 문서에 표지 추가 PDF 문서에 표지 추가

IronPDF는 PDF 문서 병합 과정을 간소화합니다. 이 기법의 가장 일반적인 응용은 이미 렌더링된 PDF 문서에 커버 페이지나 뒷 페이지를 추가하는 것입니다.

이를 수행하기 위해 먼저 표지 페이지를 준비하고 PdfDocument 기능을 사용하세요.

두 문서를 결합하려면 Merge PDF Documents Method를 사용하세요.

// Create a renderer and render a PDF from a URL
var renderer = new ChromePdfRenderer();
using var pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf/");

// Merge the cover page with the rendered PDF
using var merged = PdfDocument.Merge(new PdfDocument("CoverPage.pdf"), pdf);

// Save the merged document
merged.SaveAs("Combined.Pdf");
// Create a renderer and render a PDF from a URL
var renderer = new ChromePdfRenderer();
using var pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf/");

// Merge the cover page with the rendered PDF
using var merged = PdfDocument.Merge(new PdfDocument("CoverPage.pdf"), pdf);

// Save the merged document
merged.SaveAs("Combined.Pdf");
' Create a renderer and render a PDF from a URL
Dim renderer = New ChromePdfRenderer()
Dim pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf/")

' Merge the cover page with the rendered PDF
Dim merged = PdfDocument.Merge(New PdfDocument("CoverPage.pdf"), pdf)

' Save the merged document
merged.SaveAs("Combined.Pdf")
$vbLabelText   $csharpLabel

문서에 워터마크 추가

마지막으로, PDF 문서에 워터마크를 추가하는 것은 C# 코드를 사용하여 수행할 수 있습니다; 이것은 문서의 각 페이지에 '비밀' 또는 '샘플'이라는 면책 조항을 추가하는 데 사용할 수 있습니다.

// Prepare a stamper with HTML content for the watermark
HtmlStamper stamper = new HtmlStamper("<h2 style='color:red'>SAMPLE</h2>")
{
    HorizontalOffset = new Length(-3, MeasurementUnit.Inch),
    VerticalAlignment = VerticalAlignment.Bottom
};

// Create a renderer and render a PDF from a URL
var renderer = new ChromePdfRenderer();
using var pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");

// Apply the watermark to the PDF
pdf.ApplyStamp(stamper);

// Save the watermarked PDF
pdf.SaveAs(@"C:\PathToWatermarked.pdf");
// Prepare a stamper with HTML content for the watermark
HtmlStamper stamper = new HtmlStamper("<h2 style='color:red'>SAMPLE</h2>")
{
    HorizontalOffset = new Length(-3, MeasurementUnit.Inch),
    VerticalAlignment = VerticalAlignment.Bottom
};

// Create a renderer and render a PDF from a URL
var renderer = new ChromePdfRenderer();
using var pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");

// Apply the watermark to the PDF
pdf.ApplyStamp(stamper);

// Save the watermarked PDF
pdf.SaveAs(@"C:\PathToWatermarked.pdf");
' Prepare a stamper with HTML content for the watermark
Dim stamper As New HtmlStamper("<h2 style='color:red'>SAMPLE</h2>") With {
	.HorizontalOffset = New Length(-3, MeasurementUnit.Inch),
	.VerticalAlignment = VerticalAlignment.Bottom
}

' Create a renderer and render a PDF from a URL
Dim renderer = New ChromePdfRenderer()
Dim pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf")

' Apply the watermark to the PDF
pdf.ApplyStamp(stamper)

' Save the watermarked PDF
pdf.SaveAs("C:\PathToWatermarked.pdf")
$vbLabelText   $csharpLabel

암호로 PDF 파일 보호 가능

PDF 문서의 비밀번호 속성을 설정하면 문서가 암호화되고 사용자는 문서를 읽기 위해 올바른 비밀번호를 제공해야 합니다. 이 샘플은 .NET Core 콘솔 애플리케이션에서 사용할 수 있습니다.

using IronPdf;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create a renderer and render a PDF from HTML
            var renderer = new ChromePdfRenderer();
            using var pdfDocument = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>");

            // Set password to protect the PDF
            pdfDocument.Password = "strong!@#pass&^%word";

            // Save the secured PDF
            pdfDocument.SaveAs("secured.pdf");
        }
    }
}
using IronPdf;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create a renderer and render a PDF from HTML
            var renderer = new ChromePdfRenderer();
            using var pdfDocument = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>");

            // Set password to protect the PDF
            pdfDocument.Password = "strong!@#pass&^%word";

            // Save the secured PDF
            pdfDocument.SaveAs("secured.pdf");
        }
    }
}
Imports IronPdf

Namespace ConsoleApp
	Friend Class Program
		Shared Sub Main(ByVal args() As String)
			' Create a renderer and render a PDF from HTML
			Dim renderer = New ChromePdfRenderer()
			Dim pdfDocument = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>")

			' Set password to protect the PDF
			pdfDocument.Password = "strong!@#pass&^%word"

			' Save the secured PDF
			pdfDocument.SaveAs("secured.pdf")
		End Sub
	End Class
End Namespace
$vbLabelText   $csharpLabel

위에서 언급한 장점 없이 IronPDF로도 다음을 수행할 수 있습니다:

PDF를 만드는 것은 매우 도전적인 작업입니다; 일부 사람들은 가장 뛰어난 문서를 만들기 위해 사용해야 할 기본 개념을 한 번도 접해본 적이 없을 수 있습니다. 결과적으로, IronPDF는 PDF 생성 작업을 단순화하고, 그로 인해 PDF와 HTML로부터 생성된 문서의 원본 프레젠테이션을 개선하는 데 매우 유용합니다.

문서 및 경쟁사 분석에서 제공된 정보를 기반으로: IronPDF는 PDF 생성 시 가장 효과적인 도구이며, 사무실이나 학교에서 일하는 사람들도 포함하여 누구나 작업을 효율적으로 완료할 수 있게 해줍니다.

ASP.NET에서 C# 및 IronPDF를 사용하여 PDF 파일을 보는 방법, 그림 2: ASP.NET에서 C# 및 IronPDF를 사용하여 PDF 파일을 보는 방법 ASP.NET에서 C# 및 IronPDF를 사용하여 PDF 파일을 보는 방법

IronPDF는 반드시 필요한 .NET 라이브러리입니다. 지금 구입하여 IronPDF NuGet 패키지로 시도하세요.

자주 묻는 질문

ASP.NET 응용 프로그램에서 C#을 사용하여 PDF 파일을 어떻게 볼 수 있습니까?

IronPDF를 사용하여 PDF 파일을 이미지나 웹 페이지에 포함할 수 있는 HTML 요소로 렌더링하여 ASP.NET 응용 프로그램에서 PDF 파일을 볼 수 있습니다.

ASP.NET에서 HTML 페이지를 PDF로 변환하는 단계는 무엇입니까?

ASP.NET에서 HTML 페이지를 PDF로 변환하려면 IronPDF의 RenderHtmlAsPdf 메서드를 사용할 수 있으며, 이는 CSS 및 JavaScript를 지원하여 정확한 렌더링을 제공합니다.

C#에서 여러 PDF 문서를 병합하는 방법은 무엇입니까?

IronPDF를 사용하여 PdfDocument.Merge 메서드를 사용하여 여러 PDF 문서를 단일 문서로 병합할 수 있습니다.

ASP.NET에서 PDF 문서에 워터마크를 추가할 수 있습니까?

네, IronPDF를 사용하여 ASP.NET에서 PDF 문서에 HtmlStamper 클래스를 사용하여 사용자 정의 HTML 콘텐츠를 오버레이하여 워터마크를 추가할 수 있습니다.

C#을 사용하여 PDF 파일에 비밀번호 보호를 구현하는 방법은 무엇입니까?

IronPDF를 사용하여 PdfDocumentPassword 속성을 설정하여 PDF 파일에 비밀번호 보호를 구현할 수 있습니다.

ASP.NET 웹 폼을 PDF로 변환하는 데 IronPDF를 사용할 수 있습니까?

네, IronPDF를 사용하여 RenderThisPageAsPdf와 같은 메서드를 사용하여 ASP.NET 웹 폼을 PDF로 변환할 수 있으며 전체 웹 폼을 PDF 문서로 캡처합니다.

ASP.NET에서 PDF 생성으로 IronPDF가 제공하는 이점은 무엇입니까?

IronPDF는 빌트인 Google Chromium 엔진을 사용하여 HTML, CSS 및 JavaScript를 정확하게 렌더링하는 유연한 도구로 ASP.NET의 PDF 생성에 이점을 제공합니다.

ASP.NET 프로젝트에 IronPDF를 설치하는 방법은 무엇입니까?

ASP.NET 프로젝트에 IronPDF를 NuGet 패키지 관리자를 통해 설치하거나 IronPDF 웹사이트에서 DLL 파일을 직접 다운로드할 수 있습니다.

소프트웨어 개발자에게 IronPDF가 가치 있는 자산인 이유는 무엇입니까?

IronPDF는 복잡한 PDF 생성 작업을 단순화하고 ASP.NET 응용 프로그램에 원활하게 통합하여 효율적인 PDF 조작을 가능하게 하므로 소프트웨어 개발자에게는 가치 있는 자산입니다.

C#을 사용하여 URL에서 IronPDF로 PDF를 생성하는 방법은 무엇입니까?

IronPDF의 RenderUrlAsPdf 메서드를 사용하여 URL에서 PDF를 생성할 수 있으며, URL의 콘텐츠를 가져와 PDF 문서로 변환합니다.

.NET 10 지원: IronPDF는 ASP.NET에서 PDF 파일을 보는 데 .NET 10과 호환됩니까?

네 — IronPDF는 웹 응용 프로그램에서 ASP.NET 또는 ASP.NET Core를 사용하여 완전히 .NET 10을 지원합니다. 특별한 설정 없이 .NET 10 프로젝트 전반에서 원활하게 작동합니다. 여전히 RenderUrlAsPdf와 같은 친숙한 메서드나 application/pdf MIME 타입의 FileStreamResult 반환을 이전 .NET 버전처럼 사용할 수 있습니다. IronPDF는 크로스 플랫폼 지원을 위해 설계되었으며 .NET 10은 지원되는 프레임워크 중 명시적으로 나열됩니다. ([ironpdf.com](https://ironpdf.com/?utm_source=openai))

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

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

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

아이언 서포트 팀

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