If you're interested in using/testing please find attached a patch which adds the source file pdftotiff.cc and modifies the build files as necessary. The prerequisites are the file "tiffio.h" and "tiff.h" as well as "libtiff.so"/"libtiff.a"; the build system tries to locate this development package in the same way as for libpng. I used the version provided by "libtiff5-dev" under Debian Stable which is "5.5.0" or #define TIFFLIB_VERSION 20191103, other source or binary versions may work too.
All of the output formats of pdftoppm are supported, however to get separated (cmyk) the flag SPLASH_CMYK needs to be enabled when building the library and the utility (as for pdftoppm). The make target is called "pdftotiff" and is build by "all" if libtiff is found by the build system.
There is no manpage at present although if there were sufficient interest I could look into writing one. Also, alpha channels are not (yet) supported; I'm not very experienced with libtiff and I'm guessing that the alpha channel would have to be interleaved with the image data after the call to displayPage() and before the call to TIFFWriteEncodedStrip().
Quickstart:
Code: Select all
mkdir xpdftiff && cd xpdftiff
tar zxf ../path/to/xpdf-4.02.tar.gz
cp -r xpdf-4.02 xpdf-4.02.orig
ln -s xpdf-4.02 a
ln -s xpdf-4.02.orig b
unzip ../path/to/pdftotiff-4.02-patch.zip
patch -p0 < pdftotiff-xpdf-4.02.patch
cd xpdf-4.02 && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DSPLASH_CMYK=ON ..
make pdftotiff