Print Preview Missing in GTK Print Dialog on Fresh Kali Linux — Appears After Installing Evince

Hey everyone,

I recently did a fresh install of Kali Linux, and while testing out GTK print functionality (via the GTK widgets demo or my own simple GTK app), I noticed something odd — the Print Preview option is missing from the GTK print dialog.

However, once I install Evince (apt install evince), the Print Preview button suddenly appears and works as expected.

I’m trying to understand:

  • Why does the GTK print dialog lack a preview option by default?
  • What exactly does Evince provide that enables this feature?
  • Is there a specific package or dependency that GTK relies on for print preview functionality?

Any insight into how GTK handles print preview under the hood, or if there’s a more minimal way to enable it without pulling in a full PDF viewer like Evince, would be really helpful.

Thanks in advance!
i attached the pic of print dialog before installing evince and after installing evince


Because the print preview is based on displaying a PS/PDF render, which is generally what will be sent to the printer itself. This would require reading the PS/PDF data and rendering it, and GTK does not depend on a PDF rendering library, which would be a large dependency; additionally, the only PDF rendering library on Linux is Poppler, which is licensed under the terms of the GNU GPL, which would render GTK licensed under the terms of the GNU GPL, which in turn would make all applications using GTK licensed under the terms of the GNU GPL.

Evince is a PDF viewer, and since it’s an external process, it can be licensed under whatever terms it wants without impacting GTK. Evince is used by default on Linux systems.

On other platforms, GTK can use other print previewers. For instance, on macOS GTK will use the Preview application.

It’s also possible to specify a different preview command by using GtkSettings:gtk-print-preview-command.

That’s a question for your Linux distribution.

1 Like