Altbilgi içeriğine atla
ÜRüN KARşıLAşTıRMALARı

IronPDF ve GroupDocs: Mühendislik Takımları Hangi PDF Kütüphanesini Seçmeli?

C# dilinde PDF dosyaları ile çalışmak geliştiriciler için zorlayıcı olabilir. Bu dosyalar için içerik oluştururken dikkate alınması gereken birçok faktör vardır ve farklı formatlardan PDF'ye içerik dönüştürülürken daha da fazlası vardır. Otomasyon, artık yazılım geliştirme süreçlerinde kritik öneme sahiptir. Bu zorluklar, PDF belgelerini okumaya, yazmaya, oluşturmaya ve değiştirmeye yardımcı olacak kütüphanelerin geliştirilmesiyle çözüldü ve bu belgelerin özelliklerini düzenlemek ve diğer formatlardan dönüştürmek için de vardır.

Bu blog yazısı, .NET ve .NET Core için iki PDF kütüphanesini karşılaştırıyor:

  • IronPDF kütüphanesi
  • Apitron PDF Kit

IronPDF ve Apitron PDF Kit, .NET ve .NET Core için PDF-manipülasyon işlevlerini sağlayan kütüphanelerdir. Her ikisi de belge alanları dönüştürme ve manipülasyon görevleri için kullanılabilir. Ayrıca yer imleri oluşturmayı da sağlarlar. Bir sonraki adım, .NET projelerimiz için hangi C# PDF .NET kütüphanesinin en iyi olduğuna karar vermektir. Bu karşılaştırma makalesi, bu iki PDF kütüphanesi arasında karar vermenize yardımcı olacaktır.

Öncelikle, iki kütüphanenin neler sunduğunu inceleyelim ve ardından karşılaştırmaya geçelim.

Apitron PDF Kit Kütüphanesi ve Özellikleri

Apitron PDF Kit, çeşitli yollarla PDF dosyalarını manipüle etmenize veya dönüştürmenize olanak tanıyan bir .NET bileşenidir. Görüntüler, çizimler ve metinler ekleyebilir, belgeleri imzalayabilir ve çok daha fazlasını yapabilirsiniz. Mevcut içeriği de düzenleyebilirsiniz. Apitron PDF Kit .NET bileşeni, mobil, masaüstü, web, Windows ve Bulut uygulamaları oluşturmak için çoklu platformlarda kullanılabilir.

Bu PDF SDK'sını kullanarak:

  • Grafik çıkarabilir, değiştirebilir ve ekleyebilirsiniz (metin, görüntüler, çizimler)
  • PDF belgelerini bölebilir veya birleştirebilirsiniz
  • Parola korumalı PDF formlarını doldurabilir veya oluşturabilirsiniz, FDF desteği
  • İsteğe bağlı içerik grupları (OCG) ile çok katmanlı PDF belgeleri oluşturabilirsiniz
  • Belgelerden alanlar ekleyebilir veya kaldırabilirsiniz
  • Sayfa içeriği oluşturmak için sağdan sola veya çift yönlü metin kullanabilirsiniz
  • Belgedeki kaynakları yoklayabilirsiniz - tanımlanmış yazı tipleri, gömülü dosyalar
  • PDF belgelerinde mevcut imzaları dijital olarak imzalayabilir ve kontrol edebilirsiniz

IronPDF'nin Ana Özellikleri

Geliştiriciler, özellikle C# programcıları, IronPDF .NET kütüphanesini takdir edeceklerdir. Bu araçla, .NET Core PDF işleme uygulamasını kolayca oluşturabilirsiniz.

IronPDF, .NET Chromium motorunu kullanarak HTML sayfalarını (kodda veya URL formunda) PDF dosyalarına dönüştürür. Geçiş nesnelerini konumlandırmak veya HTML'den PDF'ler tasarlamak için karmaşık API'ler kullanmanıza gerek yoktur. IronPDF tarafından desteklenen standart web belgeleri, HTML, ASPX, JS, CSS ve resimleri içerir.

IronPDF, HTML5, CSS, JS ve resimler kullanılarak oluşturulabilir. PDF kolayca düzenlenebilir, damgalanabilir ve başlıklar ve altbilgiler eklenebilir. Ayrıca, PDF metnini okumayı ve grafik çıkarmayı da basit hale getirir.

IronPDF'nin öne çıkan özellikleri arasında:

  • HTML4/5, CSS ve JavaScript kullanarak PDF belgeleri oluşturma
  • Özelleştirilmiş ağ oturum açma kimlik bilgileri, kullanıcı ajanları, proxy'ler, çerezler, HTTP başlıkları ve form değişkenleri ile URL'ler yükleme (HTML oturum açma formlarının arkasında oturum açma imkanı sağlar)
  • PDF form alanlarını okuma ve tamamlama
  • PDF'lerden metin ve grafik çıkarma
  • Yeni HTML içeriği ile PDF sayfalarını güncelleme
  • Metin veya HTML tabanlı başlıklar ve altbilgiler oluşturma
  • PDF belge içeriğini birleştirme ve ayırma
  • ASP.NET web formlarını yazdırılabilir PDF'lere dönüştürme
  • Adobe Acrobat yazılımı olmadan PDF dosyalarını yazdırma

IronPDF, C# ile uyumlu neredeyse tüm işletim sistemleri ve çerçevelerde mevcuttur, bunlar arasında:

  • .NET Core 2.1, 3.0, 3.1, .NET 6 & 5
  • Evrensel Uyumluluk için .NET Standard 2.0 Uyumlu
  • Azure, AWS, Docker, Linux, Windows

Makalenin geri kalanı şu şekildedir:

  1. IronPDF Kurulumu
  2. Apitron PDF Kit Kurulumu
  3. PDF Belgesi Oluşturma
  4. PDF'de Başlık ve Altbilgi Oluşturma
  5. PDF'yi Dijital Olarak İmzalama
  6. Fiyatlandırma ve Lisanslama

1. IronPDF Kurulumu

IronPDF kütüphanesini indirmek ve kurmak için dört yöntem vardır. Bunlar şunlardır:

  1. NuGet Paket Yöneticisini Kullanma
  2. Geliştirici Komut İstemini Kullanma
  3. NuGet Paketini doğrudan indirme
  4. IronPDF .DLL kütüphanesini indirme

1.1. NuGet Paket Yöneticisini Kullanma

IronPDF'yi kurmak için, Solution Explorer'da projenizin üzerine sağ tıklayın. Bu, NuGet Paket Yöneticisini açacaktır.

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 1: NuGet Paket Yöneticisine Erişim Sağlama için Solution Explorer'ı kullanma

NuGet Paket Yöneticisine Erişim Sağlama için Solution Explorer'ı kullanma

Seçildikten sonra, aşağıda gösterilen şekilde IronPDF paketine göz atıp kurun.

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 2: NuGet Paket Yöneticisini Kullanarak IronPDF kütüphanesini kurma

NuGet Paket Yöneticisini Kullanarak IronPDF kütüphanesini kurma

1.2. Geliştirici Komut İstemini Kullanma

IronPDF'yi Geliştirici Komut İsteminden de kurabilirsiniz.

  • Geliştirici Komut İstemi açın --- genellikle Visual Studio klasörü altında bulunur
  • Aşağıdaki komutu yazın:
Install-Package IronPdf
  • Enter tuşuna basın
  • Bu işlem paketi indirip kuracak
  • Projenizi yeniden yükleyin ve kullanmaya başlayın

1.3. NuGet Paketini Doğrudan İndirin

IronPDF, IronPDF NuGet Paketi sitesine gidilerek paketin indirilmesiyle de kurulabilir. Adımlar şunlardır:

  • IronPDF NuGet Paketi adresine gidin
  • Paket İndir'i seçin
  • İndirilen paketi çift tıklayın
  • Paket yüklenecek
  • Visual Studio projenizi yeniden yükleyin ve kullanmaya başlayın

IronPDF indirildi ve kullanıma hazır. Ancak, öncesinde Apitron PDF kütüphanesini yüklememiz gerekiyor.

2. Apitron PDF Kiti Kurulumu

.NET Core uygulamaları için NuGet Paket Yöneticisi kullanılarak Apitron kurulabilir veya doğrudan Apitron PDF Kit NuGet web sitesinden indirilebilir.

  • IronPDF'de olduğu gibi Visual Studio'da NuGet paketlerini açın.
  • Apitron.PDF.Kit arayın.
  • Mevcut projenizde Yükle'ye tıklayın.
A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 3: Apitron PDF Kit Arama

Apitron PDF Kit Arama

Apitron'u kurmak için NuGet Paket Yöneticisi Konsolu da kullanılabilir. IronPDF'de belirtildiği gibi 'Geliştirici Komut İstemini Kullan' adımını takip edin ve aşağıdaki komutu yazın:

Install-Package Apitron.PDF.Kit

ENTER tuşuna basın. Bu, Apitron.PDF.Kit'in indirilip kurulmasını sağlayacak.

Aşağıdaki ad alanlarını ekleyin:

using Apitron.PDF.Kit;
using Apitron.PDF.Kit.FixedLayout.Resources;
using Apitron.PDF.Kit.FixedLayout.Resources.Fonts;
using Apitron.PDF.Kit.FlowLayout.Content;
using Apitron.PDF.Kit.Styles;
using Apitron.PDF.Kit.Styles.Appearance;
using Font = Apitron.PDF.Kit.Styles.Text.Font;
using Apitron.PDF.Kit;
using Apitron.PDF.Kit.FixedLayout.Resources;
using Apitron.PDF.Kit.FixedLayout.Resources.Fonts;
using Apitron.PDF.Kit.FlowLayout.Content;
using Apitron.PDF.Kit.Styles;
using Apitron.PDF.Kit.Styles.Appearance;
using Font = Apitron.PDF.Kit.Styles.Text.Font;
Imports Apitron.PDF.Kit
Imports Apitron.PDF.Kit.FixedLayout.Resources
Imports Apitron.PDF.Kit.FixedLayout.Resources.Fonts
Imports Apitron.PDF.Kit.FlowLayout.Content
Imports Apitron.PDF.Kit.Styles
Imports Apitron.PDF.Kit.Styles.Appearance
Imports Font = Apitron.PDF.Kit.Styles.Text.Font
$vbLabelText   $csharpLabel

Şimdi, IronPDF ve Apitron PDF arasındaki karşılaştırmaya geçelim.

3. PDF Belgesi Oluşturma

3.1. IronPDF Kullanarak

IronPDF, PDF oluşturmak için birden fazla yöntem sunar. İki önemli olanını inceleyelim.

Var Olan URL'den PDF'e

IronPDF, herhangi bir URL'yi PDF'e dönüştürmeyi kolaylaştırır. Aşağıdaki kod, URL'yi PDF'e dönüştürmeye yardımcı olur.

var Renderer = new IronPdf.ChromePdfRenderer();
// Render a PDF from an existing URL
using var Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/");
// Save the PDF to a file
Pdf.SaveAs("url.pdf");
var Renderer = new IronPdf.ChromePdfRenderer();
// Render a PDF from an existing URL
using var Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/");
// Save the PDF to a file
Pdf.SaveAs("url.pdf");
Dim Renderer = New IronPdf.ChromePdfRenderer()
' Render a PDF from an existing URL
Dim Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/")
' Save the PDF to a file
Pdf.SaveAs("url.pdf")
$vbLabelText   $csharpLabel

HTML Giriş Dizesinden PDF

Aşağıdaki kod, bir HTML dizesinden PDF belgesi oluşturmayı açıklar. Sadece HTML kullanabilir veya bunu CSS, resimler ve JavaScript ile birleştirebilirsiniz.

var Renderer = new IronPdf.ChromePdfRenderer();
// Render a PDF from a simple HTML string
using var PDF = Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>");
PDF.SaveAs("pixel-perfect.pdf");

// Load external HTML assets like images, CSS, and JavaScript
// Set the optional BasePath as the file location to load assets from
using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>Sample Text</h1>", @"C:\site\assets\");
AdvancedPDF.SaveAs("html-with-assets.pdf");
var Renderer = new IronPdf.ChromePdfRenderer();
// Render a PDF from a simple HTML string
using var PDF = Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>");
PDF.SaveAs("pixel-perfect.pdf");

// Load external HTML assets like images, CSS, and JavaScript
// Set the optional BasePath as the file location to load assets from
using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>Sample Text</h1>", @"C:\site\assets\");
AdvancedPDF.SaveAs("html-with-assets.pdf");
Dim Renderer = New IronPdf.ChromePdfRenderer()
' Render a PDF from a simple HTML string
Dim PDF = Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>")
PDF.SaveAs("pixel-perfect.pdf")

' Load external HTML assets like images, CSS, and JavaScript
' Set the optional BasePath as the file location to load assets from
Dim AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>Sample Text</h1>", "C:\site\assets\")
AdvancedPDF.SaveAs("html-with-assets.pdf")
$vbLabelText   $csharpLabel

Çıktı şu şekildedir:

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 4: IronPDF URL ve HTML CSS Dizisinden PDF Oluştur

IronPDF URL ve HTML CSS Dizisinden PDF Oluştur

3.2. Apitron PDF Kiti Kullanarak

Apitron PDF, bir URL veya HTML'yi PDF'e dönüştürme imkanı sunmaz. PDF'i HTML'ye dönüştürme imkanı sunar. Ayrıca XML dosyalarını PDF'e dönüştürür. Kullanılan XML dosyası:

