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!

Character Printing Problems

Status
Not open for further replies.

RWWAMS

Technical User
Jan 3, 2003
104
US
Hi everyone,

We have a report generator program that writes reports to an external file. On a Windows 98 machine, these reports can be opened and print fine through the dos editor. Unfortunately, on a Windows XP machine printing from the dos editor to a local inkjet printer is no longer possible. Therefore, we are forced to open and print the file from Microsoft Word, Wordpad or Notepad. Upon opening the file in any of these programs, the file appears to have many small boxes interspersed throughout and especially at the end of lines. We believe this is due to ASCII vs. ANSI characters. The reports are not as aesthetically pleasing as they once were.

We are looking for solutions or alternatives to avoid this problem. Any suggestions would be greatly appreciated.

Regards and thank you,
Rich
 
At a guess it is the line terminator. Get a binary editor like hexedit from
Have a look at your output text and determine

1) What the block is
2) Does it have 0A or 0D or 0A 0D at the end of each line.

Notepad wants a 0D 0A sequence (carriage return, line feed). You just need to get your compiler to output that sequence.

With WORD or wordpad, you are really looking at RTF which is a far more complicated beast. They will take text files but it isn't worth the hassle.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top