Remove starting FF on print job - Aix

This is a discussion on Remove starting FF on print job - Aix ; Hi -- I have set up a new digital copier as a network printer on an AIX 3.2.5 box (yes, they're still around ...). This server runs a legacy app that was designed to print to serially-connected dot-matrix printers. I ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Remove starting FF on print job

  1. Remove starting FF on print job

    Hi --

    I have set up a new digital copier as a network printer on an AIX 3.2.5 box
    (yes, they're still around ...). This server runs a legacy app that was
    designed to print to serially-connected dot-matrix printers. I set up the
    digital copier in AIX using the hplj-4 emulation, and created a virtual
    printer for it to set up page orientation, pitch, font, etc. Everything
    works fine.

    One wrinkle: Apparently the legacy app expects its line printers to not be
    at TOF when the print job starts. So the report programs send out a FF at
    the beginning of every job. This is causing the digital copier to eject a
    blank page at the start of each job, and it is annoying the Accounting
    people.

    I don't want to mess around with the legacy code, especially since there are
    still at least 9 serial dot-matrix printers attached to that server.

    Is there anything I can do at the queue or virprt levels to discard that
    starting FF when the print job goes to the digital copier?

    Thanks,
    CL



  2. Re: Remove starting FF on print job


    "Charles Lavin" wrote in message
    newshjth.1815$fC2.1743@bignews4.bellsouth.net...
    > Is there anything I can do at the queue or virprt levels to discard that
    > starting FF when the print job goes to the digital copier?


    Your easiest bet is to use a pre-processing filter in the virtual printer:
    lsvirprt
    select the queue
    f=c
    fc=/your/script

    Now, the virtual printer will invoke /your/filter before any other
    formatting, passing the print data as stdin to the filter. Anything your
    filter outputs to stdout will continue down the pipeline for formatting and
    printing. So, /your/script could be a simple sed or awk script which
    filters out the formfeed. Or, you could just bypass the script and set f=c
    and fc=sed 's/^L//g' (which would remove ALL fomfeeds from the incoming
    job)

    Best regards,
    Paul



  3. Re: Remove starting FF on print job

    Not all formfeeds. Just the one at the top of the job

    But I can wing a script to do that. Thanks!

    CL


    wrote in message
    news:GIoth.5082$uL6.3861@trnddc03...
    >
    > "Charles Lavin" wrote in message
    > newshjth.1815$fC2.1743@bignews4.bellsouth.net...
    >> Is there anything I can do at the queue or virprt levels to discard that
    >> starting FF when the print job goes to the digital copier?

    >
    > Your easiest bet is to use a pre-processing filter in the virtual printer:
    > lsvirprt
    > select the queue
    > f=c
    > fc=/your/script
    >
    > Now, the virtual printer will invoke /your/filter before any other
    > formatting, passing the print data as stdin to the filter. Anything your
    > filter outputs to stdout will continue down the pipeline for formatting
    > and printing. So, /your/script could be a simple sed or awk script which
    > filters out the formfeed. Or, you could just bypass the script and set
    > f=c and fc=sed 's/^L//g' (which would remove ALL fomfeeds from the
    > incoming job)
    >
    > Best regards,
    > Paul
    >
    >




+ Reply to Thread