Why does printer changes resolution? User, background, what?

enosax

New Member
I am runing a .bat file from a php using exec on a Windwos php server, where php is run using fast-cgi (and nginx). The command line to run this script is \[code\] pclose(popen("start / ". $cmd, "r")); \[/code\]Where $cmd is somethign like "mybatfile.bat 45 1"When I run the batch file manually it runs a python program to read a database, get hold of some data, and print a little report. And it all works 100% correctly. When it is run from the web page, the report comes out, so I know the program is run. The code logs the parameters passed. I know that the call is correct.When run from the server/web page the report appears on the same printer approx 20% larger that when run from the coammnd line. The python script uses PyQt and opens the printer in native mode. The code is \[code\] self.printer = QPrinter() self.printer.setPrinterName(printer) self.printer.setPageSize(QPrinter.A5) self.printer.setOrientation(QPrinter.Portrait) self.painter = QPainter(self.printer)\[/code\]Does anyone know why this happens - and what can I do to correct it? O/S is windows 7 (64 bit) for developement and a Server version for production. Python 2.7 32 bit. QT version 4. ThanksIan
 
Back
Top