samba and Win2k/XP

  • Steven Jeffers

    Steven Jeffers - 2001-11-13

    I have setup pnm2ppa as an lpd printer filter and shared it for windows computers with samba.  The windows machines use the HP Color LaserJet 4550 PS driver.  For some strange reason, I've been able to print with Win9x machines, but not with 2k/XP.  I've been able to view the postscript files in the spool directory with gs, but not been able to pass it on as pnm to pnm2ppa.  When I try, the following error message shows up in my /var/log/lpd-errs:

    Nov 13 14:22:23 forbin lpd[7016]: restarting lp
    Nov 13 14:22:23 forbin pnm2ppa[32501]: Starting print job
    Nov 13 14:22:24 forbin pnm2ppa[32501]: initImage(): Input image is not a supported PNM format
    Nov 13 14:22:24 forbin pnm2ppa[32501]: No pages printed!

    The following is my /etc/printcap:

    lp|bw:\         :lp=/dev/ulpt0:\         :sd=/var/spool/lpd/bw:\         :lf=/var/log/lpd-errs:\         :if=/usr/local/bin/bw.if:
    color:\         :lp=/dev/ulpt0:\         :sd=/var/spool/lpd/color:\         :lf=/var/log/lpd-errs:\         :if=/usr/local/bin/color.if:

    The following is my /usr/local/bin/bw.if:

    /usr/local/bin/gs -q -sDEVICE=pnmraw -r600 -sPAPERSIZE=letter -dNOPAUSE \         -sOutputFile=- - | /usr/local/bin/ -v 720  -i - -o -

    • Javier Sedano

      Javier Sedano - 2001-11-13

      Some windows PS drivers have got and option similar to "optimize for compatibility" vs. "optimize for speed". Check it, because the generated PS code is not standard. gs should deal with it, but maybe...
      And also try this other bw.if script. It creates a PNM file in /tmp. You can see that file, in order to view it (in xv, for example), and check that it's correct (or just copy the PS file from the WinXP to Linux and use gs and pnm2ppa by hand to see want happends).

      /usr/local/bin/gs -q -sDEVICE=pnmraw -r600\ -sPAPERSIZE=letter -dNOPAUSE \
      -sOutputFile=- - |
      tee /tmp/file.pnm |\ /usr/local/bin/ -v 720 -i - -o -

    • David Härdeman

      David Härdeman - 2002-02-06

      I've had the sambe problem with Win2000 creating weird PS files. Fiddling with printer driver setting in Windows didn't fix it but letting GhostScript do two passes over the file (one to correct the PS, one to convert it to pnm) did.

      Try something like:

      /usr/local/bin/gs -q -sDEVICE=pswrite -r600 -sPAPERSIZE=letter -dNOPAUSE -sOutputFile=- - | \ /usr/local/bin/gs -q -sDEVICE=pnmraw -r600 -sPAPERSIZE=letter -dNOPAUSE -sOutputFile=- - | \ /usr/local/bin/ -v 720 -i - -o -


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks