locked
[UWP] Create PDF on UWP RRS feed

  • Question

  • Hi

    Is there any way to create a pdf (from HTML view) on a Windows 10 app? I've tried the solution with the printing API and the pdf-printer. This works but there seems to be no way to do this silent without an UI.

    Any help would be appreciated.

    Best regards


    • Edited by Fred Bao Wednesday, December 9, 2015 2:19 AM add the tag
    Tuesday, December 8, 2015 12:19 PM

Answers

  • Hello BjDr,

    >>? I've tried the solution with the printing API and the pdf-printer. This works but there seems to be no way to do this silent without an UI.

    As far as I know, there is not a built-in apt that could be used to generate PDF via code directly in windows runtime. There may be some 3 part components could do what you want, however informations related with them are beyond the scope of our support for this forum. You could do a research online by your favorite tool.

    Or you could create a PDF file yourself, for this approach, you could follow this blog:

    How to generate PDF on Windows Phone in VB or C#

    Although the author writes this blog for window phone, while his code could work in a UWP project as well. And to use his code, please download the link at the top of that blog, if you just copy the button click code, you could encounter an exception that says “enc” is not found, this is a Dictionary type which is not shown in the blog.

    Regards.


    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.


    • Edited by Fred Bao Wednesday, December 9, 2015 6:21 AM
    • Proposed as answer by Fred Bao Monday, December 21, 2015 7:35 AM
    • Marked as answer by Fred Bao Wednesday, December 23, 2015 7:19 AM
    Wednesday, December 9, 2015 3:25 AM