产品比较 IronPDF与Apryse C#之间的比较 Curtis Chau 已更新:七月 28, 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 1.简介2.1 主要功能3.1 主要功能4.创建 C# 控制台应用程序4.2 创建一个新项目4.3 选择项目类型4.4 配置您的项目4.5 创建项目4.6探索项目结构5.1 使用 NuGet 软件包管理器5.2 使用 Visual Studio 命令行 NuGet 包管理器 > 包管理器控制台。 3.在控制台中键入以下命令并按 Enter: ```shell :ProductInstall ``` 该命令将下载最新版本的 IronPdf 并安装到您的项目中。 5.3从 NuGet 网页直接下载 引用"。导航到下载的 .nupkg 文件位置,选择该文件并将其添加到项目中。 上述每种方法都能将 IronPDF 成功集成到您的 .NET 项目中,让您开始使用其强大的 PDF 处理功能。 ## 6.安装 Apryse C#。 要将 Apryse C# 集成到您的 C# 项目中,您有几种选择,具体取决于您使用的是 .NET Framework 还是 .NET Core,以及您的开发环境偏好。 以下是根据 Apryse 文档和设置指南中的信息归纳出的一般步骤: ### 6.1适用于.NET Framework。 1.**下载适用于 Windows 的 Apryse SDK**:您需要访问 [**Apryse SDK for Windows 页面**](https://docs.apryse.com/documentation/dotnet/get-started/integration/windows/),下载适用于 .NET Framework 应用程序的 SDK。  2.**解压缩 SDK**:下载后,将 SDK 解压缩到系统中的已知位置。 3.**获取 Apryse 试用密钥**:在 Apryse 平台上注册以获得试用密钥,您将使用该密钥激活 SDK 的试用功能。 4.**设置您的项目**:在 Visual Studio 中,创建一个新的 .NET Framework 控制台应用程序。 然后,将提取的 SDK 中的 **Lib** 文件夹添加到您的项目目录中。 5.**添加参考文献**:右键单击项目中的 "引用",选择 "添加引用",然后导航到**Lib**文件夹,在该文件夹中复制了**PDFNetLoader.dll**和适合您的体系结构(x86 或 x64)的**PDFNet.dll**。 确保将 **PDFNet.dll** 的 "复制本地 "属性设置为 false。 6.**配置 App.config**:确保您的 App.config 文件将 **FloadFromRemoteSources** 设置启用为 true。 SDK 中有示例文件夹。 您可以直接打开并运行这些示例解决方案。 7.IronPDF 高级功能7.1 HTML 到 PDF 的转换 My PDF Welcome to My PDF This is a sample paragraph demonstrating how to create a PDF from HTML using IronPdf in C#. You can add more content here as needed. "; // Render the HTML string as a PDF var pdf = renderer.RenderHtmlAsPdf(htmlContent); // Save the resulting PDF to a file pdf.SaveAs("output.pdf"); ```  7.1.2 将 HTML 文件转换为 PDF 文件支持 Bootstrap 和现代 CSS 框架IronPdf:完整的 Bootstrap 支持代码示例:业务指标仪表板 Business Performance Dashboard Last updated: March 2025 Total Revenue Q1 2025 $2.4M ↑ +18.5% from last quarter New Customers Active 1,284 ↑ +24.3% growth rate Avg Order Value Updated $1,847 ↑ +5.2% increase Satisfaction Rate Excellent 94.7% ↑ +2.1pts improvement Revenue Breakdown by Category Monthly Quarterly Annual Category Revenue Orders Avg Value Trend AEnterprise Solutions $1,245,000 142 $8,768 +12% BProfessional Services $687,500 458 $1,501 +18% CStandard Packages $412,300 891 $463 +8% DCustom Development $55,200 12 $4,600 -3% Quick Actions Generate Full Report Export to Excel Schedule Email Share Dashboard Key Insights Top Performer: Enterprise Solutions leading revenue growth Growth Driver: Professional Services showing strongest customer acquisition Attention Needed: Custom Development segment requires review "; var pdf = renderer.RenderHtmlAsPdf(bootstrapDashboard); pdf.SaveAs("business-dashboard.pdf"); ``` **输出**:专业的商业仪表盘 PDF,采用 Bootstrap 5 基于 flexbox 的网格系统、带边框工具的卡片组件、徽章元素、响应式表格和彩色编码的度量标准--所有呈现均具有完美的布局保护和排版。 Apryse(PDFTron):有限的现代 CSS 支持7.2 PDF 合并和拆分PDF A This is the content of PDF A. This is the first page of PDF A. This is the second page of PDF A."; var htmlB = @" PDF B This is the content of PDF B. This is the first page of PDF B. This is the second page of PDF B."; // Instantiate a PDF renderer var renderer = new ChromePdfRenderer(); // Render the HTML content as separate PDF documents var pdfDocA = renderer.RenderHtmlAsPdf(htmlA); var pdfDocB = renderer.RenderHtmlAsPdf(htmlB); // Merge the two PDFs into one var mergedPdf = PdfDocument.Merge(pdfDocA, pdfDocB); // Save the merged PDF to a file mergedPdf.SaveAs("Merged.pdf"); ``` 7.3 添加水印SAMPLE", 30, IronPdf.Editing.VerticalAlignment.Middle, IronPdf.Editing.HorizontalAlignment.Center); // Save the watermarked PDF to a file pdf.SaveAs("Watermarked.pdf"); ```  7.4 PDF 表单 Employee Information Form First name: Last name: Please select your department: HR Finance IT Marketing Please select your employment status: Full-time Part-time Please select your skills: Programming Design Marketing