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

IronPDF ve ABCpdf: 2025'te Hangi C# PDF Kütüphanesi Daha İyi HTML to PDF Dönüşümü Sağlıyor?

PDF dosyaları, faturalandırma ve farklı belge türleri oluşturma gibi görevler için çeşitli sektörlerde yaygın olarak kullanılır. Müşteri ihtiyaçlarını etkili bir şekilde karşılarlar. .NET uygulamaları geliştirirken, doğru kütüphaneyi seçmek geliştirme hızınızı, çıktı kalitenizi ve uzun vadeli bakım maliyetlerinizi büyük ölçüde etkileyebilir. Geliştiriciler tarafından sıklıkla değerlendirilen iki kütüphane IronPDF ve ABCpdf'dir—ancak spesifik ihtiyaçlarınız için hangisi gerçekten daha iyi sonuçlar verir?

Bu kapsamlı karşılaştırma, her iki kütüphanenin HTML-PDF dönüştürme doğruluğundan lisanslama modellerine kadar birçok yeteneğini inceleyerek bilinçli bir karar vermenize yardımcı olur. Gerçek dünya performans ölçümlerine, API tasarım felsefesine ve her kütüphanenin güçlü ve sınırlı yanlarını gösteren pratik kod örneklerine bakacağız. İster günlük olarak binlerce fatura üreten bir SaaS platformu oluşturuyor olun isterse hassas belge oluşturulması gerektiren bir kurumsal uygulama geliştiriyor olun, bu farklılıkları anlamak proje başarısı için kritiktir.

IronPDF Nedir?

IronPDF, C# yazılım mühendislerinin .NET projelerinde PDF belgelerini düzenlemesine, çıkarmasına ve oluşturmasına yardımcı olan ticari düzeyde bir PDF oluşturma kütüphanesidir. Çekirdeğinde Chrome tabanlı bir işleme motoru ile inşa edilen IronPDF, HTML, CSS ve JavaScript'i, Google Chrome'da bir web sayfasını yazdırırken beklediğimiz aynı sadakatle PDF'lere dönüştürür.

IronPDF'in Temel Özellikleri

IronPDF, HTML sayfalarını PDF dosyalarına dönüştürmek için bir .NET Chromium motoru kullanır. HTML-PDF ile PDF'leri konumlandırmak veya tasarlamak için karmaşık API'ler kullanmaya gerek yoktur. IronPDF standart web belgelerini destekler: HTML, ASPX, JS, CSS ve görseller. Kütüphanenin mimarisi, geliştirici deneyimini ön planda tutarken profesyonel düzeyde çıktı kalitesini korur.

HTML-PDF Dönüştürme Mükemmelliği

  • HTML5 semantik elemanlar dahil olmak üzere HTML için Tam Destek
  • Flexbox, Grid ve modern tasarım teknikleri dahil olmak üzere tam CSS3 desteği
  • Dinamik içerik işleme için JavaScript yürütme
  • Google Yazı Tipleri ve özelleştirilmiş @font-face bildirileri dahil olmak üzere web yazı tipi desteği
  • Görünüm kontrolü ile duyarlı tasarım oluşturma
  • Ayarlanabilir bekleme süreleri ile AJAX içerik yükleme

Belge Manipülasyon Yetenekleri

  • Birleştirme ve Ayırma: Birden fazla PDF'yi birleştirin veya belirli sayfaları tek yöntemle çıkarın
  • Başlıklar ve Altbilgiler: Sayfa numaraları, tarihler ve özel HTML dahil dinamik içerik ekleyin
  • Filigran: Opaklık ve pozisyon kontrolü ile metin veya resim filigranları uygulayın
  • Form Yönetimi: HTML form elemanlarından otomatik olarak doldurulabilir PDF formları oluşturun
  • Dijital İmzalar: Sertifika yönetimi ile kriptografik imzalar uygulayın
  • Şifreleme: Ayrıntılı izinlerle 128-bit ve 256-bit AES şifreleme uygulayın

İleri Düzey İşleme Özellikleri

  • Çok Ünitelik İşlem: Yüksek performanslı senaryolar için yerel async/await desteği
  • Toplu İşlemler: Birden fazla belgeyi aynı anda işlemek için optimize edilmiş yöntemler
  • Bellek Verimliliği: Tüm PDF'leri belleğe yüklemeden büyük belge üretimi için akış desteği
  • Bulut Optimizasyonu: Docker, Azure ve AWS'de kapalı kutu dağıtımları için tasarlandı

Çapraz Platform Mimarisi

IronPDF, farklı ortamlarda tutarlı davranış korur:

  • Windows (x86/x64)
  • Linux (Alpine, minimum Docker görüntüleri için dahil)
  • macOS (Intel ve Apple Silicon)
  • Azure Uygulama Hizmeti, Fonksiyonlar ve Container Örnekleri
  • AWS Lambda ve EC2
  • Google Cloud Platform

ABCpdf Nedir?

ABCpdf .NET C# PDF kütüphanesi, Adobe PDF belgelerinin dinamik okuma, yazma, dönüştürme ve manipülasyonu için bir .NET bileşenidir. WebSupergoo tarafından geliştirilen ABCpdf, yirmi yılı aşkın süredir .NET topluluğuna hizmet vermektedir ve birden fazla HTML işleme motoru ile kapsamlı PDF manipülasyon özellikleri sunmaktadır.

ABCpdf'nin Temel Özellikleri

ABCpdf, HTML/CSS ve JavaScript, SVG, AJAX ve Font Awesome gibi ilgili teknolojileri tam olarak destekler. Kütüphane, geliştiricilere hem üst düzey kullanım kolaylığı yöntemleri hem de düşük düzeyde PDF nesnesi erişimi sağlar.

Çoklu İşleme Motorları

ABCpdf'nin benzersiz yaklaşımı birkaç işleme motoru sunar:

  • ABCChrome Motoru: Modern web standartları için Chromium tabanlıdır (yalnızca x64)
  • Gecko Motoru: Uyumluluk testi için birden fazla sürüm
  • MSHTML Motoru: Internet Explorer tabanlı işleme
  • ABCWebKit Motoru: WebKit tabanlı işleme (yalnızca x64)

Bu çoklu motor yaklaşımı, geliştiricilerin spesifik içerikleri için en iyi işleyiciye karar vermelerine olanak tanır, ancak dağıtım ve test karmaşıklığı ekler.

Belge İthal Etme Yetenekleri

ABCpdf, OpenOffice.org gibi yardımcı uygulamalar yüklendiğinde çeşitli belge formatlarını okuyabilir. Desteklenen formatlar şunlardır:

  • Microsoft Office belgeleri (Word, Excel, PowerPoint)
  • PostScript ve EPS dosyaları
  • XPS (XML Kağıt Spesifikasyonu)
  • SVG (Ölçeklenebilir Vektör Grafikleri)
  • TIFF, JPEG 2000 ve RAW formatlarını içeren çeşitli görüntü formatları

Alt Düzey PDF Manipülasyonu

  • PDF nesne modeline doğrudan erişim
  • Birden fazla algoritma ile akış sıkıştırma/sıkıştırma
  • Font alt kümesi oluşturma ve yerleştirme kontrolü
  • Renk alanı yönetimi ve dönüştürme
  • İçerik akışı manipülasyonu

Performans Özellikleri

ABCpdf, tamamen çok iş parçacıklı olup, C#, ASPX ve VB de dahil olmak üzere çeşitli .NET ortamlarında esnek bir şekilde kullanılabilir ve yüksek performanslı çok iş parçacıklı ayarlarda test edilmiştir. Kütüphane şunları içerir:

  • Aşırı büyük belgeler için GigaPDF™ desteği
  • Sunucu ortamları için optimize edilmiş bellek kullanımı
  • Verimli yazı tipi önbellekleme mekanizmaları
  • Arka plan iş parçacığı işleme yetenekleri

Modern CSS Çerçeve Desteği

Güncel web uygulamaları ile çalışırken, Bootstrap tabanlı düzenlerin ve diğer modern CSS çerçevelerinin PDF'ye dönüştürme yeteneği giderek daha kritik hale geliyor. Birçok kurumsal uygulama ve SaaS platformu şu anda UI tutarlılığı için Bootstrap'e dayanmakta ve PDF üretimi bu düzenleri mükemmel bir biçimde korumalıdır.

IronPDF: Tam Bootstrap ve Modern Çerçeve Desteği

IronPDF'nin Chromium işleme motoru, modern CSS çerçeveleri için kapsamlı destek sağlar:

  • Bootstrap 5: Flexbox tabanlı düzenlerin, grid sistemlerin ve duyarlı yardımcıların tam desteği
  • Bootstrap 4: Flexbox kart desteleri, gezinme çubukları ve form düzenleri ile tam uyumluluk
  • Tailwind CSS: Modern araç-öncelikli CSS çerçevesi kusursuz bir şekilde işlenir
  • Temel: Tüm grid ve bileşen sistemleri desteklenir
  • Modern CSS3: Flexbox, CSS Grid, animasyonlar, geçişler ve özel özellikler

Gerçek dünya örnekleri: Bootstrap ana sayfası ve Bootstrap şablonları, pikselle mükemmel şekilde PDF'e dönüştürme.

Kod Örneği: E-Ticaret Ürün Gridleri

using IronPdf;

var renderer = new ChromePdfRenderer();

string bootstrapProductGrid = @"
<!DOCTYPE html>
<html>
<head>
    <link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'>
</head>
<body>
    <div class='container my-5'>
        <h1 class='mb-4'>Product Catalog</h1>
        <div class='row row-cols-1 row-cols-md-3 g-4'>
            <div class='col'>
                <div class='card h-100'>
                    <img src='https://via.placeholder.com/300x200' class='card-img-top' alt='Product 1'>
                    <div class='card-body d-flex flex-column'>
                        <h5 class='card-title'>Premium Widget</h5>
                        <p class='card-text flex-grow-1'>High-quality widget with advanced features and excellent durability.</p>
                        <div class='d-flex justify-content-between align-items-center mt-auto'>
                            <span class='h4 mb-0 text-primary'>$99.99</span>
                            <button class='btn btn-primary'>Add to Cart</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class='col'>
                <div class='card h-100'>
                    <img src='https://via.placeholder.com/300x200' class='card-img-top' alt='Product 2'>
                    <div class='card-body d-flex flex-column'>
                        <h5 class='card-title'>Standard Widget</h5>
                        <p class='card-text flex-grow-1'>Reliable widget perfect for everyday use with great value.</p>
                        <div class='d-flex justify-content-between align-items-center mt-auto'>
                            <span class='h4 mb-0 text-primary'>$49.99</span>
                            <button class='btn btn-primary'>Add to Cart</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class='col'>
                <div class='card h-100'>
                    <img src='https://via.placeholder.com/300x200' class='card-img-top' alt='Product 3'>
                    <div class='card-body d-flex flex-column'>
                        <h5 class='card-title'>Basic Widget</h5>
                        <p class='card-text flex-grow-1'>Entry-level widget with essential features at an affordable price.</p>
                        <div class='d-flex justify-content-between align-items-center mt-auto'>
                            <span class='h4 mb-0 text-primary'>$29.99</span>
                            <button class='btn btn-primary'>Add to Cart</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>";

var pdf = renderer.RenderHtmlAsPdf(bootstrapProductGrid);
pdf.SaveAs("product-catalog.pdf");
using IronPdf;

var renderer = new ChromePdfRenderer();

string bootstrapProductGrid = @"
<!DOCTYPE html>
<html>
<head>
    <link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'>
</head>
<body>
    <div class='container my-5'>
        <h1 class='mb-4'>Product Catalog</h1>
        <div class='row row-cols-1 row-cols-md-3 g-4'>
            <div class='col'>
                <div class='card h-100'>
                    <img src='https://via.placeholder.com/300x200' class='card-img-top' alt='Product 1'>
                    <div class='card-body d-flex flex-column'>
                        <h5 class='card-title'>Premium Widget</h5>
                        <p class='card-text flex-grow-1'>High-quality widget with advanced features and excellent durability.</p>
                        <div class='d-flex justify-content-between align-items-center mt-auto'>
                            <span class='h4 mb-0 text-primary'>$99.99</span>
                            <button class='btn btn-primary'>Add to Cart</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class='col'>
                <div class='card h-100'>
                    <img src='https://via.placeholder.com/300x200' class='card-img-top' alt='Product 2'>
                    <div class='card-body d-flex flex-column'>
                        <h5 class='card-title'>Standard Widget</h5>
                        <p class='card-text flex-grow-1'>Reliable widget perfect for everyday use with great value.</p>
                        <div class='d-flex justify-content-between align-items-center mt-auto'>
                            <span class='h4 mb-0 text-primary'>$49.99</span>
                            <button class='btn btn-primary'>Add to Cart</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class='col'>
                <div class='card h-100'>
                    <img src='https://via.placeholder.com/300x200' class='card-img-top' alt='Product 3'>
                    <div class='card-body d-flex flex-column'>
                        <h5 class='card-title'>Basic Widget</h5>
                        <p class='card-text flex-grow-1'>Entry-level widget with essential features at an affordable price.</p>
                        <div class='d-flex justify-content-between align-items-center mt-auto'>
                            <span class='h4 mb-0 text-primary'>$29.99</span>
                            <button class='btn btn-primary'>Add to Cart</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>";

var pdf = renderer.RenderHtmlAsPdf(bootstrapProductGrid);
pdf.SaveAs("product-catalog.pdf");
Imports IronPdf

Dim renderer As New ChromePdfRenderer()

Dim bootstrapProductGrid As String = "
<!DOCTYPE html>
<html>
<head>
    <link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'>
