在实际环境中测试
在生产中测试无水印。
随时随地为您服务。
GroupDocs 和 IronPDF 都是跨平台应用程序,为工程师提供文档自动化工具。它们可以创建、编辑、格式化和打印 PDF 文档--这是当今流行的文档格式之一。在使用 .NET 和 .NET Core 构建项目时,开发人员需要选择最适合项目的工具。
开发人员需要充分了解可用的库和工具。PDF 库也不例外。由于每个库都有自己的优缺点,开发人员应使用最适合业务和项目的工具。
本文将比较 .NET 和 .NET Core 开发人员最常用的两个 PDF 库。这两个库是
IronPDF 是一款基于 C# 的商业 PDF 创建软件包,适用于 .NET 平台。它能从 HTML、CSS、图像和 JavaScript 生成 PDF。它同样适用于网络应用程序、安全内网、控制台应用程序、WPF 应用程序和 MVC 模式网站。
从版本 4 开始,IronPDF 与所有 .NET Framework 和 .NET Core 项目兼容。
GroupDocs.Editor API 是一个跨平台的 .NET 库,它使开发人员能够创建简单的应用程序,轻松地与流行的 HTML 编辑器接口 (免费和付费) 转换、编辑和处理各种文件格式的文档。
开发人员可以使用 GroupDocs.Editor 加载文档,将其转换为 HTML,将 HTML 发送给外部编辑器,然后将 HTML 保存为原始格式。此外,API 还能访问编辑器内与文档链接的资源。它支持多种网络和文字处理文件格式,包括 Microsoft Word、Microsoft Excel、OpenDocument、文本、水印等。
这两个库有什么不同?让我们一探究竟。
GroupDocs.Annotation for .NET使开发人员能用C#、ASP.NET和其他能执行文档注释功能的.NET技术制作应用程序。该库支持的文档注释功能包括:绘制形状和箭头、放置点和呼出气泡、添加文本和图像、插入注释和高亮、文本和图像的删除/下划线等。GroupDocs.Annoation 还能操作文档注释。
注释文档后,该库可将文档保存为原始文件类型。功能强大的文档注释器可以注释 PDF 文件、HTML 文件、Word 文档、Excel 电子表格、PowerPoint 演示文稿、Visio 文件、CAD 图纸、图像格式等。
// Initialize list of AnnotationInfo
List<AnnotationInfo> annotations = new List<AnnotationInfo>();
// Initialize text annotation
AnnotationInfo textAnnotation = new AnnotationInfo
{
Box = new Rectangle((float)265.44, (float)153.86, 206, 36), Type = AnnotationType.Text
};
// Add annotation to list
annotations.Add(textAnnotation);
// Get input file stream
Stream inputFile = new FileStream("D:/input.pdf", FileMode.Open, File
.ReadWrite);
// Export annotation and savthe e output file
CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Pdf);
// Initialize list of AnnotationInfo
List<AnnotationInfo> annotations = new List<AnnotationInfo>();
// Initialize text annotation
AnnotationInfo textAnnotation = new AnnotationInfo
{
Box = new Rectangle((float)265.44, (float)153.86, 206, 36), Type = AnnotationType.Text
};
// Add annotation to list
annotations.Add(textAnnotation);
// Get input file stream
Stream inputFile = new FileStream("D:/input.pdf", FileMode.Open, File
.ReadWrite);
// Export annotation and savthe e output file
CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Pdf);
' Initialize list of AnnotationInfo
Dim annotations As New List(Of AnnotationInfo)()
' Initialize text annotation
Dim textAnnotation As New AnnotationInfo With {
.Box = New Rectangle(CSng(265.44), CSng(153.86), 206, 36),
.Type = AnnotationType.Text
}
' Add annotation to list
annotations.Add(textAnnotation)
' Get input file stream
Dim inputFile As Stream = New FileStream("D:/input.pdf", FileMode.Open, File.ReadWrite)
' Export annotation and savthe e output file
CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Pdf)
用户可以使用 IronPDF 的 IronPdf.PdfDocument.AddTextAnnotation
方法和 PdfDocument.TextAnnotation
类以编程方式注释 PDF 文档。
using PdfDocument Pdf = PdfDocument.FromFile("existing.pdf");// Create a PDF annotation object
var Annotation = new IronPdf.Annotations.TextAnnotation()
{
Title = "This is the major title",
Subject = "This is a subtitle",
Contents = "This is the long 'sticky note' comment content...",
Icon = IronPdf.Annotations.TextAnnotation.AnnotationIcon.Help,
Opacity = 0.9,
Printable = false,
Hidden = false,
OpenByDefault = true,
ReadOnly = false,
Rotateable = true
};
// Add the annotation "sticky note" to a specific page and location within any new or existing PDF.
Pdf.AddTextAnnotation(Annotation, 1, 150, 250);
Pdf.SaveAs("existing.pdf");
using PdfDocument Pdf = PdfDocument.FromFile("existing.pdf");// Create a PDF annotation object
var Annotation = new IronPdf.Annotations.TextAnnotation()
{
Title = "This is the major title",
Subject = "This is a subtitle",
Contents = "This is the long 'sticky note' comment content...",
Icon = IronPdf.Annotations.TextAnnotation.AnnotationIcon.Help,
Opacity = 0.9,
Printable = false,
Hidden = false,
OpenByDefault = true,
ReadOnly = false,
Rotateable = true
};
// Add the annotation "sticky note" to a specific page and location within any new or existing PDF.
Pdf.AddTextAnnotation(Annotation, 1, 150, 250);
Pdf.SaveAs("existing.pdf");
Using Pdf As PdfDocument = PdfDocument.FromFile("existing.pdf") ' Create a PDF annotation object
Dim Annotation = New IronPdf.Annotations.TextAnnotation() With {
.Title = "This is the major title",
.Subject = "This is a subtitle",
.Contents = "This is the long 'sticky note' comment content...",
.Icon = IronPdf.Annotations.TextAnnotation.AnnotationIcon.Help,
.Opacity = 0.9,
.Printable = False,
.Hidden = False,
.OpenByDefault = True,
.ReadOnly = False,
.Rotateable = True
}
' Add the annotation "sticky note" to a specific page and location within any new or existing PDF.
Pdf.AddTextAnnotation(Annotation, 1, 150, 250)
Pdf.SaveAs("existing.pdf")
End Using
IronPDF 的文本注释功能包括添加/更改颜色、调整元素大小、设置不透明度、添加符号和编辑文本。
将某些文件格式转换为 PDF 是保持文件完整性的一个重要方面。让我们来看看这两种软件解决方案是如何进行不同转换的。
MS Word、Excel、PowerPoint、Visio 和其他文档类型可使用 GroupDocs 的 GroupDocs.Conversion API 转换。 *GroupDocs.Conversion是一个独立的应用程序接口,专为需要高速的服务器端应用程序而设计。它不依赖于 Microsoft Office 或 Open Office 等生产力软件套件。
XLSB (Excel 二进制文件格式) 是一种以二进制而非 XML 格式存储 Excel 工作簿数据的文件类型 (就像 Excel XLSX 文件类型一样).
下面的示例代码用 C# 将 XLSB 转换为 PDF。
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertXlsbToPdfInCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert XLSB to PDF using C#
{
// Remove the watermathe rk in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source XLSB file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.xlsb");
// Set convert options for the PDF document
var convertOptions = new PdfConvertOptions();
// Convert and save the XLSB in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertXlsbToPdfInCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert XLSB to PDF using C#
{
// Remove the watermathe rk in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source XLSB file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.xlsb");
// Set convert options for the PDF document
var convertOptions = new PdfConvertOptions();
// Convert and save the XLSB in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
Imports System
Imports GroupDocs.Conversion.Options.Convert
Namespace ConvertXlsbToPdfInCSharp
Friend Class Program
Public Shared Sub Main(ByVal args() As String) ' Main function to convert XLSB to PDF using C#
' Remove the watermathe rk in output PDF document by adding license
Dim licensePath As String = "GroupDocs.Conversion.lic"
Dim lic As New GroupDocs.Conversion.License()
lic.SetLicense(licensePath)
' Load the source XLSB file for conversion to PDF
Dim converter = New GroupDocs.Conversion.Converter("sample.xlsb")
' Set convert options for the PDF document
Dim convertOptions = New PdfConvertOptions()
' Convert and save the XLSB in PDF format
converter.Convert("converted.pdf", convertOptions)
Console.WriteLine("Done")
End Sub
End Class
End Namespace
使用 GroupDocs.Conversion API 将 Visio VSDX 文件转换为 PDF 文件的步骤如下:
1.使用 NuGet 软件包管理器安装 GroupDocs.Conversion 库。
2.在项目源文件中包含 GroupDocs.Conversion 命名空间(s).
3.使用 VSDX 文件的位置实例化一个新的 GroupDocs.Conversion.Converter 对象。
4.创建一个 PdfConvertOptions
类的实例,并用它来指定文件转换选项。
5.调用转换器实例的 Convert 方法创建 PDF 文件。
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertVsdxToPdfInCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert VSDX to PDF using C#
{
// Remove the watermark in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source VSDX file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.vsdx");
// Set the convert options for PDF document
var convertOptions = new PdfConvertOptions();
// Convert and save the VSDX in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertVsdxToPdfInCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert VSDX to PDF using C#
{
// Remove the watermark in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source VSDX file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.vsdx");
// Set the convert options for PDF document
var convertOptions = new PdfConvertOptions();
// Convert and save the VSDX in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
Imports System
Imports GroupDocs.Conversion.Options.Convert
Namespace ConvertVsdxToPdfInCSharp
Friend Class Program
Public Shared Sub Main(ByVal args() As String) ' Main function to convert VSDX to PDF using C#
' Remove the watermark in output PDF document by adding license
Dim licensePath As String = "GroupDocs.Conversion.lic"
Dim lic As New GroupDocs.Conversion.License()
lic.SetLicense(licensePath)
' Load the source VSDX file for conversion to PDF
Dim converter = New GroupDocs.Conversion.Converter("sample.vsdx")
' Set the convert options for PDF document
Dim convertOptions = New PdfConvertOptions()
' Convert and save the VSDX in PDF format
converter.Convert("converted.pdf", convertOptions)
Console.WriteLine("Done")
End Sub
End Class
End Namespace
本例演示如何使用 GroupDocs.Conversion 将 HTML 转换为 PDF。 从 HTML 生成 PDF 文件.它使用 Converter
类加载源文档,使用 PdfConvertOptions
类定义输出文档的属性,并使用 Convert
函数将源文档渲染为 PDF 文件。
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertVsdxToPdfInCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert VSDX to PDF using C#
{
// Remove the watermark in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source VSDX file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.vsdx");
// Set the convert options for PDF document
var convertOptions = new PdfConvertOptions();
// Convert and save the VSDX in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertVsdxToPdfInCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert VSDX to PDF using C#
{
// Remove the watermark in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source VSDX file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.vsdx");
// Set the convert options for PDF document
var convertOptions = new PdfConvertOptions();
// Convert and save the VSDX in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
Imports System
Imports GroupDocs.Conversion.Options.Convert
Namespace ConvertVsdxToPdfInCSharp
Friend Class Program
Public Shared Sub Main(ByVal args() As String) ' Main function to convert VSDX to PDF using C#
' Remove the watermark in output PDF document by adding license
Dim licensePath As String = "GroupDocs.Conversion.lic"
Dim lic As New GroupDocs.Conversion.License()
lic.SetLicense(licensePath)
' Load the source VSDX file for conversion to PDF
Dim converter = New GroupDocs.Conversion.Converter("sample.vsdx")
' Set the convert options for PDF document
Dim convertOptions = New PdfConvertOptions()
' Convert and save the VSDX in PDF format
converter.Convert("converted.pdf", convertOptions)
Console.WriteLine("Done")
End Sub
End Class
End Namespace
本示例只介绍了生成 PDF 文档的几个参数。开发人员可以指定其他文件转换选项,如调整边际空间、设置密码、添加水印等。
使用 GroupDocs 将 RTF 文件快速转换为 PDF:
1.首先安装所需的 NuGet 软件包 并在项目源代码中引用适当的命名空间
2.创建一个 Converter
类实例,以加载 RTF 源文件。
3.初始化一个 PdfConvertOptions
对象,以定义渲染 PDF 文档的属性。
4.最后,利用 Convert (传递输出位置和
PdfConvertOptions` 实例) 将 RTF 文件渲染为 PDF 文件。
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertRtfToPdfUsingCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert RTF to PDF using C#
{
// Remove the watermark in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source RTF file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.rtf");
// Set the properties for the output PDF document
var convertOptions = new PdfConvertOptions()
{
Height = 500,
Width = 500,
Dpi = 100,
PageNumber = 1,
PagesCount = 1
};
// Convert and save the RTF in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertRtfToPdfUsingCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert RTF to PDF using C#
{
// Remove the watermark in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source RTF file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.rtf");
// Set the properties for the output PDF document
var convertOptions = new PdfConvertOptions()
{
Height = 500,
Width = 500,
Dpi = 100,
PageNumber = 1,
PagesCount = 1
};
// Convert and save the RTF in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
Imports System
Imports GroupDocs.Conversion.Options.Convert
Namespace ConvertRtfToPdfUsingCSharp
Friend Class Program
Public Shared Sub Main(ByVal args() As String) ' Main function to convert RTF to PDF using C#
' Remove the watermark in output PDF document by adding license
Dim licensePath As String = "GroupDocs.Conversion.lic"
Dim lic As New GroupDocs.Conversion.License()
lic.SetLicense(licensePath)
' Load the source RTF file for conversion to PDF
Dim converter = New GroupDocs.Conversion.Converter("sample.rtf")
' Set the properties for the output PDF document
Dim convertOptions = New PdfConvertOptions() With {
.Height = 500,
.Width = 500,
.Dpi = 100,
.PageNumber = 1,
.PagesCount = 1
}
' Convert and save the RTF in PDF format
converter.Convert("converted.pdf", convertOptions)
Console.WriteLine("Done")
End Sub
End Class
End Namespace
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertExcelToPdfInCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert Excel to PDF using C#
{
// Remove the watermark in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source Excel file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.xlsx");
// Set the starting sheet number and consecutive sheet count
var convertOptions = new PdfConvertOptions()
{
PageNumber = 1,
PagesCount = 2
};
// Convert and save the Excel in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertExcelToPdfInCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert Excel to PDF using C#
{
// Remove the watermark in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source Excel file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.xlsx");
// Set the starting sheet number and consecutive sheet count
var convertOptions = new PdfConvertOptions()
{
PageNumber = 1,
PagesCount = 2
};
// Convert and save the Excel in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
Imports System
Imports GroupDocs.Conversion.Options.Convert
Namespace ConvertExcelToPdfInCSharp
Friend Class Program
Public Shared Sub Main(ByVal args() As String) ' Main function to convert Excel to PDF using C#
' Remove the watermark in output PDF document by adding license
Dim licensePath As String = "GroupDocs.Conversion.lic"
Dim lic As New GroupDocs.Conversion.License()
lic.SetLicense(licensePath)
' Load the source Excel file for conversion to PDF
Dim converter = New GroupDocs.Conversion.Converter("sample.xlsx")
' Set the starting sheet number and consecutive sheet count
Dim convertOptions = New PdfConvertOptions() With {
.PageNumber = 1,
.PagesCount = 2
}
' Convert and save the Excel in PDF format
converter.Convert("converted.pdf", convertOptions)
Console.WriteLine("Done")
End Sub
End Class
End Namespace
使用 GroupDocs,只需几行代码就能将 JPG 图像格式转换为 PDF 文档。GroupDocs 还能轻松转换其他图像类型,如 PNG、TIFF、BMP 等。
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertExcelToPdfInCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert Excel to PDF using C#
{
// Remove the watermark in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source Excel file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.xlsx");
// Set the starting sheet number and consecutive sheet count
var convertOptions = new PdfConvertOptions()
{
PageNumber = 1,
PagesCount = 2
};
// Convert and save the Excel in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertExcelToPdfInCSharp
{
class Program
{
public static void Main(string [] args) // Main function to convert Excel to PDF using C#
{
// Remove the watermark in output PDF document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source Excel file for conversion to PDF
var converter = new GroupDocs.Conversion.Converter("sample.xlsx");
// Set the starting sheet number and consecutive sheet count
var convertOptions = new PdfConvertOptions()
{
PageNumber = 1,
PagesCount = 2
};
// Convert and save the Excel in PDF format
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
Imports System
Imports GroupDocs.Conversion.Options.Convert
Namespace ConvertExcelToPdfInCSharp
Friend Class Program
Public Shared Sub Main(ByVal args() As String) ' Main function to convert Excel to PDF using C#
' Remove the watermark in output PDF document by adding license
Dim licensePath As String = "GroupDocs.Conversion.lic"
Dim lic As New GroupDocs.Conversion.License()
lic.SetLicense(licensePath)
' Load the source Excel file for conversion to PDF
Dim converter = New GroupDocs.Conversion.Converter("sample.xlsx")
' Set the starting sheet number and consecutive sheet count
Dim convertOptions = New PdfConvertOptions() With {
.PageNumber = 1,
.PagesCount = 2
}
' Convert and save the Excel in PDF format
converter.Convert("converted.pdf", convertOptions)
Console.WriteLine("Done")
End Sub
End Class
End Namespace
GroupDocs API 可将照片转换为其他文档格式,如 Microsoft Word、Excel 和 PowerPoint。
IronPDF for .NET Core 和 .NET Framework 使用 Chromium 运行时引擎将 HTML 内容转换为 PDF 文件。HTML 是 IronPDF 核心功能的基础。它将 HTML 文档渲染成 PDF 文件的效果与在谷歌 Chrome 浏览器桌面上显示的效果完全相同。
该库为此提供了多个选项。下文将详细探讨其中一些选项。
IronPDF 可以将原始 HTML、CSS 和 JavaScript 源代码直接渲染为 PDF 文件,如下图所示。
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
using var PDF = Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>")
PDF.SaveAs("pixel-perfect.pdf");
/****** Advanced ******/
// Load external html assets: images, css and javascript.
// An optional BasePath 'C:\site\assets\' is set as the file location to load assets from
using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", @"C:\site\assets\");
AdvancedPDF.SaveAs("html-with-assets.pdf");
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
using var PDF = Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>")
PDF.SaveAs("pixel-perfect.pdf");
/****** Advanced ******/
// Load external html assets: images, css and javascript.
// An optional BasePath 'C:\site\assets\' is set as the file location to load assets from
using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", @"C:\site\assets\");
AdvancedPDF.SaveAs("html-with-assets.pdf");
Imports IronPdf
Private Renderer = New IronPdf.ChromePdfRenderer()
Private PDF = Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>") PDF.SaveAs("pixel-perfect.pdf")
'''**** Advanced *****
' Load external html assets: images, css and javascript.
' An optional BasePath 'C:\site\assets\' is set as the file location to load assets from
Private AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", "C:\site\assets\")
AdvancedPDF.SaveAs("html-with-assets.pdf")
IronPDF 可轻松地将现有 URL 中的 HTML 转换为 PDF 文档。
using IronPdf;
IronPdf.ChromePdfRenderer Renderer = new IronPdf.ChromePdfRenderer();
using var Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/");
Pdf.SaveAs("url.pdf");
using IronPdf;
IronPdf.ChromePdfRenderer Renderer = new IronPdf.ChromePdfRenderer();
using var Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/");
Pdf.SaveAs("url.pdf");
Imports IronPdf
Private Renderer As New IronPdf.ChromePdfRenderer()
Private Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/")
Pdf.SaveAs("url.pdf")
有了这项功能,设计人员和编码人员可以通过支持查询字符串变量的 ASP.NET URL 渲染 PDF,从而更高效地协作开发 PDF。
IronPDF 库可以渲染 ASP.NET 只需在应用程序的 "Form_Load "事件中添加一行代码,就能将网页转换为 PDF 而不是 HTML:
private void Form1_Load(object sender, EventArgs e)
{
IronPdf.AspxToPdf.RenderThisPageAsPdf();
}
private void Form1_Load(object sender, EventArgs e)
{
IronPdf.AspxToPdf.RenderThisPageAsPdf();
}
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
IronPdf.AspxToPdf.RenderThisPageAsPdf()
End Sub
这样,数据驱动的 PDF 就可以先以 HTML 的形式进行设计和测试,以简化操作。
使用 "IronPdf.ImageToPdfConverter "类可以轻松地从一个或多个图像文件创建 PDF 文档。
// PM> Install-Package IronPdf
using IronPdf;
using System.IO;
using System.Linq;
// One or more images as IEnumerable. This example selects all JPEG images in a spe-cific folder.
var ImageFiles = System.IO.Directory.EnumerateFiles(@"C:\project\assets").Where(f => f.EndsWith(".jpg")
f.EndsWith(".jpeg"));
// Convert the images to a PDF and save it.
ImageToPdfConverter.ImageToPdf(ImageFiles).SaveAs(@"C:\project\composite.pdf");
//Also see PdfDocument.RasterizeToImageFiles() method to flatten a PDF to images or thumbnails
// PM> Install-Package IronPdf
using IronPdf;
using System.IO;
using System.Linq;
// One or more images as IEnumerable. This example selects all JPEG images in a spe-cific folder.
var ImageFiles = System.IO.Directory.EnumerateFiles(@"C:\project\assets").Where(f => f.EndsWith(".jpg")
f.EndsWith(".jpeg"));
// Convert the images to a PDF and save it.
ImageToPdfConverter.ImageToPdf(ImageFiles).SaveAs(@"C:\project\composite.pdf");
//Also see PdfDocument.RasterizeToImageFiles() method to flatten a PDF to images or thumbnails
IRON VB CONVERTER ERROR developers@ironsoftware.com
IronPDF 在 HTML 到 PDF 的转换中包含全面的 JavaScript 兼容性,包括支持 Angular.js 和其他流行的前端和单页网页框架。
IronPDF 允许用户使用 JavaScript 将图片和其他内容类型嵌入到 PDF 中。该库可将它们直接嵌入 HTML 字符串。
IronPDF 能以这种方式嵌入的内容包括 (但不限于):
这对于在 HTML 到 PDF 的渲染过程中避免外部加载资产非常有用。它可以提高速度,并允许在非文件系统位置(如字符串或数据库)存储整个渲染任务。
// PM> Install-Package IronPdf
using IronPdf;
var htmlWithJs = @"
<h1>This is HTML</h1>
<script>
document.write('<h1>This is JavaScript</h1>');
</script>";
var Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderingOptions.EnableJavaScript = true;
Renderer.RenderingOptions.RenderDelay = 100;
using var pdfdoc = Renderer.RenderHtmlAsPdf(htmlWithJs);
pdfdoc.SaveAs("js.pdf");
// PM> Install-Package IronPdf
using IronPdf;
var htmlWithJs = @"
<h1>This is HTML</h1>
<script>
document.write('<h1>This is JavaScript</h1>');
</script>";
var Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderingOptions.EnableJavaScript = true;
Renderer.RenderingOptions.RenderDelay = 100;
using var pdfdoc = Renderer.RenderHtmlAsPdf(htmlWithJs);
pdfdoc.SaveAs("js.pdf");
' PM> Install-Package IronPdf
Imports IronPdf
Private htmlWithJs = "
<h1>This is HTML</h1>
<script>
document.write('<h1>This is JavaScript</h1>');
</script>"
Private Renderer = New IronPdf.ChromePdfRenderer()
Renderer.RenderingOptions.EnableJavaScript = True
Renderer.RenderingOptions.RenderDelay = 100
Dim pdfdoc = Renderer.RenderHtmlAsPdf(htmlWithJs)
pdfdoc.SaveAs("js.pdf")
对于使用 Angular 动态加载内容的网页,IronPDF 可以为异步内容加载留出时间。
在下面的示例中,程序将等待半秒后再完整呈现网页。
// PM> Install-Package IronPdf
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderingOptions.EnableJavaScript = true;
Renderer.RenderingOptions.RenderDelay = 500;
using var pdfdoc = Renderer.RenderUrlAsPdf("https://angular.io/");
pdfdoc.SaveAs("angular.pdf");
// PM> Install-Package IronPdf
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderingOptions.EnableJavaScript = true;
Renderer.RenderingOptions.RenderDelay = 500;
using var pdfdoc = Renderer.RenderUrlAsPdf("https://angular.io/");
pdfdoc.SaveAs("angular.pdf");
' PM> Install-Package IronPdf
Imports IronPdf
Private Renderer = New IronPdf.ChromePdfRenderer()
Renderer.RenderingOptions.EnableJavaScript = True
Renderer.RenderingOptions.RenderDelay = 500
Dim pdfdoc = Renderer.RenderUrlAsPdf("https://angular.io/")
pdfdoc.SaveAs("angular.pdf")
PDF 文件是存储数据、保持文件布局以及保存字体和图形的绝佳工具。在家办公已成为当今世界的一种常态。填写和签署文件、递送文件和处理文件只是企业必须完成的几项日常任务。现在,用 PDF 签名代替实体签名已成为一项重要活动。随着企业寻求签署协议和合同以及在线交换 PDF 文档的新方法,数字签名变得越来越重要。
使用 GroupDocs.Signature for .NET API 在 C#、ASP.NET 和其他基于 .NET 的技术中构建应用程序,使用户无需安装任何其他第三方软件即可签署数字商业文档。该电子签名库易于使用。.NET开发人员可以将广泛的数字签名功能集成到他们的应用程序中,允许用户从各种文档类型中进行签名、执行搜索操作和验证电子签名。
GroupDocs.Signature 支持 PDF、Word、Excel、PowerPoint、OpenDocument、图像和其他行业标准文件格式。它可以使用文本、图像、条形码、QR 码、表单字段、印章和元数据作为签名类型。
using (Signature signature = new Signature("D:\\sample.pdf"))
{
TextSignOptions options = new TextSignOptions("John Smith")
{
// set Text color
ForeColor = Color.Red
};
// sign document to file
signature.Sign("D:\\signed.pdf", options);
}
using (Signature signature = new Signature("D:\\sample.pdf"))
{
TextSignOptions options = new TextSignOptions("John Smith")
{
// set Text color
ForeColor = Color.Red
};
// sign document to file
signature.Sign("D:\\signed.pdf", options);
}
Using signature As New Signature("D:\sample.pdf")
Dim options As New TextSignOptions("John Smith") With {.ForeColor = Color.Red}
' sign document to file
signature.Sign("D:\signed.pdf", options)
End Using
IronPDF 是在台式电脑上进行所有基于 C# 的 PDF 活动的绝佳选择。开发人员可以用它来添加签名、填写和签署 PDF 文档、加密 PDF 表单,甚至添加签名图像。
开发人员经常询问如何利用 IronPDF 和 C# 以编程方式为 PDF 添加签名。这对开发人员来说有多种含义:
第一种方法是在已存在的 PDF 页面上加盖签名 PNG 图章。它可用作签名或公司印章。只需几行代码即可完成该程序。
// open an existing PDF document or create a new one
PdfDocument Pdf = PdfDocument.FromFile(@"C:\Path\To\ASPX to PDF.pdf");
var SignatureStamp = new HtmlStamp() { Html = "<img src='signature.png' />", Width = 150, Height = 50, Bottom = 300, Left=85, ZIndex = HtmlStamp.StampLayer.OnTopOfExistingPDFContent };
Pdf.StampHTML(SignatureStamp,1);
Pdf.SaveAs(@"C:\Path\To\ASPX to PDF.pdf");
// open an existing PDF document or create a new one
PdfDocument Pdf = PdfDocument.FromFile(@"C:\Path\To\ASPX to PDF.pdf");
var SignatureStamp = new HtmlStamp() { Html = "<img src='signature.png' />", Width = 150, Height = 50, Bottom = 300, Left=85, ZIndex = HtmlStamp.StampLayer.OnTopOfExistingPDFContent };
Pdf.StampHTML(SignatureStamp,1);
Pdf.SaveAs(@"C:\Path\To\ASPX to PDF.pdf");
' open an existing PDF document or create a new one
Dim Pdf As PdfDocument = PdfDocument.FromFile("C:\Path\To\ASPX to PDF.pdf")
Dim SignatureStamp = New HtmlStamp() With {
.Html = "<img src='signature.png' />",
.Width = 150,
.Height = 50,
.Bottom = 300,
.Left=85,
.ZIndex = HtmlStamp.StampLayer.OnTopOfExistingPDFContent
}
Pdf.StampHTML(SignatureStamp,1)
Pdf.SaveAs("C:\Path\To\ASPX to PDF.pdf")
以下代码使用 .pfx 和 .p12 X509Certificate2 数字证书对 PDF 文件进行加密签名。
// 123456 below represents the signature password
new IronPdf.PdfSignature("CertificateFile.p12", "123456").SignPdfFile("ASPX to PDF.pdf");
// 123456 below represents the signature password
new IronPdf.PdfSignature("CertificateFile.p12", "123456").SignPdfFile("ASPX to PDF.pdf");
' 123456 below represents the signature password
Call (New IronPdf.PdfSignature("CertificateFile.p12", "123456")).SignPdfFile("ASPX to PDF.pdf")
下面这个更复杂的例子使用了 X509Certificate2 数字身份证签名方法和手写签名扫描件。
var Signature = new IronPdf.PdfSignature("Iron.pfx", "123456");
PdfDocument doc = Renderer.RenderHtmlAsPdf("<h1>Testing 2048 bit digital securi-ty</h1>");
// Step 3. Optional signing options and a handwritten Signature graphic
Signature.SigningContact = "support@ironsoftware.com";
Signature.SigningLocation = "Chicago, USA";
Signature.SigningReason = "To show how to sign a PDF";
Signature.LoadSignatureImageFromFile("handwriting.png");
doc.SignPdfWithDigitalSignature(Signature);
doc.SaveAs("ASPX to PDF.pdf");
var Signature = new IronPdf.PdfSignature("Iron.pfx", "123456");
PdfDocument doc = Renderer.RenderHtmlAsPdf("<h1>Testing 2048 bit digital securi-ty</h1>");
// Step 3. Optional signing options and a handwritten Signature graphic
Signature.SigningContact = "support@ironsoftware.com";
Signature.SigningLocation = "Chicago, USA";
Signature.SigningReason = "To show how to sign a PDF";
Signature.LoadSignatureImageFromFile("handwriting.png");
doc.SignPdfWithDigitalSignature(Signature);
doc.SaveAs("ASPX to PDF.pdf");
Dim Signature = New IronPdf.PdfSignature("Iron.pfx", "123456")
Dim doc As PdfDocument = Renderer.RenderHtmlAsPdf("<h1>Testing 2048 bit digital securi-ty</h1>")
' Step 3. Optional signing options and a handwritten Signature graphic
Signature.SigningContact = "support@ironsoftware.com"
Signature.SigningLocation = "Chicago, USA"
Signature.SigningReason = "To show how to sign a PDF"
Signature.LoadSignatureImageFromFile("handwriting.png")
doc.SignPdfWithDigitalSignature(Signature)
doc.SaveAs("ASPX to PDF.pdf")
当需要将多个 PDF 文件合并为一个文档或提供更少的附件时,GroupDocs.Merger 允许开发人员合并 PDF 文件。GroupDocs.Merger 无需使用第三方软件或进行任何手工操作即可实现这一目标。
GroupDocs.Merger 可合并任何大小和结构的 PDF 文档。API 将保留所有文本、照片、表格、图形、表单和其他内容的原始大小和格式。
通过几行 C# 代码,下面的示例展示了如何合并 PDF 文件:
Merger
实例,并提供 PDF 源文件的路径作为构造函数参数。您可以根据需要指定绝对或相对文件路径。Join
方法将文档合并到一起。对要整合的其他 PDF 文档重复上述步骤。Save
方法保存生成的 PDF 文档。// Load the source PDF file
using (Merger merger = new Merger(@"c:\sample1.pdf"))
{
// Add another PDF file to merge
merger.Join(@"c:\sample2.pdf");
// Merge PDF files and save result
merger.Save(@"c:\merged.pdf");
}
// Load the source PDF file
using (Merger merger = new Merger(@"c:\sample1.pdf"))
{
// Add another PDF file to merge
merger.Join(@"c:\sample2.pdf");
// Merge PDF files and save result
merger.Save(@"c:\merged.pdf");
}
' Load the source PDF file
Using merger As New Merger("c:\sample1.pdf")
' Add another PDF file to merge
merger.Join("c:\sample2.pdf")
' Merge PDF files and save result
merger.Save("c:\merged.pdf")
End Using
使用 "IronPdf.PdfDocument.Merge",IronPDF可以在C#.NET中轻松合并两个或多个PDF文档。
// PM> Install-Package IronPdf
using IronPdf;
var html_a = @"<p> [PDF_A] </p>
<p> [PDF_A] 1st Page </p>
<div style = 'page-break-after: always;' ></div>
<p> [PDF_A] 2nd Page</p>";
var html_b = @"<p> [PDF_B] </p>
<p> [PDF_B] 1st Page </p>
<div style = 'page-break-after: always;' ></div>
<p> [PDF_B] 2nd Page</p>";
var Renderer = new IronPdf.ChromePdfRenderer();
using var pdfdoc_a = Renderer.RenderHtmlAsPdf(html_a);
using var pdfdoc_b = Renderer.RenderHtmlAsPdf(html_b);
using var merged = IronPdf.PdfDocument.Merge(pdfdoc_a, pdfdoc_b);
merged.SaveAs("Merged.pdf");
// PM> Install-Package IronPdf
using IronPdf;
var html_a = @"<p> [PDF_A] </p>
<p> [PDF_A] 1st Page </p>
<div style = 'page-break-after: always;' ></div>
<p> [PDF_A] 2nd Page</p>";
var html_b = @"<p> [PDF_B] </p>
<p> [PDF_B] 1st Page </p>
<div style = 'page-break-after: always;' ></div>
<p> [PDF_B] 2nd Page</p>";
var Renderer = new IronPdf.ChromePdfRenderer();
using var pdfdoc_a = Renderer.RenderHtmlAsPdf(html_a);
using var pdfdoc_b = Renderer.RenderHtmlAsPdf(html_b);
using var merged = IronPdf.PdfDocument.Merge(pdfdoc_a, pdfdoc_b);
merged.SaveAs("Merged.pdf");
' PM> Install-Package IronPdf
Imports IronPdf
Private html_a = "<p> [PDF_A] </p>
<p> [PDF_A] 1st Page </p>
<div style = 'page-break-after: always;' ></div>
<p> [PDF_A] 2nd Page</p>"
Private html_b = "<p> [PDF_B] </p>
<p> [PDF_B] 1st Page </p>
<div style = 'page-break-after: always;' ></div>
<p> [PDF_B] 2nd Page</p>"
Private Renderer = New IronPdf.ChromePdfRenderer()
Private pdfdoc_a = Renderer.RenderHtmlAsPdf(html_a)
Private pdfdoc_b = Renderer.RenderHtmlAsPdf(html_b)
Private merged = IronPdf.PdfDocument.Merge(pdfdoc_a, pdfdoc_b)
merged.SaveAs("Merged.pdf")
IronPDF 可以通过提取单页或页面范围到新的 IronPdf.PdfDocument
对象来分割 PDF 文档。IronPdf.PdfDocument.CopyPage "可以从一个或多个PDF文件中提取页面并粘贴到一个新的文档中。
// PM> Install-Package IronPdf
using IronPdf;
var html = @"<p> Hello Iron </p>
<p> This is 1st Page </p>
<div style = 'page-break-after: always;' ></div>
<p> This is 2nd Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 3rd Page</p>";
var Renderer = new IronPdf.ChromePdfRenderer();
using var pdfdoc = Renderer.RenderHtmlAsPdf(html);
using var pdfdoc_page1 = pdfdoc.CopyPage(0);
pdfdoc_page1.SaveAs("Spli1.pdf");
using var pdfdoc_page2_3 = pdfdoc.CopyPages(1, 2);
pdfdoc_page2_3.SaveAs("Spli2.pdf");
//take the pages 2 & 3
// PM> Install-Package IronPdf
using IronPdf;
var html = @"<p> Hello Iron </p>
<p> This is 1st Page </p>
<div style = 'page-break-after: always;' ></div>
<p> This is 2nd Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 3rd Page</p>";
var Renderer = new IronPdf.ChromePdfRenderer();
using var pdfdoc = Renderer.RenderHtmlAsPdf(html);
using var pdfdoc_page1 = pdfdoc.CopyPage(0);
pdfdoc_page1.SaveAs("Spli1.pdf");
using var pdfdoc_page2_3 = pdfdoc.CopyPages(1, 2);
pdfdoc_page2_3.SaveAs("Spli2.pdf");
//take the pages 2 & 3
' PM> Install-Package IronPdf
Imports IronPdf
Private html = "<p> Hello Iron </p>
<p> This is 1st Page </p>
<div style = 'page-break-after: always;' ></div>
<p> This is 2nd Page</p>
<div style = 'page-break-after: always;' ></div>
<p> This is 3rd Page</p>"
Private Renderer = New IronPdf.ChromePdfRenderer()
Private pdfdoc = Renderer.RenderHtmlAsPdf(html)
Private pdfdoc_page1 = pdfdoc.CopyPage(0)
pdfdoc_page1.SaveAs("Spli1.pdf")
Dim pdfdoc_page2_3 = pdfdoc.CopyPages(1, 2)
pdfdoc_page2_3.SaveAs("Spli2.pdf")
'take the pages 2 & 3
GroupDocs.Merger 可将源文件分割成多个结果文件。通过指定页码数组、起始/结束页码和不同的分割选项模式,可对文档进行不同的分割。以下是可能的使用案例:
1.指定了页码数组,分割模式设置为 SplitMode.Pages
--- 页码表示存储在单独一页文档中的准确页码。
例如:数组{ 3, 6, 8 } 将生成 3 份文件,分别为第 3 页、第 6 页和第 8 页。
2.指定页码数组,并将分割模式设置为 "SplitMode.Interval"--给定的页码表示保存在独立多页文档中的页面间隔的边界。
例:数组{ 3, 6, 8 } 将产生 1-2、3-5、6-7、8-10 共 4 页的间隔。
还可以设置 ParameterRangeMode
选项,从所需的页面范围中只获取偶数或奇数页面。
按精确页码将文档分割成多个单页文档
string filePath = @"c:\sample.docx";
string filePathOut = @"c:\output\document_{0}.{1}";
SplitOptions splitOptions = new SplitOptions(filePathOut, new int [] { 3, 6, 8 });
using (Merger merger = new Merger(filePath))
{
merger.Split(splitOptions);
}
string filePath = @"c:\sample.docx";
string filePathOut = @"c:\output\document_{0}.{1}";
SplitOptions splitOptions = new SplitOptions(filePathOut, new int [] { 3, 6, 8 });
using (Merger merger = new Merger(filePath))
{
merger.Split(splitOptions);
}
Dim filePath As String = "c:\sample.docx"
Dim filePathOut As String = "c:\output\document_{0}.{1}"
Dim splitOptions As New SplitOptions(filePathOut, New Integer () { 3, 6, 8 })
Using merger As New Merger(filePath)
merger.Split(splitOptions)
End Using
按起始/结束页码将文件拆分成若干单页文件
string filePath = @"c:\sample.docx";
string filePathOut = @"c:\output\document_{0}.{1}";
SplitOptions splitOptions = new SplitOptions(filePathOut, 3, 7);
using (Merger merger = new Merger(filePath))
{
merger.Split(splitOptions);
}
string filePath = @"c:\sample.docx";
string filePathOut = @"c:\output\document_{0}.{1}";
SplitOptions splitOptions = new SplitOptions(filePathOut, 3, 7);
using (Merger merger = new Merger(filePath))
{
merger.Split(splitOptions);
}
Dim filePath As String = "c:\sample.docx"
Dim filePathOut As String = "c:\output\document_{0}.{1}"
Dim splitOptions As New SplitOptions(filePathOut, 3, 7)
Using merger As New Merger(filePath)
merger.Split(splitOptions)
End Using
按开始/结束页码和偶数/多数筛选器将文件拆分成若干单页文件
string filePath = @"c:\sample.docx";
string filePathOut = @"c:\output\document_{0}.{1}";
SplitOptions splitOptions = new SplitOptions(filePathOut, 3, 7, RangeMode.OddPages);
using (Merger merger = new Merger(filePath))
{
merger.Split(splitOptions);
}
string filePath = @"c:\sample.docx";
string filePathOut = @"c:\output\document_{0}.{1}";
SplitOptions splitOptions = new SplitOptions(filePathOut, 3, 7, RangeMode.OddPages);
using (Merger merger = new Merger(filePath))
{
merger.Split(splitOptions);
}
Dim filePath As String = "c:\sample.docx"
Dim filePathOut As String = "c:\output\document_{0}.{1}"
Dim splitOptions As New SplitOptions(filePathOut, 3, 7, RangeMode.OddPages)
Using merger As New Merger(filePath)
merger.Split(splitOptions)
End Using
将文件分割成多个多页文件
string filePath = @"c:\sample.docx";
string filePathOut = @"c:\output\document_{0}.{1}";
SplitOptions splitOptions = new SplitOptions(filePathOut, new int [] { 3, 6, 8 }, Split-Mode.Interval);
using (Merger merger = new Merger(filePath))
{
merger.Split(splitOptions);
}
string filePath = @"c:\sample.docx";
string filePathOut = @"c:\output\document_{0}.{1}";
SplitOptions splitOptions = new SplitOptions(filePathOut, new int [] { 3, 6, 8 }, Split-Mode.Interval);
using (Merger merger = new Merger(filePath))
{
merger.Split(splitOptions);
}
Dim filePath As String = "c:\sample.docx"
Dim filePathOut As String = "c:\output\document_{0}.{1}"
Dim splitOptions As New SplitOptions(filePathOut, New Integer () { 3, 6, 8 }, Split-Mode.Interval)
Using merger As New Merger(filePath)
merger.Split(splitOptions)
End Using
开发人员可以使用 GroupDocs 的 .NET 和 Java GroupDocs 可通过 API 在其网络、移动或桌面应用程序中添加显示、注释、转换、电子签名、比较和组装文档的功能。GroupDocs 授予您使用其服务的非独占、不可再许可、不可转让的许可。
该系列单个产品的起价为 1999 美元。
IronPDF 是一个免费的 C# PDF 库。用于开发是免费的。对于商业用途,可通过以下方式安排为期 30 天的部署试用 联系工程团队.
IronPDF 提供简单明了的定价许可证起价为 $749,并提供大量自定义选项。
IronPDF 不会从远程服务器将 HTML 转换为 PDF。相反,它使用的是符合标准的内部网络浏览器引擎 (无需安装任何其他软件).HTML 将以符合最高商业印刷标准的格式完美再现。最终生成清晰、高质量的 PDF 文件。
另一方面,GroupDocs.Total 产品系列可以处理 90 多种流行的文件格式。它可以进行文档查看、文档注释、文档比较、文档转换、文档操作和文档自动化。此外,用户还可以使用桌面解决方案的在线文档查看器查看文档。
与 GroupDocs 相比,IronPDF 的优势在于首次安装后无需下载任何其他文件,这不仅节省了时间,还能确保快速达到预期效果。只需下载一次,IronPDF 就能提供所有必要的功能。不过,PDFTron 包含的模块必须单独下载,然后才能组装成完整的软件包。下载特定模块可增加更多功能。
IronPDF 为您提供了简短的代码行,您可以使用这些代码行快速完成 PDF 操作任务。
更重要的是,IronPDF 的授权非常简单,所有信息在网站上都一目了然,因此比竞争对手更具优势。目前的优惠活动允许您以购买两套产品的价格获得五套 Iron Software 产品。