Hello,

I've recently start to work with Python.

I'm developing a managment software for a swimming pool, this software needs to 
print stuff directly from the website.

I'm using Ajax request and shell exec to call a Python script which launch the 
print job.

The script to print an image works fine with a standard printer but, I've to 
print on a card printer (FARGO-DTC1250e).

When I launch a print job from the website, the python script launch the job on 
the printer, that's ok.

The probleme is that I have a substantial quality deterioration .. The image 
printed on the card looks bad.

I first thought it was because of the DPI which was incorrectly configurated 
but I've type :

printer_dpi = hDC.GetDeviceCaps (LOGPIXELSX), hDC.GetDeviceCaps (LOGPIXELSY)

And I get (300, 300) which is correct.

I'm sure the problem is about the Python script, I've tried to start the print 
job directly from Windows, the image quality is perfect.

I don't know anymore where to search, eventually when the script draw the image 
? In this part of the code ?


dib = ImageWin.Dib (bmp)

scaled_width, scaled_height = [int (scale * i) for i in bmp.size]

x1 = int ((printer_size[0] - scaled_width) / 2)

y1 = int ((printer_size[1] - scaled_height) / 2)

x2 = x1 + scaled_width

y2 = y1 + scaled_height

dib.draw (hDC.GetHandleOutput (), (x1, y1, x2, y2))




I hope you'll have the time to help me.

Best wishes :)


Yann Schoeni
Municipalité de Moutier
Apprenti informaticien
Tél. +41 (0)32 494 11 69
Mob. +41 (0)79 827 30 86
E-mail yann.scho...@moutier.ch<mailto:yann.scho...@moutier.ch>

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to