TIFF 파일을 다중 페이지 지원 PDF로 변환

Python용 IronPDF의 ImageToPdfConverter 클래스는 TIFF 파일을 PDF 문서로 변환하는 기능을 지원합니다. 여러 프레임을 포함하는 TIFF 파일과 함께 ImagePdfConverter.ImageToPdf를 사용하면 TIFF 파일의 각 프레임이 별도의 페이지에 배치됩니다.

다음은 ImageToPdfConverter를 사용하여 여러 프레임으로 구성된 TIFF 이미지를 PDF 문서로 변환하는 방법의 예입니다.

코드 설명

  1. 모듈 가져오기 :

    • PdfDocument and ImageToPdfConverter are imported from the ironpdf package to handle the PDF conversion.
  2. Function convert_tiff_to_pdf(tiff_path: str, pdf_output_path: str):

    • This function takes a TIFF file (via tiff_path) and converts it into a PDF document, saving it to the specified path (pdf_output_path).
  3. ImageToPdfConverter 인스턴스 :

    • An instance of ImageToPdfConverter is created to utilize its image_to_pdf method for conversion.
  4. PDF 변환 :

    • The method image_to_pdf(tiff_path) converts the multi-frame TIFF by placing each frame on a separate page in the resulting PDF.
  5. PDF 저장하기 :
    • The converted PDF is saved using the save method of the PdfDocument class at the specified path.

'path/to/your/tiff_file.tiff''path/to/output/pdf_document.pdf' 부분을 변환을 수행할 실제 파일 경로로 바꾸십시오.

파이썬을 사용하여 PDF를 이미지로 변환하는 방법을 알아보세요.

시작할 준비 되셨나요?
버전: 2026.2 방금 출시되었습니다