Home > Archive > Clipper > January 2007 > strange printing problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
strange printing problem
|
|
| Andreas Moroder 2007-01-12, 7:55 am |
| Hello,
we have a PC that prints to a network printer via d-link LPR driver.
When I try to print from clipper it prints nothing, but when I first
print from the command line with dir >lpt2: then the clipper print works.
How does a print from clipper differe from a dir >lpt2: ?
Does clipper use other system calls ?
Is there a way to let clipper behave as plain dos ?
Thanks
Andreas
| |
| N:dlzc D:aol T:com \(dlzc\) 2007-01-12, 7:55 am |
| Dear Andreas Moroder:
"Andreas Moroder" <Andreas.moroder@[nospam]sb-brixen.it> wrote in
message news:eo7suc$dkk$1@news.dtag.de...
> Hello,
>
> we have a PC that prints to a network printer via
> d-link LPR driver. When I try to print from clipper
> it prints nothing, but when I first print from the
> command line with dir >lpt2: then the clipper print
> works. How does a print from clipper differe from
> a dir >lpt2: ? Does clipper use other system calls ?
> Is there a way to let clipper behave as plain dos ?
When you print, do you always:
SET PRINTER TO LPT2
SET PRINTER ON
SET CONSOLE OFF
.... print stuff
EJECT
SET PRINTER TO
SET CONSOLE ON
Just wondering...
David A. Smith
| |
| Andreas Moroder 2007-01-15, 6:55 pm |
| Hello David,
>
> When you print, do you always:
> SET PRINTER TO LPT2
> SET PRINTER ON
> SET CONSOLE OFF
> ... print stuff
> EJECT
> SET PRINTER TO
> SET CONSOLE ON
>
> Just wondering...
>
> David A. Smith
>
>
I do:
set printer to &cPrinter
set default to &memvar->m_path
set device to printer
set printer on
set console off
.... print stuff
eject
set printer to
set device to screen
set printer off
set console on
I doen't look very different to me.
We needed the "set default" because of problem with Advantage ( years ago )
Could it be that I should "set device to printer" later, after the
printer on ?
Bye
Andreas
| |
| Andreas Moroder 2007-01-15, 6:55 pm |
| Hello David,
>
> When you print, do you always:
> SET PRINTER TO LPT2
> SET PRINTER ON
> SET CONSOLE OFF
> ... print stuff
> EJECT
> SET PRINTER TO
> SET CONSOLE ON
>
> Just wondering...
>
> David A. Smith
>
>
I do:
set printer to &cPrinter
set default to &memvar->m_path
set device to printer
set printer on
set console off
.... print stuff
eject
set printer to
set device to screen
set printer off
set console on
I doen't look very different to me.
We needed the "set default" because of problem with Advantage ( years ago )
Could it be that I should "set device to printer" later, after the
printer on ?
Bye
Andreas
| |
| Andreas Moroder 2007-01-15, 6:55 pm |
| Hello David,
>
> When you print, do you always:
> SET PRINTER TO LPT2
> SET PRINTER ON
> SET CONSOLE OFF
> ... print stuff
> EJECT
> SET PRINTER TO
> SET CONSOLE ON
>
> Just wondering...
>
> David A. Smith
>
>
I do:
set printer to &cPrinter
set default to &memvar->m_path
set device to printer
set printer on
set console off
.... print stuff
eject
set printer to
set device to screen
set printer off
set console on
I doen't look very different to me.
We needed the "set default" because of problem with Advantage ( years ago )
Could it be that I should "set device to printer" later, after the
printer on ?
Bye
Andreas
| |
| Andreas Moroder 2007-01-15, 6:55 pm |
| Hello David,
>
> When you print, do you always:
> SET PRINTER TO LPT2
> SET PRINTER ON
> SET CONSOLE OFF
> ... print stuff
> EJECT
> SET PRINTER TO
> SET CONSOLE ON
>
> Just wondering...
>
> David A. Smith
>
>
I do:
set printer to &cPrinter
set default to &memvar->m_path
set device to printer
set printer on
set console off
.... print stuff
eject
set printer to
set device to screen
set printer off
set console on
I doen't look very different to me.
We needed the "set default" because of problem with Advantage ( years ago )
Could it be that I should "set device to printer" later, after the
printer on ?
Bye
Andreas
| |
| Andreas Moroder 2007-01-15, 6:55 pm |
| Hello David,
>
> When you print, do you always:
> SET PRINTER TO LPT2
> SET PRINTER ON
> SET CONSOLE OFF
> ... print stuff
> EJECT
> SET PRINTER TO
> SET CONSOLE ON
>
> Just wondering...
>
> David A. Smith
>
>
I do:
set printer to &cPrinter
set default to &memvar->m_path
set device to printer
set printer on
set console off
.... print stuff
eject
set printer to
set device to screen
set printer off
set console on
I doen't look very different to me.
We needed the "set default" because of problem with Advantage ( years ago )
Could it be that I should "set device to printer" later, after the
printer on ?
Bye
Andreas
| |
| N:dlzc D:aol T:com \(dlzc\) 2007-01-15, 6:55 pm |
| Dear Andreas Moroder:
"Andreas Moroder" <Andreas.moroder@[nospam]sb-brixen.it> wrote in
message news:eogb1g$2i6$1@news.dtag.de...
> Hello David,
>
> I do:
> set printer to &cPrinter
> set default to &memvar->m_path
> set device to printer
> set printer on
> set console off
>
> ... print stuff
>
> eject
> set printer to
> set device to screen
> set printer off
> set console on
>
> I doen't look very different to me.
It is good.
> We needed the "set default" because of
> problem with Advantage ( years ago )
> Could it be that I should "set device to printer"
> later, after the printer on ?
No, I would not do that.
I hoped it would be easy.
Now you indicated that if you send something via DOS to the
printer prior to starting your program, it prints.
What OpSys are you running?
Do you get an error message, or does simply nothing print?
You might try some version of the MODE command on the port, so
that the DOS session is simply setting up the port, in a batch
file (or RUN from within your program):
http://www.csulb.edu/~murdock/mode.html
.... and it may not help.
David A. Smith
| |
| Andreas Moroder 2007-01-16, 7:55 am |
| N:dlzc D:aol T:com (dlzc) schrieb:
> It is good.
>
> Now you indicated that if you send something via DOS to the
> printer prior to starting your program, it prints.
>
> What OpSys are you running?
> Do you get an error message, or does simply nothing print?
On this machine we have Windows 98 SE
It does simply nothing.
>
> You might try some version of the MODE command on the port, so
> that the DOS session is simply setting up the port, in a batch
> file (or RUN from within your program):
> http://www.csulb.edu/~murdock/mode.html
> ... and it may not help.
We start a batch that simply prints an empty page., but this is not
really a clean solution ( even with recycled paper ;)
>
> David A. Smith
>
>
Bye
Andreas
| |
| N:dlzc D:aol T:com \(dlzc\) 2007-01-16, 7:55 am |
| Dear Andreas Moroder:
"Andreas Moroder" <Andreas.moroder@[nospam]sb-brixen.it> wrote in
message news:eoib94$i5u$1@news.dtag.de...
> N:dlzc D:aol T:com (dlzc) schrieb:
> On this machine we have Windows 98 SE
> It does simply nothing.
Have you checked Microsoft?
http://support.microsoft.com/kb/258878
.... especially the "Do you print from DOS" checkbox.
You indicated that you had a third party network print server
(d-link LPR). Have you checked with them?
http://www.dlink.com/
.... "LPR" gave no hits.
[color=darkred]
> We start a batch that simply prints an empty page., but
> this is not really a clean solution ( even with recycled
> paper ;)
If D-Link does not have an answer, try the MODE command. This
may or may not work. It is not Clipper that you are having
problems with. It is the printer drivers that is expecting a
certain behavior, which DOS alone can satisfy. The MODE command
may do "enough", and you will not have to print a blank page.
Assuming that either Microshaft or D-Link didn't already provide
a fix.
David A. Smith
| |
| Klas Engwall 2007-01-16, 6:55 pm |
| Andreas,
>We start a batch that simply prints an empty page., but this is not
>really a clean solution ( even with recycled paper ;)
Here is a workaround that might work: Create a small text file that
contains only the reset command for the printer in question and let
the batch file copy that file to the printer. Make sure that you put
*ONLY* the reset command in it, no trailing CRLF. If it is a PCL
printer, for example, the file should contain only (the equivalent of)
chr(27)+'E'
If it helps to send a form feed, I believe that a reset should also
work. And you can recycle the bytes too if you copy the same file each
time <g>.
Keeping my fingers crossed <g>
Klas
-------
klas dot engwall at engwall dot com
http://www.engwall.com/clipper/
The LFN Library for Clipper
The LanMan Library for Clipper
The NFPAT1A Timeslice release patch for the Nanforum Toolkit
| |
| N:dlzc D:aol T:com \(dlzc\) 2007-01-16, 9:55 pm |
| Dear Klas Engwall:
"Klas Engwall" <klas.engwall@nospam.please> wrote in message
news:45ad6fae.79955960@nntpserver.swip.net...
> Andreas,
>
>
> Here is a workaround that might work: Create a small text file
> that
> contains only the reset command for the printer in question and
> let
> the batch file copy that file to the printer. Make sure that
> you put
> *ONLY* the reset command in it, no trailing CRLF. If it is a
> PCL
> printer, for example, the file should contain only (the
> equivalent of)
> chr(27)+'E'
>
> If it helps to send a form feed, I believe that a reset should
> also
> work. And you can recycle the bytes too if you copy the same
> file each
> time <g>.
>
> Keeping my fingers crossed <g>
I have known the reset code to eject a page. Could possibly push
the current position, print a space, then pop the position.
Problem is, SET PRINTER TO cPrinter may very well have
Windoze/DOS flush the page anyway...
http://printers.necsam.com/public/p...odes/pcl5hp.htm
<QUOTE>
Push / Pop Position
Push
<Esc>&f0S
decimal: 027 038 102 048 063
HEX: 1B 26 66 30 53
Pop
<Esc>&f1S
decimal: 027 038 102 049 063
HEX: 1B 26 66 31 53
<END QUOTE>
I'd bet the MODE command will do enough... (fingers and toes
crossed...)
David A. Smith
| |
| Klas Engwall 2007-01-17, 9:55 pm |
| David,
>I have known the reset code to eject a page.
Sure, if there is something in the printer's buffer already, an
orphaned CRLF for example. In that case it should be cleared anyway,
or it will have impact on the next page in one way or another. So
resetting the printer has the additional bonus of setting everything
(font, cursor position etc) back to the defaults.
If you send a Windows print job to a file using a PCL5 driver and take
a look at the result you will probably see <Esc>E in the stream before
anything important is transmitted. Well, at least with older drivers
where there is no PJL wrapper. The purpose is of course to remove
leftovers from previous (possibly crashed) print jobs to avoid
surprises in the new job.
> Could possibly push
>the current position, print a space, then pop the position.
That would definitely put data in the buffer - with undefined
result, expecially since you don't know where the cursor is located
when you start. It could be at the top left corner or anywhere else on
the page. And where is the top left corner? That depends on the top
and left margins, which may or may not be at their defaults. A reset
will get rid of all those unknown factors.
>Problem is, SET PRINTER TO cPrinter may very well have
>Windoze/DOS flush the page anyway...
Again, it might if there is something to flush. And that would be a
good thing rather than a problem.
Regards,
Klas
-------
klas dot engwall at engwall dot com
http://www.engwall.com/clipper/
The LFN Library for Clipper
The LanMan Library for Clipper
The NFPAT1A Timeslice release patch for the Nanforum Toolkit
|
|
|
|
|