printing question

IanBradshaw

Member²
I have a problem with printing spool files and hopefully someone can help me with this. When I print output from the command window the formatting of a pl/sql report I have written is fine, it prints off as expected.

However, when I output the data to a spool file and then print it in windows, the formatting is all over the place. On my machine 'lst' files are associated with notepad and so this changes the font and formatting. Wordpad and microsoft word are even worse. What I'm looking for is a suggestion of some other way of opening the list file so that my formatting stays the same. Does anyone have ideas?

thanks in advance,
Ian
 
I think that Notepad, Word and Wordpad don't *change* anything, they just use their defaults (a proportional font).

You might be able to do something with the DOS mode print command if you have your printer set up so DOS can use it.

You could
- open the file with Wordpad
- ctl-a (select all)
- alt-o (format)
- press enter
- type 'cou'
- press down once or twice (for the Courier font you want)
- press enter
- cntl-p (to print)

Just like the good ole days of DOS!!!

ugh
 
You can also change the font you use in notepad to be a fixed width font and will work fine. Most fonts are variable width to make it look pretty. For example, it squishes the letter "i" closer together since it is narrower.

You can use the font you are using in the command window. I use Courier or Courier New.

If you use notepad for other things and don't want to change the font, there are some decent free text editors out there you can associate with .lst files. For example Crimson Editor or Textpad.

One other thing I can think of that messes up the formatting is using tabs. If the tab length is different between editors, it looks ugly. I have the "use tab character" option unchecked.
 
P.S. the tab thing wouldn't be an issue with .lst files so much. I just added it as an after thought. I usually notice that when looking at people's code. I think that may have been confusing - sorry.
 
Thanks guys. Mike, I've tried what you said and it looks a lot better. The only problem is that notepad doesn't seem to recognise page breaks. It prints off the characters (two squares) to show a page break should be there but doesn't force one. Is there any way to get around this?
 
I'm not going to defend Notepad or I'll end up looking silly. I agree with Scott that "real basic" is a good description and Wordpad is better. If Wordpad works for you, you might as well use that. I personally don't use either. I also haven't had the joy of printing a .lst file in quite a while and had forgotten about the page breaks.

That being said, sometimes I try to get it to look at least OK with Notepad if the file is e-mailed since some people seem to open it with Notepad, complain about how it looks, and can't figure out how to open it with something else. I state in the e-mail what font to use.

When I have done that, I have set the pagesize to a huge number in the SQL Script so that only 1 heading shows up and there just aren't page breaks. You could also set the pagesize to 84 or whatever it works out to so it fits, but it's kind of more trial and error.

Of course this won't work if you need headings on pages of varying rows so what can you do.
 
Thanks very much for your help guys. I've had a look at textpad and thats working for me at the moment, I'll have another look at wordpad and see if I can get anywhere with that.

Ian
 
Back
Top