IRONSOFTWAREHOME
PDF 바코드 리더 옵션 설정
using IronBarCode;

PdfBarcodeReaderOptions myPdfOptionsExample = new PdfBarcodeReaderOptions()
{
    // The password string to open the PDF if there is one
    Password = "password123",

    // Pages of the PDF you want to scan
    PageNumbers = new[] { 1, 3 },

    // By default, all barcode formats are scanned for
    // Specifying a subset of barcode types to search for would improve performance
    ExpectBarcodeTypes = BarcodeEncoding.AllOneDimensional,

    // The DPI (dots per inch) to render each barcode image for reading
    DPI = 72,

    // The scaling factor to scale the width and height when converting the PDF to image
    // Default is 3.5 for both dimensions
    Scale = 4
};

// Read the pdf with the options applied
var results = BarcodeReader.ReadPdf("barcode.pdf", myPdfOptionsExample);
Imports IronBarCode

Dim myPdfOptionsExample As New PdfBarcodeReaderOptions() With {
    .Password = "password123",
    .PageNumbers = {1, 3},
    .ExpectBarcodeTypes = BarcodeEncoding.AllOneDimensional,
    .DPI = 72,
    .Scale = 4
}

' Read the pdf with the options applied
Dim results = BarcodeReader.ReadPdf("barcode.pdf", myPdfOptionsExample)
NuGet Download
PM > Install-Package BarCode
PDF 바코드 리더 옵션 설정

PDF 바코드 리더 옵션 설정

IronBarcode는 PDF의 맞춤화 및 최적화를 지원하기 위한 여러 가지 옵션이 PdfBarcodeReaderOptions 클래스에 있습니다. 이것은 PDF 비밀번호를 처리하고, 스캔할 페이지를 선택하며, PDF를 구문 분석할 Dpi, 및 판독 품질을 향상시키기 위해 필요한 추가 확대를 처리합니다.

핵심 사항

  1. PdfBarcodeReaderOptions 생성하기:
    • PDF 처리를 위한 다양한 옵션을 설정하기 위해 PdfBarcodeReaderOptions 인스턴스를 생성합니다:
      • Dpi: PDF 구문 분석을 위한 해상도를 설정합니다. 더 높은 Dpi 값은 바코드 감지 정확도를 향상시킬 수 있습니다.
      • PageNumbers: 스캔할 PDF 페이지를 지정합니다. 이는 특정 페이지를 대상으로 맞춤 설정할 수 있습니다.
      • Password: PDF가 비밀번호로 보호된 경우, 이 옵션을 사용하여 올바른 비밀번호를 제공할 수 있습니다.
      • ScaleToXScaleToY: 이러한 옵션은 바코드 감지 정확도를 향상시키기 위해 PDF 이미지의 크기를 조정할 수 있게 합니다.
  2. 바코드 읽기:
    • ReadPdfBarcodes 메서드를 사용하여 PDF 파일에서 바코드를 읽고 디코딩합니다. 이는 지정된 옵션을 활용합니다.
  3. 결과 반복 및 표시:
    • foreach 루프는 바코드 결과를 반복하여 각 바코드의 TypeValue를 콘솔에 표시합니다.
    • 이는 지정된 페이지에서 탐지된 모든 바코드가 검증 또는 추가 처리에 출력되도록 보장합니다.
C#으로 PDF에서 바코드를 읽는 방법을 배우세요
GitHub에서 보기

시작할 준비 되셨나요?

Nuget Downloads 2,422,100버전:2026.9방금 출시

Key in blue circle

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

Your trial license will be sent to your email address

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

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

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

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