Loading ...
Sorry, an error occurred while loading the content.

Re: gtk printing

Expand Messages
  • bill lam
    ... This is the workaround I currently use. ... choosing or config printers. gtk should have a similar dialog available but gvim choose to ignore that.
    Message 1 of 6 , Nov 1, 2008
    • 0 Attachment
      On Sat, 01 Nov 2008, Tony Mechelynck wrote:

      >
      > On 01/11/08 02:57, bill lam wrote:
      > > afaics gtk-gvim use linux console mode printing commands. Will gvim
      > > use the more user friendly gtk printing system? I wish I can use gvim
      > > instead of gedit/geany for printing
      > >
      >
      > If the ":hardcopy" command, and the options displayed by
      >
      > :help 'print<Ctrl-D>
      >
      > are not friendly enough for you, you may load the editfile in your
      > favourite browser (maybe copy it first to some *.txt filename make sure
      > it will be treated as text/plain) and print from there.

      This is the workaround I currently use.

      :hardcopy in win32 gvim will pop up a familiar print dialog for
      choosing or config printers. gtk should have a similar dialog
      available but gvim choose to ignore that.

      Hypothetically, if :hardcopy on win32 gvim is the same as that in
      linux gvim, I guess notepad will also be needed as a workaround for
      printing.

      That said, I did not suggest that gtk print dialog should be used in
      console mode vim.

      --
      regards,
      ====================================================
      GPG key 1024D/4434BAB3 2008-08-24
      gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... On Linux [g]vim, +print requires +postscript. This is not the case on Windows [g]vim, where +print -postscript uses the Windows print dialog, or the
      Message 2 of 6 , Nov 1, 2008
      • 0 Attachment
        On 01/11/08 09:07, bill lam wrote:
        > On Sat, 01 Nov 2008, Tony Mechelynck wrote:
        >
        >> On 01/11/08 02:57, bill lam wrote:
        >>> afaics gtk-gvim use linux console mode printing commands. Will gvim
        >>> use the more user friendly gtk printing system? I wish I can use gvim
        >>> instead of gedit/geany for printing
        >>>
        >> If the ":hardcopy" command, and the options displayed by
        >>
        >> :help 'print<Ctrl-D>
        >>
        >> are not friendly enough for you, you may load the editfile in your
        >> favourite browser (maybe copy it first to some *.txt filename make sure
        >> it will be treated as text/plain) and print from there.
        >
        > This is the workaround I currently use.
        >
        > :hardcopy in win32 gvim will pop up a familiar print dialog for
        > choosing or config printers. gtk should have a similar dialog
        > available but gvim choose to ignore that.
        >
        > Hypothetically, if :hardcopy on win32 gvim is the same as that in
        > linux gvim, I guess notepad will also be needed as a workaround for
        > printing.
        >
        > That said, I did not suggest that gtk print dialog should be used in
        > console mode vim.
        >

        On Linux [g]vim, +print requires +postscript. This is not the case on
        Windows [g]vim, where +print -postscript uses the Windows print dialog,
        or the default printer and settings when invoked with an exclamation
        mark. I suppose the Windows print routine was added later because
        PostScript is not found on Windows as commonly as on Unix-like systems.

        On Unix systems (and, I think, on +postscript versions for Windows, if
        any) 'printoptions' are used to define the page size, margins,
        orientation, etc. etc. etc. Then 'printexpr' is used to print the
        resulting PostScript file. The 'printexpr' default is usually OK, that's
        what I use.

        About replacing PostScript processing by GTK printing (but only on gvim
        versions with GTK or GTK2 GUI, of course) that would be adding a level
        of complexity, and at the same time break with well-known existing
        behaviour. My motto for this kind of cases: it ain't broke, so don't fix it.


        Best regards,
        Tony.
        --
        The problem ... is that we have run out of dinosaurs to form oil with.
        Scientists working for the Department of Energy have tried to form oil
        using other animals; they've piled thousands of tons of sand and Middle
        Eastern countries on top of cows, raccoons, haddock, laboratory rats,
        etc., but so far all they have managed to do is run up an enormous
        bulldozer-rental bill and anger a lot of Middle Eastern persons. None
        of the animals turned into oil, although most of the laboratory rats
        developed cancer.
        -- Dave Barry, "Postpetroleum Guzzler"

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • bill lam
        Hi Tony, Thank you for pointing out the +postscript option. I ll spare some time to learn linux lpr commands. -- regards,
        Message 3 of 6 , Nov 1, 2008
        • 0 Attachment
          Hi Tony,
          Thank you for pointing out the +postscript option. I'll spare some
          time to learn linux lpr commands.

          --
          regards,
          ====================================================
          GPG key 1024D/4434BAB3 2008-08-24
          gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Bram Moolenaar
          ... It would be convenient if the Unix version would allow setting printer options with a dialog. So that you can pick your printer from a list, instead of
          Message 4 of 6 , Nov 6, 2008
          • 0 Attachment
            Bill Lam wrote:

            > On Sat, 01 Nov 2008, Tony Mechelynck wrote:
            >
            > >
            > > On 01/11/08 02:57, bill lam wrote:
            > > > afaics gtk-gvim use linux console mode printing commands. Will gvim
            > > > use the more user friendly gtk printing system? I wish I can use gvim
            > > > instead of gedit/geany for printing
            > > >
            > >
            > > If the ":hardcopy" command, and the options displayed by
            > >
            > > :help 'print<Ctrl-D>
            > >
            > > are not friendly enough for you, you may load the editfile in your
            > > favourite browser (maybe copy it first to some *.txt filename make sure
            > > it will be treated as text/plain) and print from there.
            >
            > This is the workaround I currently use.
            >
            > :hardcopy in win32 gvim will pop up a familiar print dialog for
            > choosing or config printers. gtk should have a similar dialog
            > available but gvim choose to ignore that.
            >
            > Hypothetically, if :hardcopy on win32 gvim is the same as that in
            > linux gvim, I guess notepad will also be needed as a workaround for
            > printing.
            >
            > That said, I did not suggest that gtk print dialog should be used in
            > console mode vim.

            It would be convenient if the Unix version would allow setting printer
            options with a dialog. So that you can pick your printer from a list,
            instead of having to change a Vim option.

            This requires writing code that is machine specific. The GTK libraries
            probably have some support for this. But GTK is known for flaws and
            limited documentation, so one needs to figure out how to make this work
            inside Vim. The MS-Windows code may give some hints about what settings
            we want to have in the dialog.

            I assume that generating the file to pring remains the same. It's only
            the settings dialog that we need. One thing that might work better when
            switching from PostScript to some GUI library is handling of utf-8
            printing.

            --
            hundred-and-one symptoms of being an internet addict:
            188. You purchase a laptop so you can surf while sitting on the can.

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ download, build and distribute -- http://www.A-A-P.org ///
            \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.