Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Overlapping Printed-Character Under 2K/XP 1

Status
Not open for further replies.

sipos

Programmer
May 18, 2007
20
ID
Hi all,
I created a program using FP2.6 DOS and has tried to run it under WinXP. This program will output to COMx printer and usually print a two or more pages.

I got a problem here.

In WinXP and Win2K, the printed-character will be printed overlap each other after printing two pages or more. This weird behaviour is also showed up when i print a page twice or more continuously without break (meaning: i didnot wait for printer to stop (clear its buffer) before i print the next page).

I already tried it to run under Win98, and unfortunately, it printed correctly. I cannot use Win98 because i don't have the USB driver (I already googling, but i cannot get the driver anymore, since the motherboard is discontinued product). So I have to use WinXP/2K.

So ... do i miss some critical setting on WinXP/2K, so it make that overlapping behaviour? Or do i make a mistake on my code (sample code view below)? Or do you have any other solution/idea to solve this problem?

Thanks

*************************************************
procedure PrintABuffer
parameter aFileName

file = fopen(aFileName)
set printer to COM1
do while feof(file)
buffer = fread(file, 100)
for cx=1 to len(buffer)
??? mid(buffer,cx,1)
next
enddo
set printer to
=fclose(file)
return
*********************************************


 
Yes, you missed some. :)
On serial port you need correctly setting HANDSHAKE.You can set it by MODE COMx and parameters ODSR and OCTS needs to be ON. Of course you need the right cable (with proper wiring of these signals).

In your code is all right. Handshake does by oneself waiting for printer when have full input buffer.

Tomas
 
to ezopaci:
Aahhh ... why i don't think about it :). But because it is weekend, i cannot try it till monday.
Thanks anyway to remind me on that stuff [ODSR and OCTS].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top