Skip to content

[bug] Can't print an iframe #1557

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
tauri-bot opened this issue May 16, 2025 · 0 comments
Open

[bug] Can't print an iframe #1557

tauri-bot opened this issue May 16, 2025 · 0 comments

Comments

@tauri-bot
Copy link

This issue has been upstreamed from tauri-apps/tauri#13451

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant