logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

print - Print canvas and text widgets using native dialogs and APIs.

Description

       The  tkprint command posts a dialog that allows users to print output from the canvas and text widgets.
       The printing will be done using platform-native APIs and dialogs where available.

       The canvas widget has long supported PostScript export and both PostScript and text  files  can  be  sent
       directly  to  a  printer  on  Unix-like  systems using the “lp” and “lpr” Unix commands, and the tkprint
       command does not supersede that functionality; it builds  on  it.  The  tkprint  command  is  a  fuller
       implementation  that  uses  native  dialogs  on  macOS  and  Windows, and a Tk-based dialog that provides
       parallel functionality on X11.

Keywords

       print, output, graphics, text, canvas

                                                        n                                              tk(print)

Name

       print - Print canvas and text widgets using native dialogs and APIs.

Platform Notes

macOS  The Mac implementation uses native print dialogs and relies on the underlying Common Unix Printing
              System (CUPS) to render text output from the text widget and PDF conversion of the canvas data  to
              the printer or to a PDF file.

       Windows
              The  Windows implementation is based on the GDI (Graphics Device Interface) API. Because there are
              slight differences in how GDI and Tk's canvas widget display graphics,  printed  output  from  the
              canvas on Windows may not be identical to screen rendering.

       X11    The  X11  implementation  uses  a  Tk GUI to configure print jobs for sending to a printer via the
              “lpr” or “lp” commands. While these commands have a large number  of  parameters  for  configuring
              print  jobs,  printers vary widely in how they support these parameters. As a result, only printer
              selection and number of copies are configured as arguments to the print command; many  aspects  of
              print rendering, such as grayscale or color for the canvas, are instead configured when PostScript
              is generated.

See Also

canvas(3tk), text(3tk), tk(3tk)

Synopsis

tkprintwindow

See Also