views:

8042

answers:

10

I have around 1000 pdf filesand I need to convert them to 300 dpi tiff files. What is the best way to do this? If there is an SDK or something or a tool that can be scripted that would be ideal.

+1  A: 

How about pdf2tiff? http://python.net/~gherman/pdf2tiff.html

JBB
this does not handle multipage tiffs yet, so unfortunately this is no go for me. Thanks for the suggestion though.
gyurisc
+7  A: 

Use Imagemagick, or better yet, Ghostscript. http://www.ibm.com/developerworks/library/l-graf2/#N10284 has an example for imagemagick, http://www.asmail.be/msg0055376363.html has an example for ghostscript. I would install ghostscript and read the man page for gs to see what exact options are needed and experiment.

Good luck

Aeon
ghostscript works really good, as far as i understand imagemagick is reusing ghostscript for pdf operations. Is this correct?
gyurisc
that's what I hear, but I'm not an expert on ImageMagick internals ;)
Aeon
@AskAboutGadgets.com: Correct.
akaihola
+1  A: 

http://python.net/~gherman/projects/pdf2tiff/

You could also use pdf2ps, ps2image and then convert from the resulting image to tiff with other utilities (I remember 'paul' [paul - Yet another image viewer (displays PNG, TIFF, GIF, JPG, etc.])

Iulian Şerbănoiu
+2  A: 

ABCPDF can do so as well -- check out http://www.websupergoo.com/helppdf6net/default.html

Danimal
+1  A: 

Disclaimer: work for product I am recommending

Atalasoft has a .NET library that can convert PDF to TIFF -- we are a partner of FOXIT, so the PDF rendering is very good.

Lou Franco
+8  A: 

Using GhostScript from the command line, I've used the following in the past:

on Windows:

gswin32c -dNOPAUSE -q -g300x300 -sDEVICE=tiffg4 -dBATCH -sOutputFile=output_file_name.tif input_file_name.pdf

on *nix:

gs -dNOPAUSE -q -g300x300 -sDEVICE=tiffg4 -dBATCH -sOutputFile=output_file_name.tif input_file_name.pdf

For a large number of files, a simple batch/shell script could be used to convert an arbitrary number of files...

tomasso
+4  A: 

I wrote a little powershell script to go through a directory structure and convert all pdf files to tiff files using ghostscript. Here is my script:

$tool = 'C:\Program Files\gs\gs8.63\bin\gswin32c.exe'
$pdfs = get-childitem . -recurse | where {$_.Extension -match "pdf"}

foreach($pdf in $pdfs)
{

    $tiff = $pdf.FullName.split('.')[0] + '.tiff'
    if(test-path $tiff)
    {
        "tiff file already exists " + $tiff
    }
    else        
    {   
        'Processing ' + $pdf.Name        
        $param = "-sOutputFile=$tiff"
        & $tool -q -dNOPAUSE -sDEVICE=tiffg4 $param -r300 $pdf.FullName -c quit
    }
}
gyurisc
Thanks!! this really helped me out!
michelle
+3  A: 

using python this is what I ended up with

    import os
    os.popen(' '.join([
                       self._ghostscriptPath + 'gswin32c.exe', 
                       '-q',
                       '-dNOPAUSE',
                       '-dBATCH',
                       '-r300',
                       '-sDEVICE=tiff12nc',
                       '-sPAPERSIZE=a4',
                       '-sOutputFile=%s %s' % (tifDest, pdfSource),
                       ]))
Setori
A: 

I like PDFTIFF.com to convert PDF to TIFF, it can handle unlimited pages

John
+1  A: 

1) Install GhostScript

2) Install ImageMagick

3) Create "Convert-to-TIFF.bat" (Windows XP, Vista, 7) and use the following line:

for %%f in (%*) DO "C:\Program Files\ImageMagick-6.6.4-Q16\convert.exe" -density 300 -compress lzw %%f %%f.tiff

Dragging any number of single-page PDF files onto this file will convert them to compressed TIFFs, at 300 DPI.

Tyler