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

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

사용자 상호작용 없이 회색조로 인쇄하려면, Grayscale 속성을 활성화하고 Printer.Print()에 설정을 전달합니다:

:path=/static-assets/print/content-code-examples/how-to/grayscale-printing/silent-grayscale.cs
// 이 코드 조각은 사용할 수 없습니다!
$vbLabelText   $csharpLabel

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

명시적으로 설정되지 않은 경우 Grayscale는 기본적으로 false로 설정되어, 문서가 기본적으로 풀 컬러로 인쇄됩니다.

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

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

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

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

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

색상 정확도가 중요한 문서 — 마케팅 자료, 브랜드 자료, 색상이 구분된 데이터가 포함된 차트 —는 Grayscale를 기본 false 값으로 유지합니다.

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

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

:path=/static-assets/print/content-code-examples/how-to/grayscale-printing/combined-settings.cs
// 이 코드 조각은 사용할 수 없습니다!
$vbLabelText   $csharpLabel

Grayscale = true150와 같은 낮은 DPI와 조합하면 대량 내부 문서에 이상적인 빠르고 경제적인 초안 인쇄 구성을 만듭니다. 비차단 워크플로우의 경우, 동일한 PrintSettings를 대신에 Printer.PrintAsync()에 전달하세요.

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

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

인쇄하기 전에 파일 자체를 그레이스케일로 변환해야 하는 PDF 전용 워크플로를 위해 IronPDF의 그레이스케일 렌더링이 그 기능을 제공합니다. 대조적으로 IronPrint의 Grayscale 속성은 소스 파일을 색상으로 유지하고 인쇄된 출력에만 영향을 줍니다.

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

우리는 PrintSettings.Grayscale = true를 사용하여 회색조 인쇄를 활성화하는 방법을 다루었고, 무음 및 비동기 회색조 워크플로우를 시연했으며, 모노Chrome 출력이 의미있는 시기를 논의했으며, 그레이스케일을 초안 품질 일괄 인쇄를 위한 다른 설정과 결합했으며, 모든 IronPrint 호환 파일 형식에 대한 형식 지원을 확인했습니다.

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

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

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 다운로드 38,093 | 버전: 2026.3 방금 출시되었습니다
Still Scrolling Icon

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

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