IronPrint을 ChatGPT Codex와 함께 사용하는 방법

Curtis Chau
Curtis Chau
업데이트됨: 2026년 10월 26일

창고는 매일 밤 주문한 목록의 피킹 리스트를 출력합니다. 일부 주문은 피커를 위한 복사본이 하나 필요하고, 다른 주문은 패커를 위한 두 번째 복사본과 송장 직원용 세 번째 복사본이 필요합니다. 복사본 수가 잘못되더라도 아무런 문제도 발생하지 않습니다. 패커는 동료 복사본이 없는 시트를 찾거나, 송장 데스크는 하나의 주문에 대한 아홉 장의 시트를 받고, 인쇄 로그는 여전히 해당 주문이 전송된 것으로 보고합니다.

OpenAI의 코딩 에이전트인 ChatGPT Codex는 저장소의 파일을 편집하고 dotnet run 및 기타 명령을 실행하여 수행한 작업을 보고합니다. 이 코드는 ChatGPT 데스크톱 앱, IDE, 터미널 및 클라우드에서 작동합니다. IronPrint는 Iron Software의 .NET 인쇄 라이브러리로, PDF 및 이미지 파일을 설치된 프린터로 보내며 운영 체제의 인쇄 대화상자를 통해 조용히 또는 종이 크기, 방향, DPI, 그레이스케일 및 복사본 수를 설정하여 하나의 PrintSettings 개체에서 인쇄할 수 있습니다.

코덱스는 밤새 피킹 리스트 주문과 예상 결과의 매니페스트를 받습니다. 코덱스가 보고하는 각 복사본 수는 CSV 파일에서 가져오며, 모든 배치는 인쇄 작업이 프린터로 보내지기 전에 계획됩니다.

빠른 시작
NuGetNuGet으로 설치

PM > Install-Package IronPrint

위 명령을 NuGet 패키지 관리자 콘솔에 입력하거나 NuGet 패키지 관리자에서 패키지를 검색하여 IronPrint를 설치하십시오.

네트워크 콘솔 프로젝트에서 주문 폴더로 Codex를 실행하세요.

$ironprint Install IronPrint 2026.10.1 from NuGet in this console project.
Program.cs should then plan the six orders in Orders/sample/ without sending a job.

Give each sample PDF a row in out/quickstart.csv. The columns are:

- file
- copies, from that order's row in Orders/manifest.csv
- printer, the PrinterName in appsettings.json
- found, yes or no, whether Printer.GetPrinterNames lists that printer

Read the total copies back from that CSV and show it.
Program.cs gets the key from IRONPRINT_LICENSE_KEY by itself.
Don't show the key's value anywhere, and don't list environment variables.
Keep the PrintCapture.Install line first in Program.cs.
Don't call Print, PrintAsync or ShowPrintDialog yet.
Stop after three failed builds or runs, and tell me what came out.
Text

$ironprint 언급은 세션에 IronPrint 기술을 로드합니다.



ChatGPT Codex는 무엇이며 .NET 인쇄 작업에 어떻게 적용되나요?

Codex의 CLI 문서는 설치 및 터미널 사용을 설명하며, 그 소스 코드 및 릴리스는 GitHub에서 찾을 수 있습니다.

Codex는 IronPrint에 대해 훈련 데이터와 컨텍스트의 파일에 의존하며, 잘못된 멤버 이름은 빌드를 실패시킵니다.

IronPrint는 Windows, macOS, iOS 및 Android를 지원합니다. 이 가이드의 프로젝트는 net9.0-windows를 타겟으로 합니다.

IronPrint 프롬프트를 작성하고 Codex를 어떻게 설정하나요?

IronPrint 배치 프롬프트는 입력(Orders/manifest.csv의 모든 주문), 프린터 및 그 이름의 소스(appsettings.json, Printer.GetPrinterNames와 비교됨), 각 작업의 설정(매니페스트의 복사본 수, 용지 크기, 세로 방향, 그레이 스케일 및 150 DPI), 증명서(주문당 한 줄로 계획된 CSV), 진실 매니페스트(매니페스트의 예상 상태) 및 제약 조건(정확한 프린터 이름 및 ShowPrintDialog 호출 없음)을 명기합니다.

Codex는 현재 디렉토리 및 위로 올라가며, 저장소 루트까지의 모든 디렉토리에서 .agents/skills 폴더를 검색합니다. 각 기술 폴더는 전면에 이름과 설명이 있는 SKILL.md 파일을 보유합니다. IronPrint의 skill.md가 .agents/skills/IronPrint/SKILL.md에 복사되어 $ironprint 언급이 해결됩니다. 스킬의 단일 파일 예시는 IronPrint 2026.8.1을 고정하고, 퀵스타트는 2026.10.1을 설치합니다.

어떤 작업을 하기도 전에, Codex는 작업 폴더로의 경로에서 저장소 루트에 있는 AGENTS.md 파일을 로드합니다. 디렉토리당 하나만 읽으며, 두 개가 충돌하는 경우 작업 폴더에 가까운 파일이 우선권을 가집니다. /init를 실행하면 시작 드래프트가 생성됩니다.

테스트 머신에는 대화상자 없이 작업을 완료할 수 있는 프린터가 없고, 대화상자는 무인 실행을 중단시킵니다. 따라서 테스트 저장소에는 IronPrint가 Windows로 보내는 작업을 가로채고 XPS 파일로 작성하는 작은 캡쳐 클래스가 포함되어 있어 작업이 스풀되지 않습니다. 작동하는 프린터가 있는 프로젝트는 그 부분을 생략합니다.

Write a root-level AGENTS.md containing a section called Nightly picking lists.
These are its rules:

- IronPrint is the only printing library. Its package and namespace are both IronPrint.
- The target framework stays net9.0-windows.
- For the API, check the ironprint skill in .agents/skills/ironprint/.
- The installed IronPrint.xml settles any doubt about a member.
- Orders/ is read-only.
- The printer name comes from appsettings.json and has to appear in Printer.GetPrinterNames.
- The first line of Program.cs installs PrintCapture. It stays first, and Capture/ stays as it is.
- Print and PrintAsync run only from Program.cs, after that line.
- Tests never call them, and code that runs never calls ShowPrintDialog.
- The key lives in IRONPRINT_LICENSE_KEY. No output, log or file ever contains its value.
- A count in a reply has to come from a CSV that the same turn wrote.
- Name that CSV in the reply.

Show me the file once it's written.
Text

Codex가 어떻게 IronPrint를 추가하고 라이센스를 확인하라고 요청하나요?

Show me the IronPrint PackageReference in PickingBatch.csproj and the version that restore picked.
Then quote each IronSoftware package from the output of dotnet list package --include-transitive.
Don't touch any package reference.
Text

nuget.org에서 IronPrint 2026.10.1은 IronSoftware.Common 2026.4.2, IronSoftware.Abstractions 2026.1.2 및 IronSoftware.System.Drawing 2026.8.2라는 세 가지 종속성을 나열합니다. 우리의 실행에서는 복원도 IronSoftware.Drawing.Abstractions 2026.1.2를 추가했습니다. 각 빌드는 IronPrint의 네이티브 런타임 파일을 출력 폴더로 복사합니다. 릴리스를 고정하기 전에 IronPrint 변경 로그를 검토하세요.

Printer.GetPrinterNames, Printer.GetPrinterTrays 및 새로운 PrintSettings는 모두 키 없이 성공합니다, 따라서 프린터 목록은 라이센스에 대해 아무 것도 재증명하지 않습니다. 키 없는 인쇄 호출은 작업이 만들어지기 전에 라이선싱 예외를 던지며, 메시지는 제품 라이선스 필요라고 읽힙니다. 동기 Print는 그것을 AggregateException에 래핑하고, PrintAsync는 이것을 직접 던집니다. IronPrint 2026.10.1 외부의 코드는 라이선싱 예외 타입을 참조할 수 없습니다. 따라서 핸들러는 Exception를 잡아 타입 이름을 비교합니다.

Create Startup.ApplyIronPrintKey and make it the call right after PrintCapture in Program.cs.
It copies IRONPRINT_LICENSE_KEY into License.LicenseKey and reports License.IsLicensed.

Next, show me what IronPrint does with no key.
Run the program twice as child processes with the variable cleared for that child only:

1. A --licence-check run that lists the printers and builds a PrintSettings for PL-1023.
2. A --licence-check --send run that also calls Printer.Print once on Orders/sample/PL-1023.pdf.

Both runs use the printer from appsettings.json.
Log every call in out/licence-check.csv.
Its columns are run, call, result, exception type, inner type and message.
Give up after three repair attempts.
Text

IronPrint는 IRONPRINT_LICENSE_KEY을 읽지 않으므로 프로그램은 그 값을 License.LicenseKey에 복사합니다. 키는 라이선스 키 페이지에서 설명하는 대로 appsettings.json, Web.config 또는 App.config에 넣을 수 있습니다.

IronPrint가 하나의 문서의 여러 복사본을 어떻게 인쇄하나요?

복사본 가이드는 NumberOfCopies는 한 번 설정하고 하나의 작업을 보냅니다. 루프에서 Print를 호출하는 대신. 캘리브레이션 프로브는 두 페이지의 피킹 리스트를 세 번 보냈고, IronPrint는 복사본 수 3을 인쇄 티켓에 가지는 두 페이지의 하나의 작업을 구성하였습니다. 프린터 드라이버는 여분의 복사본을 만듭니다. Microsoft Print to PDF는 해당 티켓을 하나의 6페이지 파일로 변환했으며, 페이지는 1, 2, 1, 2, 1, 2로 정렬되었습니다.

