產品比較 Report .NET與IronPDF之間的比較 Curtis Chau 更新日期:8月 20, 2025 Download IronPDF NuGet 下載 DLL 下載 Windows 安裝程式 Start Free Trial Copy for LLMs Copy for LLMs Copy page as Markdown for LLMs Open in ChatGPT Ask ChatGPT about this page Open in Gemini Ask Gemini about this page Open in Grok Ask Grok about this page Open in Perplexity Ask Perplexity about this page Share Share on Facebook Share on X (Twitter) Share on LinkedIn Copy URL Email article In this article, we'll be taking a close look at two popular C# libraries used for working with PDF files: IronPDF - The .NET PDF Library for C# Developers and Report.NET. These tools are essential for developers who need to create, modify, or interact with PDF documents through their C# applications. Both libraries offer a range of functionalities designed to make handling PDFs easier and more efficient, but they do so in different ways. IronPDF and Report.NET enable developers to dynamically generate documents, edit content, and pull text and images from PDFs. They also support form processing, adding digital signatures, and ensuring that applications can handle PDFs across different platforms without losing document fidelity. This means that no matter the device or operating system, the PDFs will look and function as intended. Throughout this comparison, we will dive into the specific features each library offers, how they function, provide code snippets to illustrate how they can be used, and discuss their licensing terms. This comparison aims to give developers a clear understanding of what each library can do, helping them decide which one might be the best fit for their project requirements. Let's break down the capabilities and differences between IronPDF and Report.NET, focusing on simplicity and practical insights for developers. 1. Report.NET C# Library Report.NET is a robust C# library designed to help developers create, manage, and manipulate PDF documents directly within their .NET applications. This tool is known for its straightforward approach to PDF generation and manipulation, allowing for the creation of complex PDF documents from scratch or the modification of existing ones. Its capabilities range from simple text addition to the incorporation of images and shapes, making it a versatile choice for developers looking to implement PDF functionalities in their projects. 1.1 Key Features of Report.NET 1.1.1 Document Creation and Editing Report.NET shines in creating new PDF documents and editing existing ones. Developers can easily add text, images, and graphics, enabling the production of detailed and visually appealing documents. 1.1.2 Flexibility in Content Management This library allows for precise control over the document's content, including text formatting, image placement, and graphic elements. This level of control ensures that the final PDF looks exactly as intended. 1.1.3 Ease of Use With a focus on simplicity, Report.NET simplifies the PDF generation process, making it accessible even to those new to working with PDFs in a programming context. 1.1.4 Compatibility Across Platforms Report.NET is designed to work seamlessly across the .NET platform, including .NET Core, ensuring that applications can generate and manage PDFs regardless of the operating system. 1.1.5 Customization and Styling The library offers extensive customization options for PDF documents, allowing developers to adjust the layout, styling, and overall appearance to meet their specific needs. 1.1.6 Open Source As an open-source tool, Report.NET benefits from community contributions, ensuring it stays updated and receives new features over time. This community support also means developers can access a wealth of knowledge and resources. 2. IronPDF C# Library IronPDF is a comprehensive .NET library crafted to facilitate the creation, manipulation, and rendering of PDF documents within .NET applications. This tool stands out for its ability to handle both the generation of PDFs from HTML and the direct editing of existing PDF files. It is very helpful to create reports. IronPDF also integrates smoothly with SQL Server Reporting Services. We can create an end-user report designer with IronPDF to create a reporting tool and report viewer. 2.1 IronPDF的關鍵功能 2.1.1 HTML to PDF Conversion One of the core strengths of IronPDF is its capability to convert HTML and CSS into PDF documents. This feature is invaluable for developers looking to transform web content into a portable format while preserving the original design and layout. 2.1.2 PDF Manipulation IronPDF excels in providing developers with tools to edit and manipulate PDF documents. This includes adding or removing pages, modifying text, and embedding images. We can also extract report data from the reports using IronPDF. 2.1.3 Form Handling The library supports the creation and editing of PDF forms, enabling users to interact with documents in a dynamic way. This functionality is crucial for applications requiring input from end-users, such as surveys or application forms. 2.1.4 Security Features With IronPDF, implementing security measures like encryption and password protection is straightforward. These features ensure that sensitive information within PDF documents remains secure from unauthorized access. 2.1.5 Printing and Rendering IronPDF allows developers to render PDFs for both on-screen viewing and physical printing, ensuring high-quality output in both cases. This makes it easier to prepare documents for a range of presentation or distribution needs. 2.1.6 Cross-Platform Support IronPDF works across various .NET platforms, adhering to .NET code standards and facilitating development in diverse environments without compatibility issues. 2.1.7 Comprehensive Documentation and Support IronPDF is backed by detailed documentation and dedicated support, helping developers navigate the library's features and integrate its functionalities into their applications efficiently. 2.1.8 Advanced PDF Editing IronPDF offers many advanced editing features. This includes the ability to merge and split PDF documents, which is particularly useful for organizing large volumes of information or extracting specific sections from a document for separate use. 2.1.9 Custom Headers and Footers The library allows for the customization of headers and footers within PDF documents. This capability is essential for adding consistent branding, page numbers, or document titles across pages, enhancing the professional appearance of the output. 3. Creating a Console Project in Visual Studio Creating a console application in Visual Studio IDE is a straightforward process that involves several steps. 3.1 Launch Visual Studio Begin by opening Microsoft Visual Studio. If you don't have it installed, you'll need to download and install it from the official Microsoft website. Once installed, launch the visual studio. 3.2 Create a New Project After opening Visual Studio, you'll be greeted with the start window. Here, select the "Create a new project" option to initiate the process of setting up a new console application. 3.3 Choose the Project Type In the "Create a new project" window, you'll be presented with a variety of project templates. Type "console" into the search box to filter the options, then select "Console App" from the list. Make sure you choose the template that corresponds to the programming language you wish to use, such as C#. 3.4 Configure the Project Once you've selected the console app template, click "Next" to proceed to the project configuration screen. Here, you will need to provide some details about your project: Project Name: Give your project a meaningful name that reflects its purpose. Location: Choose where on your computer you want to save the project files. Solution Name: By default, this is the same as your project name, but you can change it if you're planning to include multiple projects in the same solution. Framework: Select the version of the .NET Framework you want to target. If you're unsure, choose the latest version. 3.5 Create the Project After filling out all necessary information, click the "Create" button. Visual Studio will now generate a new console application project based on your specifications. This process may take a few moments. 4. Installing IronPDF Library To leverage IronPDF's capabilities in your project, you need to install the library first. There are several methods to accomplish this, each suited to different development workflows or preferences. Below are three common methods for installing the IronPDF library into your Visual Studio project. 4.1 Install Using NuGet Package Manager The NuGet Package Manager UI in Visual Studio provides a straightforward way to browse, select, and install packages. In Visual Studio, navigate to your project within the Solution Explorer, perform a right-click action on it, and choose the "Manage NuGet Packages..." option. Click on the "Browse" tab and type "IronPDF" into the search box. Find the IronPDF package in the search results, select it, then click on the "Install" button. Visual Studio will handle the download and installation automatically. 4.2 Install Using NuGet Package Manager Console For those who prefer using command-line tools, the NuGet Package Manager Console is a powerful alternative. Open the Console: Go to the "Tools" menu in Visual Studio, then navigate to "NuGet Package Manager" > "Package Manager Console". Install Command: In the console, type the following command and press Enter: Install-Package IronPdf This command instructs NuGet to download and install the latest version of IronPDF into your project. 4.3 Install Using NuGet Website If you prefer to manually download the package or need a specific version of IronPDF, the NuGet website is a good option. Visit the NuGet Website: Go to nuget.org and search for "IronPDF". Download the Package: From the IronPDF page, select the version you need and download the .nupkg file. Manual Installation: Once downloaded, you can add the package to your project manually. In Visual Studio, go to the "Tools" menu, then "Options" > "NuGet Package Manager" > "Package Sources". Add a new source pointing to the folder where you downloaded the .nupkg file. Finally, use the Package Manager UI or Console in Visual Studio to install the package from your local source. 5. Installing Report.NET Library Open your web browser and go to the Report.NET GitHub repository at https://github.com/ritchiecarroll/Report.NET/tree/master. This page contains the most recent version of the Report.NET library along with its source code. 5.1 Download the Library On the repository page, locate the "Code" button and click it. In the dropdown menu, select "Download ZIP" to download the entire repository as a ZIP file. Save this file to a convenient location on your computer and extract its contents. 5.2 Add Report.NET to Your Project After extracting the ZIP file, you'll find the Report.NET library source code among the extracted files. To use Report.NET in your Visual Studio project, follow these steps: Open Your Project: Launch Visual Studio and open the project you wish to add Report.NET to. Add the Library Manually: There are a couple of ways to include the library in your project: As a Compiled Assembly: If the GitHub repository includes a compiled DLL file, you can simply add a reference to this DLL in your project. Right-click on "References" in your project's Solution Explorer, choose "Add Reference...", then browse to and select the DLL file. By Including Source Files: If you prefer to include the source code directly or if a compiled DLL is not provided, you can add the source code files to your project. Right-click on your project in Solution Explorer, choose "Add" > "Existing Item...", then navigate to and select the Report.NET source code files you extracted from the ZIP. Ensure Compatibility: Make sure your project targets a compatible .NET Framework version as required by Report.NET. 6. Advanced Features in IronPDF vs Report.NET C# 6.1 Advanced Features of IronPDF C# IronPDF comes with a suite of advanced features designed to handle a wide range of PDF-related tasks with ease. 6.1.1 HTML to PDF Rendering IronPDF can take HTML content, including CSS and JavaScript, and render it directly into a PDF document. This means web pages or HTML templates can be converted into PDFs that look just like they do in a browser. 6.1.1.1 HTML String to PDF IronPDF allows for direct conversion of HTML strings to PDF. This means that developers can take HTML code stored as a string variable and use IronPDF to render it into a PDF file. This feature is particularly useful when the HTML content is dynamically generated or modified by the application before conversion. using IronPdf; var Renderer = new IronPdf.HtmlToPdf(); var PDF = Renderer.RenderHtmlAsPdf("<h1>Hello IronPDF</h1>"); PDF.SaveAs("HtmlStringToPdf.pdf"); using IronPdf; var Renderer = new IronPdf.HtmlToPdf(); var PDF = Renderer.RenderHtmlAsPdf("<h1>Hello IronPDF</h1>"); PDF.SaveAs("HtmlStringToPdf.pdf"); Imports IronPdf Private Renderer = New IronPdf.HtmlToPdf() Private PDF = Renderer.RenderHtmlAsPdf("<h1>Hello IronPDF</h1>") PDF.SaveAs("HtmlStringToPdf.pdf") $vbLabelText $csharpLabel 6.1.1.2 HTML File to PDF Similarly, IronPDF can convert existing HTML files into PDF documents. This is done by reading the HTML file from the file system and using IronPDF to create a PDF document with the same formatting and structure. using IronPdf; var Renderer = new ChromePdfRenderer(); var PDF = Renderer.RenderHTMLFileAsPdf("invoice.html"); PDF.SaveAs("HtmlFileToPdf.pdf"); using IronPdf; var Renderer = new ChromePdfRenderer(); var PDF = Renderer.RenderHTMLFileAsPdf("invoice.html"); PDF.SaveAs("HtmlFileToPdf.pdf"); Imports IronPdf Private Renderer = New ChromePdfRenderer() Private PDF = Renderer.RenderHTMLFileAsPdf("invoice.html") PDF.SaveAs("HtmlFileToPdf.pdf") $vbLabelText $csharpLabel 6.1.1.3 URL to PDF IronPDF is also capable of rendering a PDF from a live URL. This allows developers to input a web address, and IronPDF will fetch the HTML content from the URL and render it as a PDF. using IronPdf; var Renderer = new ChromePdfRenderer(); var PDF = Renderer.RenderUrlAsPdf("http://ironpdf.com"); PDF.SaveAs("UrlToPdf.pdf"); using IronPdf; var Renderer = new ChromePdfRenderer(); var PDF = Renderer.RenderUrlAsPdf("http://ironpdf.com"); PDF.SaveAs("UrlToPdf.pdf"); Imports IronPdf Private Renderer = New ChromePdfRenderer() Private PDF = Renderer.RenderUrlAsPdf("http://ironpdf.com") PDF.SaveAs("UrlToPdf.pdf") $vbLabelText $csharpLabel 6.1.2 Editing PDFs With IronPDF, you can edit existing PDF documents. This includes adding text, images, and pages or removing pages from the document. You can also find and replace text from the PDF document. using IronPdf; var document = PdfDocument.FromFile("original_document.pdf"); const int targetPageIndex = 1; const string oldString = "Hello, World!"; const string newString = "Greetings, Universe!"; document.ReplaceTextOnPage(targetPageIndex, oldString, newString); document.SaveAs("modified_document.pdf"); using IronPdf; var document = PdfDocument.FromFile("original_document.pdf"); const int targetPageIndex = 1; const string oldString = "Hello, World!"; const string newString = "Greetings, Universe!"; document.ReplaceTextOnPage(targetPageIndex, oldString, newString); document.SaveAs("modified_document.pdf"); Imports IronPdf Private document = PdfDocument.FromFile("original_document.pdf") Private Const targetPageIndex As Integer = 1 Private Const oldString As String = "Hello, World!" Private Const newString As String = "Greetings, Universe!" document.ReplaceTextOnPage(targetPageIndex, oldString, newString) document.SaveAs("modified_document.pdf") $vbLabelText $csharpLabel 6.1.3 Extracting Text and Images This library can extract text and images from PDF files, similar to Crystal Reports, which you can use for indexing, searching, or repurposing content. 6.1.4 Generating PDF Forms IronPDF supports the creation of PDF forms. Developers can programmatically create forms within a PDF and users can fill them out. using IronPdf; using System; const string alternativeHtmlContent = @" <html> <body> <h2>Alternative PDF Form</h2> <form> Name: <br> Age: <br> <br> <p>Select country:</p> <select name='country'> <option value='USA'>USA</option> <option value='UK'>UK</option> <option value='Canada'>Canada</option> </select> <br> <p>Select interests:</p> <label for='interest1'> Interest 1</label><br> <label for='interest2'> Interest 2</label><br> </form> </body> </html>"; var alternativePdfRenderer = new ChromePdfRenderer(); alternativePdfRenderer.RenderingOptions.CreatePdfFormsFromHtml = true; alternativePdfRenderer.RenderHtmlAsPdf(alternativeHtmlContent).SaveAs("AlternativeForm.pdf"); using IronPdf; using System; const string alternativeHtmlContent = @" <html> <body> <h2>Alternative PDF Form</h2> <form> Name: <br> Age: <br> <br> <p>Select country:</p> <select name='country'> <option value='USA'>USA</option> <option value='UK'>UK</option> <option value='Canada'>Canada</option> </select> <br> <p>Select interests:</p> <label for='interest1'> Interest 1</label><br> <label for='interest2'> Interest 2</label><br> </form> </body> </html>"; var alternativePdfRenderer = new ChromePdfRenderer(); alternativePdfRenderer.RenderingOptions.CreatePdfFormsFromHtml = true; alternativePdfRenderer.RenderHtmlAsPdf(alternativeHtmlContent).SaveAs("AlternativeForm.pdf"); Imports IronPdf Imports System Private Const alternativeHtmlContent As String = " <html> <body> <h2>Alternative PDF Form</h2> <form> Name: <br> Age: <br> <br> <p>Select country:</p> <select name='country'> <option value='USA'>USA</option> <option value='UK'>UK</option> <option value='Canada'>Canada</option> </select> <br> <p>Select interests:</p> <label for='interest1'> Interest 1</label><br> <label for='interest2'> Interest 2</label><br> </form> </body> </html>" Private alternativePdfRenderer = New ChromePdfRenderer() alternativePdfRenderer.RenderingOptions.CreatePdfFormsFromHtml = True alternativePdfRenderer.RenderHtmlAsPdf(alternativeHtmlContent).SaveAs("AlternativeForm.pdf") $vbLabelText $csharpLabel 6.1.5 Merging PDF Documents You can combine multiple PDF files into a single document. This feature is handy for consolidating reports or combining different document sections. using IronPdf; var firstHtmlContent = @"<h1>Document A</h1> <p>This is the first document.</p> <div style='page-break-after: always;'></div> <p>Continuation of Document A</p>"; var secondHtmlContent = @"<h1>Document B</h1> <p>This is the second document.</p> <div style='page-break-after: always;'></div> <p>Continuation of Document B</p>"; var pdfRenderer = new ChromePdfRenderer(); var pdfDocA = pdfRenderer.RenderHtmlAsPdf(firstHtmlContent); var pdfDocB = pdfRenderer.RenderHtmlAsPdf(secondHtmlContent); var mergedPdf = PdfDocument.Merge(pdfDocA, pdfDocB); mergedPdf.SaveAs("MergedDocuments.pdf"); using IronPdf; var firstHtmlContent = @"<h1>Document A</h1> <p>This is the first document.</p> <div style='page-break-after: always;'></div> <p>Continuation of Document A</p>"; var secondHtmlContent = @"<h1>Document B</h1> <p>This is the second document.</p> <div style='page-break-after: always;'></div> <p>Continuation of Document B</p>"; var pdfRenderer = new ChromePdfRenderer(); var pdfDocA = pdfRenderer.RenderHtmlAsPdf(firstHtmlContent); var pdfDocB = pdfRenderer.RenderHtmlAsPdf(secondHtmlContent); var mergedPdf = PdfDocument.Merge(pdfDocA, pdfDocB); mergedPdf.SaveAs("MergedDocuments.pdf"); Imports IronPdf Private firstHtmlContent = "<h1>Document A</h1> <p>This is the first document.</p> <div style='page-break-after: always;'></div> <p>Continuation of Document A</p>" Private secondHtmlContent = "<h1>Document B</h1> <p>This is the second document.</p> <div style='page-break-after: always;'></div> <p>Continuation of Document B</p>" Private pdfRenderer = New ChromePdfRenderer() Private pdfDocA = pdfRenderer.RenderHtmlAsPdf(firstHtmlContent) Private pdfDocB = pdfRenderer.RenderHtmlAsPdf(secondHtmlContent) Private mergedPdf = PdfDocument.Merge(pdfDocA, pdfDocB) mergedPdf.SaveAs("MergedDocuments.pdf") $vbLabelText $csharpLabel 6.1.6 Splitting PDF Documents Conversely, IronPDF can split a single PDF into multiple documents. This might be needed if you want to distribute individual pages or sections. 6.1.7 Encrypting and Decrypting PDFs IronPDF allows for the encryption and decryption of PDF documents, adding an extra layer of security to sensitive information. using IronPdf; using System; var encryptedPdf = PdfDocument.FromFile("protected.pdf", "password"); encryptedPdf.SecuritySettings.RemovePasswordsAndEncryption(); encryptedPdf.SecuritySettings.MakePdfDocumentReadOnly("super-secret-key"); encryptedPdf.Password = "new-password"; encryptedPdf.SaveAs("secured.pdf"); using IronPdf; using System; var encryptedPdf = PdfDocument.FromFile("protected.pdf", "password"); encryptedPdf.SecuritySettings.RemovePasswordsAndEncryption(); encryptedPdf.SecuritySettings.MakePdfDocumentReadOnly("super-secret-key"); encryptedPdf.Password = "new-password"; encryptedPdf.SaveAs("secured.pdf"); Imports IronPdf Imports System Private encryptedPdf = PdfDocument.FromFile("protected.pdf", "password") encryptedPdf.SecuritySettings.RemovePasswordsAndEncryption() encryptedPdf.SecuritySettings.MakePdfDocumentReadOnly("super-secret-key") encryptedPdf.Password = "new-password" encryptedPdf.SaveAs("secured.pdf") $vbLabelText $csharpLabel 6.1.8 Setting Document Properties and Metadata With this library, setting document properties like the title, author, and metadata is straightforward. This helps with document management and organization. using IronPdf; using System; var encryptedPdf = PdfDocument.FromFile("sample.pdf"); encryptedPdf.MetaData.Author = "Iron Developer"; encryptedPdf.MetaData.Keywords = "Confidential, Private"; encryptedPdf.MetaData.ModifiedDate = DateTime.Now; encryptedPdf.SaveAs("modified.pdf"); using IronPdf; using System; var encryptedPdf = PdfDocument.FromFile("sample.pdf"); encryptedPdf.MetaData.Author = "Iron Developer"; encryptedPdf.MetaData.Keywords = "Confidential, Private"; encryptedPdf.MetaData.ModifiedDate = DateTime.Now; encryptedPdf.SaveAs("modified.pdf"); Imports IronPdf Imports System Private encryptedPdf = PdfDocument.FromFile("sample.pdf") encryptedPdf.MetaData.Author = "Iron Developer" encryptedPdf.MetaData.Keywords = "Confidential, Private" encryptedPdf.MetaData.ModifiedDate = DateTime.Now encryptedPdf.SaveAs("modified.pdf") $vbLabelText $csharpLabel 6.1.9 PDF/A Compliance IronPDF can generate PDF/A compliant documents, which are required for long-term archiving and record-keeping purposes. 6.1.10 XML Reports Using IronPDF Direct conversion of XML to PDF is not supported by IronPDF but a viable approach involves initially converting XML data to HTML format. This is accomplished by employing XSLT (Extensible Stylesheet Language Transformations), a powerful XML stylesheet language designed for transforming XML documents into other formats like HTML, text, or even a new XML document. Let say that it is our data.xml file: <?xml version="1.0" encoding="UTF-8"?> <Library> <Book id="1"> <Title>The Great Gatsby</Title> <Author>F. Scott Fitzgerald</Author> <Genre>Fiction</Genre> <Year>1925</Year> </Book> <Book id="2"> <Title>To Kill a Mockingbird</Title> <Author>Harper Lee</Author> <Genre>Fiction</Genre> <Year>1960</Year> </Book> <Book id="3"> <Title>1984</Title> <Author>George Orwell</Author> <Genre>Dystopian</Genre> <Year>1949</Year> </Book> </Library> <?xml version="1.0" encoding="UTF-8"?> <Library> <Book id="1"> <Title>The Great Gatsby</Title> <Author>F. Scott Fitzgerald</Author> <Genre>Fiction</Genre> <Year>1925</Year> </Book> <Book id="2"> <Title>To Kill a Mockingbird</Title> <Author>Harper Lee</Author> <Genre>Fiction</Genre> <Year>1960</Year> </Book> <Book id="3"> <Title>1984</Title> <Author>George Orwell</Author> <Genre>Dystopian</Genre> <Year>1949</Year> </Book> </Library> XML And it is our style.xslt file: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" doctype-system="about:legacy-compat" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <html> <head> <title>Library Catalog</title> <style> body { font-family: Arial, sans-serif; margin: 20px; } table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #f2f2f2; } th { background-color: #4CAF50; color: white; } </style> </head> <body> <h2>Library Catalog</h2> <table> <tr> <th>Title</th> <th>Author</th> <th>Genre</th> <th>Year</th> </tr> <xsl:for-each select="Library/Book"> <tr> <td><xsl:value-of select="Title"/></td> <td><xsl:value-of select="Author"/></td> <td><xsl:value-of select="Genre"/></td> <td><xsl:value-of select="Year"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" doctype-system="about:legacy-compat" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <html> <head> <title>Library Catalog</title> <style> body { font-family: Arial, sans-serif; margin: 20px; } table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #f2f2f2; } th { background-color: #4CAF50; color: white; } </style> </head> <body> <h2>Library Catalog</h2> <table> <tr> <th>Title</th> <th>Author</th> <th>Genre</th> <th>Year</th> </tr> <xsl:for-each select="Library/Book"> <tr> <td><xsl:value-of select="Title"/></td> <td><xsl:value-of select="Author"/></td> <td><xsl:value-of select="Genre"/></td> <td><xsl:value-of select="Year"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> XML Here's the snippet code that how we can approach this logic: using System; using System.Xml.Xsl; using System.Xml; XslCompiledTransform transform = new XslCompiledTransform(); transform.Load("style.xslt"); XmlReader reader = XmlReader.Create("data.xml"); XmlWriterSettings settings = new XmlWriterSettings { Indent = true, OmitXmlDeclaration = true }; using (XmlWriter writer = XmlWriter.Create("output.html", settings)) { transform.Transform(reader, writer); } License.LicenseKey = "Liecense-Key"; var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlFileAsPdf("output.html"); pdf.SaveAs("Report.pdf"); using System; using System.Xml.Xsl; using System.Xml; XslCompiledTransform transform = new XslCompiledTransform(); transform.Load("style.xslt"); XmlReader reader = XmlReader.Create("data.xml"); XmlWriterSettings settings = new XmlWriterSettings { Indent = true, OmitXmlDeclaration = true }; using (XmlWriter writer = XmlWriter.Create("output.html", settings)) { transform.Transform(reader, writer); } License.LicenseKey = "Liecense-Key"; var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlFileAsPdf("output.html"); pdf.SaveAs("Report.pdf"); Imports System Imports System.Xml.Xsl Imports System.Xml Private transform As New XslCompiledTransform() transform.Load("style.xslt") Dim reader As XmlReader = XmlReader.Create("data.xml") Dim settings As New XmlWriterSettings With { .Indent = True, .OmitXmlDeclaration = True } Using writer As XmlWriter = XmlWriter.Create("output.html", settings) transform.Transform(reader, writer) End Using License.LicenseKey = "Liecense-Key" Dim renderer = New ChromePdfRenderer() Dim pdf = renderer.RenderHtmlFileAsPdf("output.html") pdf.SaveAs("Report.pdf") $vbLabelText $csharpLabel You begin with an XSLT stylesheet (style.xslt) that dictates how the XML data should be structured as HTML. The XslCompiledTransform class in .NET is used to load your XSLT file. Utilize XmlReader to load your XML data (data.xml). XmlReader is efficient for this purpose because it provides a forward-only, read-only view of the XML data. The transformed HTML is written to a file (output.html) using XmlWriter, configured to produce indented HTML for readability and to omit the XML declaration, which isn't needed in the HTML output. With the HTML file ready, IronPDF's ChromePdfRenderer is then used to convert the HTML document into a PDF. This renderer mimics a high-quality rendering engine, ensuring that the generated PDF accurately represents the HTML content. Finally, the PDF document is saved to the file system (Report.pdf). This step concludes the conversion process, resulting in a PDF document derived from the original XML data. It is how we generate reports using XML and IronPDF. The output PDF file which we generate: We can also create SAP interactive reports programmatically and then convert them using IronPDF. For more detail guide, follow this guide about C# Report generation. 6.2 Advanced Features of Report.NET Report.NET provides a suite of advanced features that allow for comprehensive PDF generation and customization. The features listed in the image reflect some of these advanced capabilities. Let’s explore each one in detail. 6.2.1 Font Adding This feature enables the use of various font styles and sizes within a PDF document. It allows developers to test the appearance of different fonts, ensuring that the text is displayed correctly and according to the design specifications. using Root.Reports; using System; using System.Drawing; namespace ReportSamples { public class Test : Report { private readonly FontDef fontDef; private readonly FontProp fontProp_Title; private readonly FontProp fontProp_Label; public Test() { fontDef = FontDef.FontDefFromName(this, FontDef.StandardFont.Helvetica); fontProp_Title = new FontPropMM(fontDef, 6) { Bold = true }; fontProp_Label = new FontPropMM(fontDef, 4); } protected override void Create() { FontTest(); } private void FontTest() { FontProp fp_Title = new FontPropMM(fontDef, 12) { Bold = true }; FontProp fp = new FontPropMM(fontDef, 6); FontProp fp_Small = new FontPropMM(fontDef, 1.4); FontProp fp_XSmall = new FontPropMM(fontDef, 0.8); Page page_Cur = new Page(this); page_Cur.AddCB_MM(30, new RepString(fontProp_Title, "Font Test")); Double rX = 300; Double rY = 40; for (Int32 i = 32; i < 127; i++) { PrintCharacter(i, fp, fp_Small, fp_XSmall, rX, rY, page_Cur); } for (Int32 i = 161; i < 256; i++) { PrintCharacter(i, fp, fp_Small, fp_XSmall, rX, rY, page_Cur); } PrintCharacter('�', fp, fp_Small, fp_XSmall, rX, rY, page_Cur); } private void PrintCharacter(Int32 iChar, FontProp fp, FontProp fp_Small, FontProp fp_XSmall, Double rX, Double rY, Page page_Cur) { if (rX > 185) { rY += fp.rLineFeedMM; rX = 22; } if (rY > 280) { new Page(this); rY = 40; } Char ch = (Char)iChar; String s = ch.ToString(); page_Cur.AddMM(rX + 2, rY, new RepString(fp, s)); rX += 15; } } } using Root.Reports; using System; using System.Drawing; namespace ReportSamples { public class Test : Report { private readonly FontDef fontDef; private readonly FontProp fontProp_Title; private readonly FontProp fontProp_Label; public Test() { fontDef = FontDef.FontDefFromName(this, FontDef.StandardFont.Helvetica); fontProp_Title = new FontPropMM(fontDef, 6) { Bold = true }; fontProp_Label = new FontPropMM(fontDef, 4); } protected override void Create() { FontTest(); } private void FontTest() { FontProp fp_Title = new FontPropMM(fontDef, 12) { Bold = true }; FontProp fp = new FontPropMM(fontDef, 6); FontProp fp_Small = new FontPropMM(fontDef, 1.4); FontProp fp_XSmall = new FontPropMM(fontDef, 0.8); Page page_Cur = new Page(this); page_Cur.AddCB_MM(30, new RepString(fontProp_Title, "Font Test")); Double rX = 300; Double rY = 40; for (Int32 i = 32; i < 127; i++) { PrintCharacter(i, fp, fp_Small, fp_XSmall, rX, rY, page_Cur); } for (Int32 i = 161; i < 256; i++) { PrintCharacter(i, fp, fp_Small, fp_XSmall, rX, rY, page_Cur); } PrintCharacter('�', fp, fp_Small, fp_XSmall, rX, rY, page_Cur); } private void PrintCharacter(Int32 iChar, FontProp fp, FontProp fp_Small, FontProp fp_XSmall, Double rX, Double rY, Page page_Cur) { if (rX > 185) { rY += fp.rLineFeedMM; rX = 22; } if (rY > 280) { new Page(this); rY = 40; } Char ch = (Char)iChar; String s = ch.ToString(); page_Cur.AddMM(rX + 2, rY, new RepString(fp, s)); rX += 15; } } } Imports Root.Reports Imports System Imports System.Drawing Namespace ReportSamples Public Class Test Inherits Report Private ReadOnly fontDef As FontDef Private ReadOnly fontProp_Title As FontProp Private ReadOnly fontProp_Label As FontProp Public Sub New() fontDef = FontDef.FontDefFromName(Me, FontDef.StandardFont.Helvetica) fontProp_Title = New FontPropMM(fontDef, 6) With {.Bold = True} fontProp_Label = New FontPropMM(fontDef, 4) End Sub Protected Overrides Sub Create() FontTest() End Sub Private Sub FontTest() Dim fp_Title As FontProp = New FontPropMM(fontDef, 12) With {.Bold = True} Dim fp As FontProp = New FontPropMM(fontDef, 6) Dim fp_Small As FontProp = New FontPropMM(fontDef, 1.4) Dim fp_XSmall As FontProp = New FontPropMM(fontDef, 0.8) Dim page_Cur As New Page(Me) page_Cur.AddCB_MM(30, New RepString(fontProp_Title, "Font Test")) Dim rX As Double = 300 Dim rY As Double = 40 For i As Int32 = 32 To 126 PrintCharacter(i, fp, fp_Small, fp_XSmall, rX, rY, page_Cur) Next i For i As Int32 = 161 To 255 PrintCharacter(i, fp, fp_Small, fp_XSmall, rX, rY, page_Cur) Next i PrintCharacter(AscW(" "c), fp, fp_Small, fp_XSmall, rX, rY, page_Cur) End Sub Private Sub PrintCharacter(ByVal iChar As Int32, ByVal fp As FontProp, ByVal fp_Small As FontProp, ByVal fp_XSmall As FontProp, ByVal rX As Double, ByVal rY As Double, ByVal page_Cur As Page) If rX > 185 Then rY += fp.rLineFeedMM rX = 22 End If If rY > 280 Then Dim tempVar As New Page(Me) rY = 40 End If Dim ch As Char = ChrW(iChar) Dim s As String = ch.ToString() page_Cur.AddMM(rX + 2, rY, New RepString(fp, s)) rX += 15 End Sub End Class End Namespace $vbLabelText $csharpLabel 6.2.2 Image Embedding With the Image Sample feature, developers can embed images into PDF documents. This includes controlling the size and positioning of the images, as well as potentially applying transformations or effects to them. using Root.Reports; using System.Drawing; namespace ReportSamples { public class ImageSample : Report { protected override void Create() { FontDef fd = new FontDef(this, FontDef.StandardFont.Helvetica); FontProp fp_Title = new FontPropMM(fd, 15) { Bold = true }; FontProp fp_SubTitle = new FontPropMM(fd, 4) { Bold = true }; PenProp pp = new PenProp(this, 0.2, Color.FromArgb(235, 235, 235)); PenProp pp_Black = new PenProp(this, 0.2, Color.Black); BrushProp bp = new BrushProp(this, Color.LightGray); new Page(this); page_Cur.AddCB_MM(40, new RepString(fp_Title, "Image Sample")); System.IO.Stream stream = GetType().Assembly.GetManifestResourceStream("ReportSamples.Image.jpg"); page_Cur.AddMM(20, 90, new RepImageMM(stream, 40, Double.NaN)); page_Cur.AddMM(20, 95, new RepString(fp_SubTitle, "W = 40mm, H = auto.")); page_Cur.AddMM(67, 90, new RepImageMM(stream, 40, 20)); page_Cur.AddMM(67, 95, new RepString(fp_SubTitle, "W = 40mm, H = 20mm")); page_Cur.AddMM(114, 90, new RepImageMM(stream, Double.NaN, 30)); page_Cur.AddMM(114, 95, new RepString(fp_SubTitle, "W = auto., H = 30mm")); page_Cur.AddMM(161, 90, new RepImageMM(stream, 30, 30)); page_Cur.AddMM(161, 95, new RepString(fp_SubTitle, "W = 30mm, H = 30mm")); } } } using Root.Reports; using System.Drawing; namespace ReportSamples { public class ImageSample : Report { protected override void Create() { FontDef fd = new FontDef(this, FontDef.StandardFont.Helvetica); FontProp fp_Title = new FontPropMM(fd, 15) { Bold = true }; FontProp fp_SubTitle = new FontPropMM(fd, 4) { Bold = true }; PenProp pp = new PenProp(this, 0.2, Color.FromArgb(235, 235, 235)); PenProp pp_Black = new PenProp(this, 0.2, Color.Black); BrushProp bp = new BrushProp(this, Color.LightGray); new Page(this); page_Cur.AddCB_MM(40, new RepString(fp_Title, "Image Sample")); System.IO.Stream stream = GetType().Assembly.GetManifestResourceStream("ReportSamples.Image.jpg"); page_Cur.AddMM(20, 90, new RepImageMM(stream, 40, Double.NaN)); page_Cur.AddMM(20, 95, new RepString(fp_SubTitle, "W = 40mm, H = auto.")); page_Cur.AddMM(67, 90, new RepImageMM(stream, 40, 20)); page_Cur.AddMM(67, 95, new RepString(fp_SubTitle, "W = 40mm, H = 20mm")); page_Cur.AddMM(114, 90, new RepImageMM(stream, Double.NaN, 30)); page_Cur.AddMM(114, 95, new RepString(fp_SubTitle, "W = auto., H = 30mm")); page_Cur.AddMM(161, 90, new RepImageMM(stream, 30, 30)); page_Cur.AddMM(161, 95, new RepString(fp_SubTitle, "W = 30mm, H = 30mm")); } } } Imports Root.Reports Imports System.Drawing Namespace ReportSamples Public Class ImageSample Inherits Report Protected Overrides Sub Create() Dim fd As New FontDef(Me, FontDef.StandardFont.Helvetica) Dim fp_Title As FontProp = New FontPropMM(fd, 15) With {.Bold = True} Dim fp_SubTitle As FontProp = New FontPropMM(fd, 4) With {.Bold = True} Dim pp As New PenProp(Me, 0.2, Color.FromArgb(235, 235, 235)) Dim pp_Black As New PenProp(Me, 0.2, Color.Black) Dim bp As New BrushProp(Me, Color.LightGray) Dim tempVar As New Page(Me) page_Cur.AddCB_MM(40, New RepString(fp_Title, "Image Sample")) Dim stream As System.IO.Stream = Me.GetType().Assembly.GetManifestResourceStream("Image.jpg") page_Cur.AddMM(20, 90, New RepImageMM(stream, 40, Double.NaN)) page_Cur.AddMM(20, 95, New RepString(fp_SubTitle, "W = 40mm, H = auto.")) page_Cur.AddMM(67, 90, New RepImageMM(stream, 40, 20)) page_Cur.AddMM(67, 95, New RepString(fp_SubTitle, "W = 40mm, H = 20mm")) page_Cur.AddMM(114, 90, New RepImageMM(stream, Double.NaN, 30)) page_Cur.AddMM(114, 95, New RepString(fp_SubTitle, "W = auto., H = 30mm")) page_Cur.AddMM(161, 90, New RepImageMM(stream, 30, 30)) page_Cur.AddMM(161, 95, New RepString(fp_SubTitle, "W = 30mm, H = 30mm")) End Sub End Class End Namespace $vbLabelText $csharpLabel 6.2.3 List Layout Manager The List Layout Manager provides a way to add lists to a PDF document. This is useful for creating ordered or unordered lists, customizing list indentation, bullet styles, and managing the overall layout of list items within the document. using Root.Reports; using System.Drawing; namespace ReportSamples { public class ListLayoutManagerSample : Report { private Double rMarginLeft = 20; // millimeters private Double rWidth = 175; // millimeters protected override void Create() { FontDef fd = new FontDef(this, FontDef.StandardFont.Helvetica); FontProp fp = new FontPropMM(fd, 1.9); Double rY = 40; // vertical position in millimeters new Page(this); FontProp fp_Title = new FontPropMM(fd, 8); page_Cur.AddCB_MM(rY, new RepString(fp_Title, "List Layout Manager Sample")); rY += 18; ListLayoutManager llm = null; using (llm = new ListLayoutManager(this)) { PenProp pp_BorderLine = new PenPropMM(this, 0.4, Color.Blue); PenProp pp_GridLine = new PenPropMM(this, 0.1, Color.Blue); // Configuration for columns TlmColumn col_Number = new TlmColumnMM(llm, 10); col_Number.tlmCellDef_Default.rAlignH = RepObj.rAlignCenter; col_Number.tlmCellDef_Default.rAlignV = RepObj.rAlignCenter; col_Number.tlmCellDef_Default.penProp_LineLeft = pp_BorderLine; TlmColumn col_Text = new TlmColumnMM(llm, 100); col_Text.tlmCellDef_Default.tlmTextMode = TlmTextMode.MultiLine; TlmColumn col_Author = new TlmColumnMM(llm, rWidth - llm.rWidthMM); col_Author.tlmCellDef_Default.penProp_LineRight = pp_BorderLine; col_Author.tlmCellDef_Default.brushProp_Back = new BrushProp(this, Color.FromArgb(255, 210, 210)); llm.container_CreateMM(page_Cur, rMarginLeft, rY); // immediately creates a container // Adding rows and content // ... // Rows and content omitted for brevity // ... } rY += llm.rCurY_MM + 1.5; fp.rSizeMM = 1.5; page_Cur.AddRT_MM(rMarginLeft + rWidth, rY, new RepString(fp, "End of list")); } } } using Root.Reports; using System.Drawing; namespace ReportSamples { public class ListLayoutManagerSample : Report { private Double rMarginLeft = 20; // millimeters private Double rWidth = 175; // millimeters protected override void Create() { FontDef fd = new FontDef(this, FontDef.StandardFont.Helvetica); FontProp fp = new FontPropMM(fd, 1.9); Double rY = 40; // vertical position in millimeters new Page(this); FontProp fp_Title = new FontPropMM(fd, 8); page_Cur.AddCB_MM(rY, new RepString(fp_Title, "List Layout Manager Sample")); rY += 18; ListLayoutManager llm = null; using (llm = new ListLayoutManager(this)) { PenProp pp_BorderLine = new PenPropMM(this, 0.4, Color.Blue); PenProp pp_GridLine = new PenPropMM(this, 0.1, Color.Blue); // Configuration for columns TlmColumn col_Number = new TlmColumnMM(llm, 10); col_Number.tlmCellDef_Default.rAlignH = RepObj.rAlignCenter; col_Number.tlmCellDef_Default.rAlignV = RepObj.rAlignCenter; col_Number.tlmCellDef_Default.penProp_LineLeft = pp_BorderLine; TlmColumn col_Text = new TlmColumnMM(llm, 100); col_Text.tlmCellDef_Default.tlmTextMode = TlmTextMode.MultiLine; TlmColumn col_Author = new TlmColumnMM(llm, rWidth - llm.rWidthMM); col_Author.tlmCellDef_Default.penProp_LineRight = pp_BorderLine; col_Author.tlmCellDef_Default.brushProp_Back = new BrushProp(this, Color.FromArgb(255, 210, 210)); llm.container_CreateMM(page_Cur, rMarginLeft, rY); // immediately creates a container // Adding rows and content // ... // Rows and content omitted for brevity // ... } rY += llm.rCurY_MM + 1.5; fp.rSizeMM = 1.5; page_Cur.AddRT_MM(rMarginLeft + rWidth, rY, new RepString(fp, "End of list")); } } } Imports Root.Reports Imports System.Drawing Namespace ReportSamples Public Class ListLayoutManagerSample Inherits Report Private rMarginLeft As Double = 20 ' millimeters Private rWidth As Double = 175 ' millimeters Protected Overrides Sub Create() Dim fd As New FontDef(Me, FontDef.StandardFont.Helvetica) Dim fp As FontProp = New FontPropMM(fd, 1.9) Dim rY As Double = 40 ' vertical position in millimeters Dim tempVar As New Page(Me) Dim fp_Title As FontProp = New FontPropMM(fd, 8) page_Cur.AddCB_MM(rY, New RepString(fp_Title, "List Layout Manager Sample")) rY += 18 Dim llm As ListLayoutManager = Nothing llm = New ListLayoutManager(Me) Using llm Dim pp_BorderLine As PenProp = New PenPropMM(Me, 0.4, Color.Blue) Dim pp_GridLine As PenProp = New PenPropMM(Me, 0.1, Color.Blue) ' Configuration for columns Dim col_Number As TlmColumn = New TlmColumnMM(llm, 10) col_Number.tlmCellDef_Default.rAlignH = RepObj.rAlignCenter col_Number.tlmCellDef_Default.rAlignV = RepObj.rAlignCenter col_Number.tlmCellDef_Default.penProp_LineLeft = pp_BorderLine Dim col_Text As TlmColumn = New TlmColumnMM(llm, 100) col_Text.tlmCellDef_Default.tlmTextMode = TlmTextMode.MultiLine Dim col_Author As TlmColumn = New TlmColumnMM(llm, rWidth - llm.rWidthMM) col_Author.tlmCellDef_Default.penProp_LineRight = pp_BorderLine col_Author.tlmCellDef_Default.brushProp_Back = New BrushProp(Me, Color.FromArgb(255, 210, 210)) llm.container_CreateMM(page_Cur, rMarginLeft, rY) ' immediately creates a container ' Adding rows and content ' ... ' Rows and content omitted for brevity ' ... End Using rY += llm.rCurY_MM + 1.5 fp.rSizeMM = 1.5 page_Cur.AddRT_MM(rMarginLeft + rWidth, rY, New RepString(fp, "End of list")) End Sub End Class End Namespace $vbLabelText $csharpLabel 6.2.4 PDF-Properties This refers to the ability to set and modify various properties of the PDF document itself, such as metadata (author, title, subject), viewing preferences, and security settings like encryption and access permissions. using Root.Reports; using System; namespace ReportSamples { public class PdfPropertiesSample : Report { public PdfPropertiesSample() { PdfFormatter pf = (PdfFormatter)formatter; pf.sTitle = "PDF Sample"; pf.sAuthor = "Otto Mayer, mot@root.ch"; pf.sSubject = "Sample of some PDF features"; pf.sKeywords = "Sample PDF RSF"; pf.sCreator = "RSF Sample Application"; pf.dt_CreationDate = new DateTime(2002, 8, 15, 0, 0, 0, 0); pf.pageLayout = PageLayout.TwoColumnLeft; pf.bHideToolBar = true; pf.bHideMenubar = false; pf.bHideWindowUI = true; pf.bFitWindow = true; pf.bCenterWindow = true; pf.bDisplayDocTitle = true; } protected override void Create() { FontDef fd = new FontDef(this, FontDef.StandardFont.Helvetica); FontProp fp = new FontPropMM(fd, 4); FontProp fp_Title = new FontPropMM(fd, 11); fp_Title.bBold = true; Page page = new Page(this); page.AddCB_MM(40, new RepString(fp_Title, "PDF Properties Sample")); fp_Title.rSizeMM = 8; page.AddCB_MM(100, new RepString(fp_Title, "First Page")); page.AddCB_MM(120, new RepString(fp, "Choose <Document Properties, Summary> from the")); page.AddCB_MM(126, new RepString(fp, "File menu to display the document properties")); page = new Page(this); page.AddCB_MM(100, new RepString(fp_Title, "Second Page")); } } } using Root.Reports; using System; namespace ReportSamples { public class PdfPropertiesSample : Report { public PdfPropertiesSample() { PdfFormatter pf = (PdfFormatter)formatter; pf.sTitle = "PDF Sample"; pf.sAuthor = "Otto Mayer, mot@root.ch"; pf.sSubject = "Sample of some PDF features"; pf.sKeywords = "Sample PDF RSF"; pf.sCreator = "RSF Sample Application"; pf.dt_CreationDate = new DateTime(2002, 8, 15, 0, 0, 0, 0); pf.pageLayout = PageLayout.TwoColumnLeft; pf.bHideToolBar = true; pf.bHideMenubar = false; pf.bHideWindowUI = true; pf.bFitWindow = true; pf.bCenterWindow = true; pf.bDisplayDocTitle = true; } protected override void Create() { FontDef fd = new FontDef(this, FontDef.StandardFont.Helvetica); FontProp fp = new FontPropMM(fd, 4); FontProp fp_Title = new FontPropMM(fd, 11); fp_Title.bBold = true; Page page = new Page(this); page.AddCB_MM(40, new RepString(fp_Title, "PDF Properties Sample")); fp_Title.rSizeMM = 8; page.AddCB_MM(100, new RepString(fp_Title, "First Page")); page.AddCB_MM(120, new RepString(fp, "Choose <Document Properties, Summary> from the")); page.AddCB_MM(126, new RepString(fp, "File menu to display the document properties")); page = new Page(this); page.AddCB_MM(100, new RepString(fp_Title, "Second Page")); } } } Imports Root.Reports Imports System Namespace ReportSamples Public Class PdfPropertiesSample Inherits Report Public Sub New() Dim pf As PdfFormatter = CType(formatter, PdfFormatter) pf.sTitle = "PDF Sample" pf.sAuthor = "Otto Mayer, mot@root.ch" pf.sSubject = "Sample of some PDF features" pf.sKeywords = "Sample PDF RSF" pf.sCreator = "RSF Sample Application" pf.dt_CreationDate = New DateTime(2002, 8, 15, 0, 0, 0, 0) pf.pageLayout = PageLayout.TwoColumnLeft pf.bHideToolBar = True pf.bHideMenubar = False pf.bHideWindowUI = True pf.bFitWindow = True pf.bCenterWindow = True pf.bDisplayDocTitle = True End Sub Protected Overrides Sub Create() Dim fd As New FontDef(Me, FontDef.StandardFont.Helvetica) Dim fp As FontProp = New FontPropMM(fd, 4) Dim fp_Title As FontProp = New FontPropMM(fd, 11) fp_Title.bBold = True Dim page As New Page(Me) page.AddCB_MM(40, New RepString(fp_Title, "PDF Properties Sample")) fp_Title.rSizeMM = 8 page.AddCB_MM(100, New RepString(fp_Title, "First Page")) page.AddCB_MM(120, New RepString(fp, "Choose <Document Properties, Summary> from the")) page.AddCB_MM(126, New RepString(fp, "File menu to display the document properties")) page = New Page(Me) page.AddCB_MM(100, New RepString(fp_Title, "Second Page")) End Sub End Class End Namespace $vbLabelText $csharpLabel 6.2.5 PDF From Text The PDF From Text feature showcases the library’s capabilities in adding and customizing text content in a PDF. This includes setting text alignment, line spacing, color, and applying text effects like bold or italic. 7. Documentation and Support 7.1 IronPDF IronPDF is known for its extensive and detailed documentation. IronPDF offers a well-organized documentation section that includes setup instructions, tutorials, and API references. The guides are structured to help both beginners and experienced developers find the information they need quickly. For community-driven support, developers can turn to forums and community discussions. Here, they can ask questions, share experiences, and find answers from other users. IronPDF also offers professional support through a ticketing system where engineers can get help directly from the IronPDF team. This service might be part of the paid licensing, which offers more direct and immediate assistance. 7.2 Report.NET Report.NET, being an open-source library, has a different approach to documentation and support. The documentation might not be as extensive as commercial libraries, but it is sufficient to get started and to handle common tasks. The library’s documentation is found within the GitHub repository or as inline comments in the source code. It tends to be more technical and may require some digging to find the needed information. As Report.NET is a free and open-source library, it does not offer formal professional support. Developers rely on the community for help or might need to hire a specialist for more in-depth issues. 8. Licensing Models 8.1 IronPDF License Model IronPDF offers a variety of licensing models to suit different development and deployment needs, ensuring that there's a fit for projects and organizations of all sizes. Here's an overview: Lite License ($799 USD): This is the most basic option, suitable for individual developers working on a single project at one location. It comes with email support but doesn't cover royalty-free redistribution. Plus License ($1,199 USD): Geared towards small teams, this license supports up to three developers working on three projects across three locations. It enhances support to include 24-hour email and chat, as well as phone support. Professional License ($2,399 USD): This is designed for larger teams and projects, accommodating up to 10 developers across 10 locations working on 10 projects. It includes all Plus support options and adds screen-sharing support for more interactive problem-solving. Free Trial License: Ideal for evaluation purposes, this trial license allows you to try out IronPDF without cost. However, it's intended for private use and the generated PDFs shouldn't be published on any public or corporate internet or intranet projects. In addition to the core licenses, there are options for extended coverage: Royalty-Free Redistribution: If you need to include IronPDF in a software product that you'll distribute or sell, royalty-free redistribution coverage is required. This is priced at $1,199 for SaaS and OEM redistribution. Extended Support & Updates: This add-on ensures you receive ongoing product updates and support. You can choose from 1-year or 5-year support packages, with the latter offering savings over the annual option. 8.2 Report.NET License Model Report.NET 是在 LGPL 授權下免費發行的。 LGPL(較寬鬆的一般公共許可證)是一個自由軟體許可證,允許用戶運行、研究、共享和修改軟體。 該許可證確保 Report.NET 資料庫能在開源和專有軟體中免費使用,只要未修改 LGPL 許可的代碼部分即可。 如果這些被修改,則這些修改必須在同一許可下共享。 9. 結論 When looking at IronPDF and Report.NET, we've examined various elements such as their capabilities, the range of features they offer, ease of use, support services, and how they are licensed. IronPDF 提供一套豐富的功能,允許開發人員不僅從 HTML、圖像和文本創建和編輯 PDF 文件,還可以實施加密、數字簽名和定制頁眉/頁腳等進階功能。 不同的許可支持意味著它可以適應從個人開發者到大型企業的不同規模的項目。 其全面的文檔和專業的支持結構使其適合作為持續公開和需要直接協助的重要項目。 IronPDF 還提供 免費試用 的 IronPDF 從 $799 開始。 相比之下,Report.NET 是一個簡單的工具,擅長生成 PDF 文檔。 其 LGPL 許可意味著開發者在個人和商業項目中使用它都相當方便,沒有顯著的限制。 儘管它可能不提供與 IronPDF 相同級別的結構化支持,但 Report.NET 的開源性質鼓勵了社區的投入和幫助。 您在 IronPDF 和 Report.NET 之間的決策將取決於您項目的具體需求。 如果你的項目需要詳細的 PDF 創建和操作及專業支持的支持,那麼 IronPDF 可能是值得選擇的方式。 請注意Report.NET 是其相關所有者的註冊商標。 本網站與 Report.NET 無關,亦未獲它的認可或贊助。 所有產品名稱、徽標和品牌均為其各自所有者的財產。 比較僅供信息參考,並反映撰寫時公開可用的信息。 常見問題解答 怎樣在 C# 中將 HTML 轉換為 PDF? 您可以使用 IronPDF 的 RenderHtmlAsPdf 方法將 HTML 字符串轉換為 PDF。您還可以使用 RenderHtmlFileAsPdf 將 HTML 文件轉換為 PDF。 C# 庫的主要特徵是什麼,用於創建和編輯 PDF 文件? IronPDF 提供如 HTML 轉換到 PDF、先進的編輯功能包括合併和分割 PDF、表單處理、加密和跨平台相容性等功能。 IronPDF 如何處理 PDF 安全性? IronPDF 支援實施安全措施,如加密和密碼保護,以確保 PDF 文件中的敏感信息保持安全。 IronPDF 可以用於高級 PDF 編輯嗎? 是的,IronPDF 提供高級編輯功能,如合併和分割 PDF、表單處理,以及標頭和頁腳的自定義。 IronPDF 提供哪些文檔和支持選項? IronPDF 提供詳細的文檔、社區論壇和專業支持選項,包括電子郵件、聊天和電話支持,具體取決於許可證。 IronPDF 提供哪些許可選項? IronPDF 提供多種許可證,包括 Lite、Plus 和 Professional,每個都為不同的項目規模和支持需求量身定制。它還提供免費試用以供評估。 IronPDF 是一個跨平台的 PDF 庫嗎? 是的,IronPDF 設計用於跨 .NET 平台無縫運行,包括 .NET Core,以確保在不同作業系統之間的相容性。 使用 IronPDF 生成 PDF 的優勢是什麼? IronPDF 以其強大的功能在從 HTML 創建、編輯和渲染 PDF 而聞名,其詳細的文檔使其成為開發人員靈活的工具。 使用 IronPDF 的一些常見疑難解答場景是什麼? 常見問題包括在 PDF 中 HTML 元素的渲染不正確,這通常可以通過確保 CSS 相容性和使用最新版 IronPDF 來解決。 IronPDF 與開源 PDF 庫相比如何? IronPDF 提供更多先進的功能和專業支持,而開源解決方案如 Report.NET 則提供簡單和社區驅動的支持。 Curtis Chau 立即與工程團隊聊天 技術作家 Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。除了開發之外,Curtis 對物聯網 (IoT) 有著濃厚的興趣,探索將硬體和軟體結合的創新方式。在閒暇時間,他喜愛遊戲並構建 Discord 機器人,結合科技與創意的樂趣。 相關文章 發表日期 11月 13, 2025 C# HTML 與 PDF 開源版本比較 IronPDF 將開源 HTML 轉 PDF 庫與 IronPDF for C# 進行比較。探索哪種解決方案能為您的 .NET 專案提供最佳的 PDF 生成功能。 閱讀更多 發表日期 10月 27, 2025 哪個 ASP.NET Core PDF 庫具有最佳價值? 發現適用於 ASP.NET Core 應用程式的最佳 PDF 庫。比較 IronPDF 的 Chrome 引擎與 Aspose 和 Syncfusion 的替代方案。 閱讀更多 發表日期 10月 27, 2025 如何使用 Aspose C# 和 IronPDF 創建 PDF 通過這份針對開發人員設計的分步指南,學習如何使用 Aspose C# 與 IronPDF 創建 PDF。 閱讀更多 Compdfkit與IronPDF之間的比較C# 報告工具 (功能比較)
發表日期 11月 13, 2025 C# HTML 與 PDF 開源版本比較 IronPDF 將開源 HTML 轉 PDF 庫與 IronPDF for C# 進行比較。探索哪種解決方案能為您的 .NET 專案提供最佳的 PDF 生成功能。 閱讀更多
發表日期 10月 27, 2025 哪個 ASP.NET Core PDF 庫具有最佳價值? 發現適用於 ASP.NET Core 應用程式的最佳 PDF 庫。比較 IronPDF 的 Chrome 引擎與 Aspose 和 Syncfusion 的替代方案。 閱讀更多
發表日期 10月 27, 2025 如何使用 Aspose C# 和 IronPDF 創建 PDF 通過這份針對開發人員設計的分步指南,學習如何使用 Aspose C# 與 IronPDF 創建 PDF。 閱讀更多