I'm attempting to be able to print a TIFF file with the Kodak ActiveX Control. (the PrintImage method) I'm successful, save one problem: it uses the default printer, and the default settings.
My superiors would like to have the ability to print in landscape mode. I'd like to have this accomplished without the users changing the default printer settings all of the time. (default for most workmates is portrait)
There's a parameter where you can pass the hDC, but I have been currently unsuccessful, even using Tek-Tips's faq 184-3770. (Courtesy: Mike Gagnon)
I used the same code as said faq, with a small modification:
If PrintDlg (@lcStruct) <> 0
hDc = buf2dword (Substr (lcStruct, 17, 4)) && same as FAQ
* I don't use delete hDC because I want to keep it for the PrintImage method
Else
RETURN .f.
Endif
thisform.viewtiff.printImage(1,1,2,.f.,hDc)
... but the last line gives me an error: invalid printer name.
If you know of a solution to this problem, I'd be highly grateful. Thanks!
My superiors would like to have the ability to print in landscape mode. I'd like to have this accomplished without the users changing the default printer settings all of the time. (default for most workmates is portrait)
There's a parameter where you can pass the hDC, but I have been currently unsuccessful, even using Tek-Tips's faq 184-3770. (Courtesy: Mike Gagnon)
I used the same code as said faq, with a small modification:
If PrintDlg (@lcStruct) <> 0
hDc = buf2dword (Substr (lcStruct, 17, 4)) && same as FAQ
* I don't use delete hDC because I want to keep it for the PrintImage method
Else
RETURN .f.
Endif
thisform.viewtiff.printImage(1,1,2,.f.,hDc)
... but the last line gives me an error: invalid printer name.
If you know of a solution to this problem, I'd be highly grateful. Thanks!