Skip to content

Desktop app: Print preview missing — proposed fix for inbox-desktop #490

@GitHubNewbie0

Description

@GitHubNewbie0

We are happy to answer your questions about the code or discuss technical ideas.

Please complete the following checklist (by adding [x]):

  • [X ] I have searched open and closed issues for duplicates
  • This isn't a feature request
  • [X ] This is not a report about my app not working as expected

When printing an email in the Proton Mail desktop app, the system shows "no print preview for this app" and goes directly to the system print dialog (or shows the Save as PDF / Print / Cancel message box). The web app has print preview working correctly via window.print().
I looked at applications/inbox-desktop/src/utils/printing/print.ts and the issue is that createPrintWindow() uses show: false, so the print window is never visible to the user.
I have a proposed fix that adds a proper print preview window:

A visible BrowserWindow (800×900, title "Print Preview") opens showing the email content
A small toolbar is injected at the top with Print, Save as PDF, and Close buttons
Toolbar button clicks are handled via will-navigate interception on sentinel URLs
The original HTML (without toolbar) is what gets sent to the printer or PDF
Existing printHTML() and printAndSaveToPDF() functions are unchanged

The change is entirely self-contained in print.ts. Happy to submit a PR if this is something you'd accept.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions