简体   繁体   English

通过使用 Webview2 在 UWP 应用程序中呈现 PDF,打印按钮不起作用

[英]Print button not working by using Webview2 to render a PDF in an UWP app

I'm trying to create an UWP app and embed a WebView2 in WinUI 2. Then I try to render a PDF host in a remote server in the WebView2, the PDF can be rendered normally, but when I clcik the print button in the toolbar, nothing happen and no printing preview dialog display.我正在尝试创建一个 UWP 应用程序并在 WinUI 2 中嵌入一个 WebView2。然后我尝试在 WebView2 的远程服务器中呈现一个 PDF 主机,PDF 可以正常呈现,但是当我点击工具栏中的打印按钮时,没有任何反应,也没有显示打印预览对话框。 May I know it's a known issue?我可以知道这是一个已知问题吗? Thanks.谢谢。

打印按钮

WebView2 Runtime: 109.0.1518.52 WebView2 运行时:109.0.1518.52

Framework: UWP target to 18362框架:UWP目标到18362

OS: Win10 20H2操作系统:Win10 20H2

WinUI2 2.8.1 WinUI2 2.8.1

Unfortunately, at the moment its a known limitation that printing in a UWP app is not supported.不幸的是,目前已知的限制是不支持在 UWP 应用程序中打印。 This is described a bit more in the WebView2 WinUI2 doc .这在WebView2 WinUI2 文档中有更多描述。

For anyone who is running into this, please provide additional feedback to the WebView2 team on the WebView2 WinUI2 printing GitHub issue .对于遇到此问题的任何人,请向 WebView2 团队提供有关WebView2 WinUI2 打印 GitHub 问题的其他反馈。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM