Posted by Jim Guerber on June 06, 2006 at 14:29:46:
Extra Lines in print jobs
By its very nature, Comet appends a CR/LF to the end of every print line. In most cases this is the correct behavior.
Recently, we have added several special mnemonics to implement new features in various print drivers.
(document=)
(from=)
(to=)
(cc=)
(subject=)
(spoolmessage=)
etc.
When these mnemonics are issued, the comet runtime appends a CR/LF to the print line. In many cases, this is not the expected behavior. We tried to fix this in several recent releases, but the results were worse than the problem. Perhaps the solution was too radical.
Recently, this problem has come up again with the email printer when attempting to send an HTML document. An extra line was inserted into the document for each (cc=) mnemonic etc.
There are several ways around this problem. I will attempt to explain them here.
1. Locate the special mnemonics AFTER the printer output. This will cause the blank space to appear at the end of the document rather than at the beginning. This is much less noticeable, but does not really fix the problem.
2. Group ALL of these mnemonics into one section of the program and use the little known (auto CR off) and (auto CR on) mnemonics to surround this whole group of print statements.
print(1)(autocroff)
print(1)(to='jim@@signature.net')
print(1)(from='jim@@signature.net')
print(1)(subject='testing printer')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(cc='jim@@signature.net')
print(1)(autocron)
3. For the email printer, generate the same behavior by including the directives in the email.ini file instead of as controls to the printer. The email.ini file is not processed until the printer is closed. It may be generated anytime the program has the printer open. ...
Open printer
Print Document
Erase/Create/Open/Write/Close Email.ini
Optionally Print More Document
Close Printer
Erase Email.ini