</head>
<body>
    <div class='container my-5'>
        <h1 class='mb-4'>Product Catalog</h1>
        <div class='row row-cols-1 row-cols-md-3 g-4'>
            <div class='col'>
                <div class='card h-100'>
                    <img src='https://via.placeholder.com/300x200' class='card-img-top' alt='Product 1'>
                    <div class='card-body d-flex flex-column'>
                        <h5 class='card-title'>Premium Widget</h5>
                        <p class='card-text flex-grow-1'>High-quality widget with advanced features and excellent durability.</p>
                        <div class='d-flex justify-content-between align-items-center mt-auto'>
                            <span class='h4 mb-0 text-primary'>$99.99</span>
                            <button class='btn btn-primary'>Add to Cart</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class='col'>
                <div class='card h-100'>
                    <img src='https://via.placeholder.com/300x200' class='card-img-top' alt='Product 2'>
                    <div class='card-body d-flex flex-column'>
                        <h5 class='card-title'>Standard Widget</h5>
                        <p class='card-text flex-grow-1'>Reliable widget perfect for everyday use with great value.</p>
                        <div class='d-flex justify-content-between align-items-center mt-auto'>
                            <span class='h4 mb-0 text-primary'>$49.99</span>
                            <button class='btn btn-primary'>Add to Cart</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class='col'>
                <div class='card h-100'>
                    <img src='https://via.placeholder.com/300x200' class='card-img-top' alt='Product 3'>
                    <div class='card-body d-flex flex-column'>
                        <h5 class='card-title'>Basic Widget</h5>
                        <p class='card-text flex-grow-1'>Entry-level widget with essential features at an affordable price.</p>
                        <div class='d-flex justify-content-between align-items-center mt-auto'>
                            <span class='h4 mb-0 text-primary'>$29.99</span>
                            <button class='btn btn-primary'>Add to Cart</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>"

Dim pdf = renderer.RenderHtmlAsPdf(bootstrapProductGrid)
pdf.SaveAs("product-catalog.pdf")
$vbLabelText   $csharpLabel

Çıktı: Bootstrap 5'in kart grid sistemi, flexbox hizalaması ve duyarlı aralıklarıyla mükemmel şekilde biçimlendirilmiş ürün kataloğu—hepsi PDF'de korunur.

ABCpdf: Çok Motorlu Yaklaşım ve Çerçeve Sınırlamaları

ABCpdf'in modern CSS çerçevelerini desteklemesi, seçtiğiniz render motoruna bağlı olarak önemli ölçüde değişir:

  • ABCChrome Motoru (sadece x64): IronPDF'ye benzer iyi Bootstrap desteği, ancak belirli 64-bit platform yapılandırması gerektirir
  • ABCWebKit Motoru (sadece x64): Sınırlı flexbox desteği, Bootstrap 4+ düzenleri doğru görüntülenmeyebilir
  • Gecko Motoru: Orta düzeyde CSS3 desteği, Bootstrap 3, Bootstrap 4/5'ten daha iyi çalışır
  • MSHTML Motoru: Eski Internet Explorer renderlaması, yalnızca Bootstrap 2.x, modern uygulamalar için önerilmez

Anahtar dikkate alınması gerekenler:

  • Motor seçimi karmaşıklığı dağıtım yükünü artırır
  • Yalnızca 64-bit motorlar (ABCChrome, ABCWebKit) dağıtım esnekliğini sınırlar
  • Tutarlı Bootstrap renderlemesi için motorlar arasında test gereklidir
  • Çerçeve uyumluluğu motor seçimine göre önemli ölçüde değişir

ABCpdf'in çok motorlu mimarisi esneklik sağlar, ancak Bootstrap düzenlerinin doğru renderlemesi için dikkatli motor seçimi ve test gerektirir. Bootstrap veya modern CSS çerçevelerine yoğun yatırım yapan uygulamalar için, ABCChrome motoru en iyi sonuçları sağlar ancak x64 yalnızca dağıtım kısıtlamalarıyla birlikte gelir.

Bootstrap çerçeve uyumluluğu hakkında daha fazla bilgi için Bootstrap & Flexbox CSS Kılavuzuna bakınız.

Detaylı Özellik Karşılaştırması

Tablo 4
.NET Uygulamaları için IronPDF ve ABCpdf Özellik Karşılaştırması
Kategori Özellik/Aspect IronPDF ABCpdf Ana Avantaj
Çekirdek Mimari Tasarım Felsefesi Basitlik-öncelikli, sezgisel API'ler Esneklik-öncelikli, çoklu motorlar IronPDF: Daha hızlı geliştirme
API Karmaşıklığı RenderHtmlAsPdf() gibi basit yöntemler Doc sınıfı ile nesne yönelimli IronPDF: %70 daha az kod
Öğrenme Eğrisi 1-2 saat tipik 1-2 gün tipik IronPDF: Daha hızlı benimseme
Platform Desteği Çapraz Platform Yerel destek, tek paket Windows öncelikli, sınırlı Linux IronPDF: Gerçek çapraz platform
.NET Sürümleri .NET 10, 9, 8, 7, 6, 5, Core 3.1+, Framework 4.6.2+ .NET 10, 9, 8, 7, 6, 5, 4.0, Framework 2.0+ Her ikisi de: Modern çerçeve desteği
İşletim Sistemleri Windows, Linux, macOS, Docker native Windows, sınırlı Linux desteği IronPDF: Daha geniş OS desteği
HTML'den PDF'ye Render Motoru Chrome V127+ motoru Çoklu motorlar (Chrome 123, Gecko, MSHTML) ABCpdf: Motor esnekliği
CSS3/HTML5 Desteği %100 Chrome uyumlu Motor bazlı değişir (70-100%) IronPDF: Tutarlı renderlama
JavaScript Çalıştırma Tam V8 JavaScript desteği Motor bazlı IronPDF: Modern JS özellikleri
Web Fontları Google Fontları, @font-face, sistem fontları ABCChrome ile desteklenir Her ikisi de: Web font desteği
Performans Tek Sayfa Renderlama 200-400ms tipik 150-300ms (ABCChrome) ABCpdf: Hafifçe daha hızlı
Toplu İşleme Optimize edilmiş paralel işleme Çoklu iş parçacıklı yetenek IronPDF: Daha iyi asenkron destek
Bellek Kullanımı 150-200MB (Chrome motoru) 100-150MB (motor bazlı değişir) ABCpdf: Daha düşük bellek ayak izi
Geliştirici Deneyimi Belgelendirme Geniş kapsamlı öğreticiler, videolar, örnekler Kapsamlı API dokümanları IronPDF: Daha fazla öğrenme kaynağı
Kod Örnekleri 100+ çalışmaya hazır örnekler Kapsamlı örnekler Her ikisi de: Zengin örnekler
IntelliSense Desteği Tam XML dokümantasyonu Kapsamlı IntelliSense Her ikisi de: IDE entegrasyonu
Licensing & Pricing Giriş Seviyesi Lite: $799 (1 dev, 1 project) Standard: $329 (1 geliştirici, sadece 32-bit) ABCpdf: Daha düşük giriş maliyeti
Professional Professional: $2,399 (10 devs, 10 projects) Professional: $479 (1 geliştirici, 64-bit) IronPDF: Daha iyi ekip lisanslaması
Yeniden Dağıtım +$2,399 royalty-free $4,790 Enterprise lisansı IronPDF: Daha uygun fiyatlı
Destek Destek Dahil Evet, 24/5 mühendislik desteği Evet, e-posta desteği IronPDF: Canlı sohbet desteği
Yanıt Süresi < 1 dakika (canlı sohbet) Genellikle 24-48 saat IronPDF: Daha hızlı yanıt
En İyisi İçin Kullanım Durumları Modern web uygulamaları, SaaS, bulut yerel Windows masaüstü, eski sistemler Bağlam bağımlı
Not. ABCpdf, esnekliği sağlamak için birden fazla render motoru sunar, ancak tam işlevsellik için Windows gerektirir. IronPDF, en son Chrome motoruyla tutarlı çapraz platform performansı sağlar. Fiyat yapıları, tek geliştirici ve ekip lisansları arasında önemli ölçüde farklılık gösterir.

Visual Studio'da Yeni Proje Oluşturma

Kod örneklerine dalmadan önce uygun bir geliştirme ortamı kuralım. Visual Studio'yu açın ve yeni bir proje oluşturun:

  1. Dosya > Yeni > Proje'ye gidin
  2. "Konsol Uygulaması" seçin (.NET Core veya .NET Framework)
  3. Hedef çerçevenizi seçin (.NET 6.0 veya daha yüksek önerilir)
  4. Projenize bir ad verin (örneğin, "PdfLibraryComparison")
  5. Oluştur'a tıklayın

Visual Studio'da yeni bir proje oluşturun Yeni bir .NET uygulaması kurmak için Visual Studio'nun proje oluşturma diyalog kutusu

IronPDF C# Kütüphanesi Kurulumu

Yükleme Yöntemleri

IronPDF, farklı geliştirme iş akışlarına uyum sağlamak için birden fazla kurulum yöntemi sunar:

Yöntem 1: NuGet Paket Yöneticisi Kullanarak (Önerilen)

En basit yaklaşım, Visual Studio'nun entegre NuGet Paket Yöneticisi'ni kullanmaktır:

  1. Solution Explorer'da projenizin uzerine sag tiklayin
  2. "NuGet Paketlerini Yonet"i secin
  3. "Gözat"a tıklayın ve "IronPDF" arayın
  4. Resmi IronPDF paketinin Yükle seçeneğine tıklayın

NuGet Paket Yöneticisi IronPDF kurulumunu gösteriyor Visual Studio'nun NuGet Paket Yöneticisi arayüzüyle IronPDF kurma

Yöntem 2: Paket Yöneticisi Konsolu

Komut satırı araçlarını tercih eden geliştiriciler için:

Install-Package IronPdf

Paket Yöneticisi Konsolu IronPDF kuruyor IronPDF'i tek bir komutla kurmak için Paket Yöneticisi Konsolunu kullanma

Yöntem 3: Doğrudan İndirme

Kısıtlı internet erişimi olan ortamlar için:

  1. NuGet.org'dan indirin
  2. .nupkg dosyasını yerel bir NuGet beslemesine ekleyin
  3. Yerel beslemeden yükleyin

Yöntem 4: .NET CLI

.NET Core/5+ projeleri için:

dotnet add package IronPdf

ABCpdf Kurulumu

Yükleme Yöntemleri

ABCpdf, benzer kurulum seçenekleri sunar ancak ek hususlarla:

Yöntem 1: NuGet Kurulumu

Install-Package ABCpdf -Version 13.0.0.0

ABCpdf'nin farklı sürümler için ayrı paketleri olduğunu unutmayın:

  • ABCpdf - Standart sürüm (yalnızca 32-bit)
  • ABCpdf.ABCChrome64 - 64-bit üzerinde Chrome renderi için gereklidir
  • ABCpdf.ABCGecko - Gecko render motoru için

Yöntem 2: Manuel Kurulum

  1. WebSupergoo sitesi'nden indirin
  2. ZIP dosyasını açın
  3. Uygun DLL'lere referans ekleyin
  4. Yerli bağımlılıkları çıkış dizininize kopyalayın

Platforma Özgü Hususlar

ABCpdf, Windows dışı platformlar için ek kurulum gerektirir:


<PackageReference Include="ABCpdf.Linux" Version="13.0.0.0" />

<PackageReference Include="ABCpdf.Linux" Version="13.0.0.0" />
XML

Bu Kütüphaneler HTML'den PDF'ye Dönüşümü Nasıl İşliyor?

Her kütüphanenin HTML'den PDF'ye dönüşümü nas��l ele aldığına dair temel farklılıkları anlamak, değişen yetenekleri ve performans karakteristiklerini açıklamaya yardımcı olur.

IronPDF'in Yaklaşımı: Chrome-Öncelikli Mimari

IronPDF, birkaç avantaja sahip olan tam bir Chrome tarayıcı motoru kullanır:

using IronPdf;

// IronPDF's approach - Chrome rendering with full browser capabilities
var renderer = new ChromePdfRenderer();

// Configure rendering to match Chrome's print preview exactly
renderer.RenderingOptions = ChromePdfRenderOptions.DefaultChrome;

// Or customize for specific needs
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Screen;
renderer.RenderingOptions.EnableJavaScript = true;
renderer.RenderingOptions.WaitFor.RenderDelay(500); // Wait for JS execution

// Convert complex HTML with modern CSS and JavaScript
string complexHtml = @"
<!DOCTYPE html>
<html>
<head>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;700&display=swap');

        .container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            font-family: 'Roboto', sans-serif;
        }

        .card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 10px;
            padding: 20px;
            color: white;
            box-shadow: 0 10px 20px rgba(0,0,0,0.19);
            transform: translateY(0);
            transition: transform 0.3s;
        }

        @media print {
            .card { break-inside: avoid; }
        }
    </style>
</head>
<body>
    <div class='container'>
        <div class='card'>
            <h2>Modern CSS Support</h2>
            <p>Grid, Flexbox, Gradients, Shadows - all rendered perfectly</p>
        </div>
        <div class='card'>
            <h2>Web Fontları</h2>
            <p>Google Fonts and custom fonts work seamlessly</p>
        </div>
    </div>
    <script>
        // Dynamic content generation
        document.addEventListener('DOMContentLoaded', function() {
            const container = document.querySelector('.container');
            const dynamicCard = document.createElement('div');
            dynamicCard.className = 'card';
            dynamicCard.innerHTML = '<h2>JavaScript Generated</h2><p>This card was added by JavaScript</p>';
            container.appendChild(dynamicCard);
        });
    </script>
</body>
</html>";

var pdf = renderer.RenderHtmlAsPdf(complexHtml);
pdf.SaveAs("modern-web-features.pdf");
using IronPdf;

// IronPDF's approach - Chrome rendering with full browser capabilities
var renderer = new ChromePdfRenderer();

// Configure rendering to match Chrome's print preview exactly
renderer.RenderingOptions = ChromePdfRenderOptions.DefaultChrome;

// Or customize for specific needs
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Screen;
renderer.RenderingOptions.EnableJavaScript = true;
renderer.RenderingOptions.WaitFor.RenderDelay(500); // Wait for JS execution

// Convert complex HTML with modern CSS and JavaScript
string complexHtml = @"
<!DOCTYPE html>
<html>
<head>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;700&display=swap');

        .container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            font-family: 'Roboto', sans-serif;
        }

        .card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 10px;
            padding: 20px;
            color: white;
            box-shadow: 0 10px 20px rgba(0,0,0,0.19);
            transform: translateY(0);
            transition: transform 0.3s;
        }

        @media print {
            .card { break-inside: avoid; }
        }
    </style>
</head>
<body>
    <div class='container'>
        <div class='card'>
            <h2>Modern CSS Support</h2>
            <p>Grid, Flexbox, Gradients, Shadows - all rendered perfectly</p>
        </div>
        <div class='card'>
            <h2>Web Fontları</h2>
            <p>Google Fonts and custom fonts work seamlessly</p>
        </div>
    </div>
    <script>
        // Dynamic content generation
        document.addEventListener('DOMContentLoaded', function() {
            const container = document.querySelector('.container');
            const dynamicCard = document.createElement('div');
            dynamicCard.className = 'card';
            dynamicCard.innerHTML = '<h2>JavaScript Generated</h2><p>This card was added by JavaScript</p>';
            container.appendChild(dynamicCard);
        });
    </script>
</body>
</html>";

var pdf = renderer.RenderHtmlAsPdf(complexHtml);
pdf.SaveAs("modern-web-features.pdf");
Imports IronPdf

' IronPDF's approach - Chrome rendering with full browser capabilities
Dim renderer As New ChromePdfRenderer()

' Configure rendering to match Chrome's print preview exactly
renderer.RenderingOptions = ChromePdfRenderOptions.DefaultChrome

' Or customize for specific needs
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Screen
renderer.RenderingOptions.EnableJavaScript = True
renderer.RenderingOptions.WaitFor.RenderDelay(500) ' Wait for JS execution

' Convert complex HTML with modern CSS and JavaScript
Dim complexHtml As String = "
<!DOCTYPE html>
<html>
<head>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;700&display=swap');

        .container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            font-family: 'Roboto', sans-serif;
        }

        .card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 10px;
            padding: 20px;
            color: white;
            box-shadow: 0 10px 20px rgba(0,0,0,0.19);
            transform: translateY(0);
            transition: transform 0.3s;
        }

        @media print {
            .card { break-inside: avoid; }
        }
    </style>
</head>
<body>
    <div class='container'>
        <div class='card'>
            <h2>Modern CSS Support</h2>
            <p>Grid, Flexbox, Gradients, Shadows - all rendered perfectly</p>
        </div>
        <div class='card'>
            <h2>Web Fontları</h2>
            <p>Google Fonts and custom fonts work seamlessly</p>
        </div>
    </div>
    <script>
        ' Dynamic content generation
        document.addEventListener('DOMContentLoaded', function() {
            const container = document.querySelector('.container');
            const dynamicCard = document.createElement('div');
            dynamicCard.className = 'card';
            dynamicCard.innerHTML = '<h2>JavaScript Generated</h2><p>This card was added by JavaScript</p>';
            container.appendChild(dynamicCard);
        });
    </script>
</body>
</html>"

Dim pdf = renderer.RenderHtmlAsPdf(complexHtml)
pdf.SaveAs("modern-web-features.pdf")
$vbLabelText   $csharpLabel

Bu kod, IronPDF'in Chrome tabanlı yaklaşımının birkaç ana avantajını gösterir:

  1. Modern CSS Desteği: Izgara düzenleri, flexbox, gradyanlar ve dönüştürmeler Chrome'da olduğu gibi aynı şekilde çalışır
  2. Web Font Entegrasyonu: Google Fonts, ek konfigürasyona gerek kalmadan otomatik yüklenir
  3. JavaScript Çalıştırılması: Dinamik içerik üretimi, PDF render edilmeden önce gerçekleşir
  4. Medya Sorguları: Basılmak üzere stiller düzgün bir şekilde uygulanır

ABCpdf'in Yaklaşımı: Çoklu Motor Esnekliği

ABCpdf, her biri farklı yeteneklere sahip birden fazla render motoru sunar:

using WebSupergoo.ABCpdf13;

// Yöntem 1: Using ABCChrome engine (most modern)
Doc chromeDoc = new Doc();
chromeDoc.HtmlOptions.Engine = EngineType.Chrome;
chromeDoc.HtmlOptions.Chrome.SetUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36");

// Chrome engine supports modern web standards
int chromeId = chromeDoc.AddImageUrl("https://example.com");

// Chain pages if content overflows
while (chromeDoc.Chainable(chromeId))
{
    chromeDoc.Page = chromeDoc.AddPage();
    chromeId = chromeDoc.AddImageToChain(chromeId);
}

chromeDoc.Save("chrome-engine-output.pdf");

// Yöntem 2: Using Gecko engine (Firefox-based)
Doc geckoDoc = new Doc();
geckoDoc.HtmlOptions.Engine = EngineType.Gecko;
geckoDoc.HtmlOptions.UseScript = true; // Enable JavaScript

// Gecko provides good standards support with lower resource usage
string html = "<html><body><h1>Gecko Rendered Content</h1></body></html>";
geckoDoc.AddImageHtml(html);
geckoDoc.Save("gecko-engine-output.pdf");

// Yöntem 3: Using MSHTML engine (IE-based, legacy support)
Doc ieDoc = new Doc();
ieDoc.HtmlOptions.Engine = EngineType.MSHtml;

// MSHTML is faster but with limited modern CSS support
ieDoc.AddImageUrl("https://legacy-app.example.com");
ieDoc.Save("ie-engine-output.pdf");
using WebSupergoo.ABCpdf13;

// Yöntem 1: Using ABCChrome engine (most modern)
Doc chromeDoc = new Doc();
chromeDoc.HtmlOptions.Engine = EngineType.Chrome;
chromeDoc.HtmlOptions.Chrome.SetUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36");

// Chrome engine supports modern web standards
int chromeId = chromeDoc.AddImageUrl("https://example.com");

// Chain pages if content overflows
while (chromeDoc.Chainable(chromeId))
{
    chromeDoc.Page = chromeDoc.AddPage();
    chromeId = chromeDoc.AddImageToChain(chromeId);
}

chromeDoc.Save("chrome-engine-output.pdf");

// Yöntem 2: Using Gecko engine (Firefox-based)
Doc geckoDoc = new Doc();
geckoDoc.HtmlOptions.Engine = EngineType.Gecko;
geckoDoc.HtmlOptions.UseScript = true; // Enable JavaScript

// Gecko provides good standards support with lower resource usage
string html = "<html><body><h1>Gecko Rendered Content</h1></body></html>";
geckoDoc.AddImageHtml(html);
geckoDoc.Save("gecko-engine-output.pdf");

// Yöntem 3: Using MSHTML engine (IE-based, legacy support)
Doc ieDoc = new Doc();
ieDoc.HtmlOptions.Engine = EngineType.MSHtml;

// MSHTML is faster but with limited modern CSS support
ieDoc.AddImageUrl("https://legacy-app.example.com");
ieDoc.Save("ie-engine-output.pdf");
Imports WebSupergoo.ABCpdf13

' Yöntem 1: Using ABCChrome engine (most modern)
Dim chromeDoc As New Doc()
chromeDoc.HtmlOptions.Engine = EngineType.Chrome
chromeDoc.HtmlOptions.Chrome.SetUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36")

' Chrome engine supports modern web standards
Dim chromeId As Integer = chromeDoc.AddImageUrl("https://example.com")

' Chain pages if content overflows
While chromeDoc.Chainable(chromeId)
    chromeDoc.Page = chromeDoc.AddPage()
    chromeId = chromeDoc.AddImageToChain(chromeId)
End While

chromeDoc.Save("chrome-engine-output.pdf")

' Yöntem 2: Using Gecko engine (Firefox-based)
Dim geckoDoc As New Doc()
geckoDoc.HtmlOptions.Engine = EngineType.Gecko
geckoDoc.HtmlOptions.UseScript = True ' Enable JavaScript

' Gecko provides good standards support with lower resource usage
Dim html As String = "<html><body><h1>Gecko Rendered Content</h1></body></html>"
geckoDoc.AddImageHtml(html)
geckoDoc.Save("gecko-engine-output.pdf")

' Yöntem 3: Using MSHTML engine (IE-based, legacy support)
Dim ieDoc As New Doc()
ieDoc.HtmlOptions.Engine = EngineType.MSHtml

' MSHTML is faster but with limited modern CSS support
ieDoc.AddImageUrl("https://legacy-app.example.com")
ieDoc.Save("ie-engine-output.pdf")
$vbLabelText   $csharpLabel

Çok-motorlu yaklaşım esneklik sağlasa da dikkatli düşünce gerektirir:

  1. Motor Seçimi: Geliştiriciler, içerikleri için uygun motoru seçmelidir
  2. Özellik Eşitliği: Farklı motorlar, farklı HTML/CSS özelliklerini destekler
  3. Dağıtım Karışıklığı: Her motorun farklı çalıştırma gereksinimleri olabilir
  4. Test Yükü: Çıktılar motorlar arasında farklılık gösterebilir, bu da daha fazla test gerektirir

URL'lerden PDF Belgeleri Oluşturma

PDF kütüphanelerinin en yaygın kullanım örneklerinden biri canlı web sayfalarını PDF belgelere dönüştürmektir. Her kütüphanenin bu görevi nasıl ele aldığını inceleyelim.

IronPDF Kullanarak

IronPDF, tam Chrome tarayıcı motorunu kullanarak URL'den PDF dönüşümü yapar:

using IronPdf;
using System;
using System.Threading.Tasks;

public class UrlToPdfConverter
{
    public static async Task ConvertUrlToPdfAsync()
    {
        var renderer = new ChromePdfRenderer();

        // Configure for optimal web page capture
        renderer.RenderingOptions = new ChromePdfRenderOptions
        {
            // Viewport and scaling
            ViewPortWidth = 1920,
            ViewPortHeight = 1080,
            ZoomLevel = 100,

            // Paper and margins
            PaperSize = PdfPaperSize.A4,
            MarginTop = 10,
            MarginBottom = 10,
            MarginLeft = 10,
            MarginRight = 10,

            // Rendering behavior
            CssMediaType = PdfCssMediaType.Screen,
            PrintHtmlBackgrounds = true,
            CreatePdfFormsFromHtml = true,

            // JavaScript and timing
            EnableJavaScript = true,
            WaitFor = new WaitFor
            {
                // Wait strategies for dynamic content
                RenderDelay = 500, // milliseconds
                JavaScriptFinishDelay = 100,
                AllowedExecutionTime = 30000 // 30 seconds max
            }
        };

        // Handle authentication if needed
        renderer.RenderingOptions.HttpOptions.HttpHeaders.Add("Authorization", "Bearer your-token");

        // Convert with error handling
        try
        {
            // Async conversion for better performance
            var pdf = await renderer.RenderUrlAsPdfAsync("https://github.com/trending");

            // Add metadata
            pdf.MetaData.Author = "IronPDF Example";
            pdf.MetaData.Title = "GitHub Trending Projects";
            pdf.MetaData.CreationDate = DateTime.Now;

            // Add watermark
            pdf.ApplyWatermark("<h2 style='color:red;opacity:0.5'>CONFIDENTIAL</h2>", 
                30, VerticalAlignment.Middle, HorizontalAlignment.Center);

            pdf.SaveAs("github-trending.pdf");
            Console.WriteLine("PDF created successfully!");
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error creating PDF: {ex.Message}");
        }
    }
}
using IronPdf;
using System;
using System.Threading.Tasks;

public class UrlToPdfConverter
{
    public static async Task ConvertUrlToPdfAsync()
    {
        var renderer = new ChromePdfRenderer();

        // Configure for optimal web page capture
        renderer.RenderingOptions = new ChromePdfRenderOptions
        {
            // Viewport and scaling
            ViewPortWidth = 1920,
            ViewPortHeight = 1080,
            ZoomLevel = 100,

            // Paper and margins
            PaperSize = PdfPaperSize.A4,
            MarginTop = 10,
            MarginBottom = 10,
            MarginLeft = 10,
            MarginRight = 10,

            // Rendering behavior
            CssMediaType = PdfCssMediaType.Screen,
            PrintHtmlBackgrounds = true,
            CreatePdfFormsFromHtml = true,

            // JavaScript and timing
            EnableJavaScript = true,
            WaitFor = new WaitFor
            {
                // Wait strategies for dynamic content
                RenderDelay = 500, // milliseconds
                JavaScriptFinishDelay = 100,
                AllowedExecutionTime = 30000 // 30 seconds max
            }
        };

        // Handle authentication if needed
        renderer.RenderingOptions.HttpOptions.HttpHeaders.Add("Authorization", "Bearer your-token");

        // Convert with error handling
        try
        {
            // Async conversion for better performance
            var pdf = await renderer.RenderUrlAsPdfAsync("https://github.com/trending");

            // Add metadata
            pdf.MetaData.Author = "IronPDF Example";
            pdf.MetaData.Title = "GitHub Trending Projects";
            pdf.MetaData.CreationDate = DateTime.Now;

            // Add watermark
            pdf.ApplyWatermark("<h2 style='color:red;opacity:0.5'>CONFIDENTIAL</h2>", 
                30, VerticalAlignment.Middle, HorizontalAlignment.Center);

            pdf.SaveAs("github-trending.pdf");
            Console.WriteLine("PDF created successfully!");
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error creating PDF: {ex.Message}");
        }
    }
}
Imports IronPdf
Imports System
Imports System.Threading.Tasks

Public Class UrlToPdfConverter
	Public Shared Async Function ConvertUrlToPdfAsync() As Task
		Dim renderer = New ChromePdfRenderer()

		' Configure for optimal web page capture
		renderer.RenderingOptions = New ChromePdfRenderOptions With {
			.ViewPortWidth = 1920,
			.ViewPortHeight = 1080,
			.ZoomLevel = 100,
			.PaperSize = PdfPaperSize.A4,
			.MarginTop = 10,
			.MarginBottom = 10,
			.MarginLeft = 10,
			.MarginRight = 10,
			.CssMediaType = PdfCssMediaType.Screen,
			.PrintHtmlBackgrounds = True,
			.CreatePdfFormsFromHtml = True,
			.EnableJavaScript = True,
			.WaitFor = New WaitFor With {
				.RenderDelay = 500,
				.JavaScriptFinishDelay = 100,
				.AllowedExecutionTime = 30000
			}
		}

		' Handle authentication if needed
		renderer.RenderingOptions.HttpOptions.HttpHeaders.Add("Authorization", "Bearer your-token")

		' Convert with error handling
		Try
			' Async conversion for better performance
			Dim pdf = Await renderer.RenderUrlAsPdfAsync("https://github.com/trending")

			' Add metadata
			pdf.MetaData.Author = "IronPDF Example"
			pdf.MetaData.Title = "GitHub Trending Projects"
			pdf.MetaData.CreationDate = DateTime.Now

			' Add watermark
			pdf.ApplyWatermark("<h2 style='color:red;opacity:0.5'>CONFIDENTIAL</h2>", 30, VerticalAlignment.Middle, HorizontalAlignment.Center)

			pdf.SaveAs("github-trending.pdf")
			Console.WriteLine("PDF created successfully!")
		Catch ex As Exception
			Console.WriteLine($"Error creating PDF: {ex.Message}")
		End Try
	End Function
