Hi,

I found the problem. In the line "call system("lpr -h" . a:fname)",
there must be a space after "-h", i.e.: "call system("lpr -h " .
a:fname)".

           Laszlo

On 3/8/07, Jabba Laci <[EMAIL PROTECTED]> wrote:
Hi,

Until now I could print my files from Vim using the ":ha" command. I
have the following in my .vimrc file:

"###############################
set printoptions+=header:0

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

But now I get the following error:

E365: Failed to print PostScript file

In my shell PRINTER is set (to "[EMAIL PROTECTED]"), and in gv I can print
(with "lpr -h [EMAIL PROTECTED]") without any problem.

Do you have an idea how to solve it?

             Thanks,

                          Laszlo

Reply via email to