Search code examples
phpmysqlpdfmergetiff

How to merge multiple single-page TIFFs into a PDF with PHP?


I have a massive number of TIFF images which are single scanned pages. They are each a page of multi-page documents.

I need to be able to deliver this multi-page document to my users as a PDF. Nothing special is required except combining the images into one document, in the right order.

The images locations are provided via the result of a MySQL query in PHP as an array, i.e:

c:\images\04\DUDDSDFF.tif,c:\images\04\EDFRTOFN.tif,c:\images\04\EFSDOSDG.tif

The current dev environment I am working in uses XAMPP running on Win Server 2K3.

Any suggestions/solutions would be most appreciated.

Cheers


Solution

  • I have done done something similar before where I used the Imagick() class to convert form TIFF to PNG and then used TCPDF to generate the PDF.