C#에서 그레이스케일로 인쇄하는 방법

This article was translated from English: Does it need improvement?
Translated
View the article in English

그레이스케일로 인쇄하면 컬러 문서가 프린터 드라이버 수준에서 흑백 출력으로 변환됩니다. 이는 대량 배치 실행 중에 색상 잉크 또는 토너 카트리지를 보존하고, 비싼 소모품을 낭비하지 않고 내부 초안이 읽기 쉽게 유지되며, 단색 출력이 선호되는 포맷 요구 사항을 충족시킵니다.

IronPrint는 이를 단일 부울 값으로 처리합니다. PrintSettings.Grayscaletrue로 설정하면, 문서의 원래 색상과 관계없이 프린터에서 흑백으로 출력됩니다. 아래에서 설치, 기본 사용법, 비동기 워크플로 및 조합된 설정을 다룹니다.

빠른 시작: 그레이스케일 인쇄

  1. NuGet을 통해 IronPrint 설치: Install-Package IronPrint
  2. 파일에 using IronPrint;를 추가하십시오
  3. PrintSettings 객체 생성
  4. Grayscaletrue로 설정하십시오.
  5. 파일 경로와 함께 설정을 Printer.Print()로 전달합니다
  1. NuGet 패키지 관리자를 사용하여 https://www.nuget.org/packages/IronPrint 설치하기

    PM > Install-Package IronPrint
  2. 다음 코드 조각을 복사하여 실행하세요.

    using IronPrint;
    
    // Print in grayscale — one property, one line
    PrintSettings settings = new PrintSettings();
    settings.Grayscale = true;
    Printer.Print("report.pdf", settings);
  3. 실제 운영 환경에서 테스트할 수 있도록 배포하세요.

    무료 체험판으로 오늘 프로젝트에서 IronPrint 사용 시작하기

    arrow pointer

비어있는 인쇄에 대해 그레이스케일을 어떻게 활성화하나요?

사용자 개입 없이 그레이스케일로 PRINT하려면 Grayscale 속성을 활성화하고 설정을 Printer.Print()에 전달합니다:

:path=/static-assets/print/content-code-examples/how-to/grayscale-printing/grayscale-printing-silent-grayscale.cs
using IronPrint;

// Configure grayscale output
PrintSettings settings = new PrintSettings
{
    Grayscale = true
};

// Print the color brochure as monochrome
Printer.Print("color-brochure.pdf", settings);
Imports IronPrint

' Configure grayscale output
Dim settings As New PrintSettings With {
    .Grayscale = True
}

' Print the color brochure as monochrome
Printer.Print("color-brochure.pdf", settings)
$vbLabelText   $csharpLabel

인 경우, 프린터 드라이버는 용지에 잉크나 토너를 도포하기 전에 색상 정보를 제거합니다. 원본 파일은 변경되지 않고 — 인쇄된 출력만이 단색입니다. 이는 Windows 프린트 대화상자에서 "흑백" 또는 "그레이스케일"을 수동으로 선택하는 것과 동일한 동작이지만, 어떤 사용자 상호작용 없이 프로그래밍 방식으로 제어할 수 있습니다.

는 명시적으로 설정되지 않은 경우 기본적으로로 설정되며, 이는 문서가 기본적으로 풀 컬러로 인쇄됨을 의미합니다.

그레이스케일 인쇄는 언제 사용해야 하나요?

그레이스케일 인쇄는 여러 일반적인 상황에서 적합한 선택입니다:

비용 절감 — 컬러 토너 카트리지는 검정 카트리지보다 훨씬 더 비쌉니다. 내부 목적의 문서(초안, 근무표, 내부 메모)를 그레이스케일로 전환하면 분기 동안 페이지당 인쇄 비용을 상당히 줄일 수 있습니다.

가독성 — 연한 색상의 텍스트 또는 파스텔 배경이 있는 문서는 종이에서 읽기 어려울 수 있습니다. 그레이스케일 변환은 종종 텍스트가 많은 콘텐츠의 대비와 판독성을 향상시킵니다.

컴플라이언스 및 보관 — 일부 규제 산업에서는 기록을 위해 단색 사본을 요구합니다. 그레이스케일 출력은 소스 문서를 변경하지 않고 이 요구사항을 충족합니다.

색상 정확도가 중요한 문서(마케팅 자료, 브랜드 홍보물, 색상 코드가 지정된 데이터가 포함된 차트 등)의 경우, 을 기본값인로 유지하십시오.

그레이스케일을 다른 인쇄 설정과 어떻게 결합하나요?

``는 PrintSettings의 속성 중 하나입니다. 다음과 같은 단일 구성 객체에서 용지 여백, 용지 크기, 방향, DPI, 복사본 수프린터 선택을 조합할 수 있습니다:

:path=/static-assets/print/content-code-examples/how-to/grayscale-printing/grayscale-printing-combined-settings.cs
using IronPrint;

// Configure grayscale draft printing
PrintSettings settings = new PrintSettings
{
    Grayscale = true,
    NumberOfCopies = 10,
    PaperSize = PaperSize.A4,
    PaperOrientation = PaperOrientation.Portrait,
    Dpi = 150,
    PaperMargins = new Margins(15),
    PrinterName = "Office Mono Laser"
};

// Print the team memo
Printer.Print("team-memo.pdf", settings);
Imports IronPrint

' Configure grayscale draft printing
Dim settings As New PrintSettings With {
    .Grayscale = True,
    .NumberOfCopies = 10,
    .PaperSize = PaperSize.A4,
    .PaperOrientation = PaperOrientation.Portrait,
    .Dpi = 150,
    .PaperMargins = New Margins(15),
    .PrinterName = "Office Mono Laser"
}

' Print the team memo
Printer.Print("team-memo.pdf", settings)
$vbLabelText   $csharpLabel

Grayscale = true와 같은 낮은 DPI와 함께 사용하면, 대량 내부 문서 인쇄에 이상적인 빠르고 경제적인 초안 인쇄 구성을 만들 수 있습니다. 비차단 워크플로를 사용하려면 동일한</a>에 전달하십시오.

그레이스케일 인쇄를 지원하는 파일 형식은 무엇인가요?

IronPrint는 라이브러리가 처리하는 모든 파일 형식에 대해 그레이스케일 출력을 지원합니다: PDF, PNG, TIFF, GIF, JPEG 및 BMP. 속성은 소스 형식에 관계없이 동일하게 적용됩니다. PDF 보고서든 JPEG 사진이든 상관없이 동일한 객체를 ``에 전달합니다.

인쇄하기 전에 파일 자체를 그레이스케일로 변환해야 하는 PDF 전용 워크플로를 위해 IronPDF의 그레이스케일 렌더링이 그 기능을 제공합니다. 반면 IronPrint의 `` 속성은 원본 파일을 컬러로 유지한 채 인쇄된 출력물에만 영향을 미칩니다.

내 다음 단계는 무엇인가요?

우리는 PrintSettings.Grayscale = true를 사용하여 그레이스케일 인쇄를 활성화하는 방법을 다루었고, 백그라운드 및 비동기 그레이스케일 워크플로를 시연했으며, 단색 출력이 적합한 경우를 논의하고, 초안 품질의 일괄 인쇄를 위해 그레이스케일을 다른 설정과 결합했으며, 모든 IronPrint 호환 파일 형식에서 형식 지원이 가능한지 확인했습니다.

추가 읽기를 위해 이 리소스를 탐색하세요:

무료 체험판 라이선스 받기를 통해 모든 기능을 실제 환경에서 시험하거나, 배포를 준비 중이라면 라이선스 옵션 보기.

자주 묻는 질문

T52: IronPrint .NET이란 무엇입니까?

T53: IronPrint .NET은 개발자가 C# 응용 프로그램 내에서 인쇄 작업을 관리할 수 있도록 하는 라이브러리로, 회색조 인쇄, 무음 인쇄 및 비동기 작업과 같은 기능을 지원합니다.

T54: IronPrint를 사용하여 문서를 회색조로 인쇄하려면 어떻게 해야 합니까?

T55: IronPrint를 사용하여 C#에서 회색조로 문서를 인쇄하려면 PrintSettings 속성을 설정하여 단색 출력을 활성화할 수 있으며, 이는 인쇄 비용을 절감하는 데 도움이 됩니다.

T56: 회색조로 인쇄하는 이점은 무엇입니까?

T57: 회색조 인쇄는 잉크 또는 토너 사용을 줄여 비용 절감을 유도하며, 색상이 필요 없는 문서에 적합합니다.