<?xml version="1.0" encoding="utf-8"?>
<FlowDocument xmlns="Apitron.PDF.Kit.FlowLayout.v1">
  <Resources>
    <Image resourceId="logo" fileName="../../images/logo.png" />
  </Resources>
  <Styles>
    <Style selector="flowdocument">
      <Color value="Black" />
    </Style>
    <Style selector="grid">
      <InnerBorder thickness="1" />
      <InnerBorderColor value="Black" />
    </Style>
  </Styles>
  <Elements>
    <Image>
      <Properties>
        <Class value="logo" />
        <ResourceId value="logo" />
      </Properties>
    </Image>
    <TextBlock>
      <Properties>
        <Class value="header" />
        <Text value="Sample Interview Questions for Candidates" />
      </Properties>
    </TextBlock>
    <Br />
    <TextBlock>
      <Properties>
        <Class value="headerNote" />
        <Text value="To help facilitate the interview process, the Human Resources Department has compiled a list of questions that might be used during the phone and/or on-campus interviews. Some of the questions deal with the same content, but are phrased differently while other questions may not pertain to a specific discipline; however all of the questions are unbiased and appropriate to ask. We hope you'll find this helpful." />
      </Properties>
    </TextBlock>
  </Elements>
  <Properties>
    <Margin value="30,20,30,20" />
  </Properties>
</FlowDocument>
<?xml version="1.0" encoding="utf-8"?>
<FlowDocument xmlns="Apitron.PDF.Kit.FlowLayout.v1">
  <Resources>
    <Image resourceId="logo" fileName="../../images/logo.png" />
  </Resources>
  <Styles>
    <Style selector="flowdocument">
      <Color value="Black" />
    </Style>
    <Style selector="grid">
      <InnerBorder thickness="1" />
      <InnerBorderColor value="Black" />
    </Style>
  </Styles>
  <Elements>
    <Image>
      <Properties>
        <Class value="logo" />
        <ResourceId value="logo" />
      </Properties>
    </Image>
    <TextBlock>
      <Properties>
        <Class value="header" />
        <Text value="Sample Interview Questions for Candidates" />
      </Properties>
    </TextBlock>
    <Br />
    <TextBlock>
      <Properties>
        <Class value="headerNote" />
        <Text value="To help facilitate the interview process, the Human Resources Department has compiled a list of questions that might be used during the phone and/or on-campus interviews. Some of the questions deal with the same content, but are phrased differently while other questions may not pertain to a specific discipline; however all of the questions are unbiased and appropriate to ask. We hope you'll find this helpful." />
      </Properties>
    </TextBlock>
  </Elements>
  <Properties>
    <Margin value="30,20,30,20" />
  </Properties>
</FlowDocument>
XML

Bu XML şablonunu PDF'e dönüştürme kodu aşağıdaki gibidir:

// Use Apitron's FlowDocument to convert XML to PDF
using (Stream stream = File.OpenRead("C:\PLACE YOUR EXACT PATH HERE\template.xml"), 
               outputStream = File.Create("fromTemplate.pdf"))
{
    ResourceManager resourceManager = new ResourceManager();
    FlowDocument doc = FlowDocument.LoadFromXml(stream, resourceManager);

    doc.Write(outputStream, resourceManager);
}
// Use Apitron's FlowDocument to convert XML to PDF
using (Stream stream = File.OpenRead("C:\PLACE YOUR EXACT PATH HERE\template.xml"), 
               outputStream = File.Create("fromTemplate.pdf"))
{
    ResourceManager resourceManager = new ResourceManager();
    FlowDocument doc = FlowDocument.LoadFromXml(stream, resourceManager);

    doc.Write(outputStream, resourceManager);
}
' Use Apitron's FlowDocument to convert XML to PDF
Using stream As Stream = File.OpenRead("C:\PLACE YOUR EXACT PATH HERE\template.xml"),
      outputStream As Stream = File.Create("fromTemplate.pdf")

    Dim resourceManager As New ResourceManager()
    Dim doc As FlowDocument = FlowDocument.LoadFromXml(stream, resourceManager)

    doc.Write(outputStream, resourceManager)
End Using
$vbLabelText   $csharpLabel

Çıktı şu şekildedir:

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 5: Apitron PDF Belgesi

Apitron PDF Belgesi

IronPDF ve Apitron'un çıktısını karşılaştırırsak, IronPDF'in HTML render kullanarak etkileyici belgeler oluşturduğunu ve görüntü boyutunu bile ölçeklendirmediğini açıkça görebiliriz. Diğer yandan, Apitron benzer bir çıktı verir fakat sadece XML dosyasının kayıtlı stilleri varsa.

4. PDF Belgelerine Başlıklar ve Altbilgiler Ekleyin

4.1. IronPDF Kullanarak

IronPDF ile başlık ve altbilgiler eklemek oldukça basittir. IronPDF, sayfa numaraları ve sayfa kesilmelerini eklemenizi, kapak sayfası ekleyip kenar boşluğu eklemenizi sağlar, vb.

Başlık ve altbilgiler ekleme kodu aşağıdadır:

var Renderer = new ChromePdfRenderer();

// Add a header
Renderer.RenderingOptions.FirstPageNumber = 1; // Use 2 if a cover page will be appended
Renderer.RenderingOptions.TextHeader.DrawDividerLine = true;
Renderer.RenderingOptions.TextHeader.CenterText = "This is the header text";
Renderer.RenderingOptions.TextHeader.Font = IronPdf.Font.FontTypes.Helvetica;
Renderer.RenderingOptions.TextHeader.FontSize = 12;
Renderer.RenderingOptions.MarginTop = 25; // Create 25mm space for header

// Add a footer too
Renderer.RenderingOptions.TextFooter.DrawDividerLine = true;
Renderer.RenderingOptions.TextFooter.Font = IronPdf.Font.FontTypes.Arial;
Renderer.RenderingOptions.TextFooter.FontSize = 12;
Renderer.RenderingOptions.TextFooter.LeftText = "{date} {time}";
Renderer.RenderingOptions.TextFooter.RightText = "{page} of {total-pages}";
Renderer.RenderingOptions.MarginTop = 25; // Create 25mm space for footer

using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>This is header and footer generated pdf file</h1>", @"C:\site\assets\");
AdvancedPDF.SaveAs("html-with-assets.pdf");
var Renderer = new ChromePdfRenderer();

// Add a header
Renderer.RenderingOptions.FirstPageNumber = 1; // Use 2 if a cover page will be appended
Renderer.RenderingOptions.TextHeader.DrawDividerLine = true;
Renderer.RenderingOptions.TextHeader.CenterText = "This is the header text";
Renderer.RenderingOptions.TextHeader.Font = IronPdf.Font.FontTypes.Helvetica;
Renderer.RenderingOptions.TextHeader.FontSize = 12;
Renderer.RenderingOptions.MarginTop = 25; // Create 25mm space for header

// Add a footer too
Renderer.RenderingOptions.TextFooter.DrawDividerLine = true;
Renderer.RenderingOptions.TextFooter.Font = IronPdf.Font.FontTypes.Arial;
Renderer.RenderingOptions.TextFooter.FontSize = 12;
Renderer.RenderingOptions.TextFooter.LeftText = "{date} {time}";
Renderer.RenderingOptions.TextFooter.RightText = "{page} of {total-pages}";
Renderer.RenderingOptions.MarginTop = 25; // Create 25mm space for footer

using var AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>This is header and footer generated pdf file</h1>", @"C:\site\assets\");
AdvancedPDF.SaveAs("html-with-assets.pdf");
Dim Renderer = New ChromePdfRenderer()

' Add a header
Renderer.RenderingOptions.FirstPageNumber = 1 ' Use 2 if a cover page will be appended
Renderer.RenderingOptions.TextHeader.DrawDividerLine = True
Renderer.RenderingOptions.TextHeader.CenterText = "This is the header text"
Renderer.RenderingOptions.TextHeader.Font = IronPdf.Font.FontTypes.Helvetica
Renderer.RenderingOptions.TextHeader.FontSize = 12
Renderer.RenderingOptions.MarginTop = 25 ' Create 25mm space for header

' Add a footer too
Renderer.RenderingOptions.TextFooter.DrawDividerLine = True
Renderer.RenderingOptions.TextFooter.Font = IronPdf.Font.FontTypes.Arial
Renderer.RenderingOptions.TextFooter.FontSize = 12
Renderer.RenderingOptions.TextFooter.LeftText = "{date} {time}"
Renderer.RenderingOptions.TextFooter.RightText = "{page} of {total-pages}"
Renderer.RenderingOptions.MarginTop = 25 ' Create 25mm space for footer

Dim AdvancedPDF = Renderer.RenderHtmlAsPdf("<img src='logo.png'><h1>This is header and footer generated pdf file</h1>", "C:\site\assets\")
AdvancedPDF.SaveAs("html-with-assets.pdf")
$vbLabelText   $csharpLabel

Çıktı şu şekildedir:

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 6: IronPDF Başlık ve Altbilgi

IronPDF Başlık ve Altbilgi

4.2. Apitron PDF Kiti Kullanarak

Apitron PDF Kiti, içeriği XML yapısı formatında PDF'ye dönüştürerek PDF'ler oluşturur. Apitron PDF Kit'te, başlıklar ve altbilgiler PageHeader ve PageFooter özellikleri kullanılarak eklenebilir. Bunu başarmanın kodu aşağıdaki gibidir:

// Register document resources first
ResourceManager resourceManager = new ResourceManager();
resourceManager.RegisterResource(new Apitron.PDF.Kit.FixedLayout.Resources.XObjects.Image("logo", "../../data/logo.png"));

// Create the document
FlowDocument doc = new FlowDocument() { Margin = new Thickness(10) };

// Register styles
doc.StyleManager.RegisterStyle(".pageHeader", new Style() { Font = new Font(StandardFonts.TimesBold, 20) });
doc.StyleManager.RegisterStyle(".pageFooter", new Style() { Align = Align.Right });
doc.StyleManager.RegisterStyle("hr", new Style() { Height = 2, Margin = new Thickness(0, 5, 0, 5) });
doc.StyleManager.RegisterStyle(".content", new Style() { Align = Align.Left, Display = Display.InlineBlock });

// Fill the header section
doc.PageHeader.Class = "pageHeader";
doc.PageHeader.Add(new Image("logo") { Width = 100, Height = 50 });
doc.PageHeader.Add(new TextBlock("This document is intended for internal use only") { TextIndent = 20 });
doc.PageHeader.Add(new Hr());

// Fill the footer section
doc.PageFooter.Class = "pageFooter";
doc.PageFooter.Add(new Hr());
doc.PageFooter.Add(new TextBlock((ctx) => string.Format("Page {0} from&nbsp;", ctx.CurrentPage + 1)));
doc.PageFooter.Add(new PageCount(3) { Display = Display.Inline });

// Add pages
for (int i = 0; i < 2; ++i)
{
    doc.Add(new TextBlock("This is header and footer generation pdf file.") { Class = "content" });
    doc.Add(new PageBreak());
}

// Generate PDF
using (Stream stream = File.Create("out.pdf"))
{
    doc.Write(stream, resourceManager);
}

Process.Start("out.pdf");
// Register document resources first
ResourceManager resourceManager = new ResourceManager();
resourceManager.RegisterResource(new Apitron.PDF.Kit.FixedLayout.Resources.XObjects.Image("logo", "../../data/logo.png"));

// Create the document
FlowDocument doc = new FlowDocument() { Margin = new Thickness(10) };

// Register styles
doc.StyleManager.RegisterStyle(".pageHeader", new Style() { Font = new Font(StandardFonts.TimesBold, 20) });
doc.StyleManager.RegisterStyle(".pageFooter", new Style() { Align = Align.Right });
doc.StyleManager.RegisterStyle("hr", new Style() { Height = 2, Margin = new Thickness(0, 5, 0, 5) });
doc.StyleManager.RegisterStyle(".content", new Style() { Align = Align.Left, Display = Display.InlineBlock });

// Fill the header section
doc.PageHeader.Class = "pageHeader";
doc.PageHeader.Add(new Image("logo") { Width = 100, Height = 50 });
doc.PageHeader.Add(new TextBlock("This document is intended for internal use only") { TextIndent = 20 });
doc.PageHeader.Add(new Hr());

// Fill the footer section
doc.PageFooter.Class = "pageFooter";
doc.PageFooter.Add(new Hr());
doc.PageFooter.Add(new TextBlock((ctx) => string.Format("Page {0} from&nbsp;", ctx.CurrentPage + 1)));
doc.PageFooter.Add(new PageCount(3) { Display = Display.Inline });

// Add pages
for (int i = 0; i < 2; ++i)
{
    doc.Add(new TextBlock("This is header and footer generation pdf file.") { Class = "content" });
    doc.Add(new PageBreak());
}

// Generate PDF
using (Stream stream = File.Create("out.pdf"))
{
    doc.Write(stream, resourceManager);
}

Process.Start("out.pdf");
' Register document resources first
Dim resourceManager As New ResourceManager()
resourceManager.RegisterResource(New Apitron.PDF.Kit.FixedLayout.Resources.XObjects.Image("logo", "../../data/logo.png"))

' Create the document
Dim doc As New FlowDocument() With {.Margin = New Thickness(10)}

' Register styles
doc.StyleManager.RegisterStyle(".pageHeader", New Style() With {.Font = New Font(StandardFonts.TimesBold, 20)})
doc.StyleManager.RegisterStyle(".pageFooter", New Style() With {.Align = Align.Right})
doc.StyleManager.RegisterStyle("hr", New Style() With {
	.Height = 2,
	.Margin = New Thickness(0, 5, 0, 5)
})
doc.StyleManager.RegisterStyle(".content", New Style() With {
	.Align = Align.Left,
	.Display = Display.InlineBlock
})

' Fill the header section
doc.PageHeader.Class = "pageHeader"
doc.PageHeader.Add(New Image("logo") With {
	.Width = 100,
	.Height = 50
})
doc.PageHeader.Add(New TextBlock("This document is intended for internal use only") With {.TextIndent = 20})
doc.PageHeader.Add(New Hr())

' Fill the footer section
doc.PageFooter.Class = "pageFooter"
doc.PageFooter.Add(New Hr())
doc.PageFooter.Add(New TextBlock(Function(ctx) String.Format("Page {0} from&nbsp;", ctx.CurrentPage + 1)))
doc.PageFooter.Add(New PageCount(3) With {.Display = Display.Inline})

' Add pages
For i As Integer = 0 To 1
	doc.Add(New TextBlock("This is header and footer generation pdf file.") With {.Class = "content"})
	doc.Add(New PageBreak())
Next i

' Generate PDF
Using stream As Stream = File.Create("out.pdf")
	doc.Write(stream, resourceManager)
End Using

Process.Start("out.pdf")
$vbLabelText   $csharpLabel

Çıktı şu şekildedir:

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 7: Apitron Başlık ve Altbilgi

Apitron Başlık ve Altbilgi

5. PDF'i Dijital Olarak İmzalama

5.1. IronPDF Kullanarak

PDF işleme özelliklerinden biri dijital olarak PDF belgesini imzalayabilmektir. IronPDF, bunu yapmak için gerekli tüm araçları sağlar.

using IronPdf;

// Cryptographically sign an existing PDF in 1 line of code!
new IronPdf.Signing.PdfSignature("Iron.p12", "123456").SignPdfFile("any.pdf");

/***** Advanced example for more control *****/

// 1. Create a PDF
var Renderer = new IronPdf.ChromePdfRenderer();
var doc = Renderer.RenderHtmlAsPdf("<h1>Testing 2048 bit digital security</h1>");

// 2. Create a Signature.
// You may create a .pfx or .p12 PDF signing certificate using Adobe Acrobat Reader.

var signature = new IronPdf.Signing.PdfSignature("Iron.pfx", "123456");

// 3. Handwritten signature graphic
signature.LoadSignatureImageFromFile("handwriting.png");

// 4. Sign the PDF with the PdfSignature. Multiple signing certificates may be used
doc.SignPdfWithDigitalSignature(signature);

// 5. The PDF is not signed until saved to file, stream or byte array.
doc.SaveAs("signed.pdf");
using IronPdf;

// Cryptographically sign an existing PDF in 1 line of code!
new IronPdf.Signing.PdfSignature("Iron.p12", "123456").SignPdfFile("any.pdf");

/***** Advanced example for more control *****/

// 1. Create a PDF
var Renderer = new IronPdf.ChromePdfRenderer();
var doc = Renderer.RenderHtmlAsPdf("<h1>Testing 2048 bit digital security</h1>");

// 2. Create a Signature.
// You may create a .pfx or .p12 PDF signing certificate using Adobe Acrobat Reader.

var signature = new IronPdf.Signing.PdfSignature("Iron.pfx", "123456");

// 3. Handwritten signature graphic
signature.LoadSignatureImageFromFile("handwriting.png");

// 4. Sign the PDF with the PdfSignature. Multiple signing certificates may be used
doc.SignPdfWithDigitalSignature(signature);

// 5. The PDF is not signed until saved to file, stream or byte array.
doc.SaveAs("signed.pdf");
Imports IronPdf

' Cryptographically sign an existing PDF in 1 line of code!
Call (New IronPdf.Signing.PdfSignature("Iron.p12", "123456")).SignPdfFile("any.pdf")

'''*** Advanced example for more control ****

' 1. Create a PDF
Dim Renderer = New IronPdf.ChromePdfRenderer()
Dim doc = Renderer.RenderHtmlAsPdf("<h1>Testing 2048 bit digital security</h1>")

' 2. Create a Signature.
' You may create a .pfx or .p12 PDF signing certificate using Adobe Acrobat Reader.

Dim signature = New IronPdf.Signing.PdfSignature("Iron.pfx", "123456")

' 3. Handwritten signature graphic
signature.LoadSignatureImageFromFile("handwriting.png")

' 4. Sign the PDF with the PdfSignature. Multiple signing certificates may be used
doc.SignPdfWithDigitalSignature(signature)

' 5. The PDF is not signed until saved to file, stream or byte array.
doc.SaveAs("signed.pdf")
$vbLabelText   $csharpLabel

5.2 Apitron PDF Kiti Kullanarak

Apitron PDF Kiti ile bir PDF'e imza eklemek hem uzun hem de teknik bir süreçtir.

static void Main(string[] args)
{
    string fileName = "signedTwice.pdf";

    using (Stream stream = File.Create(fileName))
    {
        FlowDocument doc = new FlowDocument() { Margin = new Thickness(10) };
        doc.Add(new TextBlock("Signed using Apitron PDF Kit for .NET"));
        doc.Write(stream, new ResourceManager());
    }

    // Save
    Sign(fileName, "../../data/certs/JohnDoe.pfx", "password", "../../data/images/signatureImage.png", new Boundary(10, 750, 110, 800));
}

// Implementation of Sign Method
private static void Sign(string pathToDocument, string pathToCertificate, string password, string pathToSignatureImage, Boundary signatureViewLocation)
{
    // Open existing document and sign once
    using (Stream inputStream = new FileStream(pathToDocument, FileMode.Open, FileAccess.ReadWrite))
    {
        using (FixedDocument doc = new FixedDocument(inputStream))
        {
            string imageResourceId = Guid.NewGuid().ToString("N");
            string signatureFieldId = Guid.NewGuid().ToString("N");

            // Register signature image resource
            doc.ResourceManager.RegisterResource(new Image(imageResourceId, pathToSignatureImage));

            // Create first signature field and initialize it using a stored certificate
            SignatureField signatureField = new SignatureField(signatureFieldId);
            using (Stream signatureDataStream = File.OpenRead(pathToCertificate))
            {
                signatureField.Signature = Signature.Create(new Pkcs12Store(signatureDataStream, password));
            }

            // Add signature fields to the document
doc.AcroForm.Fields.Add(signatureField);

            // Create first signature view using the image resource
            SignatureFieldView signatureView = new SignatureFieldView(signatureField, signatureViewLocation);
            signatureView.ViewSettings.Graphic = Graphic.Image;
            signatureView.ViewSettings.GraphicResourceID = imageResourceId;
            signatureView.ViewSettings.Description = Description.None;

            // Add views to page annotations collection
doc.Pages[0].Annotations.Add(signatureView);

            // Save as incremental update
doc.Save();
        }
    }
}
static void Main(string[] args)
{
    string fileName = "signedTwice.pdf";

    using (Stream stream = File.Create(fileName))
    {
        FlowDocument doc = new FlowDocument() { Margin = new Thickness(10) };
        doc.Add(new TextBlock("Signed using Apitron PDF Kit for .NET"));
        doc.Write(stream, new ResourceManager());
    }

    // Save
    Sign(fileName, "../../data/certs/JohnDoe.pfx", "password", "../../data/images/signatureImage.png", new Boundary(10, 750, 110, 800));
}

// Implementation of Sign Method
private static void Sign(string pathToDocument, string pathToCertificate, string password, string pathToSignatureImage, Boundary signatureViewLocation)
{
    // Open existing document and sign once
    using (Stream inputStream = new FileStream(pathToDocument, FileMode.Open, FileAccess.ReadWrite))
    {
        using (FixedDocument doc = new FixedDocument(inputStream))
        {
            string imageResourceId = Guid.NewGuid().ToString("N");
            string signatureFieldId = Guid.NewGuid().ToString("N");

            // Register signature image resource
            doc.ResourceManager.RegisterResource(new Image(imageResourceId, pathToSignatureImage));

            // Create first signature field and initialize it using a stored certificate
            SignatureField signatureField = new SignatureField(signatureFieldId);
            using (Stream signatureDataStream = File.OpenRead(pathToCertificate))
            {
                signatureField.Signature = Signature.Create(new Pkcs12Store(signatureDataStream, password));
            }

            // Add signature fields to the document
doc.AcroForm.Fields.Add(signatureField);

            // Create first signature view using the image resource
            SignatureFieldView signatureView = new SignatureFieldView(signatureField, signatureViewLocation);
            signatureView.ViewSettings.Graphic = Graphic.Image;
            signatureView.ViewSettings.GraphicResourceID = imageResourceId;
            signatureView.ViewSettings.Description = Description.None;

            // Add views to page annotations collection
doc.Pages[0].Annotations.Add(signatureView);

            // Save as incremental update
doc.Save();
        }
    }
}
Imports System
Imports System.IO
Imports Apitron.PDF.Rasterizer
Imports Apitron.PDF.Kit.FixedLayout
Imports Apitron.PDF.Kit
Imports Apitron.PDF.Kit.Styles
Imports Apitron.PDF.Kit.Signatures
Imports Apitron.PDF.Kit.Interactive.Annotations

Module Module1
    Sub Main(args As String())
        Dim fileName As String = "signedTwice.pdf"

        Using stream As Stream = File.Create(fileName)
            Dim doc As New FlowDocument() With {.Margin = New Thickness(10)}
            doc.Add(New TextBlock("Signed using Apitron PDF Kit for .NET"))
            doc.Write(stream, New ResourceManager())
        End Using

        ' Save
        Sign(fileName, "../../data/certs/JohnDoe.pfx", "password", "../../data/images/signatureImage.png", New Boundary(10, 750, 110, 800))
    End Sub

    ' Implementation of Sign Method
    Private Sub Sign(pathToDocument As String, pathToCertificate As String, password As String, pathToSignatureImage As String, signatureViewLocation As Boundary)
        ' Open existing document and sign once
        Using inputStream As Stream = New FileStream(pathToDocument, FileMode.Open, FileAccess.ReadWrite)
            Using doc As New FixedDocument(inputStream)
                Dim imageResourceId As String = Guid.NewGuid().ToString("N")
                Dim signatureFieldId As String = Guid.NewGuid().ToString("N")

                ' Register signature image resource
                doc.ResourceManager.RegisterResource(New Image(imageResourceId, pathToSignatureImage))

                ' Create first signature field and initialize it using a stored certificate
                Dim signatureField As New SignatureField(signatureFieldId)
                Using signatureDataStream As Stream = File.OpenRead(pathToCertificate)
                    signatureField.Signature = Signature.Create(New Pkcs12Store(signatureDataStream, password))
                End Using

                ' Add signature fields to the document
                doc.AcroForm.Fields.Add(signatureField)

                ' Create first signature view using the image resource
                Dim signatureView As New SignatureFieldView(signatureField, signatureViewLocation)
                signatureView.ViewSettings.Graphic = Graphic.Image
                signatureView.ViewSettings.GraphicResourceID = imageResourceId
                signatureView.ViewSettings.Description = Description.None

                ' Add views to page annotations collection
                doc.Pages(0).Annotations.Add(signatureView)

                ' Save as incremental update
                doc.Save()
            End Using
        End Using
    End Sub
End Module
$vbLabelText   $csharpLabel

Çıktı neredeyse aynı olur. IronPDF'in PDF içeriğini değiştirme konusunda daha kolay ve kullanışlı olduğunu açıkça görebilirsiniz. Çıktı PDF, sertifika ile imzalanır ve imza üzerine basılır.

Portföy Galerileri için IronPDF ile Bootstrap 5 Kullanma

IronPDF'in Chrome V8 render motoru, modern Bootstrap 5 bileşenlerini tam anlamıyla destekler ve böylece profesyonel portföy galerileriyle görsel olarak etkileyici PDF belgeleri oluşturmanıza olanak tanır. Bu örnek, ızgara düzenleri, üzerine gelme efektleri, gradyan kaplamalar ve kategori rozetleri gibi geleneksel PDF kütüphaneleri Apitron PDF SDK ile uygulanması zor özellikleri gösterir.

using IronPdf;

var renderer = new ChromePdfRenderer();

string portfolioGallery = @"
<!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>
        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .gallery-item img {
            width: 100%;
            height: 250px;
            object-fit: cover;
            transition: transform 0.3s;
        }
        .gallery-item:hover img {
            transform: scale(1.1);
        }
        .gallery-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
            padding: 20px;
            color: white;
        }
        .category-badge {
            position: absolute;
            top: 10px;
            right: 10px;
        }
        @media print {
            .gallery-item { page-break-inside: avoid; }
        }
    </style>
</head>
<body>
    <div class='container py-5'>
        <div class='text-center mb-5'>
            <h1 class='display-4'>Design Portfolio</h1>
            <p class='lead text-muted'>Showcase of PDF Document Designs</p>
        </div>

        <div class='row mb-4'>
            <div class='col-12'>
                <div class='btn-group' role='group'>
                    <button class='btn btn-primary'>All Projects</button>
                    <button class='btn btn-outline-primary'>Invoices</button>
                    <button class='btn btn-outline-primary'>Reports</button>
                    <button class='btn btn-outline-primary'>Forms</button>
                    <button class='btn btn-outline-primary'>Certificates</button>
                </div>
            </div>
        </div>

        <div class='row g-4'>
            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-primary category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📄</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Professional Invoice Template</h5>
                        <small>Corporate billing with itemized details</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-success category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📊</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Analytics Dashboard Report</h5>
                        <small>Data visualization and metrics</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-warning category-badge'>Certificate</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>🏆</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Award Certificate</h5>
                        <small>Professional achievement recognition</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-info category-badge'>Form</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #fa709a 0%, #fee140 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📝</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Application Form</h5>
                        <small>Multi-page data collection</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-danger category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #30cfd0 0%, #330867 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>💰</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Payment Receipt</h5>
                        <small>Transaction confirmation document</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-secondary category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📈</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Financial Statement</h5>
                        <small>Quarterly performance overview</small>
                    </div>
                </div>
            </div>
        </div>

        <div class='text-center mt-5'>
            <p class='text-muted'>All templates rendered with IronPDF's Chromium engine</p>
            <div class='d-flex justify-content-center gap-2'>
                <span class='badge bg-primary'>Bootstrap 5</span>
                <span class='badge bg-success'>Responsive</span>
                <span class='badge bg-info'>Print-Ready</span>
            </div>
        </div>
    </div>
</body>
</html>";

var pdf = renderer.RenderHtmlAsPdf(portfolioGallery);
pdf.SaveAs("portfolio-gallery.pdf");
using IronPdf;

var renderer = new ChromePdfRenderer();

string portfolioGallery = @"
<!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>
        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .gallery-item img {
            width: 100%;
            height: 250px;
            object-fit: cover;
            transition: transform 0.3s;
        }
        .gallery-item:hover img {
            transform: scale(1.1);
        }
        .gallery-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
            padding: 20px;
            color: white;
        }
        .category-badge {
            position: absolute;
            top: 10px;
            right: 10px;
        }
        @media print {
            .gallery-item { page-break-inside: avoid; }
        }
    </style>
</head>
<body>
    <div class='container py-5'>
        <div class='text-center mb-5'>
            <h1 class='display-4'>Design Portfolio</h1>
            <p class='lead text-muted'>Showcase of PDF Document Designs</p>
        </div>

        <div class='row mb-4'>
            <div class='col-12'>
                <div class='btn-group' role='group'>
                    <button class='btn btn-primary'>All Projects</button>
                    <button class='btn btn-outline-primary'>Invoices</button>
                    <button class='btn btn-outline-primary'>Reports</button>
                    <button class='btn btn-outline-primary'>Forms</button>
                    <button class='btn btn-outline-primary'>Certificates</button>
                </div>
            </div>
        </div>

        <div class='row g-4'>
            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-primary category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📄</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Professional Invoice Template</h5>
                        <small>Corporate billing with itemized details</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-success category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📊</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Analytics Dashboard Report</h5>
                        <small>Data visualization and metrics</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-warning category-badge'>Certificate</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>🏆</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Award Certificate</h5>
                        <small>Professional achievement recognition</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-info category-badge'>Form</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #fa709a 0%, #fee140 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📝</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Application Form</h5>
                        <small>Multi-page data collection</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-danger category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #30cfd0 0%, #330867 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>💰</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Payment Receipt</h5>
                        <small>Transaction confirmation document</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-secondary category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📈</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Financial Statement</h5>
                        <small>Quarterly performance overview</small>
                    </div>
                </div>
            </div>
        </div>

        <div class='text-center mt-5'>
            <p class='text-muted'>All templates rendered with IronPDF's Chromium engine</p>
            <div class='d-flex justify-content-center gap-2'>
                <span class='badge bg-primary'>Bootstrap 5</span>
                <span class='badge bg-success'>Responsive</span>
                <span class='badge bg-info'>Print-Ready</span>
            </div>
        </div>
    </div>
</body>
</html>";

var pdf = renderer.RenderHtmlAsPdf(portfolioGallery);
pdf.SaveAs("portfolio-gallery.pdf");
Imports IronPdf

Dim renderer As New ChromePdfRenderer()

Dim portfolioGallery 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>
        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .gallery-item img {
            width: 100%;
            height: 250px;
            object-fit: cover;
            transition: transform 0.3s;
        }
        .gallery-item:hover img {
            transform: scale(1.1);
        }
        .gallery-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
            padding: 20px;
            color: white;
        }
        .category-badge {
            position: absolute;
            top: 10px;
            right: 10px;
        }
        @media print {
            .gallery-item { page-break-inside: avoid; }
        }
    </style>
</head>
<body>
    <div class='container py-5'>
        <div class='text-center mb-5'>
            <h1 class='display-4'>Design Portfolio</h1>
            <p class='lead text-muted'>Showcase of PDF Document Designs</p>
        </div>

        <div class='row mb-4'>
            <div class='col-12'>
                <div class='btn-group' role='group'>
                    <button class='btn btn-primary'>All Projects</button>
                    <button class='btn btn-outline-primary'>Invoices</button>
                    <button class='btn btn-outline-primary'>Reports</button>
                    <button class='btn btn-outline-primary'>Forms</button>
                    <button class='btn btn-outline-primary'>Certificates</button>
                </div>
            </div>
        </div>

        <div class='row g-4'>
            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-primary category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📄</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Professional Invoice Template</h5>
                        <small>Corporate billing with itemized details</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-success category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📊</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Analytics Dashboard Report</h5>
                        <small>Data visualization and metrics</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-warning category-badge'>Certificate</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>🏆</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Award Certificate</h5>
                        <small>Professional achievement recognition</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-info category-badge'>Form</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #fa709a 0%, #fee140 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📝</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Application Form</h5>
                        <small>Multi-page data collection</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-danger category-badge'>Invoice</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #30cfd0 0%, #330867 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>💰</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Payment Receipt</h5>
                        <small>Transaction confirmation document</small>
                    </div>
                </div>
            </div>

            <div class='col-md-4'>
                <div class='gallery-item'>
                    <span class='badge bg-secondary category-badge'>Report</span>
                    <svg width='100%' height='250' style='background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)'>
                        <text x='50%' y='50%' text-anchor='middle' fill='white' font-size='48' opacity='0.3'>📈</text>
                    </svg>
                    <div class='gallery-overlay'>
                        <h5 class='mb-1'>Financial Statement</h5>
                        <small>Quarterly performance overview</small>
                    </div>
                </div>
            </div>
        </div>

        <div class='text-center mt-5'>
            <p class='text-muted'>All templates rendered with IronPDF's Chromium engine</p>
            <div class='d-flex justify-content-center gap-2'>
                <span class='badge bg-primary'>Bootstrap 5</span>
                <span class='badge bg-success'>Responsive</span>
                <span class='badge bg-info'>Print-Ready</span>
            </div>
        </div>
    </div>
</body>
</html>"

Dim pdf = renderer.RenderHtmlAsPdf(portfolioGallery)
pdf.SaveAs("portfolio-gallery.pdf")
$vbLabelText   $csharpLabel

Bu kod, görsel kategori rozetleri, gradyan kaplamalar ve üzerine gelme efektleriyle birlikte duyarlı bir ızgara düzenine sahip profesyonel bir PDF portföyü oluşturur. Chrome render motoru, tüm Bootstrap stillerini, CSS Izgara düzenlerini ve özel CSS özelliklerini korur; geleneksel PDF kütüphanelerinin çoğaltmakta zorlandığı yeteneklerdir.

Apitron PDF SDK'ya Karşı Ana Avantajlar:

  • Dönüştürme olmadan yerel Bootstrap 5 desteği
  • CSS Izgara ve Flexbox düzenleri mükemmel bir şekilde render olur
  • Gradyan arka planlar ve modern CSS efektleri
  • Daha basit kod ve daha yüksek kaliteli çıktı

Bootstrap PDF üretimi hakkında tam kılavuz için HTML to PDF Bootstrap Guide bölümüne bakın.

6. Fiyatlandırma ve Lisanslama

IronPDF Fiyatlandırma ve Lisanslama

IronPDF, geliştirme için ücretsiz kullanılabilen bir C# kütüphanesidir ve ticari kullanım için lisanslanabilir. Tek geliştirici, ajanslar ve çok uluslu organizasyonlar için ve ayrıca SaaS ve OEM yeniden dağıtımı için proje lisansları erişilebilir. Tüm lisanslar 30 gün para iade garantisi, bir yıl destek ve güncellemeler, geliştirme/staging/üretim geçerliliği ve bir defalık satın alma olarak süresiz lisans sağlar.

Lite paketi $999 ile tekrar eden harcamalar olmadan sunulmaktadır. En iyi lisansı seçme konusunda daha fazla ayrıntı ve yardım, IronPDF ürün lisans sayfasında mevcuttur.

A Comparison of IronPDF with Apitron PDF SDK .NET - Figure 8: IronPDF Lisanslama

IronPDF Lisanslama

Apitron PDF Kiti Fiyatlandırma ve Lisanslama

Şu anda iki lisanslama yöntemi bulunmaktadır - Modern ve Legacy. Zaten bir lisansınız varsa, eski lisanslama yöntemi lisansınız süresi dolana kadar etkin kalır. Daha sonra geçiş için müşteri hizmetlerine başvurmanız gerekecektir. Modern lisanslama yöntemi, sadece yeni müşteriyseniz uygulanır.

Modern yöntemde üç lisanslama kademesi bulunur:

  • Değerlendirme - tamamen işlevsel ürünü kullanmak için üç aylık değerlendirme süresi. Sadece NuGet'ten paketi indirin ve geliştirmeye başlayın.
  • Topluluk - Ürünü ticari olmayan projelerinizde hiçbir ücret ödemeden kullanın. Onay gereklidir.
  • Ticari - yukarıda açıklanmayan her kullanım durumu. Fiyatlandırma kullanım desenine bağlıdır.

Sonuç

IronPDF kütüphanesi, HTML, JS, CSS, JPG, PNG, GIF ve SVG gibi belge türlerinden mükemmel piksel hassasiyetine sahip PDF'ler oluşturur. Krom motoru, HTML dosyalarını veya URL'leri render ederek kusursuz PDF'ler sağlar.

Apitron, sabit düzen API'si kullanarak PDF oluşturmanıza olanak tanır ve %100 PDF spesifikasyonu ile uyumlu olmak için uygulanmıştır. HTML ve CSS'ye benzer tarz odaklı içerik üretim yöntemi olarak bu sabit-düzen API, çarpıcı raporlar, faturalar, kataloglar ve daha fazlasını dakikalar içinde oluşturma yeteneği sağlar. Ayrıca XML şablonları oluşturmayı da destekler.

Apitron PDF'in lisanslama fiyatları web sitelerinde bulunmamaktadır. Kullanımınıza dayalı bir teklif almak için destekle iletişime geçmeniz gerekmektedir. Diğer yandan, IronPDF web sitesinde oldukça net bir lisanslama paketi sunmaktadır. Bu, IronPDF'in rakiplerinden öne çıkmasını sağlar ve kullanıcıların ihtiyaçlarına uygun bir seçim yapmasına olanak tanır.

IronPDF ile PDF dosyaları üzerinde çalışmak Apitron PDF'e göre daha kolaydır. IronPDF, kullanıcılarının zorlu PDF işleri için daha az kod satırı yazmasına olanak tanır. IronPDF, birden fazla dosya türünden PDF üretmek için birden fazla yöntem sunar, oysa Apitron yalnızca XML belgelerini PDF belgelerine dönüştürebilir. IronPDF'de Apitron'a kıyasla herhangi bir teknik seçenek eklemeden kusursuz bir çıktı elde edilir.

Tüm Iron Software müşterileri, şirketin beş ürününün tamamını iki tanesinin fiyatına satın alma seçeneğine sahiptir. IronPDF'in ücretsiz, 30 günlük deneme sürümünü tam işlevselliğini test etmek için deneyin. Iron Software ürünlerinin tam paketini IronSoftware.com'dan satın alın.

Lütfen dikkate alınApitron PDF Kiti, ilgili sahibinin tescilli bir ticari markasıdır. Bu site Apitron PDF Kiti ile ilişkili, onaylı ya da desteklenmiş değildir. Tüm ürün adları, logolar ve markalar kendi sahiplerine aittir. Karşılaştırmalar, yalnızca bilgilendirme amaçlıdır ve yazı sırasında halka açık bilgilerle alakalı olarak yansıtılmaktadır.

Sıkça Sorulan Sorular

C#'ta HTML'yi PDF'ye nasıl dönüştürebilirsiniz?

HTML dizgilerini PDF'lere dönüştürmek için IronPDF'ün RenderHtmlAsPdf yöntemini kullanabilirsiniz. Ayrıca, HTML dosyalarını RenderHtmlFileAsPdf kullanarak PDF'lere dönüştürebilirsiniz.

IronPDF, PDF oluşturma için hangi özellikleri sunuyor?

IronPDF, HTML, CSS ve JavaScript'ten PDF oluşturmayı, URL yüklemeyi, metin ve grafikleri çıkarmayı, PDF'leri birleştirmeyi ve daha fazlasını destekler. .NET Core, Azure, AWS, Docker, Linux ve Windows ile uyumlu.

C# dilinde bir PDF'yi nasıl dijital olarak imzalayabilirsiniz?

IronPDF ile PDF'leri dijital olarak bir PDF imza sertifikası kullanarak imzalayabilirsiniz, bu birkaç satır kod ile entegre edilebilir.

IronPDF için kurulum seçenekleri nelerdir?

IronPDF, NuGet Paket Yöneticisi, Geliştirici Komut İstemi kullanılarak veya doğrudan NuGet paketi ya da IronPDF .DLL kütüphanesi indirilerek kurulabilir.

IronPDF için ücretsiz bir sürüm mevcut mu?

Evet, IronPDF, ticari lisansların yanı sıra ücretsiz bir geliştirme sürümü sunar. 30 günlük para iade garantisi dahil detaylı fiyat bilgisi web sitelerinde bulunmaktadir.

Apitron PDF Kit HTML'den PDF'ye dönüşümü nasıl ele alıyor?

Apitron PDF Kit, doğrudan HTML'den PDF'ye dönüşümü desteklemez ancak XML dosyalarını PDF'ye dönüştürebilir.

Apitron PDF Kit'in öne çıkan özellikleri nelerdir?

Apitron PDF Kit, resim, çizim, metin ekleme, belgeleri imzalama ve PDF'leri birleştirme veya bölme gibi kapsamlı PDF manipülasyonu sağlar. Ancak, doğrudan HTML'den PDF'ye dönüşüm sunmaz.

C# dilinde bir PDF'ye başlık ve altbilgi nasıl eklenir?

IronPDF, AddTextHeader ve AddTextFooter gibi yöntemler kullanarak PDF'lere kolayca başlık ve altbilgi eklemenizi sağlar.

Apitron PDF Kit için hangi lisanslama seçenekleri mevcuttur?

Apitron PDF Kit, ticari olmayan projeler için üç aylık bir değerlendirme süresi ve topluluk lisansı sunar. Ticari kullanım için doğrudan fiyat teklifi almak üzere iletişime geçmeniz gerekir.

Hangi PDF kütüphanesi .NET geliştirme için daha kolay?

IronPDF, .NET geliştirme için genellikle daha kolaydır, daha anlaşılır bir API sunar ve Apitron PDF Kit'e göre karmaşık görevler için daha az kod satırı gerektirir.

Curtis Chau
Teknik Yazar

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ı...

Daha Fazla Oku

Iron Destek Ekibi

Haftada 5 gün, 24 saat çevrimiçiyiz.
Sohbet
E-posta
Beni Ara