🛠️ToolsShed

이미지 → PDF 변환

여러 이미지를 하나의 PDF 파일로 변환합니다. 브라우저에서 완전히 처리.

자주 묻는 질문

코드 구현

from PIL import Image
import img2pdf

# Single image to PDF using img2pdf (lossless)
with open("output.pdf", "wb") as f:
    f.write(img2pdf.convert("input.jpg"))

# Multiple images to one PDF
images = ["page1.jpg", "page2.jpg", "page3.jpg"]
with open("combined.pdf", "wb") as f:
    f.write(img2pdf.convert(images))

# Using Pillow (with resizing / format conversion)
img = Image.open("input.png").convert("RGB")
img.save("output.pdf", "PDF", resolution=150)

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.