Using PASSTHROUGH to insert a PCL print - TechRepublic
General discussion
October 19, 2000 at 07:55 AM
cknapp

Using PASSTHROUGH to insert a PCL print

by cknapp . Updated 24 years, 4 months ago

I am trying to modify an in-house
application to print so that specific print
jobs (but not all) will start printing in
duplex after a certain number of pages print
in simplex. This is for a PCL printer. I
tried using ::ExtEscape() in PASSTHROUGH,
but keep getting error 183, which is “file
already exists” This error makes no sense
to me. Can anyone help?

Here’s the code I’m using. I started just
trying to send plain text instead of the
duplex command:

int ercode;
ercode=::ExtEscape(pDC->GetSafeHdc(),
PASSTHROUGH,10,”abcdefghij”, 0, NULL);
if (ercode<=0) WriteLog("Error:%ld", GetLastError()); The pDC->GetSafeHdc is used successfully in
a subsequent function call, and the job does
print just fine, though it’s missing the
additional text.

I’ve tried calling this before and after
calls to StartPage(), but it always gets the
error. Is there some restriction about
where the function can be called?

Thanks!
Chris Knapp

This discussion is locked

All Comments