Trying to print to Brother RJ-4230B printer using CPCL Line Mode via the Brother Print SDK.
Printer gets stuck on "Receiving" when I send these bytes using driver.sendRawData(bytes):
! 0 200 200 2596 1
PW 575
TONE 0
SPEED 3
ON-FEED IGNORE
NO-PACE
BAR-SENSE
PCX 190 12
����
FORM
PRINT
���� represents the 4 bytes of the test PCX image. There are other images I need to send in a similar fashion.
This approach seems to align with the manual and with the examples I have found online, but it isn't working. Here is the manual page for the PCX command:
The command string is:
! 0 200 200 2596 1\r\nPW 575\r\nTONE 0\r\nSPEED 3\r\nON-FEED IGNORE\r\nNO-PACE\r\nBAR-SENSE\r\nPCX 190 12 \r\n{pcx image data bytes}\r\nFORM\r\nPRINT\r\n before it is converted to bytes.
I have also tried without FORM:
! 0 200 200 2596 1\r\nPW 575\r\nTONE 0\r\nSPEED 3\r\nON-FEED IGNORE\r\nNO-PACE\r\nBAR-SENSE\r\nPCX 190 12 \r\n{pcx image data bytes}\r\nPRINT\r\n"
and without \r\n on the PCX command line:
! 0 200 200 2596 1\r\nPW 575\r\nTONE 0\r\nSPEED 3\r\nON-FEED IGNORE\r\nNO-PACE\r\nBAR-SENSE\r\nPCX 190 12 {pcx image data bytes}\r\nPRINT\r\n"
Also, various combinations using STARTPCX.LBL and/or ENDPCX.LBL:
! 0 200 200 2596 1\r\nPW 575\r\nTONE 0\r\nSPEED 3\r\nON-FEED IGNORE\r\nNO-PACE\r\nBAR-SENSE\r\nPCX 190 12 \r\n{pcx image data bytes}\r\nENDPCX.LBL\r\nPRINT\r\n
! 0 200 200 2596 1\r\nPW 575\r\nTONE 0\r\nSPEED 3\r\nON-FEED IGNORE\r\nNO-PACE\r\nBAR-SENSE\r\nPCX 190 12 \r\n{pcx image data bytes}ENDPCX.LBL\r\nPRINT\r\n
STARTPCX.LBL\r\n! 0 200 200 2596 1\r\nPW 575\r\nTONE 0\r\nSPEED 3\r\nON-FEED IGNORE\r\nNO-PACE\r\nBAR-SENSE\r\nPCX 190 12 \r\n!{pcx image data bytes}\r\nENDPCX.LBL\r\nPRINT\r\n
STARTPCX.LBL\r\n! 0 200 200 2596 1\r\nPW 575\r\nTONE 0\r\nSPEED 3\r\nON-FEED IGNORE\r\nNO-PACE\r\nBAR-SENSE\r\nPCX 190 12 \r\n{pcx image data bytes}ENDPCX.LBL\r\nPRINT\r\n
! 0 200 200 2596 1\r\nPW 575\r\nTONE 0\r\nSPEED 3\r\nON-FEED IGNORE\r\nNO-PACE\r\nBAR-SENSE\r\nSTARTPCX.LBL\r\nPCX 190 12 \r\n{pcx image data bytes}ENDPCX.LBL\r\nPRINT\r\n
How can I get the printer to recognize the end of the inline data send?

See COMMAND LINE CONVERSION OF PCX FILES FOR ZPL PRINTERS.
A PCX upload in ZPL would eg. be
~DYR:ARROW,B,X,268,,(to have something to test).Also the Camero Printer Command Language (CPCL) reference seems relevant. Make sure that
bytesis indeed monochrome. In the example, the size268basically tells it when the upload is complete, in advance - alike a HTTP server may report the content-lenght before a download.When the passed content-lenght is larger than it actually is, it may keep waiting for more at EOF.
Alternatively, for direct printing of PCX file (while supported), the command would eg. be:
Probably confused Brother with Zebra, but CPCL (see the reference manual) is all the same.
Line ending
\r\nis DOS; the alternative would be\n(not sure which one applies for CPCL).Disclaimer: I only know the QL series, not the RJ series - and have no test hardware.