This might help - https://pptr.dev/
Take a full, scrolling screenshot of a Blazor Hybrid app
I am trying to find a way to take a screenshot of a Blazor Hybrid page that goes covers the area off screen as well.
I tried using html2canvas and was only able to get the current viewport.
I tried a DI injected native code that creates a bitmap from a webview, but was only able to get the visible display.
Has anyone got this working and has somewhere to point me to get the full, scrollable window?
Developer technologies | .NET | Blazor
Developer technologies | .NET | .NET MAUI
2 answers
Sort by: Most helpful
-
-
Bruce (SqlWork.com) 78,311 Reputation points Volunteer Moderator
2024-12-05T02:22:37.0733333+00:00 You need to turn scrolling (overflow) off when you call html2canvas, turn back on after. this will cause a flicker.
a common browser approach is to have a print display popup. in Maui you do this by having the hosting app create a new webview, and passing markup to the new webview.