A PHP Error was encountered

Severity: Notice

Message: Undefined index: extension

Filename: libraries/PostRender.php

Line Number: 85

Backtrace:

File: /var/www/ironpdf.com/application/libraries/PostRender.php
Line: 85
Function: _error_handler

File: /var/www/ironpdf.com/application/libraries/PostRender.php
Line: 125
Function: {closure}

File: /var/www/ironpdf.com/application/libraries/PostRender.php
Line: 66
Function: render_view_with_translated_links

File: /var/www/ironpdf.com/index.php
Line: 292
Function: require_once

Accusoft Prizmdoc PDF檢視器比較教程於.NET 10 跳過到頁腳內容
產品比較

IronPDF vs Accusoft PDF Viewer:哪個 C# 程式庫最適合 HTML 到 PDF?

IronPDF和Accusoft PDF Viewer都可以在.NET中將HTML轉換為PDF。 IronPDF提供簡單的語法、無需雲端依賴的本地處理和每個專案無限制的轉換容量,起價$699。相比之下,Accusoft需要連接網路,並按每次交易收費。

## 比較IronPDF與Accusoft PDF Viewer
  • 將HTML轉換為PDF
  • 為PDF設置首頁和頁尾
  • 將PDF轉換為圖像文件
  • 比較授權、免費試用選項等

概述

什麼是IronPDF及其工作原理?

IronPDF是一個C# HTML到PDF的程式庫,讓開發者可以從來源創建HTML字串網頁URL的PDF文件。 它也允許設置像浮水印書籤首頁和頁尾等屬性。 另外,開發者可以合併多個PDF文件為一或使用將PDF頁面轉換為圖像,並反向使用圖像轉換為PDF

IronPDF是開發免費的,並提供30天的部署試用用於實際專案。 它提供完整的文檔代碼範例API引用,幫助開發者快速入門。

Developers can download a file project from this link.

What Is Accusoft PrizmDoc Viewer and How Does It Work?

PrizmDoc Viewer是一種REST API,可使用PDF文件並遠程將其轉換為其他格式。 PrizmDoc可將超過100種不同的文件格式轉換成PDF以及PDF轉換成PNG、JPGTIFF和SVG。 它還為應用程序提供各種電子簽名選項

How Do IronPDF and PrizmDoc Viewer Compare?

IronPDF `PrizmDoc` Viewer
Work with [PDF files programmatically](/how-to/csharp-parse-pdf/). 程式化操作PDF文件。
Supports [.NET Core](/docs/) with [Windows](/get-started/windows/), [Mac](/get-started/macos/), or [Linux](/get-started/linux/). 支援使用Windows、Mac或Linux的.NET Core。
[Works Locally](/get-started/installation-overview/) Sends Documents to a [remote server](/get-started/ironpdfengine/).
Work with or without [Asynchronous Programming](/how-to/async/). Must use Asynchronous Programming with `System.Threading.Tasks`.
Works offline once [installed](/get-started/installation-overview/). Requires internet connection for `PrizmDoc` server requests.
Provides many [predefined functions](/features/). 提供一些預定義功能。
Often requires [minimal lines of code](/tutorials/html-to-pdf/). 通常需要大量代碼行。
[無限制 conversions](/licensing/) per project in each license. 云託管授權中的有限交易。
[Free for development](/get-started/quickstart/) without time limits. 只有300次交易配合試用。

讓我們安裝這兩個程式庫並比較代碼。


步驟1:安裝

如何在我的.NET專案中安裝IronPDF?

有兩種方式可以安裝IronPDF於專案中,方法之間沒有差異。 IronPDF支援多個環境,包括Azure部署AWS LambdaDocker容器Blazor應用程序

下載IronPDF的不同方法?

下載IronPDF.dll並將其引用添加到專案中。 開發者也可以使用Windows安裝程式進行系統級安裝。 之後,命名空間IronPdf變為可用,通過使用:

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

現在,開發者可以輕鬆訪問IronPDF提供的功能和類,包括用於渲染的ChromePdfRendererPDF文件操作安全功能

如何通過NuGet包管理器安裝IronPDF?


How Do I Install PrizmDoc Viewer from Accusoft?

PrizmDoc Viewer有兩個部分:用於作為RESTful API運行的伺服器端組件叫做PrizmDoc Server和客戶端專案,它向API發送請求並接收回應。 不同於IronPDF在沒有外部依賴的本地運行PrizmDoc需要網絡連接來進行雲端操作。

How Can I Access the PrizmDoc Server?

PrizmDoc伺服器是一個接收基本信息並將文件作為請求(輸入)的伺服器端應用程式,並將文件轉換為PDF文件,然後將轉換的PDF文件作為回應(輸出)發回。 它是產品的技術核心部分—文件處理和轉換引擎。開發者可以通過兩種不同的方法使用它,且都擁有相同的程式架構和技術:

  1. 自行託管:

    此選項需要安排一個伺服器。 下載PrizmDoc伺服器然後安裝它。 了解更多關於如何在Windows上安裝PrizmDoc伺服器。

    注意:為了提高性能,最低要求32 GB RAM和4核CPU。 相比之下,IronPDF的系統要求要低得多。

  2. 雲端託管:

    此基於雲的服務消除了安排伺服器的需求。 要使用此選項,註冊帳號,並從首頁的API Key

首先,讓我們檢查看看使用PrizmDoc Viewer將文件轉換為PDF的基本結構,透過直接使用WebClient()

注意:下面的範例展示了PrizmDoc是如何從概念上處理PDF文件的。 其冗長,所以您可以跳過這個範例,直接進入比較

Accusoft的工作結構如何運作?

這個範例將sample.pdf。 不同於IronPDF直接將HTML轉換為PDF的簡單操作,PrizmDoc需要多次API調用。

注意:必須在專案中安裝並引用Newtonsoft.Json程式庫。

首先,將下列程式庫添加到專案中:

using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq; // Install Newtonsoft.Json via NuGet Package Manager
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq; // Install Newtonsoft.Json via NuGet Package Manager
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Threading.Tasks
Imports Newtonsoft.Json.Linq ' Install Newtonsoft.Json via NuGet Package Manager
$vbLabelText   $csharpLabel

然後創建一個公共變量Accusoft API Key並將API金鑰粘貼進去:

static string ApiKey = "Your-API-KEY";
static string ApiKey = "Your-API-KEY";
Private Shared ApiKey As String = "Your-API-KEY"
$vbLabelText   $csharpLabel

使用PrizmDoc Viewer處理PDF文件需要3個步驟:

  1. 將文件上傳到PrizmDoc伺服器。
  2. 轉換上傳的文件。
  3. PrizmDoc伺服器下載轉換後的文件。

每一個步驟都有一個單獨的功能處理:

static void Main(string[] args)
{
    //---Upload file to Server---
    JObject uploadResults = UploadToServer("myWebpage.html").Result;
    string fileID = (string)uploadResults.SelectToken("fileId");
    string affinityToken = (string)uploadResults.SelectToken("affinityToken");

    //---Convert the uploaded file to PDF---
    JObject convertResults = Convert(affinityToken, fileID).Result;
    string processId = (string)convertResults.SelectToken("processId");
    affinityToken = (string)convertResults.SelectToken("affinityToken");

    //---Check the status that conversion is completed---
    JObject convertStatusResults = ConvertStatus(processId, affinityToken).Result;
    string convertStatus = (string)convertStatusResults.SelectToken("state");

    //---Continuously checking whether conversion completed---
    while (!(convertStatus.Equals("complete")))
    {
        System.Threading.Thread.Sleep(30000);
        convertStatusResults = ConvertStatus(processId, affinityToken).Result;
        convertStatus = (string)convertStatusResults.SelectToken("state");
    }

    //---Download the converted file from server---
    string newFileID = (string)convertStatusResults.SelectToken("output.results[0].fileId");
    DownloadFromServer(affinityToken, newFileID, "sample.pdf").Wait();

    Console.WriteLine("PDF file created successfully...!");
    Console.ReadKey();
}
static void Main(string[] args)
{
    //---Upload file to Server---
    JObject uploadResults = UploadToServer("myWebpage.html").Result;
    string fileID = (string)uploadResults.SelectToken("fileId");
    string affinityToken = (string)uploadResults.SelectToken("affinityToken");

    //---Convert the uploaded file to PDF---
    JObject convertResults = Convert(affinityToken, fileID).Result;
    string processId = (string)convertResults.SelectToken("processId");
    affinityToken = (string)convertResults.SelectToken("affinityToken");

    //---Check the status that conversion is completed---
    JObject convertStatusResults = ConvertStatus(processId, affinityToken).Result;
    string convertStatus = (string)convertStatusResults.SelectToken("state");

    //---Continuously checking whether conversion completed---
    while (!(convertStatus.Equals("complete")))
    {
        System.Threading.Thread.Sleep(30000);
        convertStatusResults = ConvertStatus(processId, affinityToken).Result;
        convertStatus = (string)convertStatusResults.SelectToken("state");
    }

    //---Download the converted file from server---
    string newFileID = (string)convertStatusResults.SelectToken("output.results[0].fileId");
    DownloadFromServer(affinityToken, newFileID, "sample.pdf").Wait();

    Console.WriteLine("PDF file created successfully...!");
    Console.ReadKey();
}
Shared Sub Main(ByVal args() As String)
	'---Upload file to Server---
	Dim uploadResults As JObject = UploadToServer("myWebpage.html").Result
	Dim fileID As String = CStr(uploadResults.SelectToken("fileId"))
	Dim affinityToken As String = CStr(uploadResults.SelectToken("affinityToken"))

	'---Convert the uploaded file to PDF---
	Dim convertResults As JObject = Convert(affinityToken, fileID).Result
	Dim processId As String = CStr(convertResults.SelectToken("processId"))
	affinityToken = CStr(convertResults.SelectToken("affinityToken"))

	'---Check the status that conversion is completed---
	Dim convertStatusResults As JObject = ConvertStatus(processId, affinityToken).Result
	Dim convertStatus As String = CStr(convertStatusResults.SelectToken("state"))

	'---Continuously checking whether conversion completed---
	Do While Not (convertStatus.Equals("complete"))
		System.Threading.Thread.Sleep(30000)
		convertStatusResults = ConvertStatus(processId, affinityToken).Result
		convertStatus = CStr(convertStatusResults.SelectToken("state"))
	Loop

	'---Download the converted file from server---
	Dim newFileID As String = CStr(convertStatusResults.SelectToken("output.results[0].fileId"))
	DownloadFromServer(affinityToken, newFileID, "sample.pdf").Wait()

	Console.WriteLine("PDF file created successfully...!")
	Console.ReadKey()
