Skip to Content
0
Former Member
Apr 08, 2013 at 04:18 AM

printopen/printsend fails to printdatawindow afterwards

22 Views

A client recently got a new style printer, continuous feed inkjet. I need to re-define page sizes mid-print (print job may have 200+ "pages", each page is one of 10 possible sizes).

Printopen/printsend successfully puts the escape sequences in the print stream, but printdatawindow doesn't print anything. If I skip printsend, then printdatawindow works fine.

Printer is basically brand new to the market (epson colorworks C831). Here's the sample code:

long handle, rtn

handle = printopen("Test Print Job", true)

string s

s = "~h1B(U~h01~255~h05~h1B(C~h02~255~h10~h0E"

// if I comment out this line, and only this line, the datawindow prints normally

rtn = printsend(handle, s, 255)

rtn = printdatawindow(handle, dwc_work_calendar)

printclose(handle)

Handle returns a valid value, printsend and printdatawindow both show success.

Anyone have any ideas on why printsend is killing the printdatawindow function?