IRONSOFTWAREHOME
PDF에 QR 코드 찍기
using IronQr;
using IronPdf;
using IronSoftware.Drawing;

// Generate QR code and save as bitmap
AnyBitmap qrBitmap = QrWriter.Write("hello world").Save();

// Load an existing PDF document
PdfDocument pdf = PdfDocument.FromFile("sample.pdf");

// Stamp the QR code onto the first page at position x=505, y=20 (top-right corner)
pdf.DrawBitmap(qrBitmap, pageIndex: 0, x: 505, y: 20, desiredWidth: 70, desiredHeight: 70, pixelFormat: PixelFormat.Format32bppArgb, ignorePageRotation: false);

// Save the modified PDF
pdf.SaveAs("output.pdf");
Imports IronQr
Imports IronPdf
Imports IronSoftware.Drawing

' Generate QR code and save as bitmap
Dim qrBitmap As AnyBitmap = QrWriter.Write("hello world").Save()

' Load an existing PDF document
Dim pdf As PdfDocument = PdfDocument.FromFile("sample.pdf")

' Stamp the QR code onto the first page at position x=505, y=20 (top-right corner)
pdf.DrawBitmap(qrBitmap, pageIndex:=0, x:=505, y:=20, desiredWidth:=70, desiredHeight:=70, pixelFormat:=PixelFormat.Format32bppArgb, ignorePageRotation:=False)

' Save the modified PDF
pdf.SaveAs("output.pdf")
NuGet Download
PM > Install-Package IronQR
PDF에 QR 코드 찍기

PDF에 QR 코드 찍기

기존 PDF 페이지에 QR 코드를 직접 찍어 인쇄된 정보를 문서 재구성 없이 임베드합니다. IronQR은 세 단계로 이를 처리합니다: QrWriter.Write().Save()으로 QR 비트맵을 생성하고, PdfDocument.FromFile으로 PDF를 로드한 다음 DrawBitmap와 함께 PDF 포인트로 x 및 y 좌표와 명시적인 width와 height을 호출하여 스탬프 크기를 정확히 제어합니다.

PDF에 QR 코드 찍기를 위한 3단계 가이드

  • AnyBitmap qrBitmap = QrWriter.Write("hello world").Save();
  • PdfDocument pdf = PdfDocument.FromFile("sample.pdf");
  • pdf.DrawBitmap(qrBitmap, pageIndex: 0, x: 505, y: 20, desiredWidth: 70, desiredHeight: 70, pixelFormat: PixelFormat.Format32bppArgb, ignorePageRotation: false);

코드 설명

QrWriter.Write는 QR 코드를 생성하고 Save()는 AnyBitmap를 반환합니다. 비트맵은 로드된 PdfDocument에 대해 DrawBitmap으로 전달됩니다. x 및 y 값은 PDF 포인트로, 왼쪽 위 모서리에서 시작됩니다 (A4 페이지는 595 × 842 포인트이며, width 및 height는 스탬프 크기를 정확하게 설정합니다. 여기서 70 × 70 포인트는 오른쪽 상단 모서리에 소형 QR을 배치합니다. desiredWidth 및 desiredHeight을 호출한 다음 결과를 기록하려면 pdf.SaveAs()을 호출하십시오.

일반적인 사용 사례는 청구서에 결제 링크를 삽입하거나, 법적 문서에 검증 코드를 추가하거나, 이벤트 티켓에 추적 ID를 배치하는 것 포함합니다. 크기와 데이터 간의 트레이드오프를 위해, 다른 오류 수정 레벨을 통해 QrOptions 객체를 구성하고 QrWriter.Write에 전달하십시오.

IronQR을 사용하여 PDF 페이지에 QR 코드 찍는 방법을 탐색하세요.

시작할 준비 되셨나요?

Nuget Downloads 75,530버전:2026.9방금 출시

Key in blue circle

무료 30일 체험 키를 즉시 받으세요.

Your trial license will be sent to your email address

제한 없음. 100% 무제한 이용. 신용카드 불필요.

OR
bullet_checked신용카드나 계정 생성은 필요하지 않습니다.제한 없음. 100% 무제한 이용. 신용카드 불필요.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried Iron Suite
무료 라이브 데모를 예약하세요
Booking Badge

전 세계 수백만 엔지니어들이 신뢰하는 제품입니다.

Iron Software의 고객 로고
부담 없는 무료 상담을 받아보세요
아래 양식을 작성하시거나 sales@ironsoftware.com으로 이메일을 보내주세요.
고객님의 정보는 항상 비밀로 유지됩니다.
전 세계 수백만 엔지니어들이 신뢰하는 제품입니다.
Iron Software의 고객 로고
지금 바로 30일 무료 체험판 키를 받으세요.
신용카드나 계정 생성은 필요하지 않습니다.