SharePoint 2013 Blogs - how can you combine filters and print results


  • Hello: A request came to my attention that instead of creating newsletter (probably distributed as PDF), why not filter on Blog posts based on Categories and Months and print the filtered posts on-the-fly (perhaps either as PDF or through a Printer if accessible). Is this possible? I don't see an option for print let alone an option for Advanced Filtering (with selection of Categories and Months).


    • Edited by get3rrd0ne Friday, April 21, 2017 3:37 PM
    Thursday, April 20, 2017 7:50 PM

All replies

  • You can add a print button using Content Editor web part on the same page and call default javascript print method

    <a href="javascript:window.print()">Print</a>

    And while taking windows print it will print all header, footer and navigation. To avoid those from printing you need to add print media css which will avoid all this.

    @media print {
            size:  auto;   /* auto is the initial value */
            margin: 0mm;  /* this affects the margin in the printer settings */
            background-color: #FFFFFF; 
            margin: 0px;  /* this affects the margin on the html before sending to printer */
            margin: 10mm 0mm 10mm 0mm; /* margin you want for the content */
        #title-row, #sidenavigation, #topnavigation {
    		display: none;

    And filtering with Categories and Months won`t have option by default as they are redirecting to different pages. I will investigate on this. Let me know if you need further help on Print one.

    Thursday, April 20, 2017 10:56 PM
  • Thanks Konjeti for your quick response...I will try out your suggestion and while waiting, for the second requirement, I wonder if we can use filtering with URL Query string as mentioned in this blog or if you have a better idea.

    Again, thanks for the help!

    Friday, April 21, 2017 3:59 PM
  • Thanks Konjeti - what's a quick way to embed the css code above to the javascript?

    Again, thanks for the help!

    Friday, April 21, 2017 5:49 PM