IronPrint 시작하기
IronPrint: .NET 용 올인원 프린트 라이브러리
IronPrint 는 Iron Software 에서 개발한 프린트 라이브러리입니다. 이 라이브러리는 Windows, macOS, Android, iOS를 포함한 다양한 환경과 호환됩니다.
C# 인쇄 라이브러리
- 문서를 인쇄하기 위한 C# 라이브러리 다운로드
- PDF, PNG, HTML, TIFF, GIF, JPEG, IMAGE, BITMAP 형식을 지원합니다.
- 인쇄 설정 사용자 지정
- 인쇄하기 전에 대화 상자를 표시합니다.
- C#에서 라이브러리의 기능을 무료로 살펴보세요.
호환성
IronPrint 다음과 같은 플랫폼과의 호환성을 지원합니다.
.NET 버전 지원
- C# , VB .NET , F#
- .NET 8, 7 , 6, 5 및 Core 3.1 이상
- .NET Framework (4.6.2 이상)
운영 체제 및 환경 지원
- 윈도우 (7 이상, 서버 2016 이상)
- macOS (10 이상)
- iOS (11 이상)
- 안드로이드 API 21 이상 (v5 "롤리팝")
.NET 프로젝트 유형 지원
- 모바일 (Xamarin, MAUI, Avalonia 지원)
- 데스크톱 (WPF, MAUI 및 Windows Avalonia)
- 콘솔 (앱 및 라이브러리)
설치
IronPrint 라이브러리
NuGet 패키지 관리자를 통해 IronPrint 패키지를 설치하세요.
또는 공식 IronPrint NuGet 웹사이트에서 직접 다운로드하세요.
설치가 완료되면 using IronPrint;을 C# 코드의 상단에 추가하여 시작할 수 있습니다.
라이선스 키 적용
다음으로 License 클래스의 LicenseKey 속성에 라이선스 키를 할당하여 IronPrint에 유효한 라이선스 또는 체험판 키를 적용합니다. IronPrint 메서드를 사용하기 전에, import 문 바로 다음에 다음 코드를 포함시키십시오.
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"Imports IronPrint
' Apply your IronPrint license key here
License.LicenseKey = "your-license-key-here"코드 예제
문서 인쇄
단순히 파일 경로를 Print 메서드에 전달하여 문서를 인쇄합니다.
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 ClassImports 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대화 상자를 사용하여 인쇄
문서를 인쇄하려면 ShowPrintDialog 메서드를 사용하세요. 이 메서드는 인쇄 전 인쇄 대화 상자를 표시합니다.
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 ClassImports 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인쇄 설정 사용자 지정
코드에서 인쇄 설정을 구성하려면 PrintSettings 클래스를 인스턴스화하십시오. PrintSettings 객체를 구성하고 이를 하나의 인쇄 메서드에 전달합니다.
using IronPrint;
class Program
{
static void Main()
{
// Create a PrintSettings object to configure printer settings
PrintSettings settings = new PrintSettings
{
NumberOfCopies = 2,
PaperOrientation = PaperOrientation.Landscape
};
// Specify the file path to be printed
string filePath = "document.pdf";
// Invoke the Print method with custom print settings
Printer.Print(filePath, settings);
}
}using IronPrint;
class Program
{
static void Main()
{
// Create a PrintSettings object to configure printer settings
PrintSettings settings = new PrintSettings
{
NumberOfCopies = 2,
PaperOrientation = PaperOrientation.Landscape
};
// Specify the file path to be printed
string filePath = "document.pdf";
// Invoke the Print method with custom print settings
Printer.Print(filePath, settings);
}
}Imports IronPrint
Module Program
Sub Main()
' Create a PrintSettings object to configure printer settings
Dim settings As New PrintSettings With {
.NumberOfCopies = 2,
.PaperOrientation = PaperOrientation.Landscape
}
' Specify the file path to be printed
Dim filePath As String = "document.pdf"
' Invoke the Print method with custom print settings
Printer.Print(filePath, settings)
End Sub
End ModuleImports IronPrint
Module Program
Sub Main()
' Create a PrintSettings object to configure printer settings
Dim settings As New PrintSettings With {
.NumberOfCopies = 2,
.PaperOrientation = PaperOrientation.Landscape
}
' Specify the file path to be printed
Dim filePath As String = "document.pdf"
' Invoke the Print method with custom print settings
Printer.Print(filePath, settings)
End Sub
End Module라이선스 및 지원 가능
IronPrint는 유료 라이브러리입니다; 그러나, 무료 체험판 라이선스도 여기에서 제공됩니다.
Iron Software에 대한 더 많은 정보를 얻으시려면, 우리 웹사이트: https://ironsoftware.com/를 방문하세요. 더 많은 지원과 문의를 원하시면, 우리 팀에 질문하세요.
Iron Software 의 지원
일반 지원 및 기술 문의를 위해서는: support@ironsoftware.com으로 이메일을 보내주십시오.
커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.