Sponsored Content
Top Forums Shell Programming and Scripting Insert FF (feed form) in text file so that when printing the printer print on a new page accordingly Post 303028682 by bakunin on Saturday 12th of January 2019 02:38:35 PM
Old 01-12-2019
Notice that such a function is usually located in the printers (or, more precisely, the printer queues) backend and you are - by trying to do what you do - second-guessing the work of it. Chances are this might get filtered out in the processing the printer driver does after you send it to the queue.

Some historical background on where that mattered: you probably know that the line-feed sequence in UNIX is a "linefeed" character, whereas in DOS/Windoze it is a carriage-return plus a linefeed. The reason is: (dot-matrix) printers worked this way, the carriage-return moved the printing head back to the left side and the linefeed move the paper upwards. It was quite like the mechanical and electrical typewriters that preceeded printers. By having this sequence as a end-of-line sequence the makers of DOS could forego the necessity to write a printer driver for their OS. UNIX, on the other hand, had printer drivers and therefore didn't need a two-character sequence. Therefore it had (and has, up to this day) a one-character EOL sequence which is in turn changed to a CR+LF if you print something to one of these old dot-matrix printers with endless paper.

Now, consider what that would do to your print job if you would mess around with the EOL sequence yourself: most probably not what you wanted to have because between your artificially inserted characters and them being processed (and turned into something maybe completely different) by the driver the printer might get confused over the result.

My suggestion is: use a "high-level" document language (i.e. Postscript, TeX, PDF, ....) to create your report. You can easily force form-feeds (or, repectively, their equivalent) within these languages because the all have that. Then use a driver for the respective language (in fact there are even natively-capable Postscript printers) to process your generated file into a correct print job. This way you are save from unknown (and unwanted) side effects and furthermore you are not bound to a specific printer model. All the mentioned languages are quasi-standards and you can easily swap one i.e. Postscript-capable printer for another Postscript-capable printer and the printed result will guaranteed to look the same.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Form Feed...

Hi, I've a text file that has a formfeed character at the beginning. I want to get rid of this formfeed character using sed. But I don't know how to specify the formfeed character. I've tried \014 (octal for formfeed), \f but still not works. Regards, Johnny (5 Replies)
Discussion started by: johnny_woo
5 Replies

2. UNIX for Dummies Questions & Answers

Disable form feed on a serial printer connected to Sco OpenServer

I connected a serial printer to my scoOpenServer which works great. I was able to disable the banner in the interface of the printer. However i am unable to find the command in the interface to disable the formfeed . Below is a copy of the interface file. Please can anyone instruct me on how to... (0 Replies)
Discussion started by: scoman2
0 Replies

3. UNIX for Dummies Questions & Answers

Page feed in Troff

Hi, does anyone knows how to give the page feed command to Printer in troff. Actually I want to implement the functionality where I'll print say 10 pages and I want user to stop printer at 5th page to do manual feed by user .... (2 Replies)
Discussion started by: dpmore
2 Replies

4. Shell Programming and Scripting

replace last form feed with line feed

Hi I have a file with lots of line feeds and form feeds (page break). Need to replace last occurrence of form feed (created by - echo "\f" ) in the file with line feed. Please advise how can i achieve this. TIA Prvn (5 Replies)
Discussion started by: prvnrk
5 Replies

5. AIX

AIX printer and extra blank page after each print

Guy's I have installed AIX direct Network printer as the below details.... printer1 hp@printer1 hplj-3 (HP-GL/2) Printer is printing fain and clearly but it's printing extra blank page after each print ? What's the couse of this problem ? Pls advice ! (6 Replies)
Discussion started by: ITHelper
6 Replies

6. AIX

Printer delay before final form feed

Hi, I am new to printing with Unix (AIX on HP). I am printing from a COBOL program. On our test system the page prints and does a Form Feed to the next page. This is good. When I release the program to our customer it prints the page but waits 5 or more seconds before doing a page... (11 Replies)
Discussion started by: habler
11 Replies

7. Shell Programming and Scripting

print formatted text to the printer

Hello!!! I am using shell script that print some formated text on the screen (example) ======== hello I am ... ======== Is it possible to print this information to the printer exactly as I see it on the screen??? (6 Replies)
Discussion started by: tdev457
6 Replies

8. AIX

AIX Printer Issue: Blank Page Printing.

We have configured Network printers in AIX 6.1. We are facing a Weird problem in Printing. While printing the user is getting a blank page after 2 pages. Please let us know the cause of this issue and ways to rectify it. If this is problem with banner/feeds how to view the default banner... (1 Reply)
Discussion started by: sugan_p
1 Replies

9. Slackware

Printer won't print but 1 page

OS: Slackwar 13.37 Printer: hpDeskjet 1000 j110 Printer Drivers/Software: HPLIP 3.11.3a (min was 3.10.9) and Cups The printer will print the first of n-pages but from page 2 on it prints the page (or part of it) backs up and starts again down about 0.8 lines and does this repeatedly till the... (2 Replies)
Discussion started by: slak0
2 Replies

10. UNIX for Beginners Questions & Answers

Print a python script down a list in a text file without printing a lot combinations

In a python script I have 2 files printing side by side on the same line. I want to have 1 of the files to be already displayed at once while the other file print down the list in the file and it still will produce new lines. I want to do it like that to reduce printing a lot of lines and... (0 Replies)
Discussion started by: bigvito19
0 Replies
enable(1)                                                          User Commands                                                         enable(1)

NAME
enable, disable - enable/disable LP printers SYNOPSIS
/usr/bin/enable printer... /usr/bin/disable [-c | -W] [ -r [reason]] printer... DESCRIPTION
The enable command activates printers, enabling them to print requests submitted by the lp command. enable must be run on the printer server. The disable command deactivates printers, disabling them from printing requests submitted by the lp command. By default, any requests that are currently printing on printer will be reprinted in their entirety either on printer or another member of the same class of printers. The disable command must be run on the print server. Use lpstat -p to check the status of printers. enable and disable only effect queueing on the print server's spooling system. Executing these commands from a client system will have no effect on the server. OPTIONS
The following options are supported for use with disable: -c Cancels any requests that are currently printing on printer. This option cannot be used with the -W option. If the printer is remote, the -c option will be silently ignored. -W Waits until the request currently being printed is finished before disabling printer. This option cannot be used with the -c option. If the printer is remote, the -W option will be silently ignored. -r [reason] Assigns a reason for the disabling of the printer(s). This reason applies to all printers specified. This reason is reported by lpstat -p. Enclose reason in quotes if it contains blanks. The default reason is "unknown reason" for the existing printer, and "new printer" for a printer added to the system but not yet enabled. OPERANDS
The following operand is supported for both enable and disable: printer The name of the printer to be enabled or disabled. Specify printer using atomic name. See printers.conf(4) for information regarding the naming conventions for atomic names. EXIT STATUS
The following exit values are returned: 0 Successful completion. non-zero An error occurred. FILES
/var/spool/lp/* LP print queue. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWpcu | +-----------------------------+-----------------------------+ |CSI |enabled | +-----------------------------+-----------------------------+ SEE ALSO
lp(1), lpstat(1), printers.conf(4), attributes(5) SunOS 5.10 9 Sep 1996 enable(1)
All times are GMT -4. The time now is 05:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy