xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

Add printing support and XAML to PDF converter #2770

Closed jitendrajadav closed 6 years ago

jitendrajadav commented 6 years ago

Description

I am developing Xamarin forms application where I want printing functionality for e.g. Invoice I can generate in XAML now this XAML I have to print and share via PDF how would I can do?

I have tried several way like HTML to PDF and PDFSharp but no hope PDFSharp is only support in .Net Standard 1 my project is .Net Standard 2 and HTML will giving so many erorr like

sample code of HTML to PDF is here where I am not able to find webpage ` if (webpage == null) webpage = new Android.Webkit.WebView(GetApplicationContext());

    int width = 2102;
    int height = 2973;

    webpage.Layout(0, 0, width, height);
    webpage.LoadDataWithBaseURL("",html, "text/html", "UTF-8" , null);
    webpage.SetWebViewClient(new WebViewCallBack(file.ToString()));

` In that case webpage I am not able to find?

please find below link:

Steps to Reproduce

Expected Behavior

Actual Behavior

Basic Information

Screenshots

Reproduction Link

pauldipietro commented 6 years ago

This doesn't appear to be the proper place for a question like this, as we use issues for proposals and bug reports; general API usage questions would probably be better suited for a place like StackOverflow. If there is an actual bug in Forms, please upload a reproduction so we can investigate it.