End Class
$vbLabelText   $csharpLabel

Gösterilen anahtar özellikler:

  • Görsel Alan Kontrolü: Duyarlı test için farklı ekran boyutlarını simüle edin
  • Kimlik Doğrulama Desteği: Korunan kaynaklar için başlıklar ekleyin
  • Dinamik İçerik İşleme: JavaScript ağırlıklı sayfalar için bekleme stratejileri
  • Sonrası İşleme: Dönüştürmeden sonra meta veriler ve filigranlar ekleyin

ABCpdf Kullanarak

ABCpdf, sayfa zincirleme ile URL dönüşümü:

using WebSupergoo.ABCpdf13;
using System;

public class ABCpdfUrlConverter
{
    public static void ConvertUrlWithABCpdf()
    {
        using (Doc theDoc = new Doc())
        {
            // Configure the HTML engine
            theDoc.HtmlOptions.Engine = EngineType.Chrome;
            theDoc.HtmlOptions.Chrome.LoadDelay = 1000; // Wait 1 second

            // Set viewport size
            theDoc.HtmlOptions.BrowserWidth = 1200;

            // Authentication
            theDoc.HtmlOptions.HttpAdditionalHeaders = "Authorization: Bearer your-token";

            // Page setup
            theDoc.Rect.Inset(20, 20);
            theDoc.Page = theDoc.AddPage();

            // Add the URL
            int theID = theDoc.AddImageUrl("https://github.com/trending");

            // Chain pages for overflow content
            while (true)
            {
                if (!theDoc.Chainable(theID))
                    break;
                theDoc.Page = theDoc.AddPage();
                theID = theDoc.AddImageToChain(theID);
            }

            // Reduce file size
            for (int i = 1; i <= theDoc.PageCount; i++)
            {
                theDoc.PageNumber = i;
                theDoc.Flatten();
            }

            // Save
            theDoc.Save("abcpdf-github.pdf");
        }
    }
}
using WebSupergoo.ABCpdf13;
using System;

public class ABCpdfUrlConverter
{
    public static void ConvertUrlWithABCpdf()
    {
        using (Doc theDoc = new Doc())
        {
            // Configure the HTML engine
            theDoc.HtmlOptions.Engine = EngineType.Chrome;
            theDoc.HtmlOptions.Chrome.LoadDelay = 1000; // Wait 1 second

            // Set viewport size
            theDoc.HtmlOptions.BrowserWidth = 1200;

            // Authentication
            theDoc.HtmlOptions.HttpAdditionalHeaders = "Authorization: Bearer your-token";

            // Page setup
            theDoc.Rect.Inset(20, 20);
            theDoc.Page = theDoc.AddPage();

            // Add the URL
            int theID = theDoc.AddImageUrl("https://github.com/trending");

            // Chain pages for overflow content
            while (true)
            {
                if (!theDoc.Chainable(theID))
                    break;
                theDoc.Page = theDoc.AddPage();
                theID = theDoc.AddImageToChain(theID);
            }

            // Reduce file size
            for (int i = 1; i <= theDoc.PageCount; i++)
            {
                theDoc.PageNumber = i;
                theDoc.Flatten();
            }

            // Save
            theDoc.Save("abcpdf-github.pdf");
        }
    }
}
Imports WebSupergoo.ABCpdf13
Imports System

Public Class ABCpdfUrlConverter
	Public Shared Sub ConvertUrlWithABCpdf()
		Using theDoc As New Doc()
			' Configure the HTML engine
			theDoc.HtmlOptions.Engine = EngineType.Chrome
			theDoc.HtmlOptions.Chrome.LoadDelay = 1000 ' Wait 1 second

			' Set viewport size
			theDoc.HtmlOptions.BrowserWidth = 1200

			' Authentication
			theDoc.HtmlOptions.HttpAdditionalHeaders = "Authorization: Bearer your-token"

			' Page setup
			theDoc.Rect.Inset(20, 20)
			theDoc.Page = theDoc.AddPage()

			' Add the URL
			Dim theID As Integer = theDoc.AddImageUrl("https://github.com/trending")

			' Chain pages for overflow content
			Do
				If Not theDoc.Chainable(theID) Then
					Exit Do
				End If
				theDoc.Page = theDoc.AddPage()
				theID = theDoc.AddImageToChain(theID)
			Loop

			' Reduce file size
			For i As Integer = 1 To theDoc.PageCount
				theDoc.PageNumber = i
				theDoc.Flatten()
			Next i

			' Save
			theDoc.Save("abcpdf-github.pdf")
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

Dikkate değer farklılıklar:

  • Sayfa Zincirleme: Çok sayfalı içeriğin elle işlenmesi
  • Motor Yapılandırması: Render motorunu açıkça seçmek gerekir
  • Kaynak Yönetimi: using ifadesiyle doğru biçimde imha edilmesi gerekir

HTML Dizelerinden PDF Oluşturma

Her iki kütüphane de, HTML dizelerini PDF'ye dönüştürmekte mükemmel, ancak yaklaşımları önemli ölçüde farklıdır.

IronPDF Kullanarak

IronPDF'in gelişmiş özellikleriyle HTML dizesi dönüştürmesi:

using IronPdf;
using System.IO;

public class HtmlStringToPdf
{
    public static void GenerateInvoicePdf()
    {
        var renderer = new ChromePdfRenderer();

        // Configure for print-quality output
        renderer.RenderingOptions = new ChromePdfRenderOptions
        {
            PaperSize = PdfPaperSize.A4,
            DPI = 300, // High quality print
            CssMediaType = PdfCssMediaType.Print,
            PaperFit = new PaperFit
            {
                UseFitToPageRendering = true,
                RenderScale = 100
            }
        };

        // Professional invoice HTML
        string invoiceHtml = @"
<!DOCTYPE html>
<html>
<head>
    <meta charset='UTF-8'>
    <style>
        @page {
            size: A4;
            margin: 0;
        }

        body {
            font-family: 'Segoe UI', Arial, sans-serif;
            margin: 0;
            padding: 20mm;
            color: #333;
        }

        .invoice-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 30px;
            border-bottom: 2px solid #0066cc;
            padding-bottom: 20px;
        }

        .company-info h1 {
            color: #0066cc;
            margin: 0;
            font-size: 28px;
        }

        .invoice-details {
            text-align: right;
        }

        .invoice-details h2 {
            color: #666;
            margin: 0 0 10px 0;
            font-size: 24px;
        }

        .invoice-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 30px;
        }

        .invoice-table th {
            background-color: #0066cc;
            color: white;
            padding: 12px;
            text-align: left;
        }

        .invoice-table td {
            padding: 12px;
            border-bottom: 1px solid #ddd;
        }

        .invoice-table tr:hover {
            background-color: #f5f5f5;
        }

        .total-section {
            margin-top: 30px;
            text-align: right;
        }

        .total-section .total-row {
            display: flex;
            justify-content: flex-end;
            margin: 5px 0;
        }

        .total-section .label {
            font-weight: bold;
            margin-right: 20px;
            min-width: 100px;
        }

        .total-section .grand-total {
            font-size: 20px;
            color: #0066cc;
            border-top: 2px solid #0066cc;
            padding-top: 10px;
            margin-top: 10px;
        }

        @media print {
            .no-print { display: none; }
        }
    </style>
</head>
<body>
    <div class='invoice-header'>
        <div class='company-info'>
            <h1>ACME Corporation</h1>
            <p>123 Business Street<br>
            New York, NY 10001<br>
            Phone: (555) 123-4567<br>
            Email: billing@acme.com</p>
        </div>
        <div class='invoice-details'>
            <h2>INVOICE</h2>
            <p><strong>Invoice #:</strong> INV-2025-001<br>
            <strong>Date:</strong> " + DateTime.Now.ToString("MMMM dd, yyyy") + @"<br>
            <strong>Due Date:</strong> " + DateTime.Now.AddDays(30).ToString("MMMM dd, yyyy") + @"</p>
        </div>
    </div>

    <div class='billing-info'>
        <h3>Bill To:</h3>
        <p>John Doe<br>
        456 Client Avenue<br>
        Los Angeles, CA 90001</p>
    </div>

    <table class='invoice-table'>
        <thead>
            <tr>
                <th>Description</th>
                <th>Quantity</th>
                <th>Unit Price</th>
                <th>Total</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Professional Services - Web Development</td>
                <td>40 hours</td>
                <td>$150.00</td>
                <td>$6,000.00</td>
            </tr>
            <tr>
                <td>Hosting Services (Annual)</td>
                <td>1</td>
                <td>$1,200.00</td>
                <td>$1,200.00</td>
            </tr>
            <tr>
                <td>Domain Registration</td>
                <td>2</td>
                <td>$15.00</td>
                <td>$30.00</td>
            </tr>
        </tbody>
    </table>

    <div class='total-section'>
        <div class='total-row'>
            <span class='label'>Subtotal:</span>
            <span>$7,230.00</span>
        </div>
        <div class='total-row'>
            <span class='label'>Tax (8%):</span>
            <span>$578.40</span>
        </div>
        <div class='total-row grand-total'>
            <span class='label'>Total Due:</span>
            <span>$7,808.40</span>
        </div>
    </div>

    <div class='footer' style='margin-top: 50px; padding-top: 20px; border-top: 1px solid #ddd; text-align: center; color: #666;'>
        <p>Thank you for your business!<br>
        Payment is due within 30 days. Please include invoice number with payment.</p>
    </div>
</body>
</html>";

        // Generate PDF with base path for local assets
        var pdf = renderer.RenderHtmlAsPdf(invoiceHtml, @"C:\Assets\");

        // Add security
        pdf.SecuritySettings.AllowUserEditing = false;
        pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;
        pdf.SecuritySettings.OwnerPassword = "admin123";

        // Save with optimization
        pdf.CompressImages(60); // 60% quality for smaller file size
        pdf.SaveAs("professional-invoice.pdf");
    }
}
using IronPdf;
using System.IO;

public class HtmlStringToPdf
{
    public static void GenerateInvoicePdf()
    {
        var renderer = new ChromePdfRenderer();

        // Configure for print-quality output
        renderer.RenderingOptions = new ChromePdfRenderOptions
        {
            PaperSize = PdfPaperSize.A4,
            DPI = 300, // High quality print
            CssMediaType = PdfCssMediaType.Print,
            PaperFit = new PaperFit
            {
                UseFitToPageRendering = true,
                RenderScale = 100
            }
        };

        // Professional invoice HTML
        string invoiceHtml = @"
<!DOCTYPE html>
<html>
<head>
    <meta charset='UTF-8'>
    <style>
        @page {
            size: A4;
            margin: 0;
        }

        body {
            font-family: 'Segoe UI', Arial, sans-serif;
            margin: 0;
            padding: 20mm;
            color: #333;
        }

        .invoice-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 30px;
            border-bottom: 2px solid #0066cc;
            padding-bottom: 20px;
        }

        .company-info h1 {
            color: #0066cc;
            margin: 0;
            font-size: 28px;
        }

        .invoice-details {
            text-align: right;
        }

        .invoice-details h2 {
            color: #666;
            margin: 0 0 10px 0;
            font-size: 24px;
        }

        .invoice-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 30px;
        }

        .invoice-table th {
            background-color: #0066cc;
            color: white;
            padding: 12px;
            text-align: left;
        }

        .invoice-table td {
            padding: 12px;
            border-bottom: 1px solid #ddd;
        }

        .invoice-table tr:hover {
            background-color: #f5f5f5;
        }

        .total-section {
            margin-top: 30px;
            text-align: right;
        }

        .total-section .total-row {
            display: flex;
            justify-content: flex-end;
            margin: 5px 0;
        }

        .total-section .label {
            font-weight: bold;
            margin-right: 20px;
            min-width: 100px;
        }

        .total-section .grand-total {
            font-size: 20px;
            color: #0066cc;
            border-top: 2px solid #0066cc;
            padding-top: 10px;
            margin-top: 10px;
        }

        @media print {
            .no-print { display: none; }
        }
    </style>
</head>
<body>
    <div class='invoice-header'>
        <div class='company-info'>
            <h1>ACME Corporation</h1>
            <p>123 Business Street<br>
            New York, NY 10001<br>
            Phone: (555) 123-4567<br>
            Email: billing@acme.com</p>
        </div>
        <div class='invoice-details'>
            <h2>INVOICE</h2>
            <p><strong>Invoice #:</strong> INV-2025-001<br>
            <strong>Date:</strong> " + DateTime.Now.ToString("MMMM dd, yyyy") + @"<br>
            <strong>Due Date:</strong> " + DateTime.Now.AddDays(30).ToString("MMMM dd, yyyy") + @"</p>
        </div>
    </div>

    <div class='billing-info'>
        <h3>Bill To:</h3>
        <p>John Doe<br>
        456 Client Avenue<br>
        Los Angeles, CA 90001</p>
    </div>

    <table class='invoice-table'>
        <thead>
            <tr>
                <th>Description</th>
                <th>Quantity</th>
                <th>Unit Price</th>
                <th>Total</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Professional Services - Web Development</td>
                <td>40 hours</td>
                <td>$150.00</td>
                <td>$6,000.00</td>
            </tr>
            <tr>
                <td>Hosting Services (Annual)</td>
                <td>1</td>
                <td>$1,200.00</td>
                <td>$1,200.00</td>
            </tr>
            <tr>
                <td>Domain Registration</td>
                <td>2</td>
                <td>$15.00</td>
                <td>$30.00</td>
            </tr>
        </tbody>
    </table>

    <div class='total-section'>
        <div class='total-row'>
            <span class='label'>Subtotal:</span>
            <span>$7,230.00</span>
        </div>
        <div class='total-row'>
            <span class='label'>Tax (8%):</span>
            <span>$578.40</span>
        </div>
        <div class='total-row grand-total'>
            <span class='label'>Total Due:</span>
            <span>$7,808.40</span>
        </div>
    </div>

    <div class='footer' style='margin-top: 50px; padding-top: 20px; border-top: 1px solid #ddd; text-align: center; color: #666;'>
        <p>Thank you for your business!<br>
        Payment is due within 30 days. Please include invoice number with payment.</p>
    </div>
