Çok Sayfa Destekli TIFF'den PDF'ye

IronPDF for Python'un ImageToPdfConverter sınıfı, TIFF dosyalarını PDF belgelerine dönüştürmeyi destekler. Birden fazla çerçeve içeren bir TIFF ile ImagePdfConverter.ImageToPdf kullandığınızda, TIFF'in her çerçevesini ayrı sayfalara yerleştirecektir.

İşte çok çerçeveli bir TIFF görüntüsünü PDF belgesine dönüştürmek için ImageToPdfConverter nasıl kullanabileceğinize dair bir örnek:

Kodun Açıklaması

  1. Modüllerin İçe Aktarılması:

    • 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 Örneği:

    • An instance of ImageToPdfConverter is created to utilize its image_to_pdf method for conversion.
  4. PDF Dönüşümü:

    • 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'nin Kaydedilmesi:
    • The converted PDF is saved using the save method of the PdfDocument class at the specified path.

Dönüştürmeyi gerçekleştirmek için gerçek dosya yollarınızı 'path/to/your/tiff_file.tiff' ve 'path/to/output/pdf_document.pdf' ile değiştirin.

Python ile PDF'yi Görüntüye Dönüştürmeyi Öğrenin

Başlamaya Hazır mısınız?
Sürüm: 2026.4 yeni yayınlandı
Still Scrolling Icon

Hala Kaydiriyor musunuz?

Hızlı bir kanit mi istiyorsunuz?
bir örnek çalıştır HTML'nizin PDF olduğunu izleyin.