End Sub
$vbLabelText   $csharpLabel

1. 將文件上傳到伺服器:

public static async Task<JObject> UploadToServer(string fileToUpload)
{
    FileInfo input = new FileInfo(fileToUpload);
    if (input == null)
    {
        throw new ArgumentException("Missing parameter input", nameof(input));
    }
    var fileName = input.Name;
    var endpoint = new Uri("___PROTECTED_URL_123___");
    using (var client = new WebClient())
    {
        client.Headers.Add("acs-api-key", ApiKey);
        client.Headers.Add("Content-Type", "application/octet-stream");
        using (var reader = new BinaryReader(input.OpenRead()))
        {
            var data = reader.ReadBytes((int)reader.BaseStream.Length);
            var results = await client.UploadDataTaskAsync(endpoint, "POST", data);
            string getResult = Encoding.ASCII.GetString(results);
            return JObject.Parse(getResult);
        }
    }
}
public static async Task<JObject> UploadToServer(string fileToUpload)
{
    FileInfo input = new FileInfo(fileToUpload);
    if (input == null)
    {
        throw new ArgumentException("Missing parameter input", nameof(input));
    }
    var fileName = input.Name;
    var endpoint = new Uri("___PROTECTED_URL_123___");
    using (var client = new WebClient())
    {
        client.Headers.Add("acs-api-key", ApiKey);
        client.Headers.Add("Content-Type", "application/octet-stream");
        using (var reader = new BinaryReader(input.OpenRead()))
        {
            var data = reader.ReadBytes((int)reader.BaseStream.Length);
            var results = await client.UploadDataTaskAsync(endpoint, "POST", data);
            string getResult = Encoding.ASCII.GetString(results);
            return JObject.Parse(getResult);
        }
    }
}
Public Shared Async Function UploadToServer(fileToUpload As String) As Task(Of JObject)
    Dim input As New FileInfo(fileToUpload)
    If input Is Nothing Then
        Throw New ArgumentException("Missing parameter input", NameOf(input))
    End If

    Dim fileName = input.Name
    Dim endpoint As New Uri("___PROTECTED_URL_123___")
    Using client As New WebClient()
        client.Headers.Add("acs-api-key", ApiKey)
        client.Headers.Add("Content-Type", "application/octet-stream")
        Using reader As New BinaryReader(input.OpenRead())
            Dim data = reader.ReadBytes(CInt(reader.BaseStream.Length))
            Dim results = Await client.UploadDataTaskAsync(endpoint, "POST", data)
            Dim getResult As String = Encoding.ASCII.GetString(results)
            Return JObject.Parse(getResult)
        End Using
    End Using
End Function
$vbLabelText   $csharpLabel

2. 將上傳的文件轉換為PDF:

public static async Task<JObject> Convert(string affinityToken, string fileID)
{
    var endpoint = new Uri("___PROTECTED_URL_124___");
    using (var client = new WebClient())
    {
        client.Headers.Add("Content-Type", "application/json");
        client.Headers.Add("acs-api-key", ApiKey);
        client.Headers.Add("Accusoft-Affinity-Token", affinityToken);
        JObject myJson =
            new JObject(
                new JProperty("input",
                    new JObject(
                        new JProperty("sources",
                            new JArray(
                                new JObject(
                                    new JProperty("fileId", fileID)
                                )
                            )
                        ),
                        new JProperty("dest",
                            new JObject(
                                new JProperty("format", "pdf")
                            )
                        )
                    )
                )
            );
        string results = await client.UploadStringTaskAsync(endpoint, "POST", myJson.ToString());
        return JObject.Parse(results);
    }
}
public static async Task<JObject> Convert(string affinityToken, string fileID)
{
    var endpoint = new Uri("___PROTECTED_URL_124___");
    using (var client = new WebClient())
    {
        client.Headers.Add("Content-Type", "application/json");
        client.Headers.Add("acs-api-key", ApiKey);
        client.Headers.Add("Accusoft-Affinity-Token", affinityToken);
        JObject myJson =
            new JObject(
                new JProperty("input",
                    new JObject(
                        new JProperty("sources",
                            new JArray(
                                new JObject(
                                    new JProperty("fileId", fileID)
                                )
                            )
                        ),
                        new JProperty("dest",
                            new JObject(
                                new JProperty("format", "pdf")
                            )
                        )
                    )
                )
            );
        string results = await client.UploadStringTaskAsync(endpoint, "POST", myJson.ToString());
        return JObject.Parse(results);
    }
}
Public Shared Async Function Convert(affinityToken As String, fileID As String) As Task(Of JObject)
    Dim endpoint = New Uri("___PROTECTED_URL_124___")
    Using client = New WebClient()
        client.Headers.Add("Content-Type", "application/json")
        client.Headers.Add("acs-api-key", ApiKey)
        client.Headers.Add("Accusoft-Affinity-Token", affinityToken)
        Dim myJson As JObject =
            New JObject(
                New JProperty("input",
                    New JObject(
                        New JProperty("sources",
                            New JArray(
                                New JObject(
                                    New JProperty("fileId", fileID)
                                )
                            )
                        ),
                        New JProperty("dest",
                            New JObject(
                                New JProperty("format", "pdf")
                            )
                        )
                    )
                )
            )
        Dim results As String = Await client.UploadStringTaskAsync(endpoint, "POST", myJson.ToString())
        Return JObject.Parse(results)
    End Using
End Function
$vbLabelText   $csharpLabel

以下JSON是myJson對象的結果值:

{
  "input": {
    "sources": 
    [
      {"fileId": "Auto Generated FileId Value"}
    ],
    "dest": {
      "format": "pdf"
    }
  }
}

檢查轉換是否完成的狀態

public static async Task<JObject> ConvertStatus(string processId, string affinityToken)
{
    string endpoint = "___PROTECTED_URL_125___" + processId;
    using (var client = new WebClient())
    {
        client.BaseAddress = endpoint;
        client.Headers.Add("acs-api-key", ApiKey);
        client.Headers.Add("Accusoft-Affinity-Token", affinityToken);
        string results = await client.DownloadStringTaskAsync(endpoint);
        return JObject.Parse(results);
    }
}
public static async Task<JObject> ConvertStatus(string processId, string affinityToken)
{
    string endpoint = "___PROTECTED_URL_125___" + processId;
    using (var client = new WebClient())
    {
        client.BaseAddress = endpoint;
        client.Headers.Add("acs-api-key", ApiKey);
        client.Headers.Add("Accusoft-Affinity-Token", affinityToken);
        string results = await client.DownloadStringTaskAsync(endpoint);
        return JObject.Parse(results);
    }
}
Public Shared Async Function ConvertStatus(processId As String, affinityToken As String) As Task(Of JObject)
    Dim endpoint As String = "___PROTECTED_URL_125___" & processId
    Using client As New WebClient()
        client.BaseAddress = endpoint
        client.Headers.Add("acs-api-key", ApiKey)
        client.Headers.Add("Accusoft-Affinity-Token", affinityToken)
        Dim results As String = Await client.DownloadStringTaskAsync(endpoint)
        Return JObject.Parse(results)
    End Using
End Function
$vbLabelText   $csharpLabel

3. 從伺服器下載轉換後的文件

