Skip to content

[bug] Can't print an iframe #13451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DVSoftware opened this issue May 16, 2025 · 3 comments
Open

[bug] Can't print an iframe #13451

DVSoftware opened this issue May 16, 2025 · 3 comments
Labels
platform: macOS status: needs triage This issue needs to triage, applied to new issues status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes type: bug

Comments

@DVSoftware
Copy link

Describe the bug

We were considering rewriting our app from Electron to Tauri, but we encountered a problem with printing.
Our app relies on print-js library to print part of the page, which makes a copy of the content to an iframe, however it never starts printing.
Printing using window.print() works fine, but iframe.contentWindow.print() does not, it is not doing anything.

Reproduction

No response

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Mac OS 15.4.1 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.87.0 (17067e9ac 2025-05-09)
    ✔ cargo: 1.87.0 (99624be96 2025-05-06)
    ✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
    ✔ Rust toolchain: 1.87.0-aarch64-apple-darwin (default)
    - node: 22.14.0
    - pnpm: 10.8.1
    - yarn: 1.22.22
    - npm: 10.9.2
    - bun: 1.1.6

[-] Packages
    - tauri 🦀: 2.5.1
    - tauri-build 🦀: 2.2.0
    - wry 🦀: 0.51.2
    - tao 🦀: 0.33.0
    - tauri-cli 🦀: 2.0.0-alpha.8 (outdated, latest: 2.5.0)
    - @tauri-apps/api : 2.5.0
    - @tauri-apps/cli : 2.5.0

[-] Plugins
    - tauri-plugin-opener 🦀: 2.2.6
    - @tauri-apps/plugin-opener : 2.2.6

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:3000/
    - framework: React
    - bundler: Vite

Stack trace


Additional context

No response

@DVSoftware DVSoftware added type: bug status: needs triage This issue needs to triage, applied to new issues labels May 16, 2025
@FabianLars
Copy link
Member

/upstream tauri-apps/wry

@tauri-apps tauri-apps bot added the status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes label May 16, 2025
@FabianLars
Copy link
Member

Just as a sanity check, can you check if that works in Safari?

@DVSoftware
Copy link
Author

@FabianLars yes, it does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: macOS status: needs triage This issue needs to triage, applied to new issues status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes type: bug
Projects
None yet
Development

No branches or pull requests

2 participants