Run silently

Hi,

Even if I put "-q" or "-dQUIET" into the args list, here is what I have :

GPL Ghostscript 9.26 (2018-11-20) Copyright (C) 2018 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 1. Page 1

My args list :

args = [
    "-q", "-dNOPAUSE",
    "-r" + str(self.resolution), "-sCompression=lzw", "-dDownScaleFactor=1",
    "-dDownScaleFactor=1", "-sDEVICE=tiff24nc",
    "-dFirstPage=1", "-dLastPage=1"
]

if crop is False:
    args.append("-sOutputFile=" + self.jpgName_tiff)
else:
    if zoneToCrop == 'header':
        args.append(" -sOutputFile=" + self.jpgName_tiff_header)
    elif zoneToCrop == 'foooter':
        args.append(" -sOutputFile=" + self.jpgName_tiff_footer)

args.append(" -f" + pdfName)

encoding = locale.getpreferredencoding()
args = [a.encode(encoding) for a in args]

ghostscript.Ghostscript(*args)

If I run the ghostscript command onto a terminal, I didn't have any text, the QUIET works

thanks in advance

Edited Mar 06, 2021 by Hartmut Goebel
Assignee Loading
Time tracking Loading