</body>
</html>";

        // Generate PDF with base path for local assets
        var pdf = renderer.RenderHtmlAsPdf(invoiceHtml, @"C:\Assets\");

        // Add security
        pdf.SecuritySettings.AllowUserEditing = false;
        pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;
        pdf.SecuritySettings.OwnerPassword = "admin123";

        // Save with optimization
        pdf.CompressImages(60); // 60% quality for smaller file size
        pdf.SaveAs("professional-invoice.pdf");
    }
}
Imports IronPdf
Imports System.IO

Public Class HtmlStringToPdf
	Public Shared Sub GenerateInvoicePdf()
		Dim renderer = New ChromePdfRenderer()

		' Configure for print-quality output
		renderer.RenderingOptions = New ChromePdfRenderOptions With {
			.PaperSize = PdfPaperSize.A4,
			.DPI = 300,
			.CssMediaType = PdfCssMediaType.Print,
			.PaperFit = New PaperFit With {
				.UseFitToPageRendering = True,
				.RenderScale = 100
			}
		}

		' Professional invoice HTML
		Dim invoiceHtml As String = "
<!DOCTYPE html>
<html>
<head>
    <meta charset='UTF-8'>
    <style>
        @page {
            size: A4;
            margin: 0;
        }

        body {
            font-family: 'Segoe UI', Arial, sans-serif;
            margin: 0;
            padding: 20mm;
            color: #333;
        }

        .invoice-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 30px;
            border-bottom: 2px solid #0066cc;
            padding-bottom: 20px;
        }

        .company-info h1 {
            color: #0066cc;
            margin: 0;
            font-size: 28px;
        }

        .invoice-details {
            text-align: right;
        }

        .invoice-details h2 {
            color: #666;
            margin: 0 0 10px 0;
            font-size: 24px;
        }

        .invoice-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 30px;
        }

        .invoice-table th {
            background-color: #0066cc;
            color: white;
            padding: 12px;
            text-align: left;
        }

        .invoice-table td {
            padding: 12px;
            border-bottom: 1px solid #ddd;
        }

        .invoice-table tr:hover {
            background-color: #f5f5f5;
        }

        .total-section {
            margin-top: 30px;
            text-align: right;
        }

        .total-section .total-row {
            display: flex;
            justify-content: flex-end;
            margin: 5px 0;
        }

        .total-section .label {
            font-weight: bold;
            margin-right: 20px;
            min-width: 100px;
        }

        .total-section .grand-total {
            font-size: 20px;
            color: #0066cc;
            border-top: 2px solid #0066cc;
            padding-top: 10px;
            margin-top: 10px;
        }

        @media print {
            .no-print { display: none; }
        }
    </style>
</head>
<body>
    <div class='invoice-header'>
        <div class='company-info'>
            <h1>ACME Corporation</h1>
            <p>123 Business Street<br>
            New York, NY 10001<br>
            Phone: (555) 123-4567<br>
            Email: billing@acme.com</p>
        </div>
        <div class='invoice-details'>
            <h2>INVOICE</h2>
            <p><strong>Invoice #:</strong> INV-2025-001<br>
            <strong>Date:</strong> " & DateTime.Now.ToString("MMMM dd, yyyy") & "<br>
            <strong>Due Date:</strong> " & DateTime.Now.AddDays(30).ToString("MMMM dd, yyyy") & "</p>
        </div>
    </div>

    <div class='billing-info'>
        <h3>Bill To:</h3>
        <p>John Doe<br>
        456 Client Avenue<br>
        Los Angeles, CA 90001</p>
    </div>

    <table class='invoice-table'>
        <thead>
            <tr>
                <th>Description</th>
                <th>Quantity</th>
                <th>Unit Price</th>
                <th>Total</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Professional Services - Web Development</td>
                <td>40 hours</td>
                <td>$150.00</td>
                <td>$6,000.00</td>
            </tr>
            <tr>
                <td>Hosting Services (Annual)</td>
                <td>1</td>
                <td>$1,200.00</td>
                <td>$1,200.00</td>
            </tr>
            <tr>
                <td>Domain Registration</td>
                <td>2</td>
                <td>$15.00</td>
                <td>$30.00</td>
            </tr>
        </tbody>
    </table>

    <div class='total-section'>
        <div class='total-row'>
            <span class='label'>Subtotal:</span>
            <span>$7,230.00</span>
        </div>
        <div class='total-row'>
            <span class='label'>Tax (8%):</span>
            <span>$578.40</span>
        </div>
        <div class='total-row grand-total'>
            <span class='label'>Total Due:</span>
            <span>$7,808.40</span>
        </div>
    </div>

    <div class='footer' style='margin-top: 50px; padding-top: 20px; border-top: 1px solid #ddd; text-align: center; color: #666;'>
        <p>Thank you for your business!<br>
        Payment is due within 30 days. Please include invoice number with payment.</p>
    </div>
