No tif image is being generated anyone see the error? I am not receiving any errors. I am now seeing the message that ghosscript is running, still not getting an output tif though. from output I am now getting ‘GPL Ghostscript 9.02 (2011-03-30)\nCopyright (C) 2010 Artifex Software, Inc. All rights reserved.\nThis software comes with NO WARRANTY: see the file PUBLIC for details.\n’ getting closer
Edited made changes as suggested by comments**
from subprocess import Popen, PIPE,STDOUT
output = Popen([
r'C:\Program Files (x86)\gs\gs9.02\bin\gswin32c.exe',
'-dNOPAUSE',
'-dBATCH',
'-sDEVICE=tiffg4',
'-dDEBUG',
'-r196X204',
'-sPAPERSIZE=a4',
'-sOutputFile=%s' % (r'C:\Python25\pdfmining\page.tif'),
'%s' %(r'C:\Python25\pdfmining\nca.pdf'),
],stdout=PIPE,stderr = STDOUT).communicate()[0]
I don’t see an input file for your command. Add the full path to an input file (PDF, PostScript, Encapsulated PostScript or AI) as the last argument, and your TIFFs should be generated…
Also, remove the
-q. It tells Ghostscript to remain ‘quiet’.Lastly, you could add a
-dDEBUGto your commandline. It tells Ghostscript to output lots of debugging information.