Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How to print

$
0
0
I have decided to migrate an existing WinForm application to XF.

It’s basically a very simple invoicing software for a shop and I was really excited about the performance when I started the project and managed to create iOS, Android, UWP, WPF and macOS all using the same code base (98% of the code is shared)

My project is a shared project (NOT PCL) and all I want to be able to do now is to print the invoices (not necessarily silently like POS)

I have to say that I am baffled that I can’t find a single working example after spending 12 hours on it...

I had been thinking using Shared Code would be giving me more flexibility to access native functions thanks to the #if #endif compiler directives but now I have minimised my expectations and will be the happiest man alive if I can at least print an invoice in the UWP/WPF only ...

I decided to create a PDF first to make things easier and consistent in terms of invoicing layout and even that was a big issue (using iTextSharp failed) so I ended up posting data to a WebService and then leaving PDF generation to the backend

Now, my question is how can I print that PDF using the device’s installed printer? (For now only in UWP/WPF and if I succeed I will be looking for other platforms)

Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>