IronPrint 로 무음 인쇄를 할 수 있나요?

T58: IronPrint는 무음 인쇄를 지원합니다.

T59: IronPrint는 비동기 인쇄를 지원하여 비차단 작업을 가능하게 하고, 인쇄 작업 중 애플리케이션 성능을 향상시킵니다.

T60: IronPrint로 인쇄 설정을 결합하는 방법은 무엇입니까?

T61: IronPrint를 사용하면 C# 코드에서 PrintSettings 객체를 적절히 구성하여 회색조 모드와 무음 인쇄와 같은 설정을 결합할 수 있습니다.

T62: IronPrint는 비용 효율적인 인쇄 솔루션에 적합합니까?

T63: 예, IronPrint는 회색조 인쇄와 효율적인 자원 관리를 통한 비용 효율적인 인쇄 솔루션을 제공하도록 설계되었습니다.

T64: IronPrint는 어떤 프로그래밍 언어와 함께 사용됩니까?

T65: IronPrint는 C# 프로그래밍 언어와 함께 사용되며, 개발자가 그들의 .NET 애플리케이션에 고급 인쇄 기능을 통합할 수 있도록 합니다.

T66: IronPrint는 배치 인쇄 작업에 사용할 수 있습니까?

T67: IronPrint는 배치 인쇄 작업에 사용할 수 있으며, 개발자가 여러 문서의 인쇄 과정을 효율적으로 자동화할 수 있습니다.

T68: 어떤 종류의 응용 프로그램이 IronPrint를 사용하여 이점을 얻을 수 있습니까?

T69: 문서 관리 시스템, 보고 도구 및 자동화 워크플로우와 같은 강력한 인쇄 기능이 필요한 응용 프로그램은 IronPrint 사용으로 크게 이점을 얻을 수 있습니다.

T70: 이 페이지는 IronPrint .NET을 사용한 C#에서의 회색조 인쇄에 관한 종합 가이드를 제공하며, 효율적인 단색 인쇄를 위한 무음, 비동기 및 결합 설정에 관한 세부 정보를 포함합니다.

A PHP Error was encountered

Severity: Warning

Message: Illegal string offset 'name'

Filename: sections/author_component.php

Line Number: 18

Backtrace:

File: /var/www/ironpdf.com/application/views/main/sections/author_component.php
Line: 18
Function: _error_handler

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 63
Function: view

File: /var/www/ironpdf.com/application/views/products/sections/three_column_docs_page_structure.php
Line: 64
Function: main_view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/views/products/how-to/index.php
Line: 2
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 552
Function: view

File: /var/www/ironpdf.com/application/controllers/Products/Howto.php
Line: 31
Function: render_products_view

File: /var/www/ironpdf.com/index.php
Line: 292
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Illegal string offset 'title'

Filename: sections/author_component.php

Line Number: 38

Backtrace:

File: /var/www/ironpdf.com/application/views/main/sections/author_component.php
Line: 38
Function: _error_handler

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 63
Function: view

File: /var/www/ironpdf.com/application/views/products/sections/three_column_docs_page_structure.php
Line: 64
Function: main_view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/views/products/how-to/index.php
Line: 2
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 552
Function: view

File: /var/www/ironpdf.com/application/controllers/Products/Howto.php
Line: 31
Function: render_products_view

File: /var/www/ironpdf.com/index.php
Line: 292
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Illegal string offset 'comment'

Filename: sections/author_component.php

Line Number: 48

Backtrace:

File: /var/www/ironpdf.com/application/views/main/sections/author_component.php
Line: 48
Function: _error_handler

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 63
Function: view

File: /var/www/ironpdf.com/application/views/products/sections/three_column_docs_page_structure.php
Line: 64
Function: main_view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/views/products/how-to/index.php
Line: 2
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 552
Function: view

File: /var/www/ironpdf.com/application/controllers/Products/Howto.php
Line: 31
Function: render_products_view

File: /var/www/ironpdf.com/index.php
Line: 292
Function: require_once

시작할 준비 되셨나요?
Nuget 다운로드 41,154 | 버전: 2026.5 just released
Still Scrolling Icon

아직도 스크롤하고 계신가요?

빠른 증거를 원하시나요? PM > Install-Package IronPrint
샘플을 실행하세요 문서가 프린터로 전송되는 것을 지켜보세요.