IronPDF vs Accusoft PDF Görüntüleyici: HTML'den PDF'ye En İyi Hangi C# Kütüphanesi?
IronPDF ve Accusoft PDF Viewer her ikisi de .NET'te HTML'den PDF'e dönüştürme işlemi yapar. IronPDF, basit bir sözdizimi, bulut bağımlılığı olmadan yerel işleme ve $999'dan başlayan sınırsız dönüşümler sunar. Buna karşılık, Accusoft internet bağlantısı gerektirir ve işlem başına ücret alır.
Genel Bakış
IronPDF Nedir ve Nasıl Çalışır?
IronPDF, geliştiricilerin HTML string, WebPage ve URL gibi kaynaklardan PDF dosyaları oluşturmasına olanak tanıyan bir C# HTML'den PDF'e kütüphanesidir. Ayrıca Filigran, Yer İmi ve Başlık ve Altbilgi gibi özelliklerin ayarlanmasına da izin verir. Ek olarak, geliştiriciler birden fazla PDF dosyasını birleştirebilir veya PDF sayfalarını görüntülere dönüştürebilir ve bunun tersini görüntüden PDF'e dönüştürme kullanarak yapabilirler.
IronPDF, geliştirme için ücretsizdir ve canlı projeler için 30 günlük bir dağıtım denemesi sunar. Geliştiricilerin hızlı bir şekilde başlamasına yardımcı olmak için tam dokümantasyon, kod örnekleri ve API referansı sağlar.
Accusoft PrizmDoc Viewer Nedir ve Nasıl Çalışır?
PrizmDoc Viewer, PDF dosyaları ile çalışan ve bunları uzaktan diğer formatlara dönüştüren bir REST API'dir. PrizmDoc, 100'den fazla farklı dosya formatını PDF'e ve PDF'i PNG, JPG, TIFF ve SVG'ye dönüştürebilir. Ayrıca uygulamalar için çeşitli elektronik imza seçenekleri sunar.
IronPDF ve PrizmDoc Viewer Nasıl Karşılaştırılır?
| IronPDF | PrizmDoc Görüntüleyici |
|---|---|
| PDF dosyalarıyla programlı olarak çalışın. | PDF dosyalarıyla programlı olarak çalışın. |
| Windows, Mac veya Linux ile .NET Core destekler. | Windows, Mac veya Linux kullanarak .NET Core destekler. |
| Yerel olarak çalışır | Belgeleri uzak bir sunucuya gönderir. |
| Asenkron Programlama ile veya olmadan çalışır. | System.Threading.Tasks ile Asenkron Programlama kullanmak zorundadır. |
| Yüklendikten sonra çevrimdışı çalışır. | PrizmDoc sunucu istekleri için internet bağlantısı gerektirir. |
| Birçok önceden tanımlanmış fonksiyon sağlar. | Bazı önceden tanımlanmış fonksiyonlar sağlar. |
| Genellikle minimal kod satırları gerektirir. | Genellikle birçok kod satırı gerektirir. |
| Her lisans için projede sınırsız dönüşüm. | Bulut barındırmalı lisanslarda sınırlı işlemler. |
| Zaman sınırlaması olmadan geliştirme için ücretsiz. | Deneme sürümü ile sınırlı işlemler. |
Her iki kütüphaneyi de yükleyelim ve kodu karşılaştıralım.
Adım 1: Kurulum
IronPDF'i .NET Projemde Nasıl Kurarım?
Bir projeye IronPDF yüklemenin iki yolu vardır ve yaklaşımlar arasında fark yoktur. IronPDF, Azure dağıtımı, AWS Lambda, Docker konteynerleri ve Blazor uygulamaları dahil olmak üzere çeşitli ortamları destekler.
IronPDF'i İndirmenin Farklı Yolları Nelerdir?
IronPDF.dll dosyasını indirin ve projeye referans olarak ekleyin. Geliştiriciler ayrıca sistem genelinde kurulum için Windows Installer kullanabilirler. Bundan sonra, IronPDF ad alanı şu şekilde erişilebilir hale gelir:
using IronPdf;Imports IronPdfImports IronPdfArtık geliştiriciler, IronPDF'in sağladığı fonksiyonlar ve sınıflara kolayca erişebilirler, bunlar arasında ChromePdfRenderer ile render etme, PDF belge manipülasyonu ve güvenlik özellikleri bulunmaktadır.
IronPDF'i NuGet Paket Yöneticisi ile Nasıl Kurarım?
-
Paket Yöneticisi Konsolu:
Paket Yöneticisi Konsolu'nu kullanıyorsanız, aşağıdaki komutu çalıştırın:
-
Çözüm için Paketleri Yönet:
NuGet Paket Yöneticisi GUI'sini kullanıyorsanız, arama çubuğunda IronPDF'i arayın ve yükleyin. Gelişmiş kurulum seçenekleri, Linux, macOS veya Windows için platforma özgü paketler dahil, kurulum kılavuzuna başvurun.
Accusoft'tan PrizmDoc Viewer'ı Nasıl Kurarım?
PrizmDoc Viewer iki parçadan oluşur: RESTful API gibi davranan sunucu tarafı bileşeni PrizmDoc Server ve API'ye istek gönderen ve yanıtları alan istemci projesi. Harici bağımlılıklar olmadan yerel olarak çalışan IronPDF'in aksine, PrizmDoc bulut tabanlı işlemler için ağ bağlantısı gerektirir.
PrizmDoc Sunucusuna Nasıl Erişebilirim?
PrizmDoc Sunucu, belgelerle birlikte temel bilgileri istekler (girdi) olarak alan ve belgeleri PDF dosyalarına dönüştüren, ardından dönüştürülen PDF dosyalarını yanıtlar (çıktı) olarak geri gönderen bir sunucu tarafı uygulamadır. Ürünün teknik kalbi olarak hizmet eder - bir belge işleme ve dönüştürme motoru. Geliştiriciler, aynı programlama yapısı ve tekniklerine sahip iki farklı yöntemle kullanabilirler:
- Kendi Sunucunuzda Barındırma:
Bu seçenek bir sunucu düzenlemeyi gerektirir. PrizmDoc Server'ı İndirin ve ardından kurun. PrizmDoc Sunucusunu Windows'a nasıl kuracağınızı daha fazla okuyun.
Not: Kendi sunucunuzda barındırılan PrizmDoc Server, önemli bellek ve işlem kaynakları gerektirir - mevcut gereksinimler için Accusoft'un boyutlandırma kılavuzuna başvurun. Buna karşılık, IronPDF'in sistem gereksinimleri çok daha mütevazıdır.
- Bulut Tabanlı Barındırma:
Bu bulut tabanlı hizmet, bir sunucu düzenleme ihtiyacını ortadan kaldırır. Bu seçeneği kullanmak için, bir hesap oluşturun ve ana sayfadaki API Key menüsünden API key kopyalayın.
Öncelikle, C# Konsol Uygulamasında WebClient() kullanarak Accusoft server ile doğrudan etkileşimde bulunarak belgeleri PDF dosyalarına dönüştürmek için PrizmDoc Viewer ile çalışma yapısının temelini inceleyelim.
Not: Aşağıdaki örnek, PrizmDoc'in PDF dosyalarını kavramsal olarak nasıl ele aldığını göstermektedir. Uzun olduğu için bu örneği atlayabilir ve doğrudan karşılaştırmaya geçebilirsiniz.
Accusoft'un Çalışma Yapısı Nasıl İşler?
Bu örnek myWebpage.html'i sample.pdf'e dönüştürür. IronPDF'in basit HTML'den PDF'e dönüştürme işleminin aksine, PrizmDoc birden fazla API çağrısı gerektirir.
Not: Newtonsoft.Json kütüphanesi projede kurulmuş ve referans verilmiş olmalıdır.
Öncelikle, projeye aşağıdaki kütüphaneleri ekleyin:
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 Managerusing System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq; // Install Newtonsoft.Json via NuGet Package ManagerImports System
Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Threading.Tasks
Imports Newtonsoft.Json.Linq ' Install Newtonsoft.Json via NuGet Package ManagerImports System
Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Threading.Tasks
Imports Newtonsoft.Json.Linq ' Install Newtonsoft.Json via NuGet Package ManagerArdından, bir genel değişken Accusoft API Key oluşturun ve API Anahtarını içine yapıştırın:
static string ApiKey = "Your-API-KEY";static string ApiKey = "Your-API-KEY";Private Shared ApiKey As String = "Your-API-KEY"Private Shared ApiKey As String = "Your-API-KEY"PrizmDoc Viewer ile PDF dosyalarını işlemek için 3 adım vardır:
- Dosyayı
PrizmDocsunucusuna yükleyin. - Yüklenen dosyayı dönüştürün.
- Dönüştürülen dosyayı
PrizmDocsunucusundan indirin.
Her adımı ayrı bir fonksiyon ele alır:
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 SubShared 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 Sub1. Dosyayı Sunucuya Yükleyin:
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("https://api.accusoft.com/PCCIS/V1/WorkFile");
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("https://api.accusoft.com/PCCIS/V1/WorkFile");
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 = New Uri("https://api.accusoft.com/PCCIS/V1/WorkFile")
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 FunctionPublic 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 = New Uri("https://api.accusoft.com/PCCIS/V1/WorkFile")
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 Function2. Yüklenen Dosyayı PDF'e Dönüştürün:
public static async Task<JObject> Convert(string affinityToken, string fileID)
{
var endpoint = new Uri("https://api.accusoft.com/v2/contentConverters");
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("https://api.accusoft.com/v2/contentConverters");
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("https://api.accusoft.com/v2/contentConverters")
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 FunctionPublic Shared Async Function Convert(affinityToken As String, fileID As String) As Task(Of JObject)
Dim endpoint = New Uri("https://api.accusoft.com/v2/contentConverters")
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 FunctionAşağıdaki JSON, myJson nesnesinin elde edilen değeridir:
{
"input": {
"sources":
[
{"fileId": "Auto Generated FileId Value"}
],
"dest": {
"format": "pdf"
}
}
}
Dönüştürmenin tamamlanıp tamamlanmadığını kontrol edin
public static async Task<JObject> ConvertStatus(string processId, string affinityToken)
{
string endpoint = "https://api.accusoft.com/v2/contentConverters/" + 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 = "https://api.accusoft.com/v2/contentConverters/" + 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 = "https://api.accusoft.com/v2/contentConverters/" & 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 FunctionPublic Shared Async Function ConvertStatus(processId As String, affinityToken As String) As Task(Of JObject)
Dim endpoint As String = "https://api.accusoft.com/v2/contentConverters/" & 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 Function3. Dönüştürülen dosyayı sunucudan indirin
public static async Task DownloadFromServer(string affinityToken, string fileId, string outfile)
{
var endpoint = new Uri("https://api.accusoft.com/PCCIS/V1/WorkFile/" + 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("https://api.accusoft.com/PCCIS/V1/WorkFile/" + 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 = New Uri("https://api.accusoft.com/PCCIS/V1/WorkFile/" & fileId)
Using client = New WebClient()
client.Headers.Add("acs-api-key", ApiKey)
client.Headers.Add("Accusoft-Affinity-Token", affinityToken)
Dim output As New FileInfo(outfile)
Using writeStream = output.Create()
Dim results = Await client.DownloadDataTaskAsync(endpoint)
Await writeStream.WriteAsync(results, 0, results.Length)
End Using
End Using
End FunctionPublic Shared Async Function DownloadFromServer(affinityToken As String, fileId As String, outfile As String) As Task
Dim endpoint = New Uri("https://api.accusoft.com/PCCIS/V1/WorkFile/" & fileId)
Using client = New WebClient()
client.Headers.Add("acs-api-key", ApiKey)
client.Headers.Add("Accusoft-Affinity-Token", affinityToken)
Dim output As New FileInfo(outfile)
Using writeStream = output.Create()
Dim results = Await client.DownloadDataTaskAsync(endpoint)
Await writeStream.WriteAsync(results, 0, results.Length)
End Using
End Using
End FunctionYukarıdaki örnek önemli çaba gerektirir. İş yükünü en aza indirmek için, Accusoft, PrizmDoc Server REST API'sinin bir sarmalayıcısı olan Accusoft.PrizmDocServerSDK adlı bir .NET kütüphanesi tanıttı. Bu kütüphaneyi .NET projelerinde nasıl kuracağımızı ve kullanacağımızı inceleyelim.
Accusoft.PrizmDocServerSDK Nasıl Kurulur?
Sarmalayıcıyı kurmanın iki yolu vardır.
-
Paket Yöneticisi Konsolu:
Paket Yöneticisi Konsolu'nu kullanıyorsanız, aşağıdaki komutu çalıştırın:
-
Çözüm için Paketleri Yönet:
NuGet Paket Yöneticisi GUI'sini kullanıyorsanız, arama çubuğunda
Accusoft.PrizmDocServerSDKarayın ve yükleyin.
Artık geliştiriciler Accusoft.PrizmDocServer ad alanına kolayca erişebilir ve kullanabilir:
using Accusoft.PrizmDocServer;using Accusoft.PrizmDocServer;Imports Accusoft.PrizmDocServerImports Accusoft.PrizmDocServerNasıl Yapılır Eğitimleri
IronPDF ve PrizmDoc Viewer Kod Örneklerinde Nasıl Karşılaştırılır?
Her iki bileşenin tanıtımı ve kurulumu incelendikten sonra, her ikisiyle de çalışmanın zamanı geldi. Aşağıdaki kullanım durumları, programlama yapısını anlamaya ve proje gereksinimlerine hangisinin uygun olduğunu belirlemeye yardımcı olmak için her iki bileşeni kullanarak uygulamayı göstermektedir.
IronPDF ve PrizmDoc Viewer Kullanarak HTML'yi PDF'ye Nasıl Dönüştürürüm?
Bu karşılaştırma için, myWebPage.html adlı bir web sayfasını PDF dosyasına dönüştürelim ve hedef konuma kaydedelim. IronPDF'nin Chrome render motoru, CSS, JavaScript ve web yazı tipleri için tam destekle piksel mükemmelliğinde dönüşüm sağlar.
IronPDF HTML'yi PDF'ye Nasıl Dönüştürür?
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 SubImports 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 SubYukarıdaki kod, bir sample.pdf dosyası oluşturur ve projedeki bin>debug klasörüne kaydeder. IronPDF ayrıca HTML dizgileri, URL'ler ve hatta HTML içeren ZIP dosyaları gibi giriş kaynaklarını da destekler.
Geliştiriciler ayrıca PDF.SaveAs("E:/sample.pdf"); gibi herhangi bir yolu belirtebilir veya bulut dağıtımları için bellek akışına kaydedebilir.
IronPDF ile PDF dosyalarıyla çalışmak hakkında daha fazla okuyun.
Şimdi, karşılaştırma için aynı görevi PrizmDoc Viewer kullanarak gerçekleştirelim.
PrizmDoc Viewer HTML'yi PDF'ye Nasıl Dönüştürür?
PrizmDoc Viewer kurulum bölümünde, Accusoft API Key elde edilmesi tartışıldı. İşte nasıl kullanılacağı.
Öncelikle, PrizmDoc sunucusuna bir istek gönderin ve bir yanıt alın. Bu işlem zaman alır ve Asenkron Programlama gerektirir. IronPDF ayrıca performansı artırmak için asenkron yöntemleri destekler.
Not: PrizmDoc Viewer'ın bulut hizmetlerini kullanarak PDF dosyaları oluştururken sistemin internete bağlı olduğundan emin olun.
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("https://api.accusoft.com", "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("https://api.accusoft.com", "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
Private Shared Sub Main(args As String())
ChromePdfRenderer().GetAwaiter().GetResult()
End Sub
Private Shared Async Function ChromePdfRenderer() As Task
' Instantiate PrizmDocServerClient object
Dim prizmDocServer = New PrizmDocServerClient("https://api.accusoft.com", "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 FunctionImports Accusoft.PrizmDocServer
Imports Accusoft.PrizmDocServer.Conversion
Private Shared Sub Main(args As String())
ChromePdfRenderer().GetAwaiter().GetResult()
End Sub
Private Shared Async Function ChromePdfRenderer() As Task
' Instantiate PrizmDocServerClient object
Dim prizmDocServer = New PrizmDocServerClient("https://api.accusoft.com", "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 FunctionPrizmDoc Viewer ile çalışmak hakkında daha fazla okuyun.
Hangi Kütüphane Daha Basit HTML'den PDF'ye Dönüşüm Sağlar?
Bu örnekler, IronPDF'nin PDF dosyaları oluşturmak için daha basit bir yaklaşım sunduğunu ve daha az zaman gerektirdiğini göstermektedir. IronPDF ayrıca özel kağıt boyutları, kenar boşlukları ve görünüm ayarları dahil olmak üzere çıktıyı ince ayarlamak için render seçenekleri sağlar.
IronPDF ve PrizmDoc Viewer Kullanarak Görüntüleri PDF'ye Nasıl Dönüştürürüm?
Bu karşılaştırma, projenin debug klasöründe bulunan bir Görüntüden PDF dosyası oluşturmayı göstermektedir. Geliştiriciler IronPDF ile başlar.
IronPDF Görüntüleri PDF'ye Nasıl Dönüştürür?
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 SubImports 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 SubIronPDF ayrıca çok çerçeveli TIFF dönüşümü, Azure Blob Storage'dan görüntü yerleştirme ve Base64 görüntü yerleştirme destekler.
Çıktı:
Bu ekran görüntüsü, yukarıdaki kod kullanılarak yeni oluşturulan sample.pdf PDF dosyasını göstermektedir:
IronPDF kullanarak bir görüntüden PDF dosyası oluşturmak basittir. Şimdi, aynı görevi PrizmDoc Viewer kullanarak gerçekleştirelim ve oluşturulan PDF dosyasını inceleyelim.
PrizmDoc Viewer Görüntüleri PDF'ye Nasıl Dönüştürür?
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("https://api.accusoft.com", "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("https://api.accusoft.com", "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
Sub Main(args As String())
ImageToPDF().GetAwaiter().GetResult()
End Sub
Private Shared Async Function ImageToPDF() As Task
' Instantiate PrizmDocServerClient object
Dim prizmDocServer = New PrizmDocServerClient("https://api.accusoft.com", "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 FunctionImports Accusoft.PrizmDocServer
Imports Accusoft.PrizmDocServer.Conversion
Sub Main(args As String())
ImageToPDF().GetAwaiter().GetResult()
End Sub
Private Shared Async Function ImageToPDF() As Task
' Instantiate PrizmDocServerClient object
Dim prizmDocServer = New PrizmDocServerClient("https://api.accusoft.com", "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Çıktı: Bu ekran görüntüsü, yukarıdaki koddan yeni oluşturulan sample.pdf PDF dosyasını göstermektedir:
Görüntüden PDF'ye Dönüştürme İçin Hangi Kütüphane Daha Az Kod Gerektirir?
IronPDF yalnızca iki satır kod gerektirir. Buna karşılık, PrizmDoc sunucusunu kullanmak, eşzamanlı programlama ile daha fazla kod satırı gerektirir. IronPDF'den çıkan sonuç, ayrıca kullanışlı tam sayfa bir belge sağlar. IronPDF, görüntü konumlandırma ve birden fazla görüntü dönüştürme için ek seçenekler sunar.
IronPDF ve PrizmDoc Viewer Kullanarak Birden Fazla PDF Dosyasını Nasıl Birleştiririm?
Bu karşılaştırma için, A.pdf, B.pdf ve C.pdf adında üç PDF dosyasının mevcut olduğunu varsayın. Görev, bu dosyaları tek bir PDF dosyasında birleştirmektir. Her iki bileşen de bu görevi gerçekleştirebilir. İlk olarak, bu işlemin IronPDF kullanılarak nasıl yapıldığını gösteren örnek.
IronPDF PDF Dosyalarını Nasıl Birleştirir?
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 SubImports 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 SubYukarıdaki kod, sample.pdf dosyasını oluşturur ve bu dosya A.pdf, B.pdf ve C.pdf dosyalarını birleştirir. IronPDF ayrıca PDF'ler arasında sayfa ekleme ve kopyalama ve PDF'leri bölme işlemlerini destekler.
Şimdi, aynı görevi PrizmDoc Viewer kullanarak gerçekleştirelim.
PrizmDoc Viewer PDF Dosyalarını Nasıl Birleştirir?
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("https://api.accusoft.com", "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("https://api.accusoft.com", "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(args As String())
PdfMerge().GetAwaiter().GetResult()
End Sub
Private Async Function PdfMerge() As Task
' Instantiate PrizmDocServerClient object
Dim prizmDocServer = New PrizmDocServerClient("https://api.accusoft.com", "Your-API-KEY")
' Pass the list of pdf files to PrizmDoc Server
Dim result As ConversionResult = Await prizmDocServer.CombineToPdfAsync(
{
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 ModuleImports System.Threading.Tasks
Imports Accusoft.PrizmDocServer
Imports Accusoft.PrizmDocServer.Conversion
Module Module1
Sub Main(args As String())
PdfMerge().GetAwaiter().GetResult()
End Sub
Private Async Function PdfMerge() As Task
' Instantiate PrizmDocServerClient object
Dim prizmDocServer = New PrizmDocServerClient("https://api.accusoft.com", "Your-API-KEY")
' Pass the list of pdf files to PrizmDoc Server
Dim result As ConversionResult = Await prizmDocServer.CombineToPdfAsync(
{
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 ModuleYukarıdaki kod, sample.pdf dosyasını oluşturur ve bu dosya A.pdf, B.pdf ve C.pdf dosyalarını birleştirir.
IronPDF ve PrizmDoc Viewer Kullanarak PDF'lere Başlık ve Altbilgi Nasıl Eklerim?
Bu karşılaştırma için, aşağıdaki HTML ve CSS ile myWebPage.html adında basit bir WebPage dosyasının mevcut olduğunu varsayın:
<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>
Amaç, bu WebPage dosyasını aşağıdaki Başlık ve Altbilgi özellikleriyle bir PDF dosyasına dönüştürmektir:
- Başlığın sol tarafında
Page Title - Başlığın sağ tarafında
DateTime - Altbilginin sağ tarafında
Page Number of Total Pages
Öncelikle, IronPDF'in Başlık ve Altbilgileri nasıl ele aldığını inceleyelim.
IronPDF PDF Başlık ve Altbilgilerini Nasıl Ele Alır?
PDF dosyalarının Başlık ve Altbilgilerini ele almak için, IronPDF, ChromePdfRenderer sınıfında RenderingOptions adında bir özellik sağlar ve bu özellik aşağıdaki gibi kullanılabilir:
-
Başlık İçin:
ChromePdfRenderer_Obj.RenderingOptions.TextHeader = new TextHeaderFooter();ChromePdfRenderer_Obj.RenderingOptions.TextHeader = new TextHeaderFooter();ChromePdfRenderer_Obj.RenderingOptions.TextHeader = New TextHeaderFooter()ChromePdfRenderer_Obj.RenderingOptions.TextHeader = New TextHeaderFooter() -
Altbilgi İçin:
ChromePdfRenderer_Obj.RenderingOptions.TextFooter = new TextHeaderFooter();ChromePdfRenderer_Obj.RenderingOptions.TextFooter = new TextHeaderFooter();ChromePdfRenderer_Obj.RenderingOptions.TextFooter = New TextHeaderFooter()ChromePdfRenderer_Obj.RenderingOptions.TextFooter = New TextHeaderFooter()
TextHeaderFooter() başlatılırken aşağıdaki özellikler ayarlanabilir:
CenterTextBaşlık veya Altbilginin ortasında metin yazdırmak içinLeftTextBaşlık veya Altbilginin sol tarafında metin yazdırmak içinRightTextBaşlık veya Altbilginin sağ tarafında metin yazdırmak içinDrawDividerLineSayfa içeriğini Başlık veya Altbilgiden ayıran bir çizgi çizerFontFamilyBaşlık veya Altbilginin yazı tipi ailesini belirtmek içinFontSizeBaşlık veya Altbilginin yazı tipi boyutunu belirtmek için- Boşluk Sayfa içeriği ile Başlık veya Altbilgi arasındaki boşluğu ayarlar
Başlık veya Altbilgi içeriğini ayarlamaya yardımcı olan aşağıdaki önceden tanımlanmış öznitelikler vardır. Bunlar süslü parantez içinde yazılır { }:
{page}Başlık veya Altbilgide geçerli sayfa numarasını yazdırır{total-pages}Başlık veya Altbilgide toplam sayfa sayısını yazdırır{url}İşlenen sayfanın URL'sini yazdırır{date}Başlık veya Altbilgide geçerli tarihi yazdırır{time}Başlık veya Altbilgide geçerli saati yazdırır{html-title}İşlenen web sayfasının başlığını Başlık veya Altbilgide yazdırır{pdf-title}Belge başlığını Başlık veya Altbilgide yazdırır
IronPDF kullanarak Başlık ve Altbilgilerle çalışmak hakkında daha fazla bilgi için Detaylı Okuyun. IronPDF ayrıca daha karmaşık tasarımlar için HTML başlıkları ve altbilgileri destekler.
Aşağıdaki örnek, yukarıdaki özellikleri kullanarak kullanım durumunu uygulamayı ve nasıl kullanılacağını göstermektedir:
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 SubImports 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Çıktı: Yukarıdaki kodla oluşturulan yeni PDF dosyasının sample.pdf ekran görüntüsü:
IronPDF kullanarak Başlık ve Altbilgilerle çalışmak, PDF dosyaları oluştururken sezgisel bir dil içerir. Şimdi, örnek PrizmDoc Viewer'ın Başlık ve Altbilgileri nasıl ele aldığını gösteriyor.
PrizmDoc Görüntüleyici PDF Başlıklarını ve Altbilgilerini Nasıl Ele Alır?
PrizmDoc Görüntüleyici, Başlıklar ve Altbilgilerle başa çıkmak için HeaderFooterOptions sınıfını sağlar ve aşağıdaki özelliklere sahiptir:
- Lines, Başlık ve Altbilgi için satır(lar)ı belirtir, her satırın aşağıdaki özellikleri vardır:
- Left, Başlık veya Altbilgi satırının sol tarafına metin yazdırır
- Center, Başlık veya Altbilgi satırının ortasına metin yazdırır
- Right, Başlık veya Altbilgi satırının sağ tarafına metin yazdırır
FontFamily, Başlık veya Altbilgi metninin yazı tipi ailesini belirtmek içinFontSize, Başlık veya Altbilgi metninin yazı tipi boyutunu belirtmek için- Color, Başlık veya Altbilgi metninin rengini belirtmek için
PrizmDoc sunucusunu kullanarak PDF sayfalarının Başlıklarını ve Altbilgilerini ayarlama hakkında Daha Fazla Bilgi Edinin.
Örnek, yukarıdaki özellikleri kullanarak kullanım durumunu nasıl uygulayacağınızı gösterir:
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("https://api.accusoft.com", "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("https://api.accusoft.com", "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
Sub Main(args As String())
SetHeaderFooter().GetAwaiter().GetResult()
End Sub
Private Shared Async Function SetHeaderFooter() As Task
' Instantiate PrizmDocServerClient object with Header and footer properties
Dim prizmDocServer = New PrizmDocServerClient("https://api.accusoft.com", "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 FunctionImports System.Threading.Tasks
Imports System.Collections.Generic
Imports Accusoft.PrizmDocServer
Imports Accusoft.PrizmDocServer.Conversion
Sub Main(args As String())
SetHeaderFooter().GetAwaiter().GetResult()
End Sub
Private Shared Async Function SetHeaderFooter() As Task
' Instantiate PrizmDocServerClient object with Header and footer properties
Dim prizmDocServer = New PrizmDocServerClient("https://api.accusoft.com", "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Çıktı:
Yukarıdaki kodla oluşturulan yeni PDF dosyasının ekran görüntüsü:
Hangi Kütüphane Başlıklar ve Altbilgiler İçin Daha Fazla Esneklik Sunar?
IronPDF, PrizmDoc Görüntüleyiciye kıyasla basit bir programlama yapısıyla Başlık ve Altbilgi özelliklerini ayarlamak için daha fazla işlev sunar. IronPDF tarafından üretilen PDF dosyası, PrizmDoc Görüntüleyici tarafından üretilen dosyadan daha okunabilir ve çekicidir. IronPDF ayrıca geliştirilmiş belge kontrolü için sayfa numaraları ve sayfa sonları destekler.
IronPDF ve PrizmDoc Görüntüleyici Kullanarak PDF Sayfalarını Görüntülere Nasıl Dönüştürürüm?
Bu karşılaştırma için, iki sayfadan oluşan Sample_PDF.pdf adlı basit bir PDF dosyanız olduğunu varsayalım.
Görev, her sayfanın bir görüntüsünü oluşturmak. İlk olarak, bu işlemi IronPDF kullanarak nasıl gerçekleştireceğimizi göreceğiz.
IronPDF PDF Sayfalarını Görüntülere Nasıl Dönüştürür?
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 SubImports 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 SubIronPDF ayrıca görüntüleri bellek akışına kaydetmeyi ve JPEG, TIFF ve daha fazlası dahil farklı görüntü formatlarını destekler.
Çıktı:
Yukarıdaki kod, aşağıdaki iki .png görüntüyü oluşturur:
IronPDF kullanarak PDF sayfalarının görüntülerini oluşturmak basittir. Şimdi, aynı görevi PrizmDoc Viewer kullanarak gerçekleştirelim.
PrizmDoc Viewer PDF Sayfalarını Görüntülere Nasıl Dönüştürür?
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("https://api.accusoft.com", "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("https://api.accusoft.com", "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("https://api.accusoft.com", "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 ModuleImports 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("https://api.accusoft.com", "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Çıktı:
Yukarıdaki kod ayrıca aşağıdaki iki .png görüntüyü oluşturur:
Hangi Kütüphane PDF'den Görüntüye Dönüşümü Daha Kolay Hale Getirir?
PrizmDoc Viewer ile karşılaştırıldığında, IronPDF geliştiricilerin her sayfanın görüntülerini minimum kod satırıyla, hatta sayfalar arasında dolaşmadan kolayca oluşturmasına olanak tanır.
Bootstrap 5 Veri Tablolarını IronPDF ile Kullanabilir miyim?
IronPDF'nin Chrome V8 render motoru, geliştiricilerin karmaşık tablo düzenleriyle profesyonel PDF raporları oluşturmasına olanak tanıyan Bootstrap 5 veri tabloları için mükemmel destek sağlar. Bu örnek, gradyan başlıklar, durum rozetleri, sayfalama kontrolleri ve özet metrikleri gösterir - bu özellikler IronPDF'nin PrizmDoc gibi geleneksel PDF görüntüleyicilere karşı avantajını vurgular. IronPDF, flexbox düzenleri, gradyanlar ve duyarlı tasarım dahil olmak üzere modern CSS özelliklerini tamamen destekler.
using IronPdf;
var renderer = new ChromePdfRenderer();
string dataTableReport = @"
<!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>
.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='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' 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='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' 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")Imports IronPdf
Dim renderer = New ChromePdfRenderer()
Dim dataTableReport As String = "
<!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>
.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")Bu kod, gradyan başlıklar, duyarlı tablolar, durum rozetleri ve özet metriklerle sofistike bir veri tablosu raporu oluşturur. IronPDF'nin Chrome render motoru, tablo üzerine gelme efektleri, rozet renkleri ve sayfalama kontrolleri dahil olmak üzere tüm Bootstrap stilini korur - bu yetenekler geleneksel PDF görüntüleyicilerin ötesine geçer. Motor ayrıca dinamik içerik için JavaScript render, özel yazı tipleri ve UTF-8 uluslararası karakterler desteği sağlar.
PrizmDoc Görüntüleyiciye Karşı Temel Avantajlar:
- Dönüştürme olmadan doğrudan HTML tablo renderi
- Tam Bootstrap bileşen desteği
- Gradyan arka planlar ve modern CSS
- Doğru sayfalama ile duyarlı tablo düzenleri
- Karmaşık JavaScript grafikler desteği
- Baskı medya CSS işleme
Bootstrap PDF oluşturma hakkında daha fazla ayrıntı için, tam render dokümantasyonuna bakın. Geliştiriciler ayrıca Angular'dan PDF'e dönüşüm ve diğer JavaScript çerçeve desteği keşfedebilirler.## IronPDF ve PrizmDoc Görüntüleyici Arasındaki Lisans Maliyetleri Nasıl Karşılaştırılır?
Her iki bileşenin teknik yapısı ve mevcut işlevleri incelendikten sonra, lisans fiyatlandırması aşağıdaki gibi özetlenmiştir. Bu, geliştiricilerin bütçe kısıtlamaları dahilinde gereksinimleri karşılamayı hedeflemesi açısından önemlidir.
IronPDF'nin Lisans Seçenekleri Nelerdir?
IronPDF lisansları, tek bir geliştirici için $999'dan başlar. IronPDF, geliştirme lisansları, dağıtım lisansları ve sürekli destek ve güncellemeler için genişletme seçenekleri dahil olmak üzere esnek lisanslama seçenekleri sunar.
Birden fazla müşteriye hizmet veren şirketler veya ajanslardaki geliştiriciler için, IronPDF, ekip büyüklüğüne ve proje sayısına göre ayarlanabilen kademeli lisanslama sunar. IronPDF, ihtiyaçlar geliştikçe lisans yükseltme yolları sunar.
Tüm IronPDF lisans paketleri 1 yıl destek ve güncellemeler içerir. Mevcut lisans paketleri, kademeler ve fiyatlandırma hakkında daha fazla bilgi için Daha Fazla Bilgi Edinin. Geliştiriciler ayrıca Web.config ve ortam değişkenleri dahil olmak üzere çeşitli yollarla lisans anahtarlarını uygulayabilir.
PrizmDoc Görüntüleyici Lisans Seçenekleri Nelerdir?
Self-Hosted PrizmDoc Maliyeti Nedir?
Self-hosted PrizmDoc Sunucusu yıllık lisans altında sunulmaktadır. PrizmDoc Görüntüleyici için güncel fiyatlandırma ve mevcut paketler hakkında bilgi almak için Accusoft ile iletişime geçin.
Bulut Tabanlı PrizmDoc Ne Kadar Maliyetlidir?
Bu lisans, PrizmDoc Görüntüleyicinin bulut tabanlı hizmetlerini kapsar ve işlem sayısına göre ölçeklenir.
Terminolojiler:
Transaction, PrizmDoc Görüntüleyici sunucusuna bir istek göndermeyi ve çıktıyı (sonuç belgesini) almayı ifade eder.
Prepaid Buckets, bir kez ödeme yapmayı ve süresi dolmayan işlemler almayı ifade eder.
Bulut fiyatlandırması kullanım bazlıdır ve işlem hacmi ile ölçeklenir. Güncel bulut fiyatlandırma katmanları ve oranları için Accusoft ile iletişime geçin.
Hızlı Eğitim Erişimi
C# IronPDF Hızlı Başlangıç El Kitabını Edinin
.NET için PDF geliştirmeyi basitleştiren, yaygın işlevlerin ve C# ve VB.NET projelerinde PDF'leri manipüle etme, düzenleme, oluşturma ve kaydetme örneklerinin yer aldığı ücretsiz bir PDF kaynak kılavuzu.
Kılavuzu İndirIronPDF API Referansını Keşfedin
IronPDF C# Kütüphanesi için API Referansını keşfedin, IronPDF'nin tüm özellikleri, sınıfları, yöntem alanları, ad alanları ve enumları hakkında detaylar içerir.
API Referansını GörüntülePrizmDoc Görüntüleyicisi, ilgili sahibinin tescilli ticari markasıdır. Bu site, Accusoft'un PrizmDoc Görüntüleyicisi ile bağlantılı, onaylanmış veya desteklenmiş değildir. Tüm ürün adları, logolar ve markalar ilgili sahiplerinin mülkiyetindedir. Karşılaştırmalar yalnızca bilgilendirme amaçlıdır ve yazım sırasında kamuya açık bilgileri yansıtır.Curtis Chau, Bilgisayar Bilimleri alanında Lisans Derecesine (Carleton Üniversitesi) sahip ve Node.js, TypeScript, JavaScript ve React konularında uzmanlaşmış ön uç geliştirmeyle ilgileniyor. Sezgisel ve estetik açıdan hoş kullanıcı arayüzleri oluşturma tutkunu, Curtis modern çerçevelerle çalışmayı ve iyi yapılandırılmış, görsel olarak çekici kılavuzlar oluşturmayı seviyor.
İlgili Makaleler
Bir Sorunu Bildir








