none
UWP - Printing multiple pages RRS feed

  • Question

  • Roy Li provided a suggestion on this.

    I would like to have the complete set of modified code as the snippets provided apparently does not work.


    sams11


    Tuesday, December 24, 2019 11:30 PM

Answers

All replies

  • Hi,

    Your question is out of the scope of currently forum. Please ask about this in other forums.

    Best regards,

    Daisy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Wednesday, December 25, 2019 1:28 AM
  • Hi,

    Thank you for pointing me out about that.

    I checked that and the code works for the sample page in the printing sample. 

    You could try to use PrintHelper from the community tool kit first. This is much more easy to use.

    Like this:

                PrintHelper printHelper = new PrintHelper(PrintCanvas);
                printHelper.AddFrameworkElementToPrint(new NewPage1());
                printHelper.AddFrameworkElementToPrint(new NewPage2());
                await printHelper.ShowPrintUIAsync("NewPages"); 

    Best regards,

    Roy


    "Developing Universal Windows apps" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Wednesday, December 25, 2019 2:14 AM
  • Hi Roy,

    This does work in a page that has Header, Footer etc.

    If I need to add another page with no such Header or Footer, this does not.

    Can you let me know what should be modified to the printHelper.cs code

    Thanks

    Sam


    rs

    Wednesday, December 25, 2019 3:24 AM
  • Hi,

    Currently, I'd suggest you to use the PrintHelper from the community tool kit instead of changing the code the Printing sample.

    Best regards,

    Roy


    "Developing Universal Windows apps" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    • Marked as answer by Sams11 Wednesday, December 25, 2019 5:24 AM
    Wednesday, December 25, 2019 3:55 AM
  • Thank you.

    This helps a lot.

    Appreciate that!



    rs

    Wednesday, December 25, 2019 5:24 AM
  • Hi Roy,

    If I need to print only a part of the page as shown in sub-grid. how can I do that?


    rs

    Thursday, December 26, 2019 4:49 AM