Discussion Locked

Using PASSTHROUGH to insert a PCL print

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

7 replies

by james_randy

If you are still tackling this problem, perhaps you should consider calling your local super-hero.

by conrad

For whatever deserves to exist deserves also to be known, for knowledge is the image of existence; and things mean and splendid exist alike.

- Francis Bacon

This discussion is closed to new replies.