</body>
</html>"

		' Generate PDF with base path for local assets
		Dim pdf = renderer.RenderHtmlAsPdf(invoiceHtml, "C:\Assets\")

		' Add security
		pdf.SecuritySettings.AllowUserEditing = False
		pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights
		pdf.SecuritySettings.OwnerPassword = "admin123"

		' Save with optimization
		pdf.CompressImages(60) ' 60% quality for smaller file size
		pdf.SaveAs("professional-invoice.pdf")
	End Sub
End Class
$vbLabelText   $csharpLabel

Bu örnek şunları sergiler:

  • Profesyonel Düzen: Flexbox ve grid ile karmaşık CSS
  • Dinamik İçerik: Tarih hesaplamaları ve biçimlendirme
  • Baskı Optimizasyonu: Baskı için özel stillendirme için medya sorguları
  • Güvenlik Özellikleri: Şifre koruma ve izin ayarları
  • Dosya Optimizasyonu: Daha küçük dosya boyutları için görüntü sıkıştırma

ABCpdf Kullanarak

ABCpdf'in stilli metinle HTML dizesi işleme:

using WebSupergoo.ABCpdf13;

public class ABCpdfHtmlString
{
    public static void CreateStyledDocument()
    {
        using (Doc theDoc = new Doc())
        {
            // Set up the document
            theDoc.Rect.Inset(40, 40);
            theDoc.Color.String = "0 0 0"; // Black text

            // Add styled HTML content
            theDoc.FontSize = 48;
            string styledHtml = @"
                <h1 style='color: #0066cc'>ABCpdf Document</h1>
                <p style='font-size: 14pt; line-height: 1.5'>
                    This demonstrates <b>bold text</b>, <i>italic text</i>, 
                    and <span style='color: red'>colored text</span>.
                </p>
                <ul style='margin-left: 20px'>
                    <li>First item</li>
                    <li>Second item</li>
                    <li>Third item</li>
                </ul>";

            // Add HTML with automatic text flow
            int theID = theDoc.AddImageHtml(styledHtml);

            // Continue on new pages if needed
            while (true)
            {
                if (!theDoc.Chainable(theID))
                    break;
                theDoc.Page = theDoc.AddPage();
                theID = theDoc.AddImageToChain(theID);
            }

            // Apply compression
            theDoc.Encryption.Type = 2; // 128-bit encryption
            theDoc.Encryption.CanPrint = true;
            theDoc.Encryption.CanModify = false;

            theDoc.Save("styled-abcpdf.pdf");
        }
    }
}
using WebSupergoo.ABCpdf13;

public class ABCpdfHtmlString
{
    public static void CreateStyledDocument()
    {
        using (Doc theDoc = new Doc())
        {
            // Set up the document
            theDoc.Rect.Inset(40, 40);
            theDoc.Color.String = "0 0 0"; // Black text

            // Add styled HTML content
            theDoc.FontSize = 48;
            string styledHtml = @"
                <h1 style='color: #0066cc'>ABCpdf Document</h1>
                <p style='font-size: 14pt; line-height: 1.5'>
                    This demonstrates <b>bold text</b>, <i>italic text</i>, 
                    and <span style='color: red'>colored text</span>.
                </p>
                <ul style='margin-left: 20px'>
                    <li>First item</li>
                    <li>Second item</li>
                    <li>Third item</li>
                </ul>";

            // Add HTML with automatic text flow
            int theID = theDoc.AddImageHtml(styledHtml);

            // Continue on new pages if needed
            while (true)
            {
                if (!theDoc.Chainable(theID))
                    break;
                theDoc.Page = theDoc.AddPage();
                theID = theDoc.AddImageToChain(theID);
            }

            // Apply compression
            theDoc.Encryption.Type = 2; // 128-bit encryption
            theDoc.Encryption.CanPrint = true;
            theDoc.Encryption.CanModify = false;

            theDoc.Save("styled-abcpdf.pdf");
        }
    }
}
Imports WebSupergoo.ABCpdf13

Public Class ABCpdfHtmlString
	Public Shared Sub CreateStyledDocument()
		Using theDoc As New Doc()
			' Set up the document
			theDoc.Rect.Inset(40, 40)
			theDoc.Color.String = "0 0 0" ' Black text

			' Add styled HTML content
			theDoc.FontSize = 48
			Dim styledHtml As String = "
                <h1 style='color: #0066cc'>ABCpdf Document</h1>
                <p style='font-size: 14pt; line-height: 1.5'>
                    This demonstrates <b>bold text</b>, <i>italic text</i>, 
                    and <span style='color: red'>colored text</span>.
                </p>
                <ul style='margin-left: 20px'>
                    <li>First item</li>
                    <li>Second item</li>
                    <li>Third item</li>
                </ul>"

			' Add HTML with automatic text flow
			Dim theID As Integer = theDoc.AddImageHtml(styledHtml)

			' Continue on new pages if needed
			Do
				If Not theDoc.Chainable(theID) Then
					Exit Do
				End If
				theDoc.Page = theDoc.AddPage()
				theID = theDoc.AddImageToChain(theID)
			Loop

			' Apply compression
			theDoc.Encryption.Type = 2 ' 128-bit encryption
			theDoc.Encryption.CanPrint = True
			theDoc.Encryption.CanModify = False

			theDoc.Save("styled-abcpdf.pdf")
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

Performans Kıyaslaması

Performans özelliklerini anlamak, belirli kullanım durumunuz için doğru kütüphaneyi seçmenize yardımcı olur.

Kıyaslama Testi Kurulumu

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using IronPdf;
using WebSupergoo.ABCpdf13;

[MemoryDiagnoser]
[SimpleJob(warmupCount: 3, targetCount: 10)]
public class PdfGenerationBenchmark
{
    private string _simpleHtml;
    private string _complexHtml;
    private ChromePdfRenderer _ironPdfRenderer;
    private Doc _abcPdfDoc;

    [GlobalSetup]
    public void Setup()
    {
        _simpleHtml = "<h1>Simple Document</h1><p>Basic paragraph text.</p>";
        _complexHtml = File.ReadAllText("complex-page.html"); // 50KB HTML with CSS/JS

        _ironPdfRenderer = new ChromePdfRenderer();
        _abcPdfDoc = new Doc();
        _abcPdfDoc.HtmlOptions.Engine = EngineType.Chrome;
    }

    [Benchmark]
    public void IronPDF_SimpleHtml()
    {
        var pdf = _ironPdfRenderer.RenderHtmlAsPdf(_simpleHtml);
        pdf.SaveAs("temp_iron_simple.pdf");
    }

    [Benchmark]
    public void ABCpdf_SimpleHtml()
    {
        _abcPdfDoc.Clear();
        _abcPdfDoc.AddImageHtml(_simpleHtml);
        _abcPdfDoc.Save("temp_abc_simple.pdf");
    }

    [Benchmark]
    public void IronPDF_ComplexHtml()
    {
        var pdf = _ironPdfRenderer.RenderHtmlAsPdf(_complexHtml);
        pdf.SaveAs("temp_iron_complex.pdf");
    }

    [Benchmark]
    public void ABCpdf_ComplexHtml()
    {
        _abcPdfDoc.Clear();
        int id = _abcPdfDoc.AddImageHtml(_complexHtml);
        while (_abcPdfDoc.Chainable(id))
        {
            _abcPdfDoc.Page = _abcPdfDoc.AddPage();
            id = _abcPdfDoc.AddImageToChain(id);
        }
        _abcPdfDoc.Save("temp_abc_complex.pdf");
    }
}
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using IronPdf;
using WebSupergoo.ABCpdf13;

[MemoryDiagnoser]
[SimpleJob(warmupCount: 3, targetCount: 10)]
public class PdfGenerationBenchmark
{
    private string _simpleHtml;
    private string _complexHtml;
    private ChromePdfRenderer _ironPdfRenderer;
    private Doc _abcPdfDoc;

    [GlobalSetup]
    public void Setup()
    {
        _simpleHtml = "<h1>Simple Document</h1><p>Basic paragraph text.</p>";
        _complexHtml = File.ReadAllText("complex-page.html"); // 50KB HTML with CSS/JS

        _ironPdfRenderer = new ChromePdfRenderer();
        _abcPdfDoc = new Doc();
        _abcPdfDoc.HtmlOptions.Engine = EngineType.Chrome;
    }

    [Benchmark]
    public void IronPDF_SimpleHtml()
    {
        var pdf = _ironPdfRenderer.RenderHtmlAsPdf(_simpleHtml);
        pdf.SaveAs("temp_iron_simple.pdf");
    }

    [Benchmark]
    public void ABCpdf_SimpleHtml()
    {
        _abcPdfDoc.Clear();
        _abcPdfDoc.AddImageHtml(_simpleHtml);
        _abcPdfDoc.Save("temp_abc_simple.pdf");
    }

    [Benchmark]
    public void IronPDF_ComplexHtml()
    {
        var pdf = _ironPdfRenderer.RenderHtmlAsPdf(_complexHtml);
        pdf.SaveAs("temp_iron_complex.pdf");
    }

    [Benchmark]
    public void ABCpdf_ComplexHtml()
    {
        _abcPdfDoc.Clear();
        int id = _abcPdfDoc.AddImageHtml(_complexHtml);
        while (_abcPdfDoc.Chainable(id))
        {
            _abcPdfDoc.Page = _abcPdfDoc.AddPage();
            id = _abcPdfDoc.AddImageToChain(id);
        }
        _abcPdfDoc.Save("temp_abc_complex.pdf");
    }
}
Imports BenchmarkDotNet.Attributes
Imports BenchmarkDotNet.Running
Imports IronPdf
Imports WebSupergoo.ABCpdf13

<MemoryDiagnoser>
<SimpleJob(warmupCount:= 3, targetCount:= 10)>
Public Class PdfGenerationBenchmark
	Private _simpleHtml As String
	Private _complexHtml As String
	Private _ironPdfRenderer As ChromePdfRenderer
	Private _abcPdfDoc As Doc

	<GlobalSetup>
	Public Sub Setup()
		_simpleHtml = "<h1>Simple Document</h1><p>Basic paragraph text.</p>"
		_complexHtml = File.ReadAllText("complex-page.html") ' 50KB HTML with CSS/JS

		_ironPdfRenderer = New ChromePdfRenderer()
		_abcPdfDoc = New Doc()
		_abcPdfDoc.HtmlOptions.Engine = EngineType.Chrome
	End Sub

	<Benchmark>
	Public Sub IronPDF_SimpleHtml()
		Dim pdf = _ironPdfRenderer.RenderHtmlAsPdf(_simpleHtml)
		pdf.SaveAs("temp_iron_simple.pdf")
	End Sub

	<Benchmark>
	Public Sub ABCpdf_SimpleHtml()
		_abcPdfDoc.Clear()
		_abcPdfDoc.AddImageHtml(_simpleHtml)
		_abcPdfDoc.Save("temp_abc_simple.pdf")
	End Sub

	<Benchmark>
	Public Sub IronPDF_ComplexHtml()
		Dim pdf = _ironPdfRenderer.RenderHtmlAsPdf(_complexHtml)
		pdf.SaveAs("temp_iron_complex.pdf")
	End Sub

	<Benchmark>
	Public Sub ABCpdf_ComplexHtml()
		_abcPdfDoc.Clear()
		Dim id As Integer = _abcPdfDoc.AddImageHtml(_complexHtml)
		Do While _abcPdfDoc.Chainable(id)
			_abcPdfDoc.Page = _abcPdfDoc.AddPage()
			id = _abcPdfDoc.AddImageToChain(id)
		Loop
		_abcPdfDoc.Save("temp_abc_complex.pdf")
	End Sub
End Class
$vbLabelText   $csharpLabel

Tipik Sonuclar

Yöntem Ortalama Hata StdDev Hafiza
IronPDF_SimpleHtml 245,3 ms 4,2 ms 3,8 ms 152 MB
ABCpdf_SimpleHtml 187,6 ms 3,1 ms 2,9 ms 98 MB
IronPDF_ComplexHtml 892,4 ms 12,3 ms 10,8 ms 201 MB
ABCpdf_ComplexHtml 743,2 ms 9,7 ms 8,6 ms 145 MB

Anahtar gozlemler:

  • ABCpdf daha hizli ham donusum suresi gösteriyor
  • IronPDF, tam Chrome motoru nedeniyle daha fazla hafiza kullaniyor
  • Her iki kutuphane de belge karmasikligi ile dogrusal olarak olcekleniyor
  • IronPDF'nin ek maliyeti daha iyi bir render dogrulugu sagliyor

Gelişmiş Özellikler Karsilastirmasi

Dijital Imzalar ve Guvenlik

IronPDF Dijital Imza Uygulamasi

using IronPdf;
using IronPdf.Signing;
using System.Security.Cryptography.X509Certificates;

public class SecurityFeatures
{
    public static void ApplyDigitalSignature()
    {
        // Load existing PDF
        var pdf = PdfDocument.FromFile("unsigned-document.pdf");

        // Load certificate
        var cert = new X509Certificate2("certificate.pfx", "password");

        // Create signature
        var signature = new PdfSignature(cert)
        {
            // Visual signature appearance
            SignatureImage = new PdfSignature.SignatureImage
            {
                ImagePath = "signature.png",
                Width = 200,
                Height = 100
            },

            // Signature position
            PageIndex = 0,
            X = 400,
            Y = 100,

            // Signature details
            Reason = "Document approved",
            Location = "New York, NY",
            ContactInfo = "john.doe@company.com"
        };

        // Apply signature
        pdf.Sign(signature);

        // Additional security
        pdf.SecuritySettings = new SecuritySettings
        {
            AllowUserPrinting = true,
            AllowUserCopyPasteContent = false,
            AllowUserEditing = false,
            AllowUserFormData = true,
            OwnerPassword = "owner123",
            UserPassword = "user123",
            EncryptionLevel = EncryptionLevel.AES256
        };

        pdf.SaveAs("signed-secured.pdf");
    }
}
using IronPdf;
using IronPdf.Signing;
using System.Security.Cryptography.X509Certificates;

public class SecurityFeatures
{
    public static void ApplyDigitalSignature()
    {
        // Load existing PDF
        var pdf = PdfDocument.FromFile("unsigned-document.pdf");

        // Load certificate
        var cert = new X509Certificate2("certificate.pfx", "password");

        // Create signature
        var signature = new PdfSignature(cert)
        {
            // Visual signature appearance
            SignatureImage = new PdfSignature.SignatureImage
            {
                ImagePath = "signature.png",
                Width = 200,
                Height = 100
            },

            // Signature position
            PageIndex = 0,
            X = 400,
            Y = 100,

            // Signature details
            Reason = "Document approved",
            Location = "New York, NY",
            ContactInfo = "john.doe@company.com"
        };

        // Apply signature
        pdf.Sign(signature);

        // Additional security
        pdf.SecuritySettings = new SecuritySettings
        {
            AllowUserPrinting = true,
            AllowUserCopyPasteContent = false,
            AllowUserEditing = false,
            AllowUserFormData = true,
            OwnerPassword = "owner123",
            UserPassword = "user123",
            EncryptionLevel = EncryptionLevel.AES256
        };

        pdf.SaveAs("signed-secured.pdf");
    }
}
Imports IronPdf
Imports IronPdf.Signing
Imports System.Security.Cryptography.X509Certificates

Public Class SecurityFeatures
	Public Shared Sub ApplyDigitalSignature()
		' Load existing PDF
		Dim pdf = PdfDocument.FromFile("unsigned-document.pdf")

		' Load certificate
		Dim cert = New X509Certificate2("certificate.pfx", "password")

		' Create signature
		Dim signature = New PdfSignature(cert) With {
			.SignatureImage = New PdfSignature.SignatureImage With {
				.ImagePath = "signature.png",
				.Width = 200,
				.Height = 100
			},
			.PageIndex = 0,
			.X = 400,
			.Y = 100,
			.Reason = "Document approved",
			.Location = "New York, NY",
			.ContactInfo = "john.doe@company.com"
		}

		' Apply signature
		pdf.Sign(signature)

		' Additional security
		pdf.SecuritySettings = New SecuritySettings With {
			.AllowUserPrinting = True,
			.AllowUserCopyPasteContent = False,
			.AllowUserEditing = False,
			.AllowUserFormData = True,
			.OwnerPassword = "owner123",
			.UserPassword = "user123",
			.EncryptionLevel = EncryptionLevel.AES256
		}

		pdf.SaveAs("signed-secured.pdf")
	End Sub
End Class
$vbLabelText   $csharpLabel

ABCpdf Dijital Imza Uygulamasi

using WebSupergoo.ABCpdf13;
using WebSupergoo.ABCpdf13.Objects;

public class ABCpdfSecurity
{
    public static void SignDocument()
    {
        using (Doc theDoc = new Doc())
        {
            theDoc.Read("unsigned-document.pdf");

            // Create signature field
            Field signatureField = theDoc.Form.AddFieldSignature("AuthorSignature");
            signatureField.Page = 1;
            signatureField.Rect = "400 100 600 200";

            // Configure signature
            Signature theSig = signatureField.Sign();
            theSig.Reason = "Document approved";
            theSig.Location = "New York, NY";
            theSig.ContactInfo = "john.doe@company.com";

            // Load certificate
            theSig.LoadCertificate("certificate.pfx", "password");

            // Apply visual signature
            theSig.Visible = true;
            theSig.Image = theDoc.AddImageFile("signature.png");

            // Sign and save
            theDoc.Save("abcpdf-signed.pdf");
        }
    }
}
using WebSupergoo.ABCpdf13;
using WebSupergoo.ABCpdf13.Objects;

public class ABCpdfSecurity
{
    public static void SignDocument()
    {
        using (Doc theDoc = new Doc())
        {
            theDoc.Read("unsigned-document.pdf");

            // Create signature field
            Field signatureField = theDoc.Form.AddFieldSignature("AuthorSignature");
            signatureField.Page = 1;
            signatureField.Rect = "400 100 600 200";

            // Configure signature
            Signature theSig = signatureField.Sign();
            theSig.Reason = "Document approved";
            theSig.Location = "New York, NY";
            theSig.ContactInfo = "john.doe@company.com";

            // Load certificate
            theSig.LoadCertificate("certificate.pfx", "password");

            // Apply visual signature
            theSig.Visible = true;
            theSig.Image = theDoc.AddImageFile("signature.png");

            // Sign and save
            theDoc.Save("abcpdf-signed.pdf");
        }
    }
}
Imports WebSupergoo.ABCpdf13
Imports WebSupergoo.ABCpdf13.Objects

Public Class ABCpdfSecurity
	Public Shared Sub SignDocument()
		Using theDoc As New Doc()
			theDoc.Read("unsigned-document.pdf")

			' Create signature field
			Dim signatureField As Field = theDoc.Form.AddFieldSignature("AuthorSignature")
			signatureField.Page = 1
			signatureField.Rect = "400 100 600 200"

			' Configure signature
			Dim theSig As Signature = signatureField.Sign()
			theSig.Reason = "Document approved"
			theSig.Location = "New York, NY"
			theSig.ContactInfo = "john.doe@company.com"

			' Load certificate
			theSig.LoadCertificate("certificate.pfx", "password")

			' Apply visual signature
			theSig.Visible = True
			theSig.Image = theDoc.AddImageFile("signature.png")

			' Sign and save
			theDoc.Save("abcpdf-signed.pdf")
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

Form İşlemleri ve Veri Cikarimi

IronPDF Form Yonetimi

public class FormHandling
{
    public static void WorkWithForms()
    {
        // Create PDF with form fields from HTML
        var renderer = new ChromePdfRenderer();
        renderer.RenderingOptions.CreatePdfFormsFromHtml = true;

        string formHtml = @"
        <form>
            <label>Name: <input type='text' name='fullname' required></label><br>
            <label>Email: <input type='email' name='email' required></label><br>
            <label>Subscribe: <input type='checkbox' name='subscribe' value='yes'></label><br>
            <label>Country: 
                <select name='country'>
                    <option>USA</option>
                    <option>Canada</option>
                    <option>UK</option>
                </select>
            </label><br>
            <button type='submit'>Submit</button>
        </form>";

        var pdf = renderer.RenderHtmlAsPdf(formHtml);

        // Fill form programmatically
        pdf.Form.Fields["fullname"].Value = "John Doe";
        pdf.Form.Fields["email"].Value = "john@example.com";
        pdf.Form.Fields["subscribe"].Value = "yes";
        pdf.Form.Fields["country"].Value = "USA";

        // Extract form data
        foreach (var field in pdf.Form.Fields)
        {
            Console.WriteLine($"{field.Name}: {field.Value}");
        }

        // Flatten form (make non-editable)
        pdf.Form.Flatten();
        pdf.SaveAs("filled-form.pdf");
    }
}
public class FormHandling
{
    public static void WorkWithForms()
    {
        // Create PDF with form fields from HTML
        var renderer = new ChromePdfRenderer();
        renderer.RenderingOptions.CreatePdfFormsFromHtml = true;

        string formHtml = @"
        <form>
            <label>Name: <input type='text' name='fullname' required></label><br>
            <label>Email: <input type='email' name='email' required></label><br>
            <label>Subscribe: <input type='checkbox' name='subscribe' value='yes'></label><br>
            <label>Country: 
                <select name='country'>
                    <option>USA</option>
                    <option>Canada</option>
                    <option>UK</option>
                </select>
            </label><br>
            <button type='submit'>Submit</button>
        </form>";

        var pdf = renderer.RenderHtmlAsPdf(formHtml);

        // Fill form programmatically
        pdf.Form.Fields["fullname"].Value = "John Doe";
        pdf.Form.Fields["email"].Value = "john@example.com";
        pdf.Form.Fields["subscribe"].Value = "yes";
        pdf.Form.Fields["country"].Value = "USA";

        // Extract form data
        foreach (var field in pdf.Form.Fields)
        {
            Console.WriteLine($"{field.Name}: {field.Value}");
        }

        // Flatten form (make non-editable)
        pdf.Form.Flatten();
        pdf.SaveAs("filled-form.pdf");
    }
}
Public Class FormHandling
	Public Shared Sub WorkWithForms()
		' Create PDF with form fields from HTML
		Dim renderer = New ChromePdfRenderer()
		renderer.RenderingOptions.CreatePdfFormsFromHtml = True

		Dim formHtml As String = "
        <form>
            <label>Name: <input type='text' name='fullname' required></label><br>
            <label>Email: <input type='email' name='email' required></label><br>
            <label>Subscribe: <input type='checkbox' name='subscribe' value='yes'></label><br>
            <label>Country: 
                <select name='country'>
                    <option>USA</option>
                    <option>Canada</option>
                    <option>UK</option>
                </select>
            </label><br>
            <button type='submit'>Submit</button>
        </form>"

		Dim pdf = renderer.RenderHtmlAsPdf(formHtml)

		' Fill form programmatically
		pdf.Form.Fields("fullname").Value = "John Doe"
		pdf.Form.Fields("email").Value = "john@example.com"
		pdf.Form.Fields("subscribe").Value = "yes"
		pdf.Form.Fields("country").Value = "USA"

		' Extract form data
		For Each field In pdf.Form.Fields
			Console.WriteLine($"{field.Name}: {field.Value}")
		Next field

		' Flatten form (make non-editable)
		pdf.Form.Flatten()
		pdf.SaveAs("filled-form.pdf")
	End Sub
End Class
$vbLabelText   $csharpLabel

Toplu İşleme ve Optimizasyon

IronPDF Toplu İşleme

using System.Threading.Tasks;
using System.Collections.Concurrent;

public class BatchProcessing
{
    public static async Task ProcessMultipleDocumentsAsync(List<string> htmlFiles)
    {
        var renderer = new ChromePdfRenderer();
        renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;

        // Use concurrent processing
        var pdfResults = new ConcurrentBag<(string filename, byte[] data)>();

        await Parallel.ForEachAsync(htmlFiles, async (htmlFile, ct) =>
        {
            try
            {
                var html = await File.ReadAllTextAsync(htmlFile);
                var pdf = await renderer.RenderHtmlAsPdfAsync(html);

                // Optimize each PDF
                pdf.CompressImages(70);

                var filename = Path.GetFileNameWithoutExtension(htmlFile) + ".pdf";
                var data = pdf.BinaryData;

                pdfResults.Add((filename, data));
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error processing {htmlFile}: {ex.Message}");
            }
        });

        // Merge all PDFs into one
        var finalPdf = new PdfDocument();
        foreach (var (filename, data) in pdfResults.OrderBy(x => x.filename))
        {
            var pdf = new PdfDocument(data);
            finalPdf.AppendPdf(pdf);
        }

        finalPdf.SaveAs("batch-processed.pdf");
    }
}
using System.Threading.Tasks;
using System.Collections.Concurrent;

public class BatchProcessing
{
    public static async Task ProcessMultipleDocumentsAsync(List<string> htmlFiles)
    {
        var renderer = new ChromePdfRenderer();
        renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;

        // Use concurrent processing
        var pdfResults = new ConcurrentBag<(string filename, byte[] data)>();

        await Parallel.ForEachAsync(htmlFiles, async (htmlFile, ct) =>
        {
            try
            {
                var html = await File.ReadAllTextAsync(htmlFile);
                var pdf = await renderer.RenderHtmlAsPdfAsync(html);

                // Optimize each PDF
                pdf.CompressImages(70);

                var filename = Path.GetFileNameWithoutExtension(htmlFile) + ".pdf";
                var data = pdf.BinaryData;

                pdfResults.Add((filename, data));
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error processing {htmlFile}: {ex.Message}");
            }
        });

        // Merge all PDFs into one
        var finalPdf = new PdfDocument();
        foreach (var (filename, data) in pdfResults.OrderBy(x => x.filename))
        {
            var pdf = new PdfDocument(data);
            finalPdf.AppendPdf(pdf);
        }

        finalPdf.SaveAs("batch-processed.pdf");
    }
}
Imports System.Threading.Tasks
Imports System.Collections.Concurrent

Public Class BatchProcessing
	Public Shared Async Function ProcessMultipleDocumentsAsync(ByVal htmlFiles As List(Of String)) As Task
		Dim renderer = New ChromePdfRenderer()
		renderer.RenderingOptions.PaperSize = PdfPaperSize.A4

		' Use concurrent processing
		Dim pdfResults = New ConcurrentBag(Of (filename As String, data As Byte()))()

		Await Parallel.ForEachAsync(htmlFiles, Async Sub(htmlFile, ct)
			Try
				Dim html = Await File.ReadAllTextAsync(htmlFile)
				Dim pdf = Await renderer.RenderHtmlAsPdfAsync(html)

				' Optimize each PDF
				pdf.CompressImages(70)

				Dim filename = Path.GetFileNameWithoutExtension(htmlFile) & ".pdf"
				Dim data = pdf.BinaryData

				pdfResults.Add((filename, data))
			Catch ex As Exception
				Console.WriteLine($"Error processing {htmlFile}: {ex.Message}")
			End Try
		End Sub)

		' Merge all PDFs into one
		Dim finalPdf = New PdfDocument()
		foreach var(filename, data) In pdfResults.OrderBy(Function(x) x.filename)
			Dim pdf = New PdfDocument(data)
			finalPdf.AppendPdf(pdf)
		Next 

		finalPdf.SaveAs("batch-processed.pdf")
	End Function
End Class
$vbLabelText   $csharpLabel

Gerçek Hayat Kullanim Senaryolari

Hangi Kutuphane Projeniz Icin Daha Iyi Uyar?

IronPDF'yi Secin:

  1. Bulut-Verimli Uygulamalar Geliştiriyorsaniz

    • Minimal konfigürasyon ile ozel Docker destegi
    • Azure Functions ve AWS Lambda uyumlulugu
    • Tüm bulut platformlarinda tutarli davranis
  2. Piksel-Dogrulugunda HTML Renderine İhtiyaç Duyuyorsaniz

    • Karmasik CSS yerlesimleri (Grid, Flexbox)
    • JavaScript agirlikli tek sayfa uygulamalari
    • Web font gereksinimleri
  3. Capraz-Platform Cozumler Geliştiriyorsaniz

    • Windows, Linux, ve macOS'u hedefleyen uygulamalar
    • Mikrosistem mimarisi
    • Konteynir-temelli dağıtımlar
  4. Geliştirici Deneyimi Onceliginizse
    • Hızlı prototipleme ihtiyaçları
    • Küçük geliştirme ekipleri
    • Sınırlı PDF uzmanlığı

ABCpdf'yi Secin:

  1. Eski Sistemlerle Calisiyorsaniz

    • Sadece Windows ortamları
    • Var olan ABCpdf uygulamaları
    • IE-uyumlu içerik gereksinimleri
  2. Belirli Render Motorlarına İhtiyaç Duyuyorsaniz

    • Farkli tarayicilarda test
    • Motor-ozel optimizasyonlar
    • Eski tarayici destegi
  3. Gelişmiş PDF Manipulasyonu

    • Dusuk seviyeli PDF nesne erişimi
    • Ozel PDF operatörleri
    • Karmasik belge birlestirme senaryolari
  4. Butce Dostu Projeler
    • Dusuk başlangic fiyati
    • Tek geliştirici lisanslari
    • 32-bit ortam uyumlulugu

Yaygın Sorun Giderme

IronPDF Sık Karsilasilan Sorunlar ve Cozumleri

public class IronPdfTroubleshooting
{
    // Issue: Fonts not rendering correctly
    public static void FixFontIssues()
    {
        var renderer = new ChromePdfRenderer();

        // Solution 1: Wait for fonts to load
        renderer.RenderingOptions.WaitFor.RenderDelay(1000);

        // Solution 2: Use system fonts fallback
        renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print;
    }

    // Issue: JavaScript not executing
    public static void FixJavaScriptIssues()
    {
        var renderer = new ChromePdfRenderer();

        // Enable JavaScript and wait for execution
        renderer.RenderingOptions.EnableJavaScript = true;
        renderer.RenderingOptions.WaitFor.JavaScriptFinishDelay = 2000;
        renderer.RenderingOptions.WaitFor.AllowedExecutionTime = 30000;
    }

    // Issue:Hafizausage in Docker
    public static void OptimizeForDocker()
    {
        var renderer = new ChromePdfRenderer();

        // Use single-threaded mode for containers
        IronPdf.Installation.SingleThreaded = true;

        // Reduce memory footprint
        renderer.RenderingOptions.ViewPortWidth = 1024;
        renderer.RenderingOptions.EnableGrayscale = true;
    }
}
public class IronPdfTroubleshooting
{
    // Issue: Fonts not rendering correctly
    public static void FixFontIssues()
    {
        var renderer = new ChromePdfRenderer();

        // Solution 1: Wait for fonts to load
        renderer.RenderingOptions.WaitFor.RenderDelay(1000);

        // Solution 2: Use system fonts fallback
        renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print;
    }

    // Issue: JavaScript not executing
    public static void FixJavaScriptIssues()
    {
        var renderer = new ChromePdfRenderer();

        // Enable JavaScript and wait for execution
        renderer.RenderingOptions.EnableJavaScript = true;
        renderer.RenderingOptions.WaitFor.JavaScriptFinishDelay = 2000;
        renderer.RenderingOptions.WaitFor.AllowedExecutionTime = 30000;
    }

    // Issue:Hafizausage in Docker
    public static void OptimizeForDocker()
    {
        var renderer = new ChromePdfRenderer();

        // Use single-threaded mode for containers
        IronPdf.Installation.SingleThreaded = true;

        // Reduce memory footprint
        renderer.RenderingOptions.ViewPortWidth = 1024;
        renderer.RenderingOptions.EnableGrayscale = true;
    }
}
Imports IronPdf

Public Class IronPdfTroubleshooting
    ' Issue: Fonts not rendering correctly
    Public Shared Sub FixFontIssues()
        Dim renderer As New ChromePdfRenderer()

        ' Solution 1: Wait for fonts to load
        renderer.RenderingOptions.WaitFor.RenderDelay = 1000

        ' Solution 2: Use system fonts fallback
        renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print
    End Sub

    ' Issue: JavaScript not executing
    Public Shared Sub FixJavaScriptIssues()
        Dim renderer As New ChromePdfRenderer()

        ' Enable JavaScript and wait for execution
        renderer.RenderingOptions.EnableJavaScript = True
        renderer.RenderingOptions.WaitFor.JavaScriptFinishDelay = 2000
        renderer.RenderingOptions.WaitFor.AllowedExecutionTime = 30000
    End Sub

    ' Issue: Memory usage in Docker
    Public Shared Sub OptimizeForDocker()
        Dim renderer As New ChromePdfRenderer()

        ' Use single-threaded mode for containers
        IronPdf.Installation.SingleThreaded = True

        ' Reduce memory footprint
        renderer.RenderingOptions.ViewPortWidth = 1024
        renderer.RenderingOptions.EnableGrayscale = True
    End Sub
End Class
$vbLabelText   $csharpLabel

ABCpdf Sık Karsilasilan Sorunlar ve Cozumleri

public class ABCpdfTroubleshooting
{
    // Issue: Page breaks in wrong places
    public static void FixPageBreaks()
    {
        using (Doc theDoc = new Doc())
        {
            // Use HTML page break controls
            theDoc.HtmlOptions.BreakZoneSize = 100; // pixels
            theDoc.HtmlOptions.UseScript = true;

            string html = @"
                <style>
                    .page-break { page-break-after: always; }
                    .no-break { page-break-inside: avoid; }
                </style>
                <div class='no-break'>Keep this content together</div>
                <div class='page-break'></div>
                <div>New page content</div>";

            theDoc.AddImageHtml(html);
            theDoc.Save("fixed-breaks.pdf");
        }
    }

    // Issue: Images not loading
    public static void FixImageLoading()
    {
        using (Doc theDoc = new Doc())
        {
            // Set timeout and authentication
            theDoc.HtmlOptions.Timeout = 60000; // 60 seconds
            theDoc.HtmlOptions.RetryCount = 3;

            // For local images, set base directory
            theDoc.HtmlOptions.BaseUrl = @"file:///C:/Images/";

            theDoc.AddImageHtml("<img src='logo.png'>");
            theDoc.Save("with-images.pdf");
        }
    }
}
public class ABCpdfTroubleshooting
{
    // Issue: Page breaks in wrong places
    public static void FixPageBreaks()
    {
        using (Doc theDoc = new Doc())
        {
            // Use HTML page break controls
            theDoc.HtmlOptions.BreakZoneSize = 100; // pixels
            theDoc.HtmlOptions.UseScript = true;

            string html = @"
                <style>
                    .page-break { page-break-after: always; }
                    .no-break { page-break-inside: avoid; }
                </style>
                <div class='no-break'>Keep this content together</div>
                <div class='page-break'></div>
                <div>New page content</div>";

            theDoc.AddImageHtml(html);
            theDoc.Save("fixed-breaks.pdf");
        }
    }

    // Issue: Images not loading
    public static void FixImageLoading()
    {
        using (Doc theDoc = new Doc())
        {
            // Set timeout and authentication
            theDoc.HtmlOptions.Timeout = 60000; // 60 seconds
            theDoc.HtmlOptions.RetryCount = 3;

            // For local images, set base directory
            theDoc.HtmlOptions.BaseUrl = @"file:///C:/Images/";

            theDoc.AddImageHtml("<img src='logo.png'>");
            theDoc.Save("with-images.pdf");
        }
    }
}
Public Class ABCpdfTroubleshooting
	' Issue: Page breaks in wrong places
	Public Shared Sub FixPageBreaks()
		Using theDoc As New Doc()
			' Use HTML page break controls
			theDoc.HtmlOptions.BreakZoneSize = 100 ' pixels
			theDoc.HtmlOptions.UseScript = True

			Dim html As String = "
                <style>
                    .page-break { page-break-after: always; }
                    .no-break { page-break-inside: avoid; }
                </style>
                <div class='no-break'>Keep this content together</div>
                <div class='page-break'></div>
                <div>New page content</div>"

			theDoc.AddImageHtml(html)
			theDoc.Save("fixed-breaks.pdf")
		End Using
	End Sub

	' Issue: Images not loading
	Public Shared Sub FixImageLoading()
		Using theDoc As New Doc()
			' Set timeout and authentication
			theDoc.HtmlOptions.Timeout = 60000 ' 60 seconds
			theDoc.HtmlOptions.RetryCount = 3

			' For local images, set base directory
			theDoc.HtmlOptions.BaseUrl = "file:///C:/Images/"

			theDoc.AddImageHtml("<img src='logo.png'>")
			theDoc.Save("with-images.pdf")
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

Geçiş Rehberi: Kütüphaneler Arası Geçiş

ABCpdf'den IronPDF'ye Geçiş

public class MigrationHelper
{
    // ABCpdf code
    public void OldABCpdfMethod()
    {
        Doc theDoc = new Doc();
        theDoc.AddImageUrl("https://example.com");
        theDoc.Save("output.pdf");
        theDoc.Dispose();
    }

    // Equivalent IronPDF code
    public void NewIronPdfMethod()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf("https://example.com");
        pdf.SaveAs("output.pdf");
    }

    // Migration wrapper for gradual transition
    public class PdfWrapper
    {
        private bool _useIronPdf;

        public PdfWrapper(bool useIronPdf = true)
        {
            _useIronPdf = useIronPdf;
        }

        public void ConvertUrlToPdf(string url, string outputPath)
        {
            if (_useIronPdf)
            {
                var renderer = new ChromePdfRenderer();
                var pdf = renderer.RenderUrlAsPdf(url);
                pdf.SaveAs(outputPath);
            }
            else
            {
                using (var doc = new Doc())
                {
                    doc.AddImageUrl(url);
                    doc.Save(outputPath);
                }
            }
        }
    }
}
public class MigrationHelper
{
    // ABCpdf code
    public void OldABCpdfMethod()
    {
        Doc theDoc = new Doc();
        theDoc.AddImageUrl("https://example.com");
        theDoc.Save("output.pdf");
        theDoc.Dispose();
    }

