Hi, I want to print my source code (*.C files) with a Form Feed at specific positions. Printing will be on a HP LaserJet 5P. I tried to insert a FF character as comment, but my printer does not do a form feed, it just prints a square. My system is running windows ME while the printer is attached via network and connected to a windows XP machine. Just to try out I inserted an #pragma eject and printed the *.lst, but no form feed was done where it should be. Any hints are very welcome. thx Heino
Depending on your printer, you can embed formfeeds in a comment by entering the ESCAPE character followed by the FORMFEED character. This works for the printers I use, including laser printers.
I haven't figured out how to enter non-printable characters via the uVision editor, but you can do it with a different editor and then cut/paste wherever you'd like it via the uVision editor.
To create a formfeed, do the following:
1) Start a comment by typing '//' 2) Hold down the ALT key 3) On the numeric keypad enter '027' (the ESCAPE character) 4) Release the ALT key 5) Hold down the ALT key 6) On the numeric keypad enter '012' (the FORMFEED character) 7) Release the ALT key 8) End the line by pressing the ENTER key
In the editor you'll probably see the start of a comment followed by two box char's that represent non-printable ASCII characters, I think.
In your printouts you'll see an empty comment as the last printed line on one page and the following text will appear on a new page. You can add text after the ESCAPE & FORMFEED characters denoting whatever you'd like if you don't like the empty comment.
Works for me...
Good luck, Seadog.
OOOPS... never mind... my bad.
I actually printed my files from my *other* editor. It handled the non-printable char's correctly. Looks like the KEIL uVision editor doesn't. Not sure yet, but it looks like the uVision editor strips out the non-printable char's before sending the file to the printer. Bummer.
Oh-well, there are plenty of freeware/shareware editors that can colorize C code just fine and print formfeeds wherever you'd like. They don't force you to print KEIL's version of the *ideal* header and footer either. They let you pick the printer font, font size, etc. too, which I can't figure out how to do via KEIL's editor. Bummer.
Sorry for the false alarm. Looks like KEIL will make us use someone else's editor to get printouts we like.