none
[UWP]Save Xaml in Pdf file RRS feed

  • Question

  • I'm developing a Windows Universal App, is there any way to save a Xaml into pdf file?
    • Edited by Barry Wang Wednesday, November 4, 2015 3:40 AM Edit title
    Tuesday, October 20, 2015 2:10 PM

Answers

  • There is no way to save PDF in UWP at this point unless you use some commercial library, but beware that their price is in the range 500-5000$ depending on the vendor. Some of them do have XAML to PDF capabilities.

    • Proposed as answer by Barry Wang Wednesday, October 21, 2015 8:42 AM
    • Marked as answer by Barry Wang Wednesday, November 4, 2015 3:39 AM
    Tuesday, October 20, 2015 5:46 PM

All replies

  • There is no way to save PDF in UWP at this point unless you use some commercial library, but beware that their price is in the range 500-5000$ depending on the vendor. Some of them do have XAML to PDF capabilities.

    • Proposed as answer by Barry Wang Wednesday, October 21, 2015 8:42 AM
    • Marked as answer by Barry Wang Wednesday, November 4, 2015 3:39 AM
    Tuesday, October 20, 2015 5:46 PM
  • Thanks for the answer!

    Someone suggests me to translate Xaml to Html adn then Html to Pdf. Do you think could be a solution?

    Wednesday, October 21, 2015 8:18 AM
  • @Claudio Paccone,

    Do you mind to use images for your PDF?

    When using UWP sample printing we can print like this:

    Best regards,

    Barry


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, October 21, 2015 8:48 AM
  • Thanks for the answer!

    Someone suggests me to translate Xaml to Html adn then Html to Pdf. Do you think could be a solution?

    Many things depend on the level of user experience that you want to provide. As said, there is no way to create PDF from Windows API. You can rely on some workarounds like implementing printing as proposed above (as Windows 10 have PDF printer) or eventually calling some web service that could possibly do this. In both cases you will be of better luck if you try with html to pdf than xaml to pdf. If you print html to pdf you can avoid loosing quality that would happen if you print xaml rendered bitmap to pdf (I would propose to use WebView for that http://stackoverflow.com/questions/17049677/how-do-i-print-webview-content-in-a-windows-store-app).


    • Edited by ivan.icin Wednesday, October 21, 2015 11:09 AM
    Wednesday, October 21, 2015 11:08 AM