TIFF 파일을 다중 페이지 지원 PDF로 변환
Python용 IronPDF의 ImageToPdfConverter 클래스는 TIFF 파일을 PDF 문서로 변환하는 기능을 지원합니다. 여러 프레임을 포함하는 TIFF 파일과 함께 ImagePdfConverter.ImageToPdf를 사용하면 TIFF 파일의 각 프레임이 별도의 페이지에 배치됩니다.
다음은 ImageToPdfConverter를 사용하여 여러 프레임으로 구성된 TIFF 이미지를 PDF 문서로 변환하는 방법의 예입니다.
코드 설명
모듈 가져오기 :
PdfDocumentandImageToPdfConverterare imported from theironpdfpackage to handle the PDF conversion.
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).
- This function takes a TIFF file (via
ImageToPdfConverter 인스턴스 :
- An instance of
ImageToPdfConverteris created to utilize itsimage_to_pdfmethod for conversion.
- An instance of
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.
- The method
- PDF 저장하기 :
- The converted PDF is saved using the
savemethod of thePdfDocumentclass at the specified path.
- The converted PDF is saved using the
'path/to/your/tiff_file.tiff' 및 'path/to/output/pdf_document.pdf' 부분을 변환을 수행할 실제 파일 경로로 바꾸십시오.






