print postscript without header

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

print postscript without header

Jabba Laci
Hi,

For printing a text file I use gvim, but by default it always prints a
header page too (with info. about job, date, user, etc.). Do you know
how to deactivate it? In ghostview I get a dialog window where I can
precise "lpr -h -P<printer>", but in gvim there is no such window.

               Thanks in advance,

                                 Laszlo
Reply | Threaded
Open this post in threaded view
|

Re: print postscript without header

Dominic Evans
set popt+=header:0

Cheers, Dom

On 07/10/05, Jabba Laci <[hidden email]> wrote:

> Hi,
>
> For printing a text file I use gvim, but by default it always prints a
> header page too (with info. about job, date, user, etc.). Do you know
> how to deactivate it? In ghostview I get a dialog window where I can
> precise "lpr -h -P<printer>", but in gvim there is no such window.
>
>                Thanks in advance,
>
>                                  Laszlo
>
Reply | Threaded
Open this post in threaded view
|

Re: print postscript without header

Alan G Isaac
In reply to this post by Jabba Laci
On Fri, 7 Oct 2005, Jabba Laci apparently wrote:
> For printing a text file I use gvim, but by default it always prints a
> header page too (with info. about job, date, user, etc.). Do you know
> how to deactivate it? In ghostview I get a dialog window where I can
> precise "lpr -h -P<printer>", but in gvim there is no such window.


:h printheader
:h printoptions

Note that you can press
:h print^d
to get a listing of print related options.

Cheers,
Alan Isaac



Reply | Threaded
Open this post in threaded view
|

Re: print postscript without header

Jabba Laci
In reply to this post by Dominic Evans
Hi,

I added this line to my .vimrc file, but strangely I still get header papers :(
Can it somehow be deactivated with a global shell variable maybe (I use bash)?

             Thanks,

                        Laszlo


> set popt+=header:0
>
> Cheers, Dom
>
> On 07/10/05, Jabba Laci <[hidden email]> wrote:
> > Hi,
> >
> > For printing a text file I use gvim, but by default it always prints a
> > header page too (with info. about job, date, user, etc.). Do you know
> > how to deactivate it? In ghostview I get a dialog window where I can
> > precise "lpr -h -P<printer>", but in gvim there is no such window.
> >
> >                Thanks in advance,
> >
> >                                  Laszlo
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: print postscript without header

Jürgen Krämer
In reply to this post by Jabba Laci

Hi

Jabba Laci wrote:
>
> For printing a text file I use gvim, but by default it always prints a
> header page too (with info. about job, date, user, etc.). Do you know
> how to deactivate it? In ghostview I get a dialog window where I can
> precise "lpr -h -P<printer>", but in gvim there is no such window.

have a look at

  :help 'printexpr'

Regards,
J?rgen

--
J?rgen Kr?mer                              Softwareentwicklung
HABEL GmbH & Co. KG                        mailto:[hidden email]
Hinteres ?schle 2                          Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-Weilheim                    Fax: +49 / 74 61 / 93 53 - 99
Reply | Threaded
Open this post in threaded view
|

Re: print postscript without header

Jabba Laci
> have a look at
>
>   :help 'printexpr'

Hi,

Thanks, I managed to solve the problem this way:

set printexpr=PrintFile(v:fname_in)
function PrintFile(fname)
  call system("lpr -h " . a:fname)
  call delete(a:fname)
  return v:shell_error
endfunc


          Best regards,

                      Laszlo