IRONSOFTWAREHOME
HTML 콘텐츠를 효율적으로 추가하는 방법
from ironpdf import *

# Use HtmlStamper to stamp Html onto pdf
htmlStamper = HtmlStamper("<h1>Html stamp</h1>")
htmlStamper.VerticalOffset = Length(-200, MeasurementUnit.Pixel)
htmlStamper.HorizontalOffset = Length(-200, MeasurementUnit.Pixel)

# Use TextStamper to stamp text with custom font onto pdf
textStamper = TextStamper("Hello World! Stamp One Here!")
textStamper.FontFamily = "Bungee Spice"
textStamper.UseGoogleFont = True
textStamper.FontSize = 30

# Use ImageStamper to stamp images onto pdf
file_path = r'C:\Users\logo.png'
imageStamper = ImageStamper(file_path)
imageStamper.VerticalAlignment = VerticalAlignment.Top
imageStamper.MinWidth = Length(20)
imageStamper.MinHeight = Length(20)

# Use BarcodeStamper to stamp QR code/Barcode onto pdf
barcodeStamper = BarcodeStamper("IronPDF", BarcodeEncoding.Code39)
barcodeStamper.MaxHeight = Length(5)
barcodeStamper.VerticalAlignment = VerticalAlignment.Bottom
barcodeStamper.HorizontalAlignment = HorizontalAlignment.Left

stamps_list = List[Stamper]()
stamps_list.Add(htmlStamper)
stamps_list.Add(textStamper)
stamps_list.Add(imageStamper)
stamps_list.Add(barcodeStamper)

pdf = PdfDocument.FromFile("Unstamped.pdf")
pdf.ApplyMultipleStamps(stamps_list)
pdf.SaveAs("Stamped.pdf")
pip install ironpdf
HTML 콘텐츠를 효율적으로 추가하는 방법

HTML 콘텐츠를 효율적으로 추가하는 방법

IronPDF for Python은 ApplyMultipleStamps을 사용하여 단일 작업에서 PDF 문서에 HTML, 텍스트, 이미지, 바코드 등 다양한 스탬프를 추가할 수 있습니다.

시작하기

각 스탬프 유형에 대한 개별 스탬퍼 객체를 만들고, 이를 List[Stamper] 컬렉션에 추가한 후, 모든 스탬프를 한 번에 적용하기 위해 ApplyMultipleStamps을 PdfDocument에서 호출합니다.

코드 이해하기

  • HtmlStamper(html): PDF에 HTML 조각을 스탬프합니다. VerticalOffset 및 HorizontalOffset을 지원하여 픽셀 기준 Length 값을 사용하여 위치를 세밀하게 조정합니다.
  • TextStamper(text): 사용자 정의 글꼴 설정으로 일반 텍스트를 스탬프합니다. UseGoogleFont = True 및 FontFamily을 설정하여 이름으로 Google Font를 사용할 수 있습니다.
  • ImageStamper(path): PDF에 이미지 파일을 스탬프합니다. MinWidth 및 MinHeight을 사용하여 스탬프의 크기를 제어하세요.
  • BarcodeStamper(value, encoding): 바코드 또는 QR 코드를 생성하고 스탬프합니다. BarcodeEncoding.Code39은 표준 Code 39 바코드를 생성합니다.
  • List[Stamper](): 혼합 유형의 스탬퍼 객체를 관리하는 형식화된 컬렉션.
  • ApplyMultipleStamps(stamps_list): 목록의 모든 스탬프를 문서의 모든 페이지에 한 번에 효율적으로 적용합니다.

정렬 및 위치 조정

각 스탬퍼는 페이지에 정확하게 위치할 수 있도록 VerticalAlignment, HorizontalAlignment, VerticalOffset, 그리고 HorizontalOffset을 지원합니다.

IronPDF for Python으로 PDF에 스탬프를 찍는 방법을 배우세요!

시작할 준비 되셨나요?

버전:2026.10방금 출시

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 for Python
무료 라이브 데모를 예약하세요
Booking Badge

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

Iron Software의 고객 로고
부담 없는 무료 상담을 받아보세요
고객님의 정보는 항상 비밀로 유지됩니다.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
전 세계 수백만 엔지니어들이 신뢰하는 제품입니다.
지금 바로 30일 무료 체험판 키를 받으세요.
신용카드나 계정 생성은 필요하지 않습니다.
PDF용 Python 모듈 다운로드
pip를 사용하여 설치하세요

버전: 2026.10

  1. Python 3.7 이상 버전 을 다운로드 하여 설치하세요.
  2. pip가 설치되어 있지 않다면 pypi.org 에서 설치하세요.
  3. 위 명령어를 터미널에서 실행하세요.
Python PDF 모듈
다운로드 모듈

버전: 2026.10

프로젝트에 수동으로 설치하세요

  1. 패키지를 다운로드하세요
  2. 터미널에서 이 명령어를 실행하세요
     pip install ironpdf-2026.10-py37-none-win_amd64.whi

라이선스 가격은 999달러 부터 시작합니다.