產品比較 IronPDF與GrapeCity PDF Viewer的比較 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 PDF 代表可攜式文件格式。 這是一種檔案類型,可讓任何文件在不同設備上進行常規檢視。 PDF 通常用來與潛在的雇主分享重要文件,如簡歷,或與客戶共享帳單。 儘管其受歡迎程度廣泛,但使用 PDF 保存和共享數據也存在一些缺點。 例如,PDF 無法通過電子郵件共享,因為它們需要先在 PDF 閱讀器中開啟。即使可以,PDF 在手機上開啟時看起來不會像 Word 文檔那麼清晰。 此外,PDF 無法像 Word 文檔一樣被編輯或更新,除非您在計算機上安裝了可以識別文件中的數據並將其轉回可編輯形式的編輯軟件。 這意味著無論是在 PC 還是 Mac 上,PDF 文件在打開時看起來都一樣。 由於這些標準不會在如 JPEG 或 GIF 等其他文件格式中實現,因此使得 PDF 文件在所有設備上具有可靠性。 在本文中,我們將回顧兩個 .NET PDF 庫: IronPDF GrapeCity PDF IronPDF IronPDF 是一個 .NET 庫,它提供了用於創建、讀取和操作 PDF 文檔的構建函數,只需幾行代碼即可實現。 接下來的文章將展示如何使用 IronPDF 創建 PDF 文件。 這些內容基於您已了解 Visual Studio 或 C# 的基礎知識,並擁有 HTML 的工作知識。 我們需要 Visual Studio 用於編寫、編譯和運行應用程式,C# 用於編寫邏輯和代碼,HTML 用於格式化 PDF 文件,包括添加標題、圖片、段落等。IronPDF 庫完全支援 .NET Core、.NET 5、Framework 和 Standard。 只需幾行代碼即可在 C# 中創建 PDF 文件。 若具備 C# 和 HTML 的基本知識,這是一項簡單的任務。 通過訪問他們的 IronPDF 功能官網了解更多。 安裝 IronPDF 開發解決方案需要安裝 IronPDF 的 NuGet 包。 直接從菜單欄點擊"項目"。 會出現一個下拉列表。 從下拉選單中選擇"管理 NuGet 包"並選擇它。 將顯示如下窗口: class="content-img-align-center"> class="content__image-caption"> 選擇“瀏覽”選項卡,接下來會出現如下窗口: class="content-img-align-center"> class="content__image-caption"> 在搜索框中輸入'IronPdf'然後按"Enter"鍵。結果窗口應該會出現: class="content-img-align-center"> class="content__image-caption"> 選擇 IronPDF: class="content-img-align-center"> class="content__image-caption">如何按 Ironpdfile 在 C# 中創建 PDF 文件 選擇“安裝”按鈕。 成功安裝後會出現的窗口: class="content-img-align-center"> class="content__image-caption"> 一旦您按下"確定"按鈕,您就可以開始了。 創建 PDF 在文件頂部添加 IronPdf 命名空間。 using IronPdf; using IronPdf; Imports IronPdf $vbLabelText $csharpLabel 實際的工作從這一點開始。 我們需要一個文件路徑來存儲構建的 PDF 文件。 為此,我們使用 SaveFileDialog 提示用戶選擇文件名和文件路徑。 private void Save_Click(object sender, EventArgs e) { // Code to Select the folder and save the file. SaveFileDialog saveFileDialog1 = new SaveFileDialog(); saveFileDialog1.InitialDirectory = @"D:\"; saveFileDialog1.Title = "Save Pdf File"; saveFileDialog1.DefaultExt = "pdf"; saveFileDialog1.Filter = "Pdf files (*.pdf)|*.pdf|All files (*.*)|*.*"; saveFileDialog1.FilterIndex = 2; saveFileDialog1.RestoreDirectory = true; if (saveFileDialog1.ShowDialog() == DialogResult.OK) { string filename = saveFileDialog1.FileName; // actual code that will create Pdf files var HtmlLine = new HtmlToPdf(); HtmlLine.RenderHtmlAsPdf(PdfText.Text).SaveAs(filename); // MessageBox to display that file save MessageBox.Show("File Saved Successfully!"); } } private void Save_Click(object sender, EventArgs e) { // Code to Select the folder and save the file. SaveFileDialog saveFileDialog1 = new SaveFileDialog(); saveFileDialog1.InitialDirectory = @"D:\"; saveFileDialog1.Title = "Save Pdf File"; saveFileDialog1.DefaultExt = "pdf"; saveFileDialog1.Filter = "Pdf files (*.pdf)|*.pdf|All files (*.*)|*.*"; saveFileDialog1.FilterIndex = 2; saveFileDialog1.RestoreDirectory = true; if (saveFileDialog1.ShowDialog() == DialogResult.OK) { string filename = saveFileDialog1.FileName; // actual code that will create Pdf files var HtmlLine = new HtmlToPdf(); HtmlLine.RenderHtmlAsPdf(PdfText.Text).SaveAs(filename); // MessageBox to display that file save MessageBox.Show("File Saved Successfully!"); } } Private Sub Save_Click(ByVal sender As Object, ByVal e As EventArgs) ' Code to Select the folder and save the file. Dim saveFileDialog1 As New SaveFileDialog() saveFileDialog1.InitialDirectory = "D:\" saveFileDialog1.Title = "Save Pdf File" saveFileDialog1.DefaultExt = "pdf" saveFileDialog1.Filter = "Pdf files (*.pdf)|*.pdf|All files (*.*)|*.*" saveFileDialog1.FilterIndex = 2 saveFileDialog1.RestoreDirectory = True If saveFileDialog1.ShowDialog() = DialogResult.OK Then Dim filename As String = saveFileDialog1.FileName ' actual code that will create Pdf files Dim HtmlLine = New HtmlToPdf() HtmlLine.RenderHtmlAsPdf(PdfText.Text).SaveAs(filename) ' MessageBox to display that file save MessageBox.Show("File Saved Successfully!") End If End Sub $vbLabelText $csharpLabel SaveFileDialog 應打開一個文件對話框,允許您選擇想要構建 PDF 文檔的文件夾和文件名。 初始目錄設置為 D 盤,但您可以選擇設置為任何目錄。 由於我們僅處理 PDF 文件,因此默認擴展設置為 PDF 文件。 在"if"條件中插入會創建 PDF 文件的實際代碼。 現在我們可以看到只用兩行代碼就成功生成了一個 PDF 文件。 PdfText 是一個包含要寫入 PDF 文件的文本的富文本框的名稱。 文件名是通過 SaveFileDialog 方法選擇的文件路徑和名稱。 閱讀 PDF 您可能會認為閱讀 PDF 文件的代碼會很複雜且難以編寫/理解,但不用擔心,IronPDF 使其更容易和簡單。 這個過程只需兩行代碼即可實現! 在文件頂部添加以下代碼以匯入 IronPdf 庫。 using IronPdf; using System; using System.Windows.Forms; using IronPdf; using System; using System.Windows.Forms; Imports IronPdf Imports System Imports System.Windows.Forms $vbLabelText $csharpLabel 在函數內寫下以下代碼。 private void Read_Click(object sender, EventArgs e) { PdfDocument PDF = PdfDocument.FromFile(FilePath.Text); FileContent.Text = PDF.ExtractAllText(); } private void Read_Click(object sender, EventArgs e) { PdfDocument PDF = PdfDocument.FromFile(FilePath.Text); FileContent.Text = PDF.ExtractAllText(); } Private Sub Read_Click(ByVal sender As Object, ByVal e As EventArgs) Dim PDF As PdfDocument = PdfDocument.FromFile(FilePath.Text) FileContent.Text = PDF.ExtractAllText() End Sub $vbLabelText $csharpLabel 這會將所有信息從數據源中提取到文件查看器中。 報告組件會使用該數據作為數據源。 GrapeCity PDF 特點 GrapeCity Documents 是一個跨平台的文件管理系統,可為所有常見文件格式提供通用文件、編輯器和閱讀解決方案。 不需要像 Adobe Acrobat 這樣的附加程序,用 .NET Standard 2.0 提供的豐富庫可以用來讀取、生成、更改和保存 PDF 文件。 它具有強大的功能集,讓開發人員可以構建包含高級字體支持、圖片、圖形、條形碼、註釋、大綱、印章、水印等的 PDF 文件。 操作 PDF 在 .NET Standard 應用程式中,您可以使用 GrapeCityPDF 根據基本或複雜的業務需求生成 PDF 文檔。 此外,您還可以從任何來源加載、修改和保存 PDF。 將 PDF 保存為圖像 您可以使用 GrapeCityPDF 將 PDF 保存為圖像而不犧牲圖像質量。 此外,您可以只用幾行代碼來實現此功能。 PDF 查看器 GrapeCity Documents PDF Viewer 是一個輕量級的以程式為基礎的客戶端查看器,用於查看 PDF 文件。 支持許多常見的 PDF 功能。 豐富的功能 GrapeCityPDF 庫具有多種功能,讓您能夠創建包含信息如文本、圖形、圖片、註釋、大綱等的複雜 PDF 文件。 安裝方法 安裝 GrapeCity 有兩種方法。 選擇 下載壓縮源文件 按鈕以下載當前樣本源文件。 直接從下載的 zip 文件中提取文件到計算機目錄中。 導航到該目錄。 執行 run.cmd 批處理文件。這將構建樣本源文件。 啟動 SupportApi 服務並在您的默認瀏覽器中打開 http://localhost:3003 URL。 有關更多信息,請參閱下載 zip 中包含的 readme.MD。 安裝 WinForms 版 以下主題闡述了安裝 WinForms 版的方法。 以下步驟提供了安裝 WinForms 版的說明: Download the C1ControlPanel from GrapeCity's ComponentOne to install the latest edition of WinForms. 使用 ComponentOneC1ControlPanel.exe 打開 ControlPanel。 任何正在運行的 Visual Studio 實例必須關閉。 現有的用戶可以使用已註冊的電子郵箱和密碼登錄。 如果您是新用戶: 使用 Component One 註冊並通過填寫必要信息創建一個帳戶。 驗證信息會發送到您的電子郵箱地址。 通過訪問驗證鏈接激活您的電子郵箱地址。 如果您不想登錄或註冊,您可以選擇匿名用戶身分繼續。 在 WinForms 版塊中選擇 安裝。 通過選擇所有版本旁邊的複選框可以安裝所有版本。 選擇 查看更多 按鈕以了解更多有關版本的信息。 class="content-img-align-center"> class="content__image-caption"> 點擊安裝後,頁面會顯示用戶協議,請在點擊 接受許可協議 按鈕前查看。 一旦您接受許可協議,則會出現顯示設置和修改目錄路徑按鈕的後續頁面。 選擇 接受設置 提示以確認目錄路徑並開始安裝過程。 class="content-img-align-center"> class="content__image-caption"> 安裝程序會安裝控件並在安裝過程中顯示其進度。 在此屏幕顯示時,您將無法取消安裝過程。 安裝控件後,將顯示“安裝成功”屏幕。 當前安裝的版本將顯示在相應的版本中。 安裝程序會安裝控件並在安裝過程中顯示其進度。 在此屏幕顯示時,您將無法取消安裝過程。 class="content-img-align-center"> class="content__image-caption"> 安裝控件後,將顯示“安裝成功”屏幕。 當前安裝的版本將顯示在相應的版本中。 class="content-img-align-center"> class="content__image-caption"> 創建 PDF using System; using System.IO; using System.Drawing; using System.Text; using GrapeCity.Documents.Text; using GrapeCity.Documents.Common; using GrapeCity.Documents.Drawing; using GrapeCity.Documents.Pdf; using GrapeCity.Documents.Pdf.Structure; using GrapeCity.Documents.Pdf.MarkedContent; using GrapeCity.Documents.Pdf.Graphics; using GrapeCity.Documents.Pdf.Annotations; using GCTEXT = GrapeCity.Documents.Text; using GCDRAW = GrapeCity.Documents.Drawing; namespace GcPdfWeb.Samples.Basics { // This sample shows how to create a PDF/A-3u compliant document. public class PdfA { public void CreatePDF(Stream stream) { var doc = new GcPdfDocument(); var date = new DateTime(1961, 4, 12, 6, 7, 0, DateTimeKind.Utc); // Mark the document as PDF/A-3u conformant: doc.ConformanceLevel = PdfAConformanceLevel.PdfA3u; var fnt = GCTEXT.Font.FromFile(Path.Combine("Resources", "Fonts", "arial.ttf")); var gap = 36; // PDF/A-3a requires all content to be tagged so create and populate StructElement when rendering: StructElement sePart = new StructElement("Part"); doc.StructTreeRoot.Children.Add(sePart); TextLayout tl = null; // Add 3 pages with sample content tagged according to PDF/A rules: for (int pageNo = 1; pageNo <= 3; ++pageNo) { // add page var page = doc.Pages.Add(); var g = page.Graphics; float y = 72; if (doc.Pages.Count == 1) { // Create paragraph element: var seParagraph = new StructElement("P") { DefaultPage = page }; // Add it to Part element: sePart.Children.Add(seParagraph); tl = g.CreateTextLayout(); tl.MarginAll = 72; tl.MaxWidth = page.Size.Width; tl.DefaultFormat.Font = fnt; tl.DefaultFormat.FontBold = true; tl.DefaultFormat.FontSize = 20; tl.Append("PDF/A-3A Document"); // PerformLayout is done automatically in a new TextLayout or after a Clear(): //tl.PerformLayout(true); // Draw TextLayout within tagged content: g.BeginMarkedContent(new TagMcid("P", 0)); g.DrawTextLayout(tl, PointF.Empty); g.EndMarkedContent(); y = tl.ContentRectangle.Bottom + gap; seParagraph.ContentItems.Add(new McidContentItemLink(0)); } // Add some sample paragraphs tagged according to PDF/A rules: for (int i = 1; i <= 3; ++i) { // Create paragraph element: var seParagraph = new StructElement("P") { DefaultPage = page }; // Add it to Part element: sePart.Children.Add(seParagraph); var sb = new StringBuilder(); sb.Append(string.Format("Paragraph {0} on page {1}: ", i, pageNo)); sb.Append(Common.Util.LoremIpsum(1, 2, 4, 5, 10)); var para = sb.ToString(); tl.Clear(); tl.DefaultFormat.FontSize = 14; tl.DefaultFormat.FontBold = false; tl.MarginTop = y; tl.Append(para); // Draw TextLayout within tagged content: g.BeginMarkedContent(new TagMcid("P", i)); g.DrawTextLayout(tl, PointF.Empty); g.EndMarkedContent(); y += tl.ContentHeight + gap; // Add content item to paragraph StructElement: seParagraph.ContentItems.Add(new McidContentItemLink(i)); // PDF/A-3 allows embedding files into document, but they should be associated with some document element // add embedded file associated with seParagraph: var ef1 = EmbeddedFileStream.FromBytes(doc, Encoding.UTF8.GetBytes(para)); // ModificationDate and MimeType should be specified in case of PDF/A: ef1.ModificationDate = date; ef1.MimeType = "text/plain"; var fn = string.Format("Page{0}_Paragraph{1}.txt", pageNo, i); var fs1 = FileSpecification.FromEmbeddedStream(fn, ef1); // UnicodeFile.FileName should be specified for PDF/A compliance: fs1.UnicodeFile.FileName = fs1.File.FileName; // Relationship should be specified in case of PDF/A: fs1.Relationship = AFRelationship.Unspecified; doc.EmbeddedFiles.Add(fn, fs1); seParagraph.AssociatedFiles.Add(fs1); } } // PDF/A-3 allows transparency drawing in PDF file, add some: var gpage = doc.Pages [0].Graphics; gpage.FillRectangle(new RectangleF(20, 20, 200, 200), Color.FromArgb(40, Color.Red)); // PDF/A-3 allows using FormXObjects, add one with transparency: var r = new RectangleF(0, 0, 144, 72); var fxo = new FormXObject(doc, r); var gfxo = fxo.Graphics; gfxo.FillRectangle(r, Color.FromArgb(40, Color.Violet)); TextFormat tf = new TextFormat() { Font = fnt, FontSize = 16, ForeColor = Color.FromArgb(100, Color.Black), }; gfxo.DrawString("FormXObject", tf, r, TextAlignment.Center, ParagraphAlignment.Center); gfxo.DrawRectangle(r, Color.Blue, 3); gpage.DrawForm(fxo, new RectangleF(300, 250, r.Width, r.Height), null, ImageAlign.ScaleImage); // PDF/A-3 allows using embedded files, but each embedded file must be associated with a document's element: EmbeddedFileStream ef = EmbeddedFileStream.FromFile(doc, Path.Combine("Resources", "WordDocs", "ProcurementLetter.docx")); // ModificationDate and MimeType should be specified for EmbeddedFile in PDF/A: ef.ModificationDate = date; ef.MimeType = "application/msword"; var fs = FileSpecification.FromEmbeddedFile(ef); fs.UnicodeFile.FileName = fs.File.FileName; fs.Relationship = AFRelationship.Unspecified; doc.EmbeddedFiles.Add("ProcurementLetter.docx", fs); // Associate embedded file with the document: doc.AssociatedFiles.Add(fs); // Add an attachment associated with an annotation: var sa = new StampAnnotation() { UserName = "Minerva", Font = fnt, Rect = new RectangleF(300, 36, 220, 72), }; sa.Flags |= AnnotationFlags.Print; // Use a FormXObject to represent the stamp annotation: var stampFxo = new FormXObject(doc, new RectangleF(PointF.Empty, sa.Rect.Size)); var gstampFxo = stampFxo.Graphics; gstampFxo.FillRectangle(stampFxo.Bounds, Color.FromArgb(40, Color.Green)); gstampFxo.DrawString("Stamp Annotation\nassociated with minerva.jpg", tf, stampFxo.Bounds, TextAlignment.Center, ParagraphAlignment.Center); gstampFxo.DrawRectangle(stampFxo.Bounds, Color.Green, 3); // sa.AppearanceStreams.Normal.Default = stampFxo; doc.Pages [0].Annotations.Add(sa); ef = EmbeddedFileStream.FromFile(doc, Path.Combine("Resources", "Images", "minerva.jpg")); ef.ModificationDate = date; ef.MimeType = "image/jpeg"; fs = FileSpecification.FromEmbeddedFile(ef); fs.UnicodeFile.FileName = fs.File.FileName; fs.Relationship = AFRelationship.Unspecified; doc.EmbeddedFiles.Add("minerva.jpg", fs); sa.AssociatedFiles.Add(fs); // Mark the document as conforming to Tagged PDF conventions (required for PDF/A): doc.MarkInfo.Marked = true; // Metadata.CreatorTool and DocumentInfo.Creator should be the same for a PDF/A document: doc.Metadata.CreatorTool = doc.DocumentInfo.Creator; // A title should be specified for PDF/A document: doc.Metadata.Title = "GcPdf Document"; doc.ViewerPreferences.DisplayDocTitle = true; // Done: doc.Save(stream); } } } using System; using System.IO; using System.Drawing; using System.Text; using GrapeCity.Documents.Text; using GrapeCity.Documents.Common; using GrapeCity.Documents.Drawing; using GrapeCity.Documents.Pdf; using GrapeCity.Documents.Pdf.Structure; using GrapeCity.Documents.Pdf.MarkedContent; using GrapeCity.Documents.Pdf.Graphics; using GrapeCity.Documents.Pdf.Annotations; using GCTEXT = GrapeCity.Documents.Text; using GCDRAW = GrapeCity.Documents.Drawing; namespace GcPdfWeb.Samples.Basics { // This sample shows how to create a PDF/A-3u compliant document. public class PdfA { public void CreatePDF(Stream stream) { var doc = new GcPdfDocument(); var date = new DateTime(1961, 4, 12, 6, 7, 0, DateTimeKind.Utc); // Mark the document as PDF/A-3u conformant: doc.ConformanceLevel = PdfAConformanceLevel.PdfA3u; var fnt = GCTEXT.Font.FromFile(Path.Combine("Resources", "Fonts", "arial.ttf")); var gap = 36; // PDF/A-3a requires all content to be tagged so create and populate StructElement when rendering: StructElement sePart = new StructElement("Part"); doc.StructTreeRoot.Children.Add(sePart); TextLayout tl = null; // Add 3 pages with sample content tagged according to PDF/A rules: for (int pageNo = 1; pageNo <= 3; ++pageNo) { // add page var page = doc.Pages.Add(); var g = page.Graphics; float y = 72; if (doc.Pages.Count == 1) { // Create paragraph element: var seParagraph = new StructElement("P") { DefaultPage = page }; // Add it to Part element: sePart.Children.Add(seParagraph); tl = g.CreateTextLayout(); tl.MarginAll = 72; tl.MaxWidth = page.Size.Width; tl.DefaultFormat.Font = fnt; tl.DefaultFormat.FontBold = true; tl.DefaultFormat.FontSize = 20; tl.Append("PDF/A-3A Document"); // PerformLayout is done automatically in a new TextLayout or after a Clear(): //tl.PerformLayout(true); // Draw TextLayout within tagged content: g.BeginMarkedContent(new TagMcid("P", 0)); g.DrawTextLayout(tl, PointF.Empty); g.EndMarkedContent(); y = tl.ContentRectangle.Bottom + gap; seParagraph.ContentItems.Add(new McidContentItemLink(0)); } // Add some sample paragraphs tagged according to PDF/A rules: for (int i = 1; i <= 3; ++i) { // Create paragraph element: var seParagraph = new StructElement("P") { DefaultPage = page }; // Add it to Part element: sePart.Children.Add(seParagraph); var sb = new StringBuilder(); sb.Append(string.Format("Paragraph {0} on page {1}: ", i, pageNo)); sb.Append(Common.Util.LoremIpsum(1, 2, 4, 5, 10)); var para = sb.ToString(); tl.Clear(); tl.DefaultFormat.FontSize = 14; tl.DefaultFormat.FontBold = false; tl.MarginTop = y; tl.Append(para); // Draw TextLayout within tagged content: g.BeginMarkedContent(new TagMcid("P", i)); g.DrawTextLayout(tl, PointF.Empty); g.EndMarkedContent(); y += tl.ContentHeight + gap; // Add content item to paragraph StructElement: seParagraph.ContentItems.Add(new McidContentItemLink(i)); // PDF/A-3 allows embedding files into document, but they should be associated with some document element // add embedded file associated with seParagraph: var ef1 = EmbeddedFileStream.FromBytes(doc, Encoding.UTF8.GetBytes(para)); // ModificationDate and MimeType should be specified in case of PDF/A: ef1.ModificationDate = date; ef1.MimeType = "text/plain"; var fn = string.Format("Page{0}_Paragraph{1}.txt", pageNo, i); var fs1 = FileSpecification.FromEmbeddedStream(fn, ef1); // UnicodeFile.FileName should be specified for PDF/A compliance: fs1.UnicodeFile.FileName = fs1.File.FileName; // Relationship should be specified in case of PDF/A: fs1.Relationship = AFRelationship.Unspecified; doc.EmbeddedFiles.Add(fn, fs1); seParagraph.AssociatedFiles.Add(fs1); } } // PDF/A-3 allows transparency drawing in PDF file, add some: var gpage = doc.Pages [0].Graphics; gpage.FillRectangle(new RectangleF(20, 20, 200, 200), Color.FromArgb(40, Color.Red)); // PDF/A-3 allows using FormXObjects, add one with transparency: var r = new RectangleF(0, 0, 144, 72); var fxo = new FormXObject(doc, r); var gfxo = fxo.Graphics; gfxo.FillRectangle(r, Color.FromArgb(40, Color.Violet)); TextFormat tf = new TextFormat() { Font = fnt, FontSize = 16, ForeColor = Color.FromArgb(100, Color.Black), }; gfxo.DrawString("FormXObject", tf, r, TextAlignment.Center, ParagraphAlignment.Center); gfxo.DrawRectangle(r, Color.Blue, 3); gpage.DrawForm(fxo, new RectangleF(300, 250, r.Width, r.Height), null, ImageAlign.ScaleImage); // PDF/A-3 allows using embedded files, but each embedded file must be associated with a document's element: EmbeddedFileStream ef = EmbeddedFileStream.FromFile(doc, Path.Combine("Resources", "WordDocs", "ProcurementLetter.docx")); // ModificationDate and MimeType should be specified for EmbeddedFile in PDF/A: ef.ModificationDate = date; ef.MimeType = "application/msword"; var fs = FileSpecification.FromEmbeddedFile(ef); fs.UnicodeFile.FileName = fs.File.FileName; fs.Relationship = AFRelationship.Unspecified; doc.EmbeddedFiles.Add("ProcurementLetter.docx", fs); // Associate embedded file with the document: doc.AssociatedFiles.Add(fs); // Add an attachment associated with an annotation: var sa = new StampAnnotation() { UserName = "Minerva", Font = fnt, Rect = new RectangleF(300, 36, 220, 72), }; sa.Flags |= AnnotationFlags.Print; // Use a FormXObject to represent the stamp annotation: var stampFxo = new FormXObject(doc, new RectangleF(PointF.Empty, sa.Rect.Size)); var gstampFxo = stampFxo.Graphics; gstampFxo.FillRectangle(stampFxo.Bounds, Color.FromArgb(40, Color.Green)); gstampFxo.DrawString("Stamp Annotation\nassociated with minerva.jpg", tf, stampFxo.Bounds, TextAlignment.Center, ParagraphAlignment.Center); gstampFxo.DrawRectangle(stampFxo.Bounds, Color.Green, 3); // sa.AppearanceStreams.Normal.Default = stampFxo; doc.Pages [0].Annotations.Add(sa); ef = EmbeddedFileStream.FromFile(doc, Path.Combine("Resources", "Images", "minerva.jpg")); ef.ModificationDate = date; ef.MimeType = "image/jpeg"; fs = FileSpecification.FromEmbeddedFile(ef); fs.UnicodeFile.FileName = fs.File.FileName; fs.Relationship = AFRelationship.Unspecified; doc.EmbeddedFiles.Add("minerva.jpg", fs); sa.AssociatedFiles.Add(fs); // Mark the document as conforming to Tagged PDF conventions (required for PDF/A): doc.MarkInfo.Marked = true; // Metadata.CreatorTool and DocumentInfo.Creator should be the same for a PDF/A document: doc.Metadata.CreatorTool = doc.DocumentInfo.Creator; // A title should be specified for PDF/A document: doc.Metadata.Title = "GcPdf Document"; doc.ViewerPreferences.DisplayDocTitle = true; // Done: doc.Save(stream); } } } Imports Microsoft.VisualBasic Imports System Imports System.IO Imports System.Drawing Imports System.Text Imports GrapeCity.Documents.Text Imports GrapeCity.Documents.Common Imports GrapeCity.Documents.Drawing Imports GrapeCity.Documents.Pdf Imports GrapeCity.Documents.Pdf.Structure Imports GrapeCity.Documents.Pdf.MarkedContent Imports GrapeCity.Documents.Pdf.Graphics Imports GrapeCity.Documents.Pdf.Annotations Imports GCTEXT = GrapeCity.Documents.Text Imports GCDRAW = GrapeCity.Documents.Drawing Namespace GcPdfWeb.Samples.Basics ' This sample shows how to create a PDF/A-3u compliant document. Public Class PdfA Public Sub CreatePDF(ByVal stream As Stream) Dim doc = New GcPdfDocument() Dim [date] = New DateTime(1961, 4, 12, 6, 7, 0, DateTimeKind.Utc) ' Mark the document as PDF/A-3u conformant: doc.ConformanceLevel = PdfAConformanceLevel.PdfA3u Dim fnt = GCTEXT.Font.FromFile(Path.Combine("Resources", "Fonts", "arial.ttf")) Dim gap = 36 ' PDF/A-3a requires all content to be tagged so create and populate StructElement when rendering: Dim sePart As New StructElement("Part") doc.StructTreeRoot.Children.Add(sePart) Dim tl As TextLayout = Nothing ' Add 3 pages with sample content tagged according to PDF/A rules: For pageNo As Integer = 1 To 3 ' add page Dim page = doc.Pages.Add() Dim g = page.Graphics Dim y As Single = 72 If doc.Pages.Count = 1 Then ' Create paragraph element: Dim seParagraph = New StructElement("P") With {.DefaultPage = page} ' Add it to Part element: sePart.Children.Add(seParagraph) tl = g.CreateTextLayout() tl.MarginAll = 72 tl.MaxWidth = page.Size.Width tl.DefaultFormat.Font = fnt tl.DefaultFormat.FontBold = True tl.DefaultFormat.FontSize = 20 tl.Append("PDF/A-3A Document") ' PerformLayout is done automatically in a new TextLayout or after a Clear(): 'tl.PerformLayout(true); ' Draw TextLayout within tagged content: g.BeginMarkedContent(New TagMcid("P", 0)) g.DrawTextLayout(tl, PointF.Empty) g.EndMarkedContent() y = tl.ContentRectangle.Bottom + gap seParagraph.ContentItems.Add(New McidContentItemLink(0)) End If ' Add some sample paragraphs tagged according to PDF/A rules: For i As Integer = 1 To 3 ' Create paragraph element: Dim seParagraph = New StructElement("P") With {.DefaultPage = page} ' Add it to Part element: sePart.Children.Add(seParagraph) Dim sb = New StringBuilder() sb.Append(String.Format("Paragraph {0} on page {1}: ", i, pageNo)) sb.Append(Common.Util.LoremIpsum(1, 2, 4, 5, 10)) Dim para = sb.ToString() tl.Clear() tl.DefaultFormat.FontSize = 14 tl.DefaultFormat.FontBold = False tl.MarginTop = y tl.Append(para) ' Draw TextLayout within tagged content: g.BeginMarkedContent(New TagMcid("P", i)) g.DrawTextLayout(tl, PointF.Empty) g.EndMarkedContent() y += tl.ContentHeight + gap ' Add content item to paragraph StructElement: seParagraph.ContentItems.Add(New McidContentItemLink(i)) ' PDF/A-3 allows embedding files into document, but they should be associated with some document element ' add embedded file associated with seParagraph: Dim ef1 = EmbeddedFileStream.FromBytes(doc, Encoding.UTF8.GetBytes(para)) ' ModificationDate and MimeType should be specified in case of PDF/A: ef1.ModificationDate = [date] ef1.MimeType = "text/plain" Dim fn = String.Format("Page{0}_Paragraph{1}.txt", pageNo, i) Dim fs1 = FileSpecification.FromEmbeddedStream(fn, ef1) ' UnicodeFile.FileName should be specified for PDF/A compliance: fs1.UnicodeFile.FileName = fs1.File.FileName ' Relationship should be specified in case of PDF/A: fs1.Relationship = AFRelationship.Unspecified doc.EmbeddedFiles.Add(fn, fs1) seParagraph.AssociatedFiles.Add(fs1) Next i Next pageNo ' PDF/A-3 allows transparency drawing in PDF file, add some: Dim gpage = doc.Pages (0).Graphics gpage.FillRectangle(New RectangleF(20, 20, 200, 200), Color.FromArgb(40, Color.Red)) ' PDF/A-3 allows using FormXObjects, add one with transparency: Dim r = New RectangleF(0, 0, 144, 72) Dim fxo = New FormXObject(doc, r) Dim gfxo = fxo.Graphics gfxo.FillRectangle(r, Color.FromArgb(40, Color.Violet)) Dim tf As New TextFormat() With { .Font = fnt, .FontSize = 16, .ForeColor = Color.FromArgb(100, Color.Black) } gfxo.DrawString("FormXObject", tf, r, TextAlignment.Center, ParagraphAlignment.Center) gfxo.DrawRectangle(r, Color.Blue, 3) gpage.DrawForm(fxo, New RectangleF(300, 250, r.Width, r.Height), Nothing, ImageAlign.ScaleImage) ' PDF/A-3 allows using embedded files, but each embedded file must be associated with a document's element: Dim ef As EmbeddedFileStream = EmbeddedFileStream.FromFile(doc, Path.Combine("Resources", "WordDocs", "ProcurementLetter.docx")) ' ModificationDate and MimeType should be specified for EmbeddedFile in PDF/A: ef.ModificationDate = [date] ef.MimeType = "application/msword" Dim fs = FileSpecification.FromEmbeddedFile(ef) fs.UnicodeFile.FileName = fs.File.FileName fs.Relationship = AFRelationship.Unspecified doc.EmbeddedFiles.Add("ProcurementLetter.docx", fs) ' Associate embedded file with the document: doc.AssociatedFiles.Add(fs) ' Add an attachment associated with an annotation: Dim sa = New StampAnnotation() With { .UserName = "Minerva", .Font = fnt, .Rect = New RectangleF(300, 36, 220, 72) } sa.Flags = sa.Flags Or AnnotationFlags.Print ' Use a FormXObject to represent the stamp annotation: Dim stampFxo = New FormXObject(doc, New RectangleF(PointF.Empty, sa.Rect.Size)) Dim gstampFxo = stampFxo.Graphics gstampFxo.FillRectangle(stampFxo.Bounds, Color.FromArgb(40, Color.Green)) gstampFxo.DrawString("Stamp Annotation" & vbLf & "associated with minerva.jpg", tf, stampFxo.Bounds, TextAlignment.Center, ParagraphAlignment.Center) gstampFxo.DrawRectangle(stampFxo.Bounds, Color.Green, 3) ' sa.AppearanceStreams.Normal.Default = stampFxo doc.Pages (0).Annotations.Add(sa) ef = EmbeddedFileStream.FromFile(doc, Path.Combine("Resources", "Images", "minerva.jpg")) ef.ModificationDate = [date] ef.MimeType = "image/jpeg" fs = FileSpecification.FromEmbeddedFile(ef) fs.UnicodeFile.FileName = fs.File.FileName fs.Relationship = AFRelationship.Unspecified doc.EmbeddedFiles.Add("minerva.jpg", fs) sa.AssociatedFiles.Add(fs) ' Mark the document as conforming to Tagged PDF conventions (required for PDF/A): doc.MarkInfo.Marked = True ' Metadata.CreatorTool and DocumentInfo.Creator should be the same for a PDF/A document: doc.Metadata.CreatorTool = doc.DocumentInfo.Creator ' A title should be specified for PDF/A document: doc.Metadata.Title = "GcPdf Document" doc.ViewerPreferences.DisplayDocTitle = True ' Done: doc.Save(stream) End Sub End Class End Namespace $vbLabelText $csharpLabel GrapeCityPDF 不是一個高級的 PDF 庫,與 IronPDF 相比,擁有的功能有限。 IronPDF 授權模式與定價 30 天退款保證:購買授權後,您將獲得 30 天退款保證。 如果授權不適合您的需求,IronPDF 將保證在 30 天內全額退款。 簡單整合:IronPDF 與現成的專案以及環境的整合是一個無縫的過程,只需一行代碼即可完成。 這可以通過使用 NuGet 包方法進行整合,或者可以在線直接下載並整合到您的環境中實現。 永久許可證:每授權僅需購買一次,無需續訂要求。 免費支持和產品更新:每個授權都會提供來自產品團隊的全面支持,並且還包含一年免費的產品更新。 可以隨時購買擴展。 購買前可以查看擴展。 立即授權:收到付款後,已註冊的授權密鑰將立即發送。 所有許可證均為永久存續期限,適用於開發、測試與運行環境。 Bootstrap 工作流程演示 現代 PDF 生成工作流程受益於視覺過程表現。 這個 Bootstrap 5 示例展示了 IronPDF 的能力,能夠渲染具有卡片、徽章和步驟指標的工作流程時間軸。 using IronPdf; var renderer = new ChromePdfRenderer(); string workflowTimeline = @" <!DOCTYPE html> <html> <head> <meta charset='utf-8'> <link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'> <style> .timeline-item { position: relative; padding-left: 40px; margin-bottom: 30px; } .timeline-item::before { content: ''; position: absolute; left: 0; top: 0; width: 20px; height: 20px; background: #0d6efd; border-radius: 50%; border: 3px solid white; box-shadow: 0 0 0 2px #0d6efd; } .timeline-item::after { content: ''; position: absolute; left: 9px; top: 20px; width: 2px; height: calc(100% + 10px); background: #dee2e6; } .timeline-item:last-child::after { display: none; } @media print { .timeline-item { page-break-inside: avoid; } } </style> </head> <body class='bg-light'> <div class='container py-4'> <div class='text-center mb-5'> <h1 class='display-6 fw-bold'>PDF Generation Workflow</h1> <p class='lead text-muted'>From HTML to Professional PDF Documents</p> </div> <div class='timeline-item'> <div class='card shadow-sm'> <div class='card-body'> <div class='d-flex justify-content-between align-items-center mb-2'> <h4 class='card-title mb-0'>Step 1: Initialize Renderer</h4> <span class='badge bg-primary'>Setup</span> </div> <p class='card-text'>Create ChromePdfRenderer instance with Chrome V8 engine for accurate HTML rendering.</p> <div class='bg-light p-2 rounded'> <code>var renderer = new ChromePdfRenderer();</code> </div> <div class='mt-2'> <small class='text-muted'>✓ Chrome V8 Engine • ✓ Full CSS3 Support • ✓ JavaScript Ready</small> </div> </div> </div> </div> <div class='timeline-item'> <div class='card shadow-sm'> <div class='card-body'> <div class='d-flex justify-content-between align-items-center mb-2'> <h4 class='card-title mb-0'>Step 2: Prepare HTML Content</h4> <span class='badge bg-info'>Content</span> </div> <p class='card-text'>Design your document using modern HTML5, CSS3 (Flexbox/Grid), and optional JavaScript.</p> <div class='row g-2'> <div class='col-4'><span class='badge bg-success w-100'>HTML5</span></div> <div class='col-4'><span class='badge bg-success w-100'>CSS3</span></div> <div class='col-4'><span class='badge bg-success w-100'>JavaScript</span></div> </div> </div> </div> </div> <div class='timeline-item'> <div class='card shadow-sm'> <div class='card-body'> <div class='d-flex justify-content-between align-items-center mb-2'> <h4 class='card-title mb-0'>Step 3: Render to PDF</h4> <span class='badge bg-warning text-dark'>Processing</span> </div> <p class='card-text'>Convert HTML to PDF with pixel-perfect accuracy and sub-second performance.</p> <div class='bg-light p-2 rounded'> <code>var pdf = renderer.RenderHtmlAsPdf(htmlContent);</code> </div> <div class='progress mt-2' style='height: 8px;'> <div class='progress-bar bg-warning' style='width: 100%'></div> </div> <small class='text-muted d-block mt-1'>Average render time: 0.9 seconds</small> </div> </div> </div> <div class='timeline-item'> <div class='card shadow-sm'> <div class='card-body'> <div class='d-flex justify-content-between align-items-center mb-2'> <h4 class='card-title mb-0'>Step 4: Save or Stream</h4> <span class='badge bg-success'>Output</span> </div> <p class='card-text'>Export to file, stream, or byte array for flexible deployment options.</p> <div class='bg-light p-2 rounded'> <code>pdf.SaveAs("document.pdf");</code> </div> <div class='mt-2'> <span class='badge bg-outline-secondary me-1'>File</span> <span class='badge bg-outline-secondary me-1'>Stream</span> <span class='badge bg-outline-secondary'>Byte Array</span> </div> </div> </div> </div> <div class='alert alert-info'> <strong>Comparison Note:</strong> GrapeCity PDF Viewer focuses on document viewing and annotation, not HTML-to-PDF generation. IronPDF specializes in creating PDFs from modern web content with full Bootstrap and framework support. </div> <div class='card shadow-sm border-primary'> <div class='card-header bg-primary text-white'> <h5 class='mb-0'>Key Advantages</h5> </div> <div class='card-body'> <div class='row'> <div class='col-md-6'> <h6 class='text-primary'>IronPDF Strengths</h6> <ul class='small'> <li>Complete HTML-to-PDF workflow</li> <li>Bootstrap 5 framework support</li> <li>Async/await for scalability</li> <li>Cross-platform deployment</li> </ul> </div> <div class='col-md-6'> <h6 class='text-muted'>GrapeCity Focus</h6> <ul class='small'> <li>PDF viewing and annotation</li> <li>UI component for display</li> <li>Limited generation features</li> <li>Viewer-centric approach</li> </ul> </div> </div> </div> </div> </div> </body> </html>"; var pdf = renderer.RenderHtmlAsPdf(workflowTimeline); pdf.SaveAs("workflow-timeline.pdf"); using IronPdf; var renderer = new ChromePdfRenderer(); string workflowTimeline = @" <!DOCTYPE html> <html> <head> <meta charset='utf-8'> <link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'> <style> .timeline-item { position: relative; padding-left: 40px; margin-bottom: 30px; } .timeline-item::before { content: ''; position: absolute; left: 0; top: 0; width: 20px; height: 20px; background: #0d6efd; border-radius: 50%; border: 3px solid white; box-shadow: 0 0 0 2px #0d6efd; } .timeline-item::after { content: ''; position: absolute; left: 9px; top: 20px; width: 2px; height: calc(100% + 10px); background: #dee2e6; } .timeline-item:last-child::after { display: none; } @media print { .timeline-item { page-break-inside: avoid; } } </style> </head> <body class='bg-light'> <div class='container py-4'> <div class='text-center mb-5'> <h1 class='display-6 fw-bold'>PDF Generation Workflow</h1> <p class='lead text-muted'>From HTML to Professional PDF Documents</p> </div> <div class='timeline-item'> <div class='card shadow-sm'> <div class='card-body'> <div class='d-flex justify-content-between align-items-center mb-2'> <h4 class='card-title mb-0'>Step 1: Initialize Renderer</h4> <span class='badge bg-primary'>Setup</span> </div> <p class='card-text'>Create ChromePdfRenderer instance with Chrome V8 engine for accurate HTML rendering.</p> <div class='bg-light p-2 rounded'> <code>var renderer = new ChromePdfRenderer();</code> </div> <div class='mt-2'> <small class='text-muted'>✓ Chrome V8 Engine • ✓ Full CSS3 Support • ✓ JavaScript Ready</small> </div> </div> </div> </div> <div class='timeline-item'> <div class='card shadow-sm'> <div class='card-body'> <div class='d-flex justify-content-between align-items-center mb-2'> <h4 class='card-title mb-0'>Step 2: Prepare HTML Content</h4> <span class='badge bg-info'>Content</span> </div> <p class='card-text'>Design your document using modern HTML5, CSS3 (Flexbox/Grid), and optional JavaScript.</p> <div class='row g-2'> <div class='col-4'><span class='badge bg-success w-100'>HTML5</span></div> <div class='col-4'><span class='badge bg-success w-100'>CSS3</span></div> <div class='col-4'><span class='badge bg-success w-100'>JavaScript</span></div> </div> </div> </div> </div> <div class='timeline-item'> <div class='card shadow-sm'> <div class='card-body'> <div class='d-flex justify-content-between align-items-center mb-2'> <h4 class='card-title mb-0'>Step 3: Render to PDF</h4> <span class='badge bg-warning text-dark'>Processing</span> </div> <p class='card-text'>Convert HTML to PDF with pixel-perfect accuracy and sub-second performance.</p> <div class='bg-light p-2 rounded'> <code>var pdf = renderer.RenderHtmlAsPdf(htmlContent);</code> </div> <div class='progress mt-2' style='height: 8px;'> <div class='progress-bar bg-warning' style='width: 100%'></div> </div> <small class='text-muted d-block mt-1'>Average render time: 0.9 seconds</small> </div> </div> </div> <div class='timeline-item'> <div class='card shadow-sm'> <div class='card-body'> <div class='d-flex justify-content-between align-items-center mb-2'> <h4 class='card-title mb-0'>Step 4: Save or Stream</h4> <span class='badge bg-success'>Output</span> </div> <p class='card-text'>Export to file, stream, or byte array for flexible deployment options.</p> <div class='bg-light p-2 rounded'> <code>pdf.SaveAs("document.pdf");</code> </div> <div class='mt-2'> <span class='badge bg-outline-secondary me-1'>File</span> <span class='badge bg-outline-secondary me-1'>Stream</span> <span class='badge bg-outline-secondary'>Byte Array</span> </div> </div> </div> </div> <div class='alert alert-info'> <strong>Comparison Note:</strong> GrapeCity PDF Viewer focuses on document viewing and annotation, not HTML-to-PDF generation. IronPDF specializes in creating PDFs from modern web content with full Bootstrap and framework support. </div> <div class='card shadow-sm border-primary'> <div class='card-header bg-primary text-white'> <h5 class='mb-0'>Key Advantages</h5> </div> <div class='card-body'> <div class='row'> <div class='col-md-6'> <h6 class='text-primary'>IronPDF Strengths</h6> <ul class='small'> <li>Complete HTML-to-PDF workflow</li> <li>Bootstrap 5 framework support</li> <li>Async/await for scalability</li> <li>Cross-platform deployment</li> </ul> </div> <div class='col-md-6'> <h6 class='text-muted'>GrapeCity Focus</h6> <ul class='small'> <li>PDF viewing and annotation</li> <li>UI component for display</li> <li>Limited generation features</li> <li>Viewer-centric approach</li> </ul> </div> </div> </div> </div> </div> </body> </html>"; var pdf = renderer.RenderHtmlAsPdf(workflowTimeline); pdf.SaveAs("workflow-timeline.pdf"); IRON VB CONVERTER ERROR developers@ironsoftware.com $vbLabelText $csharpLabel 輸出:一個專業的工作流程時間軸 PDF,包含 Bootstrap 5 卡片、標記、進度條和自定義時間軸樣式。 IronPDF 精確地渲染所有定位、flexbox 佈局和公用類,展示瞭如何全面支援複雜的 CSS3 設計。 有關 Bootstrap 框架兼容性的詳細信息,請參閱 Bootstrap & Flexbox CSS 指南。 精簡版套餐 1 位開發人員 1 個地點 1 個專案 永久許可證 此套餐允許組織中的單個軟件開發人員在一個地方使用 Iron Software。 Iron Software 可以在單個內聯網應用程式、網頁應用或桌面軟件中使用。 不允許在組織外部或代理/客戶關係中共享許可證,這些許可證不可轉讓。 這種類型的授權,和所有其他授權類型一樣,明確排除在未購買額外覆蓋的情況下通過 OEM 重新分發和將 Iron Software 用於 SaaS 的所有權利。 定價:每年起價 $799。 專業版許可證 10 位開發人員 10 個地點 10 個專案 永久許可證 該許可證允許組織內的指定數量的軟件開發人員在多個地方使用 Iron Software,最多可達十個。 Iron Software 可以用於任意數量的網站、內聯網應用或桌面軟件應用。許可證不可轉讓,因此禁止在組織外部或代理/客戶關係中共享。 這種類型的許可證和所有其他許可證類型一樣,明確排除在未購買額外覆蓋的情況下通過 OEM 重新分發和將 Iron Software 作為 SaaS 的運用在內的所有權利。 該許可證可以整合到一個專案中,最多可達 10 個。 定價: 每年起價 $1,199。 無限制許可證 無限制開發人員 無限制地點 無限制專案 永久許可證 這允許您在一個單一組織中可以有無數量的軟件開發人員在無限的地點使用 Iron Software。 Iron Software 可以用於無數量的內聯網應用,桌面軟件應用,或網站。許可證不可轉讓,且不得在組織外部或代理/客戶關係中共享。與所有其他許可權類型一樣,在未購買附加覆蓋的情況下,此類許可權明確排除所有未在協定下授予的權利,包括 OEM 重新分發和將 Iron Software 作為 SaaS 用途。 定價:每年起價 $2999。 免版稅重新分發:這允許您將 Iron Software 作為多個獨立包裝的商業產品的一部分分發(無需支付版稅),基於基礎許可所覆蓋的專案數量。 這將允許在 SaaS 軟件服務中部署 Iron Software,這是基於基礎許可所涵蓋的專案數量。 定價:每年起價 $1599。 class="content-img-align-center"> class="content__image-caption"> GrapeCity PDF 授權模式與定價 PDF文檔 包括 1 開發人員許可證 1 分發位置 該套餐包含一個開發人員許可證和只有一個分發位置,沒有支持和維護。 定價:每年起價 $1,199。 PDF文檔 Unlimited 包括 1 開發人員許可證 無限制分發地點 該套餐包含一個開發人員許可證,無限分發位置。 不包括支持和維護。 GrapeCity 不支持 SaaS 和 OEM。 定價:每年起價 $2799。 PDF文檔 Team Unlimited 包括 5 開發人員許可證 無限制分發地點 該套餐包含五個開發人員許可證,無限制的分發位置,不含支持和維護。 GrapeCity 不支持 SaaS 和 OEM。 定價:每年起價 $5799。 class="content-img-align-center"> class="content__image-caption"> IronPDF 精簡版 單開發人員套餐提供 1 年支持,約 $liteLicense。 而 GrapeCity PDF 文檔包含一個單開發人員套件,沒有任何支持,定價 $plusLicense。 IronPDF 專業套餐,包括 10 開發人員包並附有一年的支持,價格為 $plusLicense。 相比之下,GrapeCity 不提供 10 開發人員套件—只有一個 5 開發人員套件,價格為 $5799。 IronPDF 精簡 和 專業 套件提供 SaaS 服務或 OEM 和 5 年支持選項。 精簡的單開發人員套餐提供五年支持、SaaS 和 OEM 服務,價格為 $2897 美元。 而 GrapeCity 沒有 SaaS、OEM 服務或 5 年支持選項。 IronPDF 十位開發人員的專業套件包含五年支持、SaaS 和 OEM 服務,價格為 $3397 美元。 而 GrapeCity 沒有任何十位開發人員套件。 結論 GrapeCity PDF 文檔允許開發人員導出/匯入,創建 AcroForms(PDF 表單),並在多個桌面應用上運行 PDF。 使用 GrapeCity PDF 文檔(GcPdf),您即可在為客戶提供完整的 PDF 解決方案的路上。 我們強烈推薦 IronPDF,因為該產品提供了更高的精確性。 競爭對手即使有類似功能,也可能遇到諸如某些圖片轉換失敗而出現未知字符之類的精確性問題。 另一方面,IronPDF 能提供精確的結果。 IronPDF 包提供競爭力的授權和支持,無需持續費用。 IronPDF 起價為 $799,其多樣化包裝涵蓋了更多功能。 GrapeCity PDF 每年的起價從 $1649 開始。 IronPDF 還支持多種平台,僅需一個價格! 如果您尚未成為 IronPDF 的客戶,您可以訪問免費試用,檢查所有可用功能。 如果您購買完整的 Iron Suite,您可以用兩個產品的價格購買到所有五個產品。 For further details regarding IronPDF licensing, please visit Iron Software's Iron Suite product page to review the complete package information. 請注意GrapeCity Documents for PDF 是該所有者的註冊商標。 此網站未與 GrapeCity Documents for PDF 認可、批准或贊助。 所有產品名稱、徽標和品牌均為其各自所有者的財產。 比較僅供信息參考,並反映撰寫時公開可用的信息。 常見問題解答 如何在 .NET 中將 HTML 轉換為 PDF? 您可以使用 IronPDF 的 RenderHtmlAsPdf 方法將 HTML 字串轉換為 PDF。此外,您可以使用 RenderHtmlFileAsPdf 方法將 HTML 文件轉換為 PDF。 如何使用 NuGet 安裝 PDF 庫的步驟是什麼? 要通過 NuGet 安裝 IronPDF,請打開 Visual Studio,導航到 '管理 NuGet 套件',搜索 'IronPdf',然後點擊 '安裝' 將其添加到您的項目中。 有哪些 GrapeCity PDF 檢視器的 .NET 替代方案? IronPDF 是 GrapeCity PDF 檢視器的合適替代方案,提供用戶友好的體驗,並對 .NET Core、.NET 5、Framework 和 Standard 提供廣泛支持。 如何使用 .NET 庫創建和閱讀 PDF 文件? 使用 IronPDF,您可以通過包含 IronPdf 名稱空間並使用 HtmlToPdf 類將 HTML 呈現為 PDF 來創建 PDF。要閱讀 PDF,您可以使用 PdfDocument 類來訪問和操控內容。 PDF 庫可用的許可選項有哪些? IronPDF 提供一系列許可選項,包括單一開發人員的 Lite 套件、最多 10 名開發人員的專業許可,以及團隊的無限許可,所有這些都帶有永久許可和支持選項。 為什麼我應該選擇 IronPDF 而不是其他 PDF 解決方案? 推薦使用 IronPDF 是因為其精確度、全面的功能、有競爭力的許可和廣泛的支持選項。它以有競爭力的價格支持多個平台。 我可以在購買之前試用 PDF 庫嗎? 是的,IronPDF 提供免費試用版,使您可以在做出購買決策之前探索所有可用功能。此外,Iron Suite 套件以折扣價提供所有 Iron Software 產品的訪問。 使用 PDF 文件有哪些缺點? 由於其尺寸,PDF 通常難以通過電子郵件分享,並且相比 Word 文件在移動設備上顯示效果不夠清晰,與此同時,需要特定的軟件來編輯或更新。 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。 閱讀更多 IronPDF與XFINIUM.PDF間的比較IronPDF與Textcontrol的比較
發表日期 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。 閱讀更多