Make a throwaway console project in scratch/copies-probe/ on your own.
Exclude scratch/** from PickingBatch.csproj with a Compile Remove item.
Run it yourself to find what NumberOfCopies holds on a new PrintSettings.
It also tries 0, -1 and 1000 and records what reads back.

Then the explorer agent answers these from IronPrint.xml and the ironprint skill:

- What the XML says happens when a driver can't make several copies.
- What GetPrinterTrays returns for each installed printer.
- Whether PrintSettings.DefaultSettings is static or belongs to an instance.

Nobody sends a job, and Services/ and Program.cs stay as they are.
Write all the answers to out/copies-probe.csv.
Beside each answer, quote IronPrint.xml, the ironprint skill or the probe output.
Where a page and the probe disagree, say so.
Text

NumberOfCopies는 기본값이 1이며 속성은 0, -1 및 1000을 허용합니다. 복사본 가이드는 0 또는 음수 값이 싱글 카피로 되돌아간다고 명시합니다. 인쇄 호출은 캘리브레이션에서 0 및 -1을 거부하며, 메시지가 양수여야 한다고 읽히는 ArgumentOutOfRangeException가 발생했고, 아무 작업도 생성되지 않았습니다. 따라서 배치는 설정이 생성되기 전에 그러한 주문을 거부합니다. XML 주석은 일부 플랫폼이 값을 무시하고 한 장을 인쇄할 수 있다고 덧붙입니다.

각 페이지는 작업의 DPI로 프린터에 이미지로 전송됩니다. 프로브에서 A4 페이지는 150 DPI에서 1240 x 1753 픽셀이었습니다. Grayscale가 설정되면 인쇄 티켓의 출력 색상은 모노Chrome입니다.

야간 배치 인쇄 작업을 어떻게 계획하나요?

Have the worker agent write Services/PickingPrinter.cs.
It applies Orders/README.md to every row of Orders/manifest.csv and follows these rules:

- A --printer option overrides the name in appsettings.json.
- An --inbox option picks the PDF folder. Orders/inbox/ is the default.
- Check the printer name against Printer.GetPrinterNames before reading any order.
- Match the name exactly, case included.
- An unknown name stops the run with a message that lists the installed printers.
- Build a new PrintSettings for each Ready order.
- NumberOfCopies comes from the copies column, and PaperSize from the paper column.
- Every order gets portrait, grayscale and 150 DPI.
- An empty file, or one without a %PDF header, is Unreadable.

Add a --plan mode that sends nothing and writes out/print-plan.csv with these columns:

- order_id and file
- status, always one of the README's four
- NumberOfCopies, PaperSize, PaperOrientation, Dpi and Grayscale as the job would send them
- printer

Add a --send mode that awaits PrintAsync once per Ready order, in manifest order.
It writes out/send-log.csv with order_id, file and NumberOfCopies, and no plan file.
Don't run --send yet.
Run --plan over Orders/inbox/ and report the status counts from print-plan.csv.
Text

IronPrint는 인쇄 호출이 파일을 읽을 때에만 손상된 파일을 보고합니다. 빈 파일은 IronPDF 문제 해결 페이지로 연결된 메시지를 가진 난독화된 네임스페이스에서 예외 유형과 함께 캘리브레이션에서 실패했으며, .pdf로 명명된 텍스트 파일은 InvalidDataException로 실패했습니다. 계획에서 PDF 헤더에 대한 검사는 둘 다 작업 목록에서 제외시킵니다.

각 인쇄 작업이 무엇을 가지고 있는지 확인하는 방법은 무엇인가요?

PL-1028.pdf는 여섯 개의 샘플 주문 중 하나로, 각각의 SKU에 대해 빈과 수량이 적힌 두 페이지 A4 피킹 리스트이며, 매니페스트는 세 복사본을 제공합니다.

Now run --send with --inbox Orders/sample/.
Orders whose PDF isn't in that folder count as Missing and aren't sent.
PrintCapture writes each job to out/captured/ and adds a row to out/captured/jobs.csv.

Match send-log.csv to jobs.csv in sending order.
Then write out/sample-send.csv with one row per sent order and these columns:

- order_id and the NumberOfCopies it was sent with
- copies, pages, media and color from its jobs.csv row

Tell me whether each order went out as a single job carrying its copy count.
Text

산출

아래의 PDF는 IronPrint가 PL-1028을 위해 구축한 작업으로 캡처된 XPS 파일에서 페이지별로 변환되었습니다.

IronPrint가 작업을 구축하기 위해 PL-1028를 피킹 리스트하여 프린터 대신 파일에 캡처했습니다. 이 작업은 150 DPI 그레이스케일로 된 두 장의 A4 세로 방향 페이지를 포함하며, 인쇄 티켓에서는 세 장의 복사본을 요청합니다.

프린터 이름이 일치하지 않으면 무슨 일이 발생하나요?

프린터 이름 가이드는 이름이 운영 체제의 이름과 정확히 일치해야 하며, 대소문자를 포함하여 불일치 시 "조용히 실패하거나 오류를 던질 것"이라고 명시합니다. 캘리브레이션 작업은 예외를 발생시키지 않았습니다. 존재하지 않는 대기열인 Warehouse Laser 01에 대한 작업과 소문자로 된 adobe pdf에 대한 작업 모두 테스트 머신이 기본 프린터로 사용하는 Microsoft Print to PDF로 라우팅되었습니다.

IronPrint sends a job with an unknown printer name to the Windows default printer.
Show me that PickingPrinter refuses before that can happen.

Run --plan two times, passing each of these names with --printer:

1. "Warehouse Laser 01", a queue this machine doesn't have.
2. "adobe pdf", the installed name in the wrong case.

Neither run may change out/print-plan.csv.
Write out/printer-check.csv with the columns run, printer, exit code, message and plan rows written.
Tell me which printers the message listed.
Text

잘못 출력된 시트를 진단하는 방법은 무엇인가요?

-i 플래그(--image)는 세션의 첫 번째 프롬프트 또는 이를 재개하는 프롬프트에 이미지를 첨부하며, 대화형 작곡가는 붙여넣은 이미지를 수락합니다.

I attached a scan of a picking list with -i.
The packer found it alone, without the copies that should have come with it.
Read the order number from the image.
Look that order up in out/print-plan.csv and Orders/manifest.csv.
Tell me the copy count and paper size that the plan sends.
Also say whether the page in the image fits that paper.
Don't change any code.
Text

오류가 있는 배치 출력을 끝에서 끝까지 디버그하는 방법은 무엇인가요?

Find out why last night's run printed the wrong number of picking lists.
Logs/nightly-2026-10-14/print.log reports these five orders as sent.
Orders/warehouse-complaint.csv lists what the warehouse counted by hand for them.

Have the explorer agent read Jobs/NightlyPrint.cs and that log before you write anything.
Your findings go in out/nightly-diagnosis.md, covering:

- the cause behind each count in the complaint file
- the smallest fix
- a --plan command that proves the fix without sending a job

Don't run or edit any code.
Then tell me what you found.
Text

편집을 허락하기 전에 진단 결과를 읽으세요. 확실한 진단은 로그가 성공을 기록하는 이유도 설명합니다, 왜냐하면 로그는 각 호출을 기록하고 인쇄된 시트를 기록하지 않기 때문입니다.

1회성 코드를 재사용 가능한, 테스트된 구성요소로 어떻게 변환하나요?

Put the worker agent on a PrintQueueService class, built like this:

- Install Microsoft.Extensions.DependencyInjection and resolve the service from its container.
- Configure it with a PrintOptions record holding printer, DPI, grayscale and plan-only.
- Keep the README rules and the printer check from PickingPrinter.
- PrintQueueService.cs stays under 150 lines, with XML doc comments.
- Nothing calls Jobs/NightlyPrint.cs.

Run it plan-only over Orders/inbox/ into out/final-plan.csv.
Then compare every status and copy count with manifest.csv and list any difference.
Text

리팩터링으로 프린터 확인이 누락될 수 있으며 여전히 컴파일될 수 있습니다.

Add an xUnit project at tests/PickingBatch.Tests.
Keep it out of the main project's compile items, and put both projects in one solution.

Write tests on the real Orders/ files that check these:

- a 3-copy order gets NumberOfCopies 3 in a single PrintSettings
- a Letter order gets PaperSize.Letter, and an A4 order gets PaperSize.A4
- an order with copies 0 is Rejected and gets no settings
- the empty file and the text file are both Unreadable
- an unknown printer name is refused with a message naming the installed printers

Assert on settings objects and statuses.
Run the tests with dotnet test and a trx logger writing to out/tests/.
Report how many passed and how many failed, reading the trx file.
Text

설정 객체에 대한 어설션은 작업을 보내지 않도록 유지하지만, 정확한 이름 확인은 여전히 구성된 프린터가 설치되어야 합니다.

$ironprint Look in the installed IronPrint.xml.
List every Printer member that sends a job or opens a dialog, then tell me:

- Which ones take a byte array instead of a path?
- Which ones show the operating system's print dialog?
- Which ones are asynchronous?

Back each member with one compiling line in a probe project under scratch/.
Build that probe with dotnet build only, and never run it.
It's the one place a ShowPrintDialog call may appear.
Then show me the line in PrintQueueService that stops plan-only mode from sending a job.
Text

이러한 프롬프트를 다른 인쇄 배치에서 재사용하는 방법은 무엇인가요?

새로운 파일 이름, 프린터 이름 및 복사 규칙으로 동일한 프롬프트가 배송 라벨이나 송장을 처리합니다. IronPrint AI 코딩 어시스턴트 가이드는 모든 어시스턴트가 공유하는 설정을 다룹니다.

실제 실행에서 프롬프트가 무엇을 생성했습니까?

코덱스는 위의 프롬프트를 순서대로 하나의 세션에서 받았습니다. .NET 9 프로젝트는 40개의 주문, 그들의 피킹 리스트와 각 주문의 예상 상태 및 복사 수가 있는 매니페스트를 포함했습니다. 각 출력 파일을 다시 확인하는 개별 스크립트.

  • 배치 전에 매니페스트는 35개의 준비된 주문, 0개의 복사본이 있는 2개의 주문, 누락된 파일 1개 및 읽을 수 없는 파일 2개를 나열했습니다.
  • 계획은 40개의 모든 주문에 대해 매니페스트와 일치했습니다.
  • 계획된 모든 준비된 주문은 매니페스트 복사본 수와 용지 크기를 가지고 있으며, 150 DPI 그레이스케일의 세로 방향으로 되어 있습니다.
  • 여섯 개의 샘플 주문을 보내는 것은 각각의 캡처된 작업을 생성했습니다.
  • 여섯 개의 인쇄 티켓의 복사본 수는 1, 2, 2, 1, 3, 3으로 매니페스트와 일치합니다.
  • 여섯 개의 작업은 11페이지를 포함했으며, 복사본 수가 20장의 시트로 늘어났습니다.
  • Letter 주문은 215.9 x 279.4 mm 페이지로 캡처되었고, A4 주문은 210 x 297 mm 페이지로 캡처되었습니다.
  • 여섯 개의 캡처된 작업의 모든 페이지는 색이 없는 150 DPI 이미지로 빨간색 우선 밴드는 회색이었습니다.
  • 키가 없는 상태에서 프로그램은 네 개의 프린터를 나열하고 설정을 구축했으며, 인쇄 호출은 Production License Required로 실패했습니다.
  • 두 개의 잘못된 프린터 이름은 아무 행도 쓰여지기 전에 계획을 중지했고, 메시지는 네 개의 설치된 프린터를 나열했습니다.
  • 스캔에서 코덱스는 주문 PL-1024를 식별하고 계획에서 세 가지 복사본을 A4로 보고했습니다.
  • 야간 진단은 9, 4, 18장의 시트를 복사본 수가 이미 설정된 상태에서 복사본당 한 번 Print를 호출하는 루프까지 추적했습니다.
  • 0을 1로 올린 클램프에 영 복사본 주문의 시트를 추적했습니다.
  • 리팩터링된 PrintQueueService는 51개의 라인이었고, 그 계획은 모든 상태와 복사 수에서 매니페스트와 일치했습니다.
  • 7개의 모든 테스트는 Codex의 세션과 새로운 클론에서 모두 통과했습니다.
  • 코덱스는 작업을 보내거나 대화상자를 열어주는 여덟 개의 프린터 멤버를 나열하고, 이를 실행하지 않았습니다.
  • 일부 단계는 페이지와 달리 작동했습니다. 퀵스타트는 세 번의 시도 끝에 성공하지 못하고 CSV를 작성하지 않았습니다. 한 번의 라이센스 확인 시도는 키가 여전히 설정된 상태에서 실행되었고, 캡처 클래스는 그 인쇄 호출을 가로챘습니다. 탐색기는 각 프린터를 쿼리하는 대신 XML에서 트레이 질문에 답했습니다. 코덱스는 계획 전용 체크가 Program.cs에 있으며 PrintQueueService에 있지 않다고 보고했습니다.

Google Antigravity 가이드는 동일한 비동기식 인쇄 호출을 기다리는 ASP.NET Core 페이지를 구축합니다. Claude Code 가이드에서는 각 문서 유형이 자체 프린터에 가고 서브 에이전트가 프린터 이름 검사를 검토합니다. 이 실행의 코덱스 버전, 모델, 테스트 머신 및 타이밍에 대한 내용은 공유된 실행 기록을 참조하십시오.


문제 해결


질문?

질문이 있으시면 support@ironsoftware.com으로 문의하세요.

커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.

더 읽기

시작할 준비 되셨나요?

NuGet 다운로드 수 52,106버전:2026.11방금 출시