Attempting to print from the RPi over serial RS232 interface using the GW command, I was getting image corruption. Some of the image would appear to wrap, or the image would just not print unless some extra line feeds were added to the end of the command. This was even though the number of bytes sent was correct.
After blaming my code for dithering the image for three hours, I finally found the issue. I had checked through each printer software switch and setting, wasting much time tinkering with form size, thinking it was the cause of picture wrapping. I finally looked at Windows Mode (notice how W is towards back of the book). This was set to Y (YES), looking at the description in the EPL programming guide, it said it all…
The Windows mode escape sequences are only used by the optional Windows printer driver. When working with a main frame or other non-Windows host, this mode can be disabled to prevent erratic operation.
As I was using RS232 on Windows IoT core – I think this counts as requiring a setting of “NO”.
So sending the EPL command “WN” did the trick. No more odd behaviour sending the binary for the PCX image. I’ve seen on many forums other people struggling and giving up on sending images via GW, hopefully this post may give some another thing to check. Do comment if it helped you!