Howdy all - I have Samba 2.0.3 running like a champ on a dual PPro 200, 128 MB RAM, running Slackware 3.6, kernel 2.2.5. Running like a champ as far as file sharing is concerned, that is. I have an HP Deskjet 1000c hanging off the parallel port. I set up a raw printer in /etc/printcap, the line looks like this: dj1000|DeskJet 1000c:sh:lp=/dev/lp0:sd=/var/spool/lpd/dj1000 the printing section in smb.conf looks like this: [printers] comment = All Printers path = /usr/spool/samba print ok = Yes The print jobs make it, and start coming out the printer, but where ink stops getting laid on paper, the form stops. I guess I need a form feed. I tried making my printcap look like this: dj1000|DeskJet 1000c:sh:lp=/dev/lp0:sd=/var/spool/lpd/dj1000:mx#0:ff=\f which should force a form feed, and set the max print size to anything. This didn't work. How do I force a form feed after the last page? Is it a Samba thing, or a Linux thing? Thanks! Thomas Cameron, CNE, MCP, MCT Three-Sixteen Technical Services, Inc. ][ O/////||=========LINUX=========> ][
On Sun, 25 Apr 1999 tcameron@three-sixteen.com wrote:> Subject: HP Deskjet 1000c > > The print jobs make it, and start coming out the printer, but where ink > stops getting laid on paper, the form stops. I guess I need a form feed.There are a couple of ways to deal with this. First you can usually make the Windows printer configuration send it's own form feed. This is the prefered solution. There's usually a check box somewhere to do this. Alternatively you can make Samba do it: print command = "lpr -r -P %p %s ; echo \014" I cant check this but you might need more back slashes.> Thomas Cameron, CNE, MCP, MCTBrett Worth CLE (Certifiable Linux Enthusiast)
On 25 Apr 99, "Thomas Cameron" <tcameron@three-sixteen.com> had questions about HP Deskjet 1000c:> I have Samba 2.0.3 running like a champ on a dual PPro 200, 128 MB RAM, > running Slackware 3.6, kernel 2.2.5. Running like a champ as far as file > sharing is concerned, that is. > > I have an HP Deskjet 1000c hanging off the parallel port. I set up a raw > printer in /etc/printcap, the line looks like this: > > dj1000|DeskJet 1000c:sh:lp=/dev/lp0:sd=/var/spool/lpd/dj1000 > > the printing section in smb.conf looks like this: > > [printers] > comment = All Printers > path = /usr/spool/samba > print ok = Yes > > The print jobs make it, and start coming out the printer, but where ink > stops getting laid on paper, the form stops. I guess I need a form feed. > I tried making my printcap look like this: > > dj1000|DeskJet 1000c:sh:lp=/dev/lp0:sd=/var/spool/lpd/dj1000:mx#0:ff=\f > > which should force a form feed, and set the max print size to anything. > This didn't work. > > How do I force a form feed after the last page? Is it a Samba thing, or a > Linux thing?It looks to me like it's a linux thing, ie, smbprint is only used for remote smb printers. And I couldn't see anywhere in the smbprint script that handles that stuff. I'm not sure how slackware does it (I gave up on slackware and debian a long time ago) but redhat uses a generic magic filter (if=...) along with ghostscript and nenscript to handle printing chores. They also have a nice X-based printtool widget to configure printers. The redhat setup does not use the printcap option to handle formfeeds, but has a line in the magic filter for that (user-specified) option. There are seperate config files for postscript and ascii, and each one has a SEND_EOF option. The if script (a bash shell script) detects the setting, and if set to yes, sends it as an ascii code with printf "/014". I'm not sure why the ff printcap option isn't working for you; you can try changing the string it sends and see if that helps. Or you can use a filter to send the proper escape sequence (I assume the HP knows PCL?). For the netware queue, I had to do the double printer thing described in the HOWTO (where one printcap entry runs a filter, but then re-directs the job to another printcap entry that sends it to the remote queue via nprint). You shouldn't have to go that far though... Have you tried printing various files from the linux side? The linux printing HOWTOs are a little dated, but still have some good info. There is also printing info in the smb HOWTO. You might want to play around with some of the debug stuff mentioned there, or maybe check out the APS filters, lprng, etc. I barely have a clue about this stuff, even after my experience playing with custom filters for netware queues, smb printers, local printers, etc. My advice would be to read the above HOWTOs, the man pages for lpd, lpr, printcap, etc. Most of all, poke around on your system and look at the config files, filter scripts, etc, and try various options. If you want to be properly tortured, you have to show the proper desire and motivation... ;-) Hope this helps, Steve ************************************************************* Steve Arnold http://www.rain.org/~sarnold "A mime is a terrible thing to waste..." Mel Brooks
When the world was young, Brett Worth <brettw@sgi.com> carved some runes like this:> > The print jobs make it, and start coming out the printer, but where ink > > stops getting laid on paper, the form stops. I guess I need a form > > feed. > > There are a couple of ways to deal with this. First you can usually make > the Windows printer configuration send it's own form feed. This is the > prefered solution. There's usually a check box somewhere to do this. > > Alternatively you can make Samba do it: > > print command = "lpr -r -P %p %s ; echo \014"I guess I wasn't very clear in my previous post; you probably don't want to do this manually every time you print, and I would say adding a filter script is cleaner than modifying the print command in the smb.conf file. Printers have various ways to do CR/LF, formfeed, etc; the PCL commands (escape codes) should be well documented in your HP manual. Here is a way to do it with sed and escape codes (assumes the shell is bash): #!/bin/sh # # Add carriage returns to text files using sed, # and force a formfeed: # sed -e s/$/ echo -ne \\f You can pipe a text file through the above and then to lpr, or you can install it as an input filter. You can also do it without sed; this is specific to an HPLJ III (PCL5), but should work on any PCL printer: #!/bin/sh # echo -ne \\033\&k2G cat - echo -ne \\f The basic HP manual has an appendix listing the PCL commands (escape sequences) but they are explained in detail only in the Technical Reference Manual (we had to send away for it). Here is one for formatted text (only a masochist would do this for fun; hey, wait a minute...) #!/bin/sh # # Filter for LaserJet 4MPlus to treat LF as CRLF and add some text # formatting (uses PCL-5 escape codes). # The "echo -ne" assumes that /bin/sh is actually bash, while the # 033 is ascii char #27 (ESC) in octal. # echo -ne \\033\E # reset echo -ne \\033\&k2G # treat lf as cr-lf echo -ne \\033\&l0O # portrait mode echo -ne \\033\&l8D # 8 lines per inch echo -ne \\033\&l8E # 1" top margin (8 lines) echo -ne \\033\&l66F # 66 lines per page echo -ne \\033\&a10L # 1" left margin echo -ne \\033\(10U # PC-8 symbol set echo -ne \\033\(s3T # courier echo -ne \\033\(s0P # fixed echo -ne \\033\(s0S # upright echo -ne \\033\(s0B # medium echo -ne \\033\&k4S # 12 char. per inch cat - # echo -ne \\f # form feed echo -ne \\033\E> Brett Worth CLE (Certifiable Linux Enthusiast)I like this; can I be certifiable too? Where are the requirements defined? Is there an exam? Steve ****************************************************************** Stephen L Arnold http://www.rain.org/~sarnold #include <std_disclaimer.h> ******************************************************************