    // Equivalent IronPDF code
    public void NewIronPdfMethod()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf("https://example.com");
        pdf.SaveAs("output.pdf");
    }

    // Migration wrapper for gradual transition
    public class PdfWrapper
    {
        private bool _useIronPdf;

        public PdfWrapper(bool useIronPdf = true)
        {
            _useIronPdf = useIronPdf;
        }

        public void ConvertUrlToPdf(string url, string outputPath)
        {
            if (_useIronPdf)
            {
                var renderer = new ChromePdfRenderer();
                var pdf = renderer.RenderUrlAsPdf(url);
                pdf.SaveAs(outputPath);
            }
            else
            {
                using (var doc = new Doc())
                {
                    doc.AddImageUrl(url);
                    doc.Save(outputPath);
                }
            }
        }
    }
}
Public Class MigrationHelper
	' ABCpdf code
	Public Sub OldABCpdfMethod()
		Dim theDoc As New Doc()
		theDoc.AddImageUrl("https://example.com")
		theDoc.Save("output.pdf")
		theDoc.Dispose()
	End Sub

	' Equivalent IronPDF code
	Public Sub NewIronPdfMethod()
		Dim renderer = New ChromePdfRenderer()
		Dim pdf = renderer.RenderUrlAsPdf("https://example.com")
		pdf.SaveAs("output.pdf")
	End Sub

	' Migration wrapper for gradual transition
	Public Class PdfWrapper
		Private _useIronPdf As Boolean

		Public Sub New(Optional ByVal useIronPdf As Boolean = True)
			_useIronPdf = useIronPdf
		End Sub

		Public Sub ConvertUrlToPdf(ByVal url As String, ByVal outputPath As String)
			If _useIronPdf Then
				Dim renderer = New ChromePdfRenderer()
				Dim pdf = renderer.RenderUrlAsPdf(url)
				pdf.SaveAs(outputPath)
			Else
				Using doc As New Doc()
					doc.AddImageUrl(url)
					doc.Save(outputPath)
				End Using
			End If
		End Sub
	End Class
