IronPrint ile Başlarken
IronPrint: .NET için Tümleşik Baskı Kütüphaneniz
IronPrint, Iron Software tarafından geliştirilen bir yazdırma kütüphanesidir. Kutuphane, Windows, macOS, Android ve iOS dahil olmak üzere çok çeşitli ortamlarda uyumludur.
C# Yazdirma Kutuphanesi
- Belgeleri yazdirma icin C# kutuphanesini indirin
- PDF, PNG, HTML, TIFF, GIF, JPEG, IMAGE, BITMAP formatlarini isleyin
- Yazdirma ayarlarini özellestirin
- Yazdirmadan önce diyalogu gösterin
- Kütüphane özelliklerini C#'da ücretsiz keşfedin
Uyumluluk
IronPrint, su platformlara çapraz platform desteği uyumluluğu sunar:
.NET Sürüm Destegi
- C#, VB.NET, F#
- .NET 8, 7, 6, 5 ve Core 3.1+
- .NET Framework (4.6.2+)
Isletim Sistemleri ve Ortam Destegi
- Windows (7+, Server 2016+)
- macOS (10+)
- iOS (11+)
- Android API 21+ (v5 "Lollipop")
.NET Proje Türleri Destegi
- Mobil (Xamarin & MAUI & Avalonia)
- Masaüstü (WPF & MAUI & Windows Avalonia)
- Konsol (Uygulama & Kutuphane)
Kurulum
IronPrint Kutuphanesi
IronPrint paketini NuGet Paket Yöneticisi araciligi ile kurun:
dotnet add package IronPrint
Alternatif olarak, resmi IronPrint NuGet web sitesinden dogrudan indirin.
Kurulduktan sonra, C# kodunuzun en üstüne using IronPrint; ekleyerek başlayabilirsiniz.
Lisans Anahtarı Uygulamak
Daha sonra, IronPrint'e geçerli bir lisans veya deneme anahtarı uygulamak için lisans anahtarını License sınıfının LicenseKey özelliğine atayın. Herhangi bir IronPrint metodunu kullanmadan önce, ithalat ifadesinin hemen ardindan asagidaki kodu ekleyin:
using IronPrint;
// Apply your IronPrint license key here
License.LicenseKey = "your-license-key-here";
using IronPrint;
// Apply your IronPrint license key here
License.LicenseKey = "your-license-key-here";
Imports IronPrint
' Apply your IronPrint license key here
License.LicenseKey = "your-license-key-here"
Kod Örnekleri
Belge Yazdir
Belgeyi yazdırmak için dosya yolunu Print yöntemine basitçe iletin.
using IronPrint;
class Program
{
static void Main()
{
// Specify the file path to be printed
string filePath = "document.pdf";
// Invoke the Print method to print the document
IronPrint.Print(filePath);
}
}
using IronPrint;
class Program
{
static void Main()
{
// Specify the file path to be printed
string filePath = "document.pdf";
// Invoke the Print method to print the document
IronPrint.Print(filePath);
}
}
Imports IronPrint
Friend Class Program
Shared Sub Main()
' Specify the file path to be printed
Dim filePath As String = "document.pdf"
' Invoke the Print method to print the document
IronPrint.Print(filePath)
End Sub
End Class
Diyalog ile Yazdir
Belgeyi yazdırmak için ShowPrintDialog yöntemini kullanın, bu da yazdırmadan önce yazdırma iletişim kutusunu gösterir.
using IronPrint;
class Program
{
static void Main()
{
// Specify the file path to be printed
string filePath = "document.pdf";
// Invoke the ShowPrintDialog method to prompt the dialog before printing
IronPrint.ShowPrintDialog(filePath);
}
}
using IronPrint;
class Program
{
static void Main()
{
// Specify the file path to be printed
string filePath = "document.pdf";
// Invoke the ShowPrintDialog method to prompt the dialog before printing
IronPrint.ShowPrintDialog(filePath);
}
}
Imports IronPrint
Friend Class Program
Shared Sub Main()
' Specify the file path to be printed
Dim filePath As String = "document.pdf"
' Invoke the ShowPrintDialog method to prompt the dialog before printing
IronPrint.ShowPrintDialog(filePath)
End Sub
End Class
Yazdırma Ayarlarını Özelleştirme
Yazdırma ayarlarını koddan yapılandırmak için PrintSettings sınıfını oluşturun. PrintSettings nesnesini yapılandırın ve yazdırma yöntemlerinden birine iletin.
using IronPrint;
class Program
{
static void Main()
{
// Create a PrintSettings object to configure printer settings
PrintSettings settings = new PrintSettings
{
Copies = 2,
Duplex = DuplexMode.Vertical,
PageOrientation = PageOrientation.Landscape
};
// Specify the file path to be printed
string filePath = "document.pdf";
// Invoke the Print method with custom print settings
IronPrint.Print(filePath, settings);
}
}
using IronPrint;
class Program
{
static void Main()
{
// Create a PrintSettings object to configure printer settings
PrintSettings settings = new PrintSettings
{
Copies = 2,
Duplex = DuplexMode.Vertical,
PageOrientation = PageOrientation.Landscape
};
// Specify the file path to be printed
string filePath = "document.pdf";
// Invoke the Print method with custom print settings
IronPrint.Print(filePath, settings);
}
}
Imports IronPrint
Friend Class Program
Shared Sub Main()
' Create a PrintSettings object to configure printer settings
Dim settings As New PrintSettings With {
.Copies = 2,
.Duplex = DuplexMode.Vertical,
.PageOrientation = PageOrientation.Landscape
}
' Specify the file path to be printed
Dim filePath As String = "document.pdf"
' Invoke the Print method with custom print settings
IronPrint.Print(filePath, settings)
End Sub
End Class
Lisanslama ve Destek Mevcut
IronPrint ücretli bir kutuphane, ancak ücretsiz deneme lisanslari da burada mevcuttur.
Iron Software ile ilgili daha fazla bilgi icin, lutfen web sitemizi ziyaret edin: https://ironsoftware.com/ Daha fazla destek ve sorular icin, lutfen ekibimizle iletişime geçin.
Iron Software'dan Destek
Genel destek ve teknik sorular için lütfen bize şu e-posta adresinden ulaşın: support@ironsoftware.com.

