Skip to content
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

[Enhancement] The printing function can send to printer with page size without preview? #95

Open
qq1688 opened this issue Mar 3, 2021 · 0 comments

Comments

@qq1688
Copy link

qq1688 commented Mar 3, 2021

I want to print the HTML or webview to a default or a pre-defined printer in XF for UWP app, can this add-on do this?

var myWebView = new Xamarin.Forms.WebView();
myWebView.VerticalOptions = LayoutOptions.FillAndExpand;
myWebView.SetPageSize("XXXX"); <-------------
myWebView.SetPrinter("XXX Printer"); <-------------
WebViewPrintEffect.ApplyTo(myWebView);
myWebView.Source = new HtmlWebViewSource { Html = "some HTML text here" };

//myWebView.PrintAsync("my_print_job_name");
myWebView.AddToPrintPool(); <-------------

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