I maintain a PowerBuilder Classic 12.5 application which has functionality to print checks on a Source Technologies MICR printer. The application has been running fine in a Windows XP environment. We are trying to move to a Windows-7 operating system and the check printing no longer works.
Here is the issue. PowerBuilder issues a PrintOpen
followed by several Print
commands to send command strings to the printer to unlock MICR mode and various secure fonts:
il_job = PrintOpen( )
Print(il_job,'&%STF[password]$')
Print(il_job,'&%SMCPFFFF$')
Print(il_job,'&%STP10003$')
Print(il_job,'&%STP10002$')
Print(il_job,'&%STP10001$')
Print(il_job,'&%1B$&u600D')
Print(il_job,'&%1B$*t600R')
This works fine on XP, and if you redirect the printer to "print to file", you can see the command strings right there in the file.
In Windows-7, the printer does not recognize the command strings, and in fact, just prints the commands on the check stock. If you do the same "print to file", you can see the commands in there, but each character in the command string is separated by other characters.
The following is a sample taken from the "print to" file, and you can see the string '&%SMCPFFFF$'
by looking at each character that precedes an asterisk (*).
*p171Y&*p50X%*p100XS*p150XM*p200XC*p250XP*p300XF*p350XF*p400XF*p450XF*p500X$
This would seem to be a print driver issue, and in fact, Source Technologies now provides a "Universal Print Driver" which we have been told to use. Our PC support person was able to get the check printing working temporarily by re-installing the old print driver that we used on Windows XP, but as soon as the printer is turned off and on again, it resets to the new universal driver.
I tried using PrintDefineFont
and PrintSetFont
, to set the font to Courier Regular 8pt (which is what the Tech Support guy at Source Technologies told us we needed), but that didn't help:
PrintDefineFont(il_job, 1, "Courier", -8, 400, Fixed!, AnyFont!, FALSE, FALSE)
PrintSetFont(il_job, 1)
Can anyone help me with this issue? Or suggest where I might get help.
Thanks.