Converting XAML to PDF in an UWP app
问题 I have a Canvas element on a XAML page that I'm using as a printing root in my UWP app. I'm using events such as PrintManager.PrintTaskRequested and PrintDocument.Paginate to prepare my report and send it to a printer. I need to export the report programmatically to a PDF file. The ideal solution would somehow utilize the existing printing root (the Canvas), print to it, and then convert the result to PDF. After that, I would be able to save PDF to a file or attach it to an email. I've been