# IronPrint ile Başlarken
T[98] ## IronPrint: .NET için Hepsi Bir Arada Yazdırma Kütüphaneniz
**IronPrint**, Iron Software tarafından geliştirilen bir yazdırma kütüphanesidir. Kütüphane, Windows, macOS, Android ve iOS dahil olmak üzere birçok ortamla uyumludur.
<div class="hsg-featured-snippet">
<h2>C# Yazdırma Kütüphanesi</h2>
<ol>
<li><a href="https://www.nuget.org/packages/IronPrint/">Belgeleri yazdırmak için C# kütüphanesini indirin</a></li>
<li>PDF, PNG, HTML, TIFF, GIF, JPEG, GÖRÜNTÜ, BITMAP formatlarını işleyin</li>
<li>Yazdırma ayarlarını özelleştirin</li>
<li>Yazdırmadan önce diyalogu göster</li>
<li>C#'ta kütüphanenin özelliklerini ücretsiz olarak keşfedin</li>
</ol>
</div>
### Uyumluluk
**IronPrint**, şu platformlar arası destek uyumluluğuna sahiptir:
#### .NET Sürüm Desteği
- **C#**, **VB.NET**, **F#**
- **.NET 8, 7**, 6, 5 ve Core 3.1+
- .NET Framework (4.6.2+)
#### İşletim Sistemleri ve Ortamlara Dair Destek
- **Windows** (7+, Sunucu 2016+)
- **macOS** (10+)
- **iOS** (11+)
- **Android** API 21+ (v5 "Lollipop")
#### .NET Proje Tipleri Desteği
- **Mobil** (Xamarin & MAUI & Avalonia)
- **Masaüstü** (WPF & MAUI & Windows Avalonia)
- **Konsol** (Uygulama & Kütüphane)
## Kurulum
### IronPrint Kütüphanesi
NuGet Paket Yöneticisi aracılığıyla IronPrint paketini yükleyin:
```shell
:InstallCmd dotnet add package IronPrint
```
Alternatif olarak, doğrudan [resmi IronPrint NuGet web sitesinden](https://www.nuget.org/packages/IronPrint) indirin.
Kurulduktan sonra, C# kodunuzun üst kısmına `using IronPrint;` ekleyerek başlayabilirsiniz.
## Lisans Anahtarı Uygulama
Ardından, lisans anahtarını `License` sınıfının `LicenseKey` özelliğine atayarak IronPrint için geçerli bir lisans veya deneme anahtarı uygulayın. Herhangi bir IronPrint yöntemini kullanmadan önce, içe aktarma ifadesinin hemen arkasından aşağıdaki kodu ekleyin:
```csharp
using IronPrint;
// Apply your IronPrint license key here
License.LicenseKey = "your-license-key-here";
```
## Kod Örnekleri
### Belge Yazdır
Dosya yolunu `Print` yöntemine geçirin, belgeyi yazdırmak için.
```csharp
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);
}
}
```
### Diyalog ile Yazdır
Belgeyi yazdırmak için `ShowPrintDialog` yöntemini kullanın, bu yöntem ayrıca yazdırmadan önce yazdırma iletişim kutusunu gösterir.
```csharp
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);
}
}
```
### 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 aktarın.
```csharp
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);
}
}
```
## Lisanslama ve Destek Mevcuttur
**IronPrint** ücretli bir kütüphanedir; ancak, [buradan](trial-license) ücretsiz deneme lisansları da mevcuttur.
Iron Software hakkında daha fazla bilgi için lütfen web sitemizi ziyaret edin: [https://ironsoftware.com/](https://ironsoftware.com/) Daha fazla destek ve sorular için lütfen [ekibimize sorun](/contact-us/).
### Iron Software'dan Destek
Genel destek ve teknik sorular için lütfen bize şu e-posta adresinden yazın: [support@ironsoftware.com](mailto:support@ironsoftware.com).
T[98] ## IronPrint: .NET için Hepsi Bir Arada Yazdırma Kütüphaneniz
IronPrint, Iron Software tarafından geliştirilen bir yazdırma kütüphanesidir. Kütüphane, Windows, macOS, Android ve iOS dahil olmak üzere birçok ortamla uyumludur.
Kurulduktan sonra, C# kodunuzun üst kısmına using IronPrint; ekleyerek başlayabilirsiniz.
Lisans Anahtarı Uygulama
Ardından, lisans anahtarını License sınıfının LicenseKey özelliğine atayarak IronPrint için geçerli bir lisans veya deneme anahtarı uygulayın. Herhangi bir IronPrint yöntemini kullanmadan önce, içe aktarma ifadesinin hemen arkasından aşağıdaki kodu ekleyin:
using IronPrint;// Apply your IronPrint license key hereLicense.LicenseKey = "your-license-key-here";
using IronPrint;
// Apply your IronPrint license key here
License.LicenseKey = "your-license-key-here";
ImportsIronPrint' Apply your IronPrint license key hereLicense.LicenseKey = "your-license-key-here"
Imports IronPrint
' Apply your IronPrint license key here
License.LicenseKey = "your-license-key-here"
Kod Örnekleri
Belge Yazdır
Dosya yolunu Print yöntemine geçirin, belgeyi yazdırmak için.
using IronPrint;class Program{ static voidMain() { // Specify the file path to be printed string filePath = "document.pdf"; // Invoke the Print method to print the documentIronPrint.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);
}
}
ImportsIronPrintFriend Class ProgramShared Sub Main() ' Specify the file path to be printed Dim filePath AsString = "document.pdf" ' Invoke the Print method to print the documentIronPrint.Print(filePath) End SubEnd Class
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 Yazdır
Belgeyi yazdırmak için ShowPrintDialog yöntemini kullanın, bu yöntem ayrıca yazdırmadan önce yazdırma iletişim kutusunu gösterir.
using IronPrint;class Program{ static voidMain() { // Specify the file path to be printed string filePath = "document.pdf"; // Invoke the ShowPrintDialog method to prompt the dialog before printingIronPrint.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);
}
}
ImportsIronPrintFriend Class ProgramShared Sub Main() ' Specify the file path to be printed Dim filePath AsString = "document.pdf" ' Invoke the ShowPrintDialog method to prompt the dialog before printingIronPrint.ShowPrintDialog(filePath) End SubEnd Class
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 aktarın.
using IronPrint;class Program{ static voidMain() { // 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 settingsIronPrint.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);
}
}
ImportsIronPrintFriend Class ProgramShared Sub Main() ' Create a PrintSettings object to configure printer settings Dim settings As New PrintSettingsWith { .Copies = 2, .Duplex = DuplexMode.Vertical, .PageOrientation = PageOrientation.Landscape } ' Specify the file path to be printed Dim filePath AsString = "document.pdf" ' Invoke the Print method with custom print settingsIronPrint.Print(filePath, settings) End SubEnd Class
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 Mevcuttur
IronPrint ücretli bir kütüphanedir; ancak, buradan ücretsiz deneme lisansları da mevcuttur.
Iron Software hakkında daha fazla bilgi için lütfen web sitemizi ziyaret edin: https://ironsoftware.com/ Daha fazla destek ve sorular için lütfen ekibimize sorun.
Iron Software'dan Destek
Genel destek ve teknik sorular için lütfen bize şu e-posta adresinden yazın: support@ironsoftware.com.
Curtis Chau, Bilgisayar Bilimleri alanında Lisans Derecesine (Carleton Üniversitesi) sahip ve Node.js, TypeScript, JavaScript ve React konularında uzmanlaşmış ön uç geliştirmeyle ilgileniyor. Sezgisel ve estetik açıdan hoş kullanıcı arayüzleri oluşturma tutkunu, Curtis modern çerçevelerle çalışmayı ve iyi yapılandırılmış, görsel olarak çekici kılavuzlar oluşturmayı seviyor.