public static async Task DownloadFromServer(string affinityToken, string fileId, string outfile)
{
    var endpoint = new Uri("___PROTECTED_URL_126___" + fileId);

    using (var client = new WebClient())
    {
        client.Headers.Add("acs-api-key", ApiKey);
        client.Headers.Add("Accusoft-Affinity-Token", affinityToken);
        FileInfo output = new FileInfo(outfile);

        using (var writeStream = output.Create())
        {
            var results = await client.DownloadDataTaskAsync(endpoint);
            await writeStream.WriteAsync(results, 0, results.Length);
        }
    }
}
public static async Task DownloadFromServer(string affinityToken, string fileId, string outfile)
{
    var endpoint = new Uri("___PROTECTED_URL_126___" + fileId);

    using (var client = new WebClient())
    {
        client.Headers.Add("acs-api-key", ApiKey);
        client.Headers.Add("Accusoft-Affinity-Token", affinityToken);
        FileInfo output = new FileInfo(outfile);

        using (var writeStream = output.Create())
        {
            var results = await client.DownloadDataTaskAsync(endpoint);
            await writeStream.WriteAsync(results, 0, results.Length);
        }
    }
}
Public Shared Async Function DownloadFromServer(affinityToken As String, fileId As String, outfile As String) As Task
    Dim endpoint As New Uri("___PROTECTED_URL_126___" & fileId)

    Using client As New WebClient()
        client.Headers.Add("acs-api-key", ApiKey)
        client.Headers.Add("Accusoft-Affinity-Token", affinityToken)
        Dim output As New FileInfo(outfile)

        Using writeStream As FileStream = output.Create()
            Dim results As Byte() = Await client.DownloadDataTaskAsync(endpoint)
            Await writeStream.WriteAsync(results, 0, results.Length)
        End Using
    End Using
End Function
$vbLabelText   $csharpLabel

上述範例需要相當大的努力。 為了減少工作負擔,Accusoft推出了名為Accusoft.PrizmDocServerSDK的.NET程式庫,作為對PrizmDoc伺服器REST API的API封裝。 讓我們檢視如何在.NET專案中安裝和使用此程式庫。

How Do I Install Accusoft.PrizmDocServerSDK?

安裝包裝的方式有兩種。

  • 包管理控制台:

    如果使用包管理器控制台,請運行以下命令:

    _CODEBLOCK10

  • 管理解決方案的包:

    如果使用NuGet包管理器GUI,請在搜尋欄中瀏覽Accusoft.PrizmDocServerSDK並安裝它。

現在,開發者可以輕鬆訪問Accusoft.PrizmDocServer命名空間並使用它:

using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer;
Imports Accusoft.PrizmDocServer
$vbLabelText   $csharpLabel

如何教程

IronPDF和PrizmDoc Viewer在代碼範例中如何比較?

在查看了兩個組件的介紹和安裝後,是時候開始同時使用它們。 以下用例演示如何使用這兩個組件進行實現,以幫助理解程式架構,並確定哪個最適合專案的需求。


如何使用IronPDF與PrizmDoc Viewer將HTML轉換為PDF?

在這次比較中,讓我們將一個名為myWebPage.html的網頁轉換為PDF文件,並將其保存到目標位置。 IronPDF的Chrome渲染引擎提供像素完美的轉換,完全支持CSSJavaScript網頁字體

IronPDF如何將HTML轉換為PDF?

using IronPdf;

static void Main(string[] args)
{
    // Create rendering converter
    var converter = new ChromePdfRenderer();
    // Render HTML file to PDF
    using var PDF = converter.RenderHTMLFileAsPdf("myWebPage.html");
    // Save to target location
    PDF.SaveAs("sample.pdf");
}
using IronPdf;

static void Main(string[] args)
{
    // Create rendering converter
    var converter = new ChromePdfRenderer();
    // Render HTML file to PDF
    using var PDF = converter.RenderHTMLFileAsPdf("myWebPage.html");
    // Save to target location
    PDF.SaveAs("sample.pdf");
}
Imports IronPdf

Shared Sub Main(ByVal args() As String)
	' Create rendering converter
	Dim converter = New ChromePdfRenderer()
	' Render HTML file to PDF
	Dim PDF = converter.RenderHTMLFileAsPdf("myWebPage.html")
	' Save to target location
	PDF.SaveAs("sample.pdf")
End Sub
$vbLabelText   $csharpLabel

上面的代碼創建了一個bin>debug資料夾中。 IronPDF還支持HTML字串URL,甚至包含HTML的ZIP文件作為輸入來源。

開發者還可以指定任何路徑,如PDF.SaveAs("E:/sample.pdf");或保存為內存流以進行雲端部署。

了解更多關於使用IronPDF處理PDF文件。

現在,讓我們使用PrizmDoc Viewer執行相同的任務以進行比較。

PrizmDoc Viewer如何將HTML轉換為PDF?

PrizmDoc Viewer安裝部分,討論了獲取Accusoft API Key。 這是如何使用它。

首先,向PrizmDoc伺服器發送請求並接收回應。 這個過程需要時間,需要異步編程。 IronPDF還支持異步方法來提高性能。

注意:在使用PrizmDoc Viewer的云服務創建PDF文件時,確保系統連接到互聯網。

using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;

static void Main(string[] args)
{
    ChromePdfRenderer().GetAwaiter().GetResult();
}

private static async Task ChromePdfRenderer()
{
    // Instantiate PrizmDocServerClient object
    var prizmDocServer = new PrizmDocServerClient("___PROTECTED_URL_127___", "Your-API-KEY");
    // Specify HTML file and convert it to a PDF.
    ConversionResult result = await prizmDocServer.ConvertToPdfAsync("myWebPage.html");
    // Save PDF file to the target location
    await result.RemoteWorkFile.SaveAsync("sample.pdf");
}
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;

static void Main(string[] args)
{
    ChromePdfRenderer().GetAwaiter().GetResult();
}

private static async Task ChromePdfRenderer()
{
    // Instantiate PrizmDocServerClient object
    var prizmDocServer = new PrizmDocServerClient("___PROTECTED_URL_127___", "Your-API-KEY");
    // Specify HTML file and convert it to a PDF.
    ConversionResult result = await prizmDocServer.ConvertToPdfAsync("myWebPage.html");
    // Save PDF file to the target location
    await result.RemoteWorkFile.SaveAsync("sample.pdf");
}
Imports Accusoft.PrizmDocServer
Imports Accusoft.PrizmDocServer.Conversion

Module Program
    Sub Main(args As String())
        ChromePdfRenderer().GetAwaiter().GetResult()
    End Sub

    Private Async Function ChromePdfRenderer() As Task
        ' Instantiate PrizmDocServerClient object
        Dim prizmDocServer = New PrizmDocServerClient("___PROTECTED_URL_127___", "Your-API-KEY")
        ' Specify HTML file and convert it to a PDF.
        Dim result As ConversionResult = Await prizmDocServer.ConvertToPdfAsync("myWebPage.html")
        ' Save PDF file to the target location
        Await result.RemoteWorkFile.SaveAsync("sample.pdf")
    End Function
End Module
$vbLabelText   $csharpLabel

了解更多關於使用PrizmDoc Viewer工作的內容。

哪個程式庫提供更簡單的HTML到PDF轉換?

這些範例證明IronPDF提供了一個更簡單的創建PDF文件的方法,並需要較少的時間。IronPDF還提供渲染選項以微調輸出,包括自訂紙張大小邊距視口設置


如何使用IronPDF將圖像轉換為PDF與PrizmDoc Viewer進行比較?

此比較顯示如何從位於專案的debug資料夾中的圖像創建PDF文件。 開發者開始使用IronPDF。

IronPDF如何將圖像轉換為PDF?

using IronPdf;

static void Main(string[] args)
{
    // Specify the image to be converted
    using var converted = ImageToPdfConverter.ImageToPdf("google.png");
    // Save PDF file to the target location
    converted.SaveAs("sample.pdf");
}
using IronPdf;

static void Main(string[] args)
{
    // Specify the image to be converted
    using var converted = ImageToPdfConverter.ImageToPdf("google.png");
    // Save PDF file to the target location
    converted.SaveAs("sample.pdf");
}
Imports IronPdf

Shared Sub Main(ByVal args() As String)
	' Specify the image to be converted
	Dim converted = ImageToPdfConverter.ImageToPdf("google.png")
	' Save PDF file to the target location
	converted.SaveAs("sample.pdf")
End Sub
$vbLabelText   $csharpLabel

IronPDF還支持多幀TIFF轉換嵌入Azure Blob Storage的圖像Base64圖像嵌入

輸出:

此螢幕截圖顯示了使用上述代碼新創建的PDF文件sample.pdf

PDF文件顯示了中心的Google標誌在白色背景上,展示了IronPDF的圖像到PDF轉換能力

使用IronPDF從圖像創建PDF文件是直接的。 現在,讓我們使用PrizmDoc Viewer執行相同的任務並檢查其生成的PDF文件。

PrizmDoc Viewer如何將圖像轉換為PDF?

using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;

static void Main(string[] args)
{
    ImageToPDF().GetAwaiter().GetResult();
}

private static async Task ImageToPDF()
{
    // Instantiate PrizmDocServerClient object
    var prizmDocServer = new PrizmDocServerClient("___PROTECTED_URL_128___", "Your-API-KEY");
    // Specify the image to be converted
    ConversionResult results = await prizmDocServer.ConvertToPdfAsync("google.png");
    // Save PDF file to the target location
    await results.RemoteWorkFile.SaveAsync("sample.pdf");
}
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;

static void Main(string[] args)
{
    ImageToPDF().GetAwaiter().GetResult();
}

private static async Task ImageToPDF()
{
    // Instantiate PrizmDocServerClient object
    var prizmDocServer = new PrizmDocServerClient("___PROTECTED_URL_128___", "Your-API-KEY");
    // Specify the image to be converted
    ConversionResult results = await prizmDocServer.ConvertToPdfAsync("google.png");
    // Save PDF file to the target location
    await results.RemoteWorkFile.SaveAsync("sample.pdf");
}
Imports Accusoft.PrizmDocServer
Imports Accusoft.PrizmDocServer.Conversion

Module Module1

    Sub Main()
        ImageToPDF().GetAwaiter().GetResult()
    End Sub

    Private Async Function ImageToPDF() As Task
        ' Instantiate PrizmDocServerClient object
        Dim prizmDocServer As New PrizmDocServerClient("___PROTECTED_URL_128___", "Your-API-KEY")
        ' Specify the image to be converted
        Dim results As ConversionResult = Await prizmDocServer.ConvertToPdfAsync("google.png")
        ' Save PDF file to the target location
        Await results.RemoteWorkFile.SaveAsync("sample.pdf")
    End Function

End Module
$vbLabelText   $csharpLabel

輸出: 這個螢幕截圖顯示了使用上述代碼新創建的PDF文件sample.pdf

PDF viewer displaying the Google logo on a gray background, showing `PrizmDoc`'s image conversion result

哪個程式庫需要更少的代碼來進行圖像到PDF的轉換?

IronPDF只需要兩行代碼。 相比之下,使用PrizmDoc伺服器涉及更多同步程式和非同步程式。 IronPDF生成的輸出文件還自動提供了一個可用的全頁文件。 IronPDF提供圖像定位多圖像轉換的額外選項。


如何使用IronPDF和PrizmDoc Viewer合併多個PDF文件?

在這次比較中,假設存在三個名為C.pdf的PDF文件。 任務是合併它們到一個PDF文件中。 這兩個組件都可以執行此任務。 首先,範例顯示了如何使用IronPDF執行此操作。

IronPDF如何合併PDF文件?

using IronPdf;
using System.Collections.Generic;

static void Main(string[] args)
{
    // Create rendering converter  
    var Renderer = new IronPdf.ChromePdfRenderer();
    // Create a list of pdf files
    var PDFs = new List<PdfDocument>();
    PDFs.Add(PdfDocument.FromFile("A.pdf"));
    PDFs.Add(PdfDocument.FromFile("B.pdf"));
    PDFs.Add(PdfDocument.FromFile("C.pdf"));
    // Merge the list of pdf file
    using PdfDocument PDF = PdfDocument.Merge(PDFs);
    // Save merged file to the target location
    PDF.SaveAs("sample.pdf");

    foreach(var pdf in PDFs)
    {
        pdf.Dispose();
    }
}
using IronPdf;
using System.Collections.Generic;

static void Main(string[] args)
{
    // Create rendering converter  
    var Renderer = new IronPdf.ChromePdfRenderer();
    // Create a list of pdf files
    var PDFs = new List<PdfDocument>();
    PDFs.Add(PdfDocument.FromFile("A.pdf"));
    PDFs.Add(PdfDocument.FromFile("B.pdf"));
    PDFs.Add(PdfDocument.FromFile("C.pdf"));
    // Merge the list of pdf file
    using PdfDocument PDF = PdfDocument.Merge(PDFs);
    // Save merged file to the target location
    PDF.SaveAs("sample.pdf");

    foreach(var pdf in PDFs)
    {
        pdf.Dispose();
    }
}
Imports IronPdf
Imports System.Collections.Generic

Shared Sub Main(ByVal args() As String)
	' Create rendering converter  
	Dim Renderer = New IronPdf.ChromePdfRenderer()
	' Create a list of pdf files
	Dim PDFs = New List(Of PdfDocument)()
	PDFs.Add(PdfDocument.FromFile("A.pdf"))
	PDFs.Add(PdfDocument.FromFile("B.pdf"))
	PDFs.Add(PdfDocument.FromFile("C.pdf"))
	' Merge the list of pdf file
	Using PDF As PdfDocument = PdfDocument.Merge(PDFs)
		' Save merged file to the target location
		PDF.SaveAs("sample.pdf")
	
'INSTANT VB NOTE: The variable pdf was renamed since Visual Basic will not allow local variables with the same name as parameters or other local variables:
		For Each .pdf_Conflict In PDFs
			.pdf_Conflict.Dispose()
		Next pdf_Conflict
	End Using
End Sub
$vbLabelText   $csharpLabel

上面的代碼創建了一個C.pdf。 IronPDF還支持在PDF之間添加和復制頁面以及拆分PDF

現在,讓我們用PrizmDoc Viewer執行相同的任務。

PrizmDoc Viewer如何合併PDF文件?

using System.Threading.Tasks;
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;

static void Main(string[] args)
{
    PdfMerge().GetAwaiter().GetResult();
}

private static async Task PdfMerge()
{
    // Instantiate PrizmDocServerClient object
    var prizmDocServer = new PrizmDocServerClient("___PROTECTED_URL_129___", "Your-API-KEY");
    // Pass the list of pdf files to PrizmDoc Server
    ConversionResult result = await prizmDocServer.CombineToPdfAsync(
        new []
        {
            new ConversionSourceDocument("A.pdf"),
            new ConversionSourceDocument("B.pdf"),
            new ConversionSourceDocument("C.pdf"),
        });
    // Save merged file to the target location
    await result.RemoteWorkFile.SaveAsync("sample.pdf");
}
using System.Threading.Tasks;
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;

static void Main(string[] args)
{
    PdfMerge().GetAwaiter().GetResult();
}

private static async Task PdfMerge()
{
    // Instantiate PrizmDocServerClient object
    var prizmDocServer = new PrizmDocServerClient("___PROTECTED_URL_129___", "Your-API-KEY");
    // Pass the list of pdf files to PrizmDoc Server
    ConversionResult result = await prizmDocServer.CombineToPdfAsync(
        new []
        {
            new ConversionSourceDocument("A.pdf"),
            new ConversionSourceDocument("B.pdf"),
            new ConversionSourceDocument("C.pdf"),
        });
    // Save merged file to the target location
    await result.RemoteWorkFile.SaveAsync("sample.pdf");
}
Imports System.Threading.Tasks
Imports Accusoft.PrizmDocServer
Imports Accusoft.PrizmDocServer.Conversion

Module Module1
    Sub Main()
        PdfMerge().GetAwaiter().GetResult()
    End Sub

    Private Async Function PdfMerge() As Task
        ' Instantiate PrizmDocServerClient object
        Dim prizmDocServer = New PrizmDocServerClient("___PROTECTED_URL_129___", "Your-API-KEY")
        ' Pass the list of pdf files to PrizmDoc Server
        Dim result As ConversionResult = Await prizmDocServer.CombineToPdfAsync(
            New ConversionSourceDocument() {
                New ConversionSourceDocument("A.pdf"),
                New ConversionSourceDocument("B.pdf"),
                New ConversionSourceDocument("C.pdf")
            })
        ' Save merged file to the target location
        Await result.RemoteWorkFile.SaveAsync("sample.pdf")
    End Function
End Module
$vbLabelText   $csharpLabel

上面的代碼還創建了一個C.pdf文件。


如何使用IronPDF和PrizmDoc Viewer為PDF添加首頁和頁尾?

在這次比較中,假設有一個簡單的myWebPage.html,其包含以下HTML和CSS:

<html>
<head>
    <style>
        li {
            font-size: x-large;
            color: rgba(156, 89, 13, 0.897);
            list-style: square;
        }
    </style>
</head>
<body>
    <h1 style="text-align: center;">Hello World..!</h1>
    <h1>Main Menu</h1>
    <ul>
        <li>SubMenu 1</li>
        <li>SubMenu 2</li>
        <li>SubMenu 3</li>
        <li>SubMenu 4</li>
        <li>SubMenu 5</li>
    </ul>
</body>
</html>
<html>
<head>
    <style>
        li {
            font-size: x-large;
            color: rgba(156, 89, 13, 0.897);
            list-style: square;
        }
    </style>
</head>
<body>
    <h1 style="text-align: center;">Hello World..!</h1>
    <h1>Main Menu</h1>
    <ul>
        <li>SubMenu 1</li>
        <li>SubMenu 2</li>
        <li>SubMenu 3</li>
        <li>SubMenu 4</li>
        <li>SubMenu 5</li>
    </ul>
</body>
</html>
HTML

目的是將這個WebPage轉換為具有以下首頁和頁尾屬性的PDF文件:

  • Page Title在首頁的左側
  • DateTime在首頁的右側
  • Page Number of Total Pages在頁尾的右側

首先,讓我們檢查IronPDF如何處理首頁和頁尾。

IronPDF怎樣處理PDF的首頁和頁尾?

要處理PDF文件的首頁和頁尾,IronPDF在RenderingOptions的屬性,可以如下使用:

  • 首頁:

    _CODEBLOCK19

  • 頁尾:

    _CODEBLOCK20

初始化TextHeaderFooter()時可以設置以下屬性:

  • CenterText 打印首頁或頁尾中央的文本
  • LeftText 打印首頁或頁尾左側的文本
  • RightText 打印首頁或頁尾右側的文本
  • DrawDividerLine 繪製分隔頁面內容和首頁或頁尾的線
  • FontFamily 指定首頁或頁尾的字體系列
  • FontSize 指定首頁或頁尾的字體大小
  • 間距 調整頁面內容和首頁或頁尾之間的距離

