Secure Design ®
SDLPD CR/LF FAQ Help Products Order Contact Us back

Q) We cannot print our text files to SDLPD. In binary mode the file does the LF --> LF/CR stair step effect

A) This is because the print data contains only line feed characters. The printer is expecting CR/LF characters for end of lines.

While SDLPD provides basic LF-->CR/LF translations, it may not be enough. Some UNIX programs print bold by printing the line twice, using a CR on the end of the first line. Using the text translation with SDLPD will cause the line to print twice. A better solution is to send a setup code to make the printer accept the Unix LF rather than convert the LF to CR/LF.

With an HP printer you can change the way a printer looks for the end of line marks. The best way to do this with SDLPD is to use a job prefix file, and have the proper setup codes in the file. These files belong in the sdlpdflt directory in your SYS:SYSTEM directory. Use the sdlpdcon.nlm to select which file is the prefix file for your job type.

Note: You will need to edit the file with a program that can edit special characters such as a hex editor. The <ESC> marks below should be replaced with an escape character, ASCII 27 (0x1B)

Line termination <ESC>&k#G

0: CR=CR LF=LF FF=FF (default)
1: CR=CR+LF LF=LF FF=FF
2: CR=CR LF=CR+LF FF=CR+FF
3: CR=CR+LF LF=CR+LF FF=CR+FF

Example: <ESC>&k2G

The above example will let default Unix text files print by setting the printer to use LF as CR+LF.

Q) In text mode the job prints but the bottom 6 lines are missing.

Q) I printed something like a man page and every page has 6 blank lines in the middle, And I can't change the lines per page the program generates the text job with. What can I do?

A) Remember, much of Unix assumes a line printer which prints 66 lines from the top of the page to the bottom. Laser printers have a margin and print approximately 60 lines per page rather than 66.

If so, perhaps the following will help:

Perforation Skip Mode <ESC>&l#L

0 = off = 0.0 in Top Margin
1 = on = 1/2 in top margin

Example: <ESC>&l1L

In this example, the printer should print leaving a margin on the top and bottom of the page.

You can also specify the number of lines per vertical inch with the following command:

        <ESC>l#D

To print 66 lines on a letter (8.5x11 inch) page with 1/2 inch margins, you would use 6.6


Secure Design®
PO Box 1066, Beaverton OR 97075
Ph: +1-503-259-2624 Fax: +1-503-259-2639
Copyright © 1997-2000 Secure Design, All rights reserved.
support@sdesign.com