This thread asks for how to convert multi-page PDF to multi-page TIFF with Ghostscript;
However, I want to covert a multi page PDF to a number of single-page TIFFs: Each page in the PDF is expected to be converted to a single TIFF file. So the above answer does not exactly match what I need.
How can I achieve this?
I am using Windows XP.
Be sure to have a recent version of Ghostscript installed. Then you can run these commands:
gs \
-o singlepage-tiffg4-%03d.tif \
-sDEVICE=tiffg4 \
multipage-input.pdf
and
gs \
-o singlepage-tiff24nc-%03d.tif \
-sDEVICE=tiff24nc \
multipage-input.pdf
and
gs \
-o singlepage-tiff32nc-%03d.tif \
-sDEVICE=tiff32nc \
multipage-input.pdf
The commands will generate you 3 sets of TIFF files. Each set contains singlepage TIFFs which carry names that contain an index numbers starting with 001
:
ls -lt singlepage-tiff*.tif
-rw-r--r-- 1 kp staff 161975 18 Feb 15:49 singlepage-tiffg4-001.tif
-rw-r--r-- 1 kp staff 169294 18 Feb 15:49 singlepage-tiffg4-002.tif
-rw-r--r-- 1 kp staff 167397 18 Feb 15:49 singlepage-tiffg4-003.tif
-rw-r--r-- 1 kp staff 190052 18 Feb 15:49 singlepage-tiffg4-004.tif
If you have a lot of PDF pages per file, you can increase the number of digits/leading zeros to a higher number: use %05d
to get a 5 digit numbering.
The three different commands generate different types of TIFF:
All the resolution values for the TIFF files result from Ghostscript's default settings. If you want to override these, for example because you require 600dpi by 600dpi, just add
-r600x600
to any of the above command lines.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With