wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.37k stars 1.22k forks source link

[v3] WebviewWindow.Print() prints the viewport instead of the full webpage #3889

Closed maddie closed 2 hours ago

maddie commented 4 hours ago

Description

With the latest tagged v3 (on the creation of this issue), WebviewWindow.Print() prints the viewport instead of the full webpage. Is the Print function fully implemented? Can't seem to find the API in the documentation.

To Reproduce

  1. Create a long page that overflows (with a vertical scrollbar), preferably with a page-break property set.
  2. Call WebviewWindow.Print(), I think you have to do it in Go since @wailsio/runtime doesn't seem to have this function available. I achieved this via a custom event emitted from JS side.
  3. Check the print preview, you will see there's only one page (or one page with an empty page), with scrollbars shown on the preview.

Expected behaviour

The print preview should correctly show multiple pages (or whole page, if no page-break was defined).

Screenshots

No response

Attempted Fixes

No response

System Details

Wails Doctor

# System
┌────────────────────────────┐
| Name          | MacOS      |
| Version       | 15.1       |
| ID            | 24B83      |
| Branding      | MacOS 15.1 |
| Platform      | darwin     |
| Architecture  | arm64      |
| Apple Silicon | true       |
| CPU           | Apple M1   |
| CPU           | Unknown    |
| GPU           | Unknown    |
| Memory        | Unknown    |
└────────────────────────────┘

# Build Environment
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| Wails CLI      | v3.0.0-alpha.7                                                                                                            |
| Go Version     | go1.23.2                                                                                                                  |
| -buildmode     | exe                                                                                                                       |
| -compiler      | gc                                                                                                                        |
| CGO_CFLAGS     |                                                                                                                           |
| CGO_CPPFLAGS   |                                                                                                                           |
| CGO_CXXFLAGS   |                                                                                                                           |
| CGO_ENABLED    | 1                                                                                                                         |
| CGO_LDFLAGS    |                                                                                                                           |
| DefaultGODEBUG | asynctimerchan=1,gotypesalias=0,httpservecontentkeepheaders=1,tls3des=1,tlskyber=0,x509keypairleaf=0,x509negativeserial=1 |
| GOARCH         | arm64                                                                                                                     |
| GOARM64        | v8.0                                                                                                                      |
| GOOS           | darwin                                                                                                                    |
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────────────────────┐
| Xcode cli tools | 2409                                                 |
| npm             | 9.12.3                                               |
| *NSIS           | Not Installed. Install with `brew install makensis`. |
└─────────────────────── * - Optional Dependency ────────────────────────┘

# Diagnosis
 SUCCESS  Your system is ready for Wails development!

Need documentation? Run: wails3 docs

 ♥   If Wails is useful to you or your company, please consider sponsoring the project: wails3 sponsor

Additional context

No response

leaanthony commented 2 hours ago

Hi there! Thanks for this feedback. Whilst v3 is in alpha, we have a strict feedback procedure outlined here: https://v3alpha.wails.io/getting-started/feedback This is to reduce noise whilst the branch is unstable and keep all the information in one place. We'd love to have you as part of the v3 feedback loop so please consider opening a new post there. Just a copy and paste would be fine. Closing this for now. Thanks again 🙏