I'm trying to combine many (100s) of large (10MB+) tiff files into one pdf or ps file but every attempt results in failure due to overuse of system resources (I suspect). The command I'm running is (in a perl script):
convert -compress JPEG -adjoin @formatted_files $dir_name/$pdf_file
where "@formatted_files" is a list of all the files to be converted, "$dir_name" is the directory for output (this perl script would ideally batch process many directories), and "$pdf_file" is the pdf file to be written.
This works on directories containg lesser numbers of images with smaller file sizes, but any moderately sized input inevitably results in failure. I've tried using the "limit memory" and "limit map" options with no success. Maybe I'm using those incorrectly. Does anyone have an idea of a workaround for this problem? Thanks for all your help!
System - RedHat 4, 6 Gb mem, 4x Intel Xeon 3.2 GHz processors
Combine many large tiffs to one pdf (or ps) file
Re: Combine many large tiffs to one pdf (or ps) file
Go disk? If so, ImageMagick can process as many images as you have disk space. Assume you have 1TB of free space at /data. This command should work:
- export MAGICK_TMPDIR=/data
convert -limit area 1 -compress JPEG -adjoin @formatted_files $dir_name/$pdf_file
- convert -limit area 1 'image-*.tif[512x512]' image.pdf
Re: Combine many large tiffs to one pdf (or ps) file
Hi Magick, thanks for your response.
That approach doesn't seem to be working. I'm monitoring both memory usage and disk usage during the process and memory is still being completely monopolized while disk is not used at all.
That approach doesn't seem to be working. I'm monitoring both memory usage and disk usage during the process and memory is still being completely monopolized while disk is not used at all.