• tk print problem

    From Mark Summerfield@m.n.summerfield@gmail.com to comp.lang.tcl on Tue Oct 14 07:49:47 2025
    From Newsgroup: comp.lang.tcl

    I am developing a component based on Tk's text widget.
    But when I use `tk print $textwidget` instead of a print
    dialog it just throws an error:

    "No installed printers found.
    Please check or update your CUPS installation."

    I do have CUPS and a printer installed.

    I'm using Tcl/Tk 9.0.2 (64-bit) on Debian 12 (bookworm) on
    Linux 6.1.0. My Tcl/Tk was built from source and is installed locally.

    I'm not after printing per-se; but I _would_ like to get either
    postscript or PDF output from the text widget.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Emiliano@emil.g@example.invalid to comp.lang.tcl on Tue Oct 14 10:32:10 2025
    From Newsgroup: comp.lang.tcl

    On Tue, 14 Oct 2025 07:49:47 -0000 (UTC)
    Mark Summerfield <m.n.summerfield@gmail.com> wrote:

    I am developing a component based on Tk's text widget.
    But when I use `tk print $textwidget` instead of a print
    dialog it just throws an error:

    "No installed printers found.
    Please check or update your CUPS installation."

    I do have CUPS and a printer installed.

    Can you please fill a ticket at https://core.tcl-lang.org/tk/ticket ?
    I'll take a look.

    I'm using Tcl/Tk 9.0.2 (64-bit) on Debian 12 (bookworm) on
    Linux 6.1.0. My Tcl/Tk was built from source and is installed locally.

    If you have installed libcups2 development files (libcups2-dev package
    on debian based distros) Tk will link with such library and you
    get a much faster print processing.

    I'm not after printing per-se; but I _would_ like to get either
    postscript or PDF output from the text widget.

    On free unices you can install the Generic-CUPS-PDF-Printer virtual
    printer and get a pdf from the text widget in the $env(HOME)/PDF
    folder.

    Regards
    --
    Emiliano
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Mark Summerfield@m.n.summerfield@gmail.com to comp.lang.tcl on Wed Oct 15 06:59:27 2025
    From Newsgroup: comp.lang.tcl

    On Tue, 14 Oct 2025 10:32:10 -0300, Emiliano wrote:

    On Tue, 14 Oct 2025 07:49:47 -0000 (UTC)
    Mark Summerfield <m.n.summerfield@gmail.com> wrote:

    I am developing a component based on Tk's text widget.
    But when I use `tk print $textwidget` instead of a print
    dialog it just throws an error:

    "No installed printers found.
    Please check or update your CUPS installation."

    I do have CUPS and a printer installed.

    Can you please fill a ticket at https://core.tcl-lang.org/tk/ticket ?
    I'll take a look.

    I'm using Tcl/Tk 9.0.2 (64-bit) on Debian 12 (bookworm) on
    Linux 6.1.0. My Tcl/Tk was built from source and is installed locally.

    If you have installed libcups2 development files (libcups2-dev package
    on debian based distros) Tk will link with such library and you
    get a much faster print processing.

    I'm not after printing per-se; but I _would_ like to get either
    postscript or PDF output from the text widget.

    On free unices you can install the Generic-CUPS-PDF-Printer virtual
    printer and get a pdf from the text widget in the $env(HOME)/PDF
    folder.

    Regards

    Thank you. The solution was to install the cups-pdf package to get
    the generic cups PDF printer.

    The resultant PDF is just plain text, no colors, no alignment
    (other than left) etc. But it does work.
    --- Synchronet 3.21a-Linux NewsLink 1.2