beeware / beeware/toga

Implement interaction with printer

Open
#3,750 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
5.4k
Forks
827
Avg merge
9h 45m
Merged PRs (30d)
58

Description

### What is the problem or limitation you are having?

Toga currently offers support to some hardware, like camera and computer screen, but doesn't offer direct access to printer or scanner.

### Describe the solution you'd like

The ideal implementation of this feature would be able to handle:
- Raw text
- Text files (e.g. txt or pdf)
- Image files (e.g. png or jpeg)

One pice of the content listed above would be handed to the OS-specfic print dialog, like the ones attached below, where page selection, printer selection, orientation and other configurations should happen, outside of the Toga application.

Linux (GTK):
https://docs.gtk.org/gtk4/class.PrintUnixDialog.html

Windows:
Image

MacOS:
Image

Android:
Image

### Describe alternatives you've considered

Handling printers and printing in python is not very straightfoward:
- there is a package dedicated to windows `win32print`, `win32ui`
- the solution I found for Unix systems would issue a `lp` command to the system, using Python's `subprocess` package

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by clarifying the supported platforms and the API boundary using the GTK, Windows, macOS, and Android print-dialog examples, including which raw and file-based inputs are required; done means an agreed cross-platform scope and verified printer interaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.