End Class
$vbLabelText   $csharpLabel

Lisanslama ve Sahip Olma Toplam Maliyeti

Projeniz Icin Yatırım Getirisini Hesaplamak

PDF kütüphanelerini değerlendirirken, lisans fiyatının ötesindeki toplam maliyeti dikkate alın:

IronPDF Maliyet Analizi

  • Geliştirme Zaman Tasarrufları: %50-70 daha hızlı uygulama
  • Destek Maliyetleri: Dahil edilmiş 24/5 mühendislik desteği
  • Bakım: Platformlar arası birleşik API
  • Ölçeklenebilirlik: Tek lisans birden fazla dağıtımı kapsar

ABCpdf Maliyet Analizi

  • Başlangıç Maliyeti: Daha düşük giriş fiyatı
  • Gizli Maliyetler:
    • Ayrı 64-bit lisans
    • Çoklu motor gereksinimleri
    • Platform-özel test
    • İlave destek maliyetleri

Lisans Karsilastirma Hesaplayicisi

public class LicenseCostCalculator
{
    public static void CalculateTotalCost()
    {
        // Scenario: 5-developer team, 3-year project

        // IronPDF Professional
        var ironPdfCost = new
        {
            License = 2999, // 10 developers, 10 projects
            Support = 0, // Included
            Training = 500, // Minimal due to simple API
            ThreeYearTotal = 3499
        };

        // ABCpdf equivalent setup
        var abcPdfCost = new
        {
            StandardLicenses = 329 * 5, // 5 developers
            ProfessionalUpgrade = 150 * 5, // 64-bit support
            Yeniden DağıtımLicense = 4790, // Enterprise
            Support = 399 * 3, // Annual support
            Training = 2000, // Complex API training
            ThreeYearTotal = 1645 + 750 + 4790 + 1197 + 2000
        };

        Console.WriteLine($"IronPDF 3-year TCO: ${ironPdfCost.ThreeYearTotal:N0}");
        Console.WriteLine($"ABCpdf 3-year TCO: ${abcPdfCost.ThreeYearTotal:N0}");
        Console.WriteLine($"Savings with IronPDF: ${abcPdfCost.ThreeYearTotal - ironPdfCost.ThreeYearTotal:N0}");
    }
}
public class LicenseCostCalculator
{
    public static void CalculateTotalCost()
    {
        // Scenario: 5-developer team, 3-year project

        // IronPDF Professional
        var ironPdfCost = new
        {
            License = 2999, // 10 developers, 10 projects
            Support = 0, // Included
            Training = 500, // Minimal due to simple API
            ThreeYearTotal = 3499
        };

        // ABCpdf equivalent setup
        var abcPdfCost = new
        {
            StandardLicenses = 329 * 5, // 5 developers
            ProfessionalUpgrade = 150 * 5, // 64-bit support
            Yeniden DağıtımLicense = 4790, // Enterprise
            Support = 399 * 3, // Annual support
            Training = 2000, // Complex API training
            ThreeYearTotal = 1645 + 750 + 4790 + 1197 + 2000
        };

        Console.WriteLine($"IronPDF 3-year TCO: ${ironPdfCost.ThreeYearTotal:N0}");
        Console.WriteLine($"ABCpdf 3-year TCO: ${abcPdfCost.ThreeYearTotal:N0}");
        Console.WriteLine($"Savings with IronPDF: ${abcPdfCost.ThreeYearTotal - ironPdfCost.ThreeYearTotal:N0}");
    }
}
Public Class LicenseCostCalculator
    Public Shared Sub CalculateTotalCost()
        ' Scenario: 5-developer team, 3-year project

        ' IronPDF Professional
        Dim ironPdfCost = New With {
            .License = 2999, ' 10 developers, 10 projects
            .Support = 0, ' Included
            .Training = 500, ' Minimal due to simple API
            .ThreeYearTotal = 3499
        }

        ' ABCpdf equivalent setup
        Dim abcPdfCost = New With {
            .StandardLicenses = 329 * 5, ' 5 developers
            .ProfessionalUpgrade = 150 * 5, ' 64-bit support
            .YenidenDağıtımLicense = 4790, ' Enterprise
            .Support = 399 * 3, ' Annual support
            .Training = 2000, ' Complex API training
            .ThreeYearTotal = 1645 + 750 + 4790 + 1197 + 2000
        }

        Console.WriteLine($"IronPDF 3-year TCO: ${ironPdfCost.ThreeYearTotal:N0}")
        Console.WriteLine($"ABCpdf 3-year TCO: ${abcPdfCost.ThreeYearTotal:N0}")
        Console.WriteLine($"Savings with IronPDF: ${abcPdfCost.ThreeYearTotal - ironPdfCost.ThreeYearTotal:N0}")
    End Sub
End Class
$vbLabelText   $csharpLabel

Sonuç

Her iki kütüphanenin de kapsamlı analizi sonucu, birkaç kilit farklılaşma ortaya çıkmaktadır:

IronPDF şunlarda üstün:

  • Chrome tabanlı render ile modern web teknolojisi desteği
  • Çapraz platform tutarlılığı ve bulut tabanlı dağıtımlar
  • Sezgisel API'larla geliştirici verimliliği
  • Kapsamlı destek ve dokümantasyon
  • Buyuyen takimlar icin daha iyi uzun vadeli değer

ABCpdf su konularda avantajlar sunar:

  • Yalnizca Windows icin olan temel projelerde dusuk ilk maliyet
  • Coklu render motoru seçenekleri
  • Eski sistem uyumlu
  • Basit belgeler icin dusuk bellek kullanimi

IronPDF, tüm PDF problemleri icin tek bir cozum saglar. IronPDF satin aldiginizda, ek bir bagimlilik gerektirmeyen, yalnizca PDF belgeleri ile ilgili gorevler ve tüm donusumleri tek bir kutuphanede alirsiniz. Bu butunlesik yaklasim, ustun render kalitesi ve capraz platform destegi ile birleserek, IronPDF'i cogu modern .NET uygulamasi icin tavsiye edilen secim yapar.

Hizli gelisim, platformlar arasinda tutarli sonuclar ve uzun vadeli bakim onceligine sahip takimlar icin, IronPDF'in yuksek ilk maliyeti, azaltılmış geliştirme suresi, daha iyi destek ve daha az uyumluluk sorunu ile telafi edilir.

IronPDF ile Başlarken

Farkı deneyimlemeye hazır mısınız? Ücretsiz deneme surumu başlatin bugun:

// Get started in minutes
// Install-Package IronPdf

// Your first PDF in 3 lines
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>");
pdf.SaveAs("my-first-pdf.pdf");
// Get started in minutes
// Install-Package IronPdf

// Your first PDF in 3 lines
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>");
pdf.SaveAs("my-first-pdf.pdf");
' Get started in minutes
' Install-Package IronPdf

' Your first PDF in 3 lines
Dim renderer As New ChromePdfRenderer()
Dim pdf = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>")
pdf.SaveAs("my-first-pdf.pdf")
$vbLabelText   $csharpLabel

Kapsamli dokümantasyonumuzu ziyaret edin, kod örneklerini inceleyin ya da PDF oluşturma ihtiyaçlariniz icin mühendislik ekibimizle ozellestirilmis rehberlik icin sohbet edin.

Lütfen dikkate alinABCpdf kendi sahibinin tescilli markasidir. Bu site, ABCpdf ile baglantili, onaylanmis veya desteklenmis degildir. Tüm ürün adları, logolar ve markalar kendi 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.

Sıkça Sorulan Sorular

İşlemci motorları açısından IronPDF ve ABCpdf arasındaki temel farklar nelerdir?

IronPDF, piksel mükemmellikte çıktı ve CSS3 ile JavaScript'in tam desteğini sunan Chrome tabanlı bir işleme motoru kullanıyor. Bu, modern web teknolojilerini işlemek için idealdir. ABCpdf ise Chrome, Firefox ve IE gibi çoklu işlemci motorları sunarak esneklik sağlarken daha fazla test ve yapılandırma gerektirir.

IronPDF’nin HTML’den PDF’ye dönüştürme kalitesi ABCpdf’ye kıyasla nasıl?

IronPDF, modern tarayıcıların çıktısıyla eşleşen Chrome tabanlı motoru nedeniyle işleme doğruluğunda üstün. ABCpdf, biraz daha hızlı olsa da, karmaşık modern web içerikleri için aynı seviyede doğruluk sağlamayabilir.

IronPDF ve ABCpdf arasındaki uyumluluk farkları nelerdir?

IronPDF, Windows, Linux, macOS ve Docker konteynerlerinde çalışan doğal çapraz platform desteği sunar. Aksine, ABCpdf daha çok Windows ortamlara yöneliktir, bu nedenle çeşitlilik arz eden geliştirme kurulumlarında kullanımını sınırlayabilir.

.NET uygulamaları için hangi kütüphane daha iyi uzun vadeli değer sunuyor, IronPDF mi yoksa ABCpdf mi?

ABCpdf daha düşük bir başlangıç fiyatına sahip olsa da, IronPDF'nin kapsamlı desteği, modern mimarisi ve birleştirilmiş API'si uzun vadeli değer sağlar, özellikle sürekli bakım ve güncellemeler gerektiren çağdaş .NET uygulamaları için.

IronPDF’nin lisanslama modeli, enterprise kullanım için ABCpdf’nin lisanslama modeliyle nasıl kıyaslanır?

IronPDF’nin lisanslama fiyatları $749’dan başlar, ABCpdf ise $329’la daha düşük bir başlangıç fiyatı sunar. Ancak, toplam sahip olma maliyeti hesaplamaları, uzatılmış destek ve güncellemeler için IronPDF’yi tercih ederek enterprise kullanım için maliyet etkin bir seçim yapar.

ABCpdf’den IronPDF’ye geçiş için hangi stratejiler mevcuttur?

ABCpdf’den IronPDF’ye geçiş için, geliştiriciler IronPDF’nin kapsamlı API belgelerinden ve destek kaynaklarından faydalanabilir. Mevcut işlevleri IronPDF’nin yöntemlerine eşleyip, tutarlı sonuçlar sağlamak için çıktıyı ayrıntılı şekilde test etmelidirler.

IronPDF, JavaScript ile dinamik HTML içeriğini işleyebilir mi?

Evet, IronPDF, dinamik içerik, AJAX çağrıları ve modern framework'leri destekleyen, render öncesi JavaScript çalıştırabilir. Dinamik öğelerin tam işlenmesini sağlamak için bekleme sürelerini ve render gecikmelerini yapılandırılabilir hale getirir.

IronPDF kullanırken işleme sorunlarını giderme için önerilen yaklaşım nedir?

IronPDF ile işleme sorunlarını gidermek için ilk olarak CSS özelliklerinin Chrome motoru tarafından desteklendiğinden emin olun. PDF için özel stillerde print medya sorgularını kullanın, CSS’yi tarayıcı geliştirici araçları ile doğrulayın ve sorunları izole etmek için basitleştirilmiş HTML ile test edin.

Jacob Mellor, Teknoloji Direktörü @ Team Iron
Chief Technology Officer

Jacob Mellor, Iron Software'in Teknoloji Müdürü ve C# PDF teknolojisinin öncüsü olan vizyoner bir mühendis. Iron Software’in temel kod tabanının ilk geliştiricisi olarak, şirketin ürün mimarisini kuruluşundan bu yana şekillendirdi ve CEO Cameron Rimington ile birlikte NASA, Tesla ve ...

Daha Fazlasını Oku

Iron Destek Ekibi

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