Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin 使用编程webview打印uwp应用程序_Xamarin_Printing_Uwp - Fatal编程技术网

Xamarin 使用编程webview打印uwp应用程序

Xamarin 使用编程webview打印uwp应用程序,xamarin,printing,uwp,Xamarin,Printing,Uwp,我有一个简单的WebView像: var webView = new Xamarin.Forms.WebView { Source = new HtmlWebViewSource { Html = @$" <!DOCTYPE html>

我有一个简单的
WebView
像:

 var webView = new Xamarin.Forms.WebView
            {
                Source = new HtmlWebViewSource
                {
                    Html = @$"
                            <!DOCTYPE html>
                            <html>
                            <body>
<table border = '1'; style='width:265; height:189;'>
    <caption>SLOT CARD</caption>
    <thead>
    <tr>
        <th>QR</th>
        <th>Data</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>test1</td>
        <td>
            value1
            value2
            value3
      </td>
    </tr>
    </tbody>
</table>
                            </body>
                            </html>
                            "
                }
            };
如何将我的webview附加到那里?可能吗?问候


注*:我的webview concist仅在一页中显示,并带有短表。。。webview中的最大表格大小为:265px 189px

关于打印适用于android onlt@Sushingover的UWP webview,存在许多问题。您可以查看
  PrintDocument document = new PrintDocument();
            document.PrinterSettings.PrinterName = "Test";
            document.PrinterSettings.DefaultPageSettings.PaperSize = document.PrinterSettings.PaperSizes[0];
            document.PrinterSettings.DefaultPageSettings.Margins = new Margins(1, 1, 1, 1);
       

            document.Print();