以下預定義屬性有助於設置首頁或頁尾內容。 它們寫在大括號內{ }

  • {page} 在首頁或頁尾打印當前頁碼
  • {total-pages} 在首頁或頁尾打印頁數總數
  • {url} 在首頁或頁尾打印渲染頁面的网址
  • {date} 在首頁或頁尾打印當前日期
  • {time} 在首頁或頁尾打印當前時間
  • {html-title} 在首頁或頁尾打印渲染網頁的標題
  • {pdf-title} 在首頁或頁尾打印文件標題

了解更多有關使用IronPDF處理首頁和頁尾的詳細內容。 IronPDF還支持HTML首頁和頁尾以實現更複雜的設計。

範例顯示了以下示例來實現用例並演示如何使用上述屬性:

using IronPdf;

static void Main(string[] args)
{
    // Create rendering converter
    var converter = new ChromePdfRenderer();
    // Setting Header properties
    converter.RenderingOptions.TextHeader = new TextHeaderFooter()
    {
        DrawDividerLine = true,
        LeftText = "Page Title",
        RightText = "{date} {time}",
        FontSize = 13
    };
    // Setting footer properties
    converter.RenderingOptions.TextFooter = new TextHeaderFooter()
    {
        RightText = "Page {page} of {total-pages}",
        FontSize = 12
    };
    // Specify the file to be converted
    using var PDF = converter.RenderHTMLFileAsPdf("myWebPage.html");
    // Save to target location
    PDF.SaveAs("sample.pdf");
}
using IronPdf;

static void Main(string[] args)
{
    // Create rendering converter
    var converter = new ChromePdfRenderer();
    // Setting Header properties
    converter.RenderingOptions.TextHeader = new TextHeaderFooter()
    {
        DrawDividerLine = true,
        LeftText = "Page Title",
        RightText = "{date} {time}",
        FontSize = 13
    };
    // Setting footer properties
    converter.RenderingOptions.TextFooter = new TextHeaderFooter()
    {
        RightText = "Page {page} of {total-pages}",
        FontSize = 12
    };
    // Specify the file to be converted
    using var PDF = converter.RenderHTMLFileAsPdf("myWebPage.html");
    // Save to target location
    PDF.SaveAs("sample.pdf");
}
Imports IronPdf

Shared Sub Main(ByVal args() As String)
	' Create rendering converter
	Dim converter = New ChromePdfRenderer()
	' Setting Header properties
	converter.RenderingOptions.TextHeader = New TextHeaderFooter() With {
		.DrawDividerLine = True,
		.LeftText = "Page Title",
		.RightText = "{date} {time}",
		.FontSize = 13
	}
	' Setting footer properties
	converter.RenderingOptions.TextFooter = New TextHeaderFooter() With {
		.RightText = "Page {page} of {total-pages}",
		.FontSize = 12
	}
	' Specify the file to be converted
	Dim PDF = converter.RenderHTMLFileAsPdf("myWebPage.html")
	' Save to target location
	PDF.SaveAs("sample.pdf")
End Sub
$vbLabelText   $csharpLabel

輸出: 此螢幕截圖顯示了使用上述代碼新創建的PDF文件sample.pdf

PDF文件帶有自定義首頁顯示

使用IronPDF進行首頁和頁尾設計時,創建PDF文件時使用直觀的語言。 現在,範例顯示PrizmDoc Viewer如何處理首頁和頁尾。

PrizmDoc Viewer如何處理PDF的首頁和頁尾?

PrizmDoc Viewer提供HeaderFooterOptions類來處理首頁和頁尾,具有以下屬性:

  • 指定首頁和頁尾的行,其中每行具有以下屬性:
    • 在首頁或頁尾行打印左側的文本
    • 中央 在首頁或頁尾行打印中央的文本
    • 在首頁或頁尾行上打印右側的文本
  • FontFamily 指定首頁或頁尾文本的字體類型
  • FontSize 指定首頁或頁尾文本的字體大小
  • 顏色 指定首頁或頁尾文本的顏色

了解更多有關使用PrizmDoc伺服器設置PDF頁面的首頁和頁尾的信息。

範例展示了如何使用上述屬性實現用例:

using System.Threading.Tasks;
using System.Collections.Generic;
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;

static void Main(string[] args)
{
    SetHeaderFooter().GetAwaiter().GetResult();
}

private static async Task SetHeaderFooter()
{
    // Instantiate PrizmDocServerClient object with Header and footer properties
    var prizmDocServer = new PrizmDocServerClient("___PROTECTED_URL_130___", "Your-API-KEY");

    ConversionResult result = await prizmDocServer.ConvertToPdfAsync(
        "myWebPage.html",
        header: new HeaderFooterOptions
        {
            Lines = new List<HeaderFooterLine>
            {
                new HeaderFooterLine { Left = "Page Title", Right = DateTime.Now.ToString() }
            },
        },
        footer: new HeaderFooterOptions
        {
            Lines = new List<HeaderFooterLine>
            {
                new HeaderFooterLine { Right = "Page {{pageNumber}} of {{pageCount}}" },
            },
        });

    // Save to the target location
    await result.RemoteWorkFile.SaveAsync("sample.pdf");
}
using System.Threading.Tasks;
using System.Collections.Generic;
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;

static void Main(string[] args)
{
    SetHeaderFooter().GetAwaiter().GetResult();
}

private static async Task SetHeaderFooter()
{
    // Instantiate PrizmDocServerClient object with Header and footer properties
    var prizmDocServer = new PrizmDocServerClient("___PROTECTED_URL_130___", "Your-API-KEY");

    ConversionResult result = await prizmDocServer.ConvertToPdfAsync(
        "myWebPage.html",
        header: new HeaderFooterOptions
        {
            Lines = new List<HeaderFooterLine>
            {
                new HeaderFooterLine { Left = "Page Title", Right = DateTime.Now.ToString() }
            },
        },
        footer: new HeaderFooterOptions
        {
            Lines = new List<HeaderFooterLine>
            {
                new HeaderFooterLine { Right = "Page {{pageNumber}} of {{pageCount}}" },
            },
        });

    // Save to the target location
    await result.RemoteWorkFile.SaveAsync("sample.pdf");
}
Imports System.Threading.Tasks
Imports System.Collections.Generic
Imports Accusoft.PrizmDocServer
Imports Accusoft.PrizmDocServer.Conversion

Module Program
    Sub Main(args As String())
        SetHeaderFooter().GetAwaiter().GetResult()
    End Sub

    Private Async Function SetHeaderFooter() As Task
        ' Instantiate PrizmDocServerClient object with Header and footer properties
        Dim prizmDocServer = New PrizmDocServerClient("___PROTECTED_URL_130___", "Your-API-KEY")

        Dim result As ConversionResult = Await prizmDocServer.ConvertToPdfAsync(
            "myWebPage.html",
            header:=New HeaderFooterOptions With {
                .Lines = New List(Of HeaderFooterLine) From {
                    New HeaderFooterLine With {.Left = "Page Title", .Right = DateTime.Now.ToString()}
                }
            },
            footer:=New HeaderFooterOptions With {
                .Lines = New List(Of HeaderFooterLine) From {
                    New HeaderFooterLine With {.Right = "Page {{pageNumber}} of {{pageCount}}"}
                }
            })

        ' Save to the target location
        Await result.RemoteWorkFile.SaveAsync("sample.pdf")
    End Function
End Module
$vbLabelText   $csharpLabel

輸出:

使用上述代碼新創建的PDF文件的螢幕截圖:

PDF with header showing 'Page Title' and timestamp, comparing `PrizmDoc`'s header/footer implementation

哪個程式庫為首頁和頁尾提供了更多的靈活性?

PrizmDoc Viewer相比,IronPDF提供了更多設置首頁和頁尾屬性的功能,並且程式結構簡單。 由IronPDF生成的PDF文件比由PrizmDoc Viewer生成的文件更易讀和美觀。IronPDF還支持頁碼頁面分隔以改善文件控制。


如何使用IronPDF和PrizmDoc Viewer將PDF頁面轉換為圖像?

在這次比較中,假設您有一個名為Sample_PDF.pdf的簡單PDF文件,包含兩個頁面。

Page1 Page2
PDF查看器顯示了一個包含Lorem ipsum文本及標準查看器控件的示例PDF的第1頁
PDF查看器顯示了一個包含Lorem ipsum文本及導航控件的示例PDF的第2頁

任務是創建每個頁面的圖像。 首先,範例將檢視如何使用IronPDF執行此操作。

IronPDF如何將PDF頁面轉換為圖像?

using IronPdf;

static void Main(string[] args)
{
    // Specify file to be converted
    var pdf = PdfDocument.FromFile("Sample_PDF.pdf");
    // Save images to the target location
    pdf.RasterizeToImageFiles("image_*.png");
}
using IronPdf;

static void Main(string[] args)
{
    // Specify file to be converted
    var pdf = PdfDocument.FromFile("Sample_PDF.pdf");
    // Save images to the target location
    pdf.RasterizeToImageFiles("image_*.png");
}
Imports IronPdf

Shared Sub Main(ByVal args() As String)
	' Specify file to be converted
	Dim pdf = PdfDocument.FromFile("Sample_PDF.pdf")
	' Save images to the target location
	pdf.RasterizeToImageFiles("image_*.png")
End Sub
$vbLabelText   $csharpLabel

IronPDF還支持將圖像保存到內存流不同圖像格式,包括JPEG、TIFF等更多。

輸出:

上面的代碼創建了以下兩個.png的圖像:

Page1圖像 Page2圖像
從PDF第1頁生成的PNG圖片顯示了Virtual Mechanics教程內容,並顯示清晰的文本渲染
從PDF第2頁生成的PNG圖片顯示了持續的文本內容和IronPDF的光柵化質量

使用IronPDF創建PDF頁面的圖像是直接的。 現在,讓我們用PrizmDoc Viewer執行相同的任務。

PrizmDoc Viewer如何將PDF頁面轉換為圖像?

using System.Linq;
using System.Collections.Generic;
using System.Threading.Tasks;
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;

static void Main(string[] args)
{
    PdfToImage().GetAwaiter().GetResult();
}

private static async Task PdfToImage()
{
    // Instantiate PrizmDocServerClient object
    var prizmDocServer = new PrizmDocServerClient("___PROTECTED_URL_131___", "Your-API-KEY");
    // Convert PDF file to images
    IEnumerable<ConversionResult> results = await prizmDocServer.ConvertAsync("Sample_PDF.pdf", DestinationFileFormat.Png);

    // Save each image.
    for (int i = 0; i < results.Count(); i++)
    {
        await results.ElementAt(i).RemoteWorkFile.SaveAsync($"page-{i + 1}.png");
    }
}
using System.Linq;
using System.Collections.Generic;
using System.Threading.Tasks;
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;

static void Main(string[] args)
{
    PdfToImage().GetAwaiter().GetResult();
}

private static async Task PdfToImage()
{
    // Instantiate PrizmDocServerClient object
    var prizmDocServer = new PrizmDocServerClient("___PROTECTED_URL_131___", "Your-API-KEY");
    // Convert PDF file to images
    IEnumerable<ConversionResult> results = await prizmDocServer.ConvertAsync("Sample_PDF.pdf", DestinationFileFormat.Png);

    // Save each image.
    for (int i = 0; i < results.Count(); i++)
    {
        await results.ElementAt(i).RemoteWorkFile.SaveAsync($"page-{i + 1}.png");
    }
}
Imports System.Linq
Imports System.Collections.Generic
Imports System.Threading.Tasks
Imports Accusoft.PrizmDocServer
Imports Accusoft.PrizmDocServer.Conversion

Module Program
    Sub Main(args As String())
        PdfToImage().GetAwaiter().GetResult()
    End Sub

    Private Async Function PdfToImage() As Task
        ' Instantiate PrizmDocServerClient object
        Dim prizmDocServer = New PrizmDocServerClient("___PROTECTED_URL_131___", "Your-API-KEY")
        ' Convert PDF file to images
        Dim results As IEnumerable(Of ConversionResult) = Await prizmDocServer.ConvertAsync("Sample_PDF.pdf", DestinationFileFormat.Png)

        ' Save each image.
        For i As Integer = 0 To results.Count() - 1
            Await results.ElementAt(i).RemoteWorkFile.SaveAsync($"page-{i + 1}.png")
        Next
    End Function
End Module
$vbLabelText   $csharpLabel

輸出:

上述代碼也創建了以下兩個.png的圖像:

Page1 Page2
PNG image generated from PDF page 1 using `PrizmDoc`'s conversion service with sample text content
PNG image generated from PDF page 2 showing `PrizmDoc`'s image conversion output quality

哪個程式庫更易進行PDF到圖像的轉換?

相比PrizmDoc Viewer,IronPDF允許開發者輕鬆創建每個頁面的圖像,使用最少的代碼行,甚至不用迭代頁面。


我可以使用Bootstrap 5數據表與IronPDF配合嗎?

IronPDF的Chrome V8渲染引擎提供了出色的支持Bootstrap 5數據表,使開發者可以生成具有複雜表格式的專業PDF報告。 此範例展示了漸變頭部、狀態標籤、分頁控件和摘要指標—突顯了IronPDF相對於傳統PDF查看器如PrizmDoc的優勢。 IronPDF全面支持現代CSS功能,包括flexbox佈局漸變響應設計

using IronPdf;

var renderer = new ChromePdfRenderer();

string dataTableReport = @"
<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <link href='___PROTECTED_URL_132___ rel='stylesheet'>
    <style>
        .table-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            border-radius: 10px 10px 0 0;
        }
        .table-container {
            background: white;
            border-radius: 0 0 10px 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .table th {
            background: #f8f9fa;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.85rem;
            letter-spacing: 0.5px;
        }
        .status-badge {
            padding: 0.35em 0.65em;
            border-radius: 0.25rem;
            font-weight: 600;
            font-size: 0.75rem;
        }
        .trend-positive { color: #198754; font-weight: 700; }
        .trend-negative { color: #dc3545; font-weight: 700; }
        @media print {
            .table-container { page-break-inside: avoid; }
        }
    </style>
</head>
<body class='bg-light'>
    <div class='container py-5'>
        <div class='table-container'>
            <div class='table-header'>
                <div class='row align-items-center'>
                    <div class='col-md-8'>
                        <h2 class='mb-2'>Sales Performance Report</h2>
                        <p class='mb-0 opacity-75'>Q4 2024 Regional Analysis</p>
                    </div>
                    <div class='col-md-4 text-end'>
                        <div class='btn-group btn-group-sm'>
                            <button class='btn btn-light'>Export</button>
                            <button class='btn btn-light'>Filter</button>
                            <button class='btn btn-light'>Sort</button>
                        </div>
                    </div>
                </div>
            </div>

            <div class='p-4'>
                <div class='row mb-3'>
                    <div class='col-md-4'>
                        <input type='text' class='form-control form-control-sm' placeholder='Search regions...'>
                    </div>
                    <div class='col-md-8 text-end'>
                        <span class='text-muted small'>Showing 1-10 of 48 results</span>
                    </div>
                </div>

                <div class='table-responsive'>
                    <table class='table table-hover align-middle'>
                        <thead>
                            <tr>
                                <th>Region</th>
                                <th>Revenue</th>
                                <th>Units Sold</th>
                                <th>Growth</th>
                                <th>Status</th>
                                <th>Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    <strong>North America</strong><br>
                                    <small class='text-muted'>USA, Canada, Mexico</small>
                                </td>
                                <td>$4,280,000</td>
                                <td>12,450</td>
                                <td><span class='trend-positive'>↑ 18.5%</span></td>
                                <td><span class='status-badge bg-success text-white'>Exceeding</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Europe</strong><br>
                                    <small class='text-muted'>EU, UK, Switzerland</small>
                                </td>
                                <td>$3,650,000</td>
                                <td>10,890</td>
                                <td><span class='trend-positive'>↑ 12.3%</span></td>
                                <td><span class='status-badge bg-success text-white'>On Track</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Asia Pacific</strong><br>
                                    <small class='text-muted'>Japan, Australia, Singapore</small>
                                </td>
                                <td>$2,940,000</td>
                                <td>8,320</td>
                                <td><span class='trend-positive'>↑ 24.7%</span></td>
                                <td><span class='status-badge bg-primary text-white'>Growing</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Latin America</strong><br>
                                    <small class='text-muted'>Brazil, Argentina, Chile</small>
                                </td>
                                <td>$1,580,000</td>
                                <td>4,670</td>
                                <td><span class='trend-positive'>↑ 8.9%</span></td>
                                <td><span class='status-badge bg-info text-white'>Stable</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Middle East</strong><br>
                                    <small class='text-muted'>UAE, Saudi Arabia, Israel</small>
                                </td>
                                <td>$980,000</td>
                                <td>2,890</td>
                                <td><span class='trend-negative'>↓ 3.2%</span></td>
                                <td><span class='status-badge bg-warning text-dark'>Review</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                        </tbody>
                        <tfoot class='table-light'>
                            <tr>
                                <td><strong>Total</strong></td>
                                <td><strong>$13,430,000</strong></td>
                                <td><strong>39,220</strong></td>
                                <td><strong class='trend-positive'>↑ 14.8%</strong></td>
                                <td colspan='2'></td>
                            </tr>
                        </tfoot>
                    </table>
                </div>

                <div class='d-flex justify-content-between align-items-center mt-4'>
                    <div>
                        <select class='form-select form-select-sm' style='width: auto; display: inline-block;'>
                            <option>10 per page</option>
                            <option>25 per page</option>
                            <option>50 per page</option>
                        </select>
                    </div>
                    <nav>
                        <ul class='pagination pagination-sm mb-0'>
                            <li class='page-item disabled'><a class='page-link' href='#'>Previous</a></li>
                            <li class='page-item active'><a class='page-link' href='#'>1</a></li>
                            <li class='page-item'><a class='page-link' href='#'>2</a></li>
                            <li class='page-item'><a class='page-link' href='#'>3</a></li>
                            <li class='page-item'><a class='page-link' href='#'>Next</a></li>
                        </ul>
                    </nav>
                </div>
            </div>
        </div>

        <div class='row g-3 mt-4'>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-primary mb-1'>$13.4M</h3>
                        <small class='text-muted'>Total Revenue</small>
                    </div>
                </div>
            </div>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-success mb-1'>39,220</h3>
                        <small class='text-muted'>Units Sold</small>
                    </div>
                </div>
            </div>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-info mb-1'>14.8%</h3>
                        <small class='text-muted'>Growth Rate</small>
                    </div>
                </div>
            </div>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-warning mb-1'>5</h3>
                        <small class='text-muted'>Active Regions</small>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>";

var pdf = renderer.RenderHtmlAsPdf(dataTableReport);
pdf.SaveAs("data-table-report.pdf");
using IronPdf;

var renderer = new ChromePdfRenderer();

string dataTableReport = @"
<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <link href='___PROTECTED_URL_132___ rel='stylesheet'>
    <style>
        .table-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            border-radius: 10px 10px 0 0;
        }
        .table-container {
            background: white;
            border-radius: 0 0 10px 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .table th {
            background: #f8f9fa;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.85rem;
            letter-spacing: 0.5px;
        }
        .status-badge {
            padding: 0.35em 0.65em;
            border-radius: 0.25rem;
            font-weight: 600;
            font-size: 0.75rem;
        }
        .trend-positive { color: #198754; font-weight: 700; }
        .trend-negative { color: #dc3545; font-weight: 700; }
        @media print {
            .table-container { page-break-inside: avoid; }
        }
    </style>
</head>
<body class='bg-light'>
    <div class='container py-5'>
        <div class='table-container'>
            <div class='table-header'>
                <div class='row align-items-center'>
                    <div class='col-md-8'>
                        <h2 class='mb-2'>Sales Performance Report</h2>
                        <p class='mb-0 opacity-75'>Q4 2024 Regional Analysis</p>
                    </div>
                    <div class='col-md-4 text-end'>
                        <div class='btn-group btn-group-sm'>
                            <button class='btn btn-light'>Export</button>
                            <button class='btn btn-light'>Filter</button>
                            <button class='btn btn-light'>Sort</button>
                        </div>
                    </div>
                </div>
            </div>

            <div class='p-4'>
                <div class='row mb-3'>
                    <div class='col-md-4'>
                        <input type='text' class='form-control form-control-sm' placeholder='Search regions...'>
                    </div>
                    <div class='col-md-8 text-end'>
                        <span class='text-muted small'>Showing 1-10 of 48 results</span>
                    </div>
                </div>

                <div class='table-responsive'>
                    <table class='table table-hover align-middle'>
                        <thead>
                            <tr>
                                <th>Region</th>
                                <th>Revenue</th>
                                <th>Units Sold</th>
                                <th>Growth</th>
                                <th>Status</th>
                                <th>Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    <strong>North America</strong><br>
                                    <small class='text-muted'>USA, Canada, Mexico</small>
                                </td>
                                <td>$4,280,000</td>
                                <td>12,450</td>
                                <td><span class='trend-positive'>↑ 18.5%</span></td>
                                <td><span class='status-badge bg-success text-white'>Exceeding</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Europe</strong><br>
                                    <small class='text-muted'>EU, UK, Switzerland</small>
                                </td>
                                <td>$3,650,000</td>
                                <td>10,890</td>
                                <td><span class='trend-positive'>↑ 12.3%</span></td>
                                <td><span class='status-badge bg-success text-white'>On Track</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Asia Pacific</strong><br>
                                    <small class='text-muted'>Japan, Australia, Singapore</small>
                                </td>
                                <td>$2,940,000</td>
                                <td>8,320</td>
                                <td><span class='trend-positive'>↑ 24.7%</span></td>
                                <td><span class='status-badge bg-primary text-white'>Growing</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Latin America</strong><br>
                                    <small class='text-muted'>Brazil, Argentina, Chile</small>
                                </td>
                                <td>$1,580,000</td>
                                <td>4,670</td>
                                <td><span class='trend-positive'>↑ 8.9%</span></td>
                                <td><span class='status-badge bg-info text-white'>Stable</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Middle East</strong><br>
                                    <small class='text-muted'>UAE, Saudi Arabia, Israel</small>
                                </td>
                                <td>$980,000</td>
                                <td>2,890</td>
                                <td><span class='trend-negative'>↓ 3.2%</span></td>
                                <td><span class='status-badge bg-warning text-dark'>Review</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                        </tbody>
                        <tfoot class='table-light'>
                            <tr>
                                <td><strong>Total</strong></td>
                                <td><strong>$13,430,000</strong></td>
                                <td><strong>39,220</strong></td>
                                <td><strong class='trend-positive'>↑ 14.8%</strong></td>
                                <td colspan='2'></td>
                            </tr>
                        </tfoot>
                    </table>
                </div>

                <div class='d-flex justify-content-between align-items-center mt-4'>
                    <div>
                        <select class='form-select form-select-sm' style='width: auto; display: inline-block;'>
                            <option>10 per page</option>
                            <option>25 per page</option>
                            <option>50 per page</option>
                        </select>
                    </div>
                    <nav>
                        <ul class='pagination pagination-sm mb-0'>
                            <li class='page-item disabled'><a class='page-link' href='#'>Previous</a></li>
                            <li class='page-item active'><a class='page-link' href='#'>1</a></li>
                            <li class='page-item'><a class='page-link' href='#'>2</a></li>
                            <li class='page-item'><a class='page-link' href='#'>3</a></li>
                            <li class='page-item'><a class='page-link' href='#'>Next</a></li>
                        </ul>
                    </nav>
                </div>
            </div>
        </div>

        <div class='row g-3 mt-4'>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-primary mb-1'>$13.4M</h3>
                        <small class='text-muted'>Total Revenue</small>
                    </div>
                </div>
            </div>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-success mb-1'>39,220</h3>
                        <small class='text-muted'>Units Sold</small>
                    </div>
                </div>
            </div>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-info mb-1'>14.8%</h3>
                        <small class='text-muted'>Growth Rate</small>
                    </div>
                </div>
            </div>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-warning mb-1'>5</h3>
                        <small class='text-muted'>Active Regions</small>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>";

var pdf = renderer.RenderHtmlAsPdf(dataTableReport);
pdf.SaveAs("data-table-report.pdf");
Imports IronPdf

Dim renderer = New ChromePdfRenderer()

Dim dataTableReport As String = "
<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <link href='___PROTECTED_URL_132___ rel='stylesheet'>
    <style>
        .table-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            border-radius: 10px 10px 0 0;
        }
        .table-container {
            background: white;
            border-radius: 0 0 10px 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .table th {
            background: #f8f9fa;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.85rem;
            letter-spacing: 0.5px;
        }
        .status-badge {
            padding: 0.35em 0.65em;
            border-radius: 0.25rem;
            font-weight: 600;
            font-size: 0.75rem;
        }
        .trend-positive { color: #198754; font-weight: 700; }
        .trend-negative { color: #dc3545; font-weight: 700; }
        @media print {
            .table-container { page-break-inside: avoid; }
        }
    </style>
</head>
<body class='bg-light'>
    <div class='container py-5'>
        <div class='table-container'>
            <div class='table-header'>
                <div class='row align-items-center'>
                    <div class='col-md-8'>
                        <h2 class='mb-2'>Sales Performance Report</h2>
                        <p class='mb-0 opacity-75'>Q4 2024 Regional Analysis</p>
                    </div>
                    <div class='col-md-4 text-end'>
                        <div class='btn-group btn-group-sm'>
                            <button class='btn btn-light'>Export</button>
                            <button class='btn btn-light'>Filter</button>
                            <button class='btn btn-light'>Sort</button>
                        </div>
                    </div>
                </div>
            </div>

            <div class='p-4'>
                <div class='row mb-3'>
                    <div class='col-md-4'>
                        <input type='text' class='form-control form-control-sm' placeholder='Search regions...'>
                    </div>
                    <div class='col-md-8 text-end'>
                        <span class='text-muted small'>Showing 1-10 of 48 results</span>
                    </div>
                </div>

                <div class='table-responsive'>
                    <table class='table table-hover align-middle'>
                        <thead>
                            <tr>
                                <th>Region</th>
                                <th>Revenue</th>
                                <th>Units Sold</th>
                                <th>Growth</th>
                                <th>Status</th>
                                <th>Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    <strong>North America</strong><br>
                                    <small class='text-muted'>USA, Canada, Mexico</small>
                                </td>
                                <td>$4,280,000</td>
                                <td>12,450</td>
                                <td><span class='trend-positive'>↑ 18.5%</span></td>
                                <td><span class='status-badge bg-success text-white'>Exceeding</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Europe</strong><br>
                                    <small class='text-muted'>EU, UK, Switzerland</small>
                                </td>
                                <td>$3,650,000</td>
                                <td>10,890</td>
                                <td><span class='trend-positive'>↑ 12.3%</span></td>
                                <td><span class='status-badge bg-success text-white'>On Track</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Asia Pacific</strong><br>
                                    <small class='text-muted'>Japan, Australia, Singapore</small>
                                </td>
                                <td>$2,940,000</td>
                                <td>8,320</td>
                                <td><span class='trend-positive'>↑ 24.7%</span></td>
                                <td><span class='status-badge bg-primary text-white'>Growing</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Latin America</strong><br>
                                    <small class='text-muted'>Brazil, Argentina, Chile</small>
                                </td>
                                <td>$1,580,000</td>
                                <td>4,670</td>
                                <td><span class='trend-positive'>↑ 8.9%</span></td>
                                <td><span class='status-badge bg-info text-white'>Stable</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Middle East</strong><br>
                                    <small class='text-muted'>UAE, Saudi Arabia, Israel</small>
                                </td>
                                <td>$980,000</td>
                                <td>2,890</td>
                                <td><span class='trend-negative'>↓ 3.2%</span></td>
                                <td><span class='status-badge bg-warning text-dark'>Review</span></td>
                                <td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
                            </tr>
                        </tbody>
                        <tfoot class='table-light'>
                            <tr>
                                <td><strong>Total</strong></td>
                                <td><strong>$13,430,000</strong></td>
                                <td><strong>39,220</strong></td>
                                <td><strong class='trend-positive'>↑ 14.8%</strong></td>
                                <td colspan='2'></td>
                            </tr>
                        </tfoot>
                    </table>
                </div>

                <div class='d-flex justify-content-between align-items-center mt-4'>
                    <div>
                        <select class='form-select form-select-sm' style='width: auto; display: inline-block;'>
                            <option>10 per page</option>
                            <option>25 per page</option>
                            <option>50 per page</option>
                        </select>
                    </div>
                    <nav>
                        <ul class='pagination pagination-sm mb-0'>
                            <li class='page-item disabled'><a class='page-link' href='#'>Previous</a></li>
                            <li class='page-item active'><a class='page-link' href='#'>1</a></li>
                            <li class='page-item'><a class='page-link' href='#'>2</a></li>
                            <li class='page-item'><a class='page-link' href='#'>3</a></li>
                            <li class='page-item'><a class='page-link' href='#'>Next</a></li>
                        </ul>
                    </nav>
                </div>
            </div>
        </div>

        <div class='row g-3 mt-4'>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-primary mb-1'>$13.4M</h3>
                        <small class='text-muted'>Total Revenue</small>
                    </div>
                </div>
            </div>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-success mb-1'>39,220</h3>
                        <small class='text-muted'>Units Sold</small>
                    </div>
                </div>
            </div>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-info mb-1'>14.8%</h3>
                        <small class='text-muted'>Growth Rate</small>
                    </div>
                </div>
            </div>
            <div class='col-md-3'>
                <div class='card text-center'>
                    <div class='card-body'>
                        <h3 class='text-warning mb-1'>5</h3>
                        <small class='text-muted'>Active Regions</small>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>"

Dim pdf = renderer.RenderHtmlAsPdf(dataTableReport)
pdf.SaveAs("data-table-report.pdf")
$vbLabelText   $csharpLabel

這段代碼生成了一個複雜的數據表報告,具有漸變頭部、響應表格、狀態標籤和摘要指標。 IronPDF的Chrome渲染引擎保留了所有Bootstrap樣式,包括表格懸停效果、徽章顏色和分頁控件—這些功能超越了傳統PDF查看器的能力。 該引擎還支援JavaScript 渲染以生成動態內容、自訂字體UTF-8 國際字元

主要優勢 vs PrizmDoc 檢視器:

有關 Bootstrap PDF 生成的更多詳細資訊,請參閱完整的渲染文檔。 開發者也可以探索Angular 轉 PDF 轉換和其他JavaScript 框架支援。## IronPDF 和 PrizmDoc 檢視器的授權成本比較如何?

在檢視了兩個組件的技術結構和可用功能後,以下列出授權價格。 這是至關重要的,因為開發者希望在預算限制內滿足要求。

IronPDF 的授權選項有哪些?

IronPDF 授權從 $699 開始,適用於一個開發者的單一專案。 IronPDF 提供靈活的授權選項,包括開發授權、部署授權以及擴展選項以支持和更新。

對於公司或服務多個客戶的代理機構的開發者來說,授權也從 $699 開始,可以根據團隊規模和專案數量進行調整。 IronPDF 提供授權升級路徑以隨需擴展。

以下授權需要一次性付款:

開發者數量 價格
1-5 $699
6-10 $799
11-20 $899
21-50 $1,199
無限制 $1,199
  • 對於擁有多個地點的公司,授權從 $1199 開始
  • 對於 SaaS 服務,授權從 $1099 開始
  • 對於免版稅的 OEM 再分發,授權從 $1599 開始

注意:上述所有授權方案均包含1 年的支援和更新

閱讀更多關於所有可用的 IronPDF 授權方案。 開發者也可以在不同方式中應用授權金鑰,包括Web.config和環境變數。

PrizmDoc 檢視器的授權選項有哪些?

What Is the Cost of Self-Hosted PrizmDoc?

對於自行管理的伺服器,授權價格為每年 $7,900,包括標準支援。

閱讀更多關於 PrizmDoc 檢視器的所有可用套件。

How Much Does Cloud-Based PrizmDoc Cost?

該授權涵蓋基於雲的 PrizmDoc 檢視器服務,根據交易數量進行調整。

術語:

Transaction 指將請求發送到 PrizmDoc 檢視器伺服器並接收輸出(生成的文檔)。

預付款桶 意味著支付一次並接收不會過期的交易。

交易數量 預付款桶 每月 每年
200 $18
1,000 $89
2,000 $119
6,000 $254 $169 $1,859 (6,000 交易/月)
12,000 $434 $289 $3,179 (12,000 交易/月)
25,000 $699 $499 $5,459 (25,000 交易/月)
50,000 $1,199 $799 $8,789 (50,000 交易/月)
100,000 $1,199 $1,199 $10,989 (100,000 交易/月)
200,000 $2,549 $1,699 $19,188 (200,000 交易/月)
300,000 $3,299 $2,199 $25,188 (300,000 交易/月)
400,000 $4,049 $2,699 $31,188 (400,000 交易/月)
500,000 $4,799 $3,199 $37,188 (500,000 交易/月)

快速教程訪問

Html To Pdf Icon related to 快速教程訪問
### 獲取 C# IronPDF 快速入門手冊

一個免費的 PDF 資源指南,簡化 .NET 的 PDF 開發,包含常用功能的演練和 C# 及 VB.NET 專案的 PDF 操作、編輯、生成及保存範例。

下載指南
### 探索 IronPDF API 參考資料

探索 IronPDF C# 程式庫的 API 參考資料,包括 IronPDF 的所有功能、類別、方法、欄位、命名空間和列舉的詳細資訊。

查看 API 參考
Documentation related to 快速教程訪問

{i:(Accusoft 的 PrizmDoc 檢視器是其各自所有者的註冊商標。 本網站與 Accusoft 的 PrizmDoc 檢視器沒有任何關聯、認可或贊助。 所有產品名稱、標誌和品牌均為其各自所有者的財產。 比較僅供參考,並反映了撰寫本文時的公開信息。)}]

常見問題解答

怎樣在 C# 中將 HTML 轉換為 PDF?

您可以使用 IronPDF 的 RenderHtmlAsPdf 方法將 HTML 字符串轉換為 PDF。您還可以使用 RenderHtmlFileAsPdf 將 HTML 文件轉換為 PDF。

使用 IronPDF 而不是 PrizmDoc Viewer 進行 PDF 轉換的優點是什麼?

IronPDF 提供了一個簡便的本地 PDF 渲染解決方案,支持離線工作,無需異步程序設計。相比之下,PrizmDoc 查看器通過 REST API 運行,需要網路連接以便與遠程服務器進行交互。

我可以使用 PDF 庫合併多個 PDF 文檔嗎?

可以,使用 IronPDF,您可以使用 MergePdf 方法合併多個 PDF,讓您可以無縫地組合文檔。

IronPDF 如何處理 PDF 到圖像的轉換?

IronPDF 允許您輕鬆使用其內置方法將 PDF 頁面轉換為圖像,提供了一種簡化的方法,與其他軟件相比。

IronPDF 中的頁眉和頁腳自定義選項有哪些?

IronPDF 提供了豐富的功能來設置頁眉和頁腳屬性,具有簡單的編程結構,使您可以輕鬆自定義文檔。

IronPDF 適合離線 PDF 處理嗎?

是的,IronPDF 支持離線 PDF 處理,這意味著您可以在沒有網路連接的情況下工作,不像某些其他解決方案需要遠程服務器交互。

IronPDF 許可的成本結構是什麼樣的?

IronPDF 許可費用從單個開發團隊的單個項目 $699 起,並為公司和 SaaS 服務提供可擴展的選擇,提供經濟實惠的一次性付款解決方案。

我可以免費使用 IronPDF 進行開發嗎?

是的,IronPDF 為開發提供免費使用,不限時間,並提供 30 天部署試用,以便您的項目實施。

PrizmDoc Viewer 如何處理 HTML 到 PDF 的轉換?

PrizmDoc Viewer 使用 REST API 進行 HTML 到 PDF 的轉換,需要異步程序設計和網路連接來與遠程服務器交互。

自託管 PrizmDoc Server 的系統要求是什麼?

自託管 PrizmDoc 服務器需要至少 32 GB RAM 和 4 核心 CPU,以滿足其處理需求。

IronPDF 是否與 .NET 10 完全相容?

是的。IronPDF 支援 .NET 10(以及 .NET 9、8、7、6、.NET Core、.NET Standard 和 .NET Framework)。它通過 NuGet 安裝,可以在 Windows、Linux 和 macOS 上運行,並使用其本機的 Chrome 渲染器在 .NET 10 應用程序中提供像素級精確的 HTML 到 PDF 渲染。

Curtis Chau
技術作家

Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。

除了開發之外,Curtis 對物聯網 (IoT) 有著濃厚的興趣,探索將硬體和軟體結合的創新方式。在閒暇時間,他喜愛遊戲並構建 Discord 機器人,結合科技與創意的樂趣。

鋼鐵支援團隊

我們每週 5 天,每天 24 小時在線上。
聊天
電子郵件
打電話給我