Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Operation not supported" and "Printer selected is not valid" errors while printing

Hopefully somebody will be able to help. In my Delphi 7 application small percentage of users report errors when printing and I'm trying to resolve this with last of them. I'm slightly limited when it comes to testing (as user is physically distant and we are working it out via e-mail), but I get some additional information from EurekaLog.

Anyway, first error that he got is "Operation not supported on selected printer", at this line of code:

Printer.Orientation := AOrientation;

So, I assumed that his printer doesn't support Orientation (I never heard of this, but I guess it's possible) and tried without this line of code. But now he gets "Printer selected is not valid" at this line:

Result := Printer.PageWidth / GetDeviceCaps(Printer.Handle, LOGPIXELSX);

As far as I know, printer is correctly selected (it's Canon Pixma iP1500, but other users have other models, inkjet or laser), and he already tried to update drivers. OS also varies - from XP to Vista SP1).

I suggested to him to try with another printer, but whatever he responds, I don't know where to look next. Google search didn't give any useful results (for me, at least). Does anyone have an idea?

Thanks in advance!

like image 915
vrad Avatar asked Jan 12 '09 11:01

vrad


1 Answers

Not a direct solution, but it may help solve the problem. First thing I do with this sort of problem is get the exact driver version from the customer, and then download the driver and install it on my PC, using LPT1. I can then print against it for testing, and resolve any issues with the driver. Obviously I can't actually print, but that isn't usually a problem. Using a virtual machine helps a lot too.

like image 194
mj2008 Avatar answered Sep 23 '22 18:09

mj2008