From: Darren D. <dd...@co...> - 2005-08-03 17:42:52
|
On Wednesday 03 August 2005 11:57 am, kristen kaasbjerg wrote: > The problem only occurs when you save the file in ps > or eps format. If instead png is used the error > doesn't appear, at least not at my machine! I think I understand this. The problem is that the ghostscript command is different on linux and windows. On Linux it is "gs", and on windows its something like gs32win. Would you try editing your backend_ps.py file to read the following, (but make sure gs32win is really the name of the executable), note there are subtle changes throughout the block: command = 'latex -interaction=nonstopmode "%s"' % texfile stdin, stdout, stderr = os.popen3(command) verbose.report(stdout.read(), 'debug-annoying') verbose.report(stderr.read(), 'helpful') command = 'dvips -R -T %fin,%fin -o "%s" "%s"' % (pw, ph, psfile, dvifile) stdin, stdout, stderr = os.popen3(command) verbose.report(stdout.read(), 'debug-annoying') verbose.report(stderr.read(), 'helpful') os.remove(epsfile) if ext.startswith('.ep'): dpi = rcParams['ps.distiller.res'] command = 'gs32win -dBATCH -dNOPAUSE -dSAFER -r%d \ -sDEVICE=epswrite -dLanguageLevel=2 -dEPSFitPage \ -sOutputFile="%s" "%s"'% (dpi, epsfile, psfile) stdin, stdout, stderr = os.popen3(command) verbose.report(stdout.read(), 'debug-annoying') verbose.report(stderr.read(), 'helpful') shutil.move(epsfile, outfile) else: shutil.move(psfile, outfile) At some point I'll come up with a way to automatically call the right command for ghostscript, but I am really busy at the moment... -- Darren |