New to Kendo UI for jQuery? Download free 30-day trial

Export All ListView Pages to PDF


Product Progress® Kendo UI® ListView for jQuery
Product Version Created with the 2017.3.1026 version


How can I export all ListView pages to a PDF file?


  1. Select the Pager of the ListView.
  2. Save the dataSource pageSize in a variable.
  3. Change the pageSize to display all the items.
  4. Use the Kendo UI Drawing API to export the desired content.
  5. When the export promise is done, set the old pageSize to the dataSource of the Pager.
<div id="example">
        // Import DejaVu Sans font for embedding

        // NOTE: Only required if the Kendo UI stylesheets are loaded
        // from a different origin, e.g.
            "DejaVu Sans": "",
            "DejaVu Sans|Bold": "",
            "DejaVu Sans|Bold|Italic": "",
            "DejaVu Sans|Italic": "",
            "WebComponentsIcons": ""

    <!-- Load Pako ZLIB library to enable PDF compression -->
    <script src=""></script>

    <script src=""></script>

    <div class="demo-section k-content wide">
        <div id="listView"></div>
        <div id="pager" class="k-pager"></div>

    <script type="text/x-kendo-template" id="template">
        <div class="product">
            <img src=" ProductID #.jpg" alt="#: ProductName # image" />
            <p>#:kendo.toString(UnitPrice, "c")#</p>

        $(function() {
            var dataSource = new{
                data: products,
                pageSize: 21

                dataSource: dataSource

                dataSource: dataSource,
                template: kendo.template($("#template").html())
        setTimeout(function(e) {
            var pager = $("#pager").data("kendoPager");
            var oldPageSize = pager.dataSource.pageSize();
            var total = oldPageSize * pager.dataSource.totalPages();


                .then(function(group) {
                    kendo.drawing.pdf.saveAs(group, "ListView.pdf");
                .done(function(data) {
        }, 1500);

        #listView {
            padding: 10px 5px;
            margin-bottom: -1px;
            min-height: 510px;
            /* Avoid cutout if font or line is bigger */
            font: inherit;

        .product {
            float: left;
            position: relative;
            width: 111px;
            height: 170px;
            margin: 0 5px;
            padding: 0;

        .product img {
            width: 110px;
            height: 110px;

        .product h3 {
            margin: 0;
            padding: 3px 5px 0 0;
            max-width: 96px;
            overflow: hidden;
            line-height: 1.1em;
            font-size: .9em;
            font-weight: normal;
            text-transform: uppercase;
            color: #999;

        .product p {
            visibility: hidden;

        .product:hover p {
            visibility: visible;
            position: absolute;
            width: 110px;
            height: 110px;
            top: 0;
            margin: 0;
            padding: 0;
            line-height: 110px;
            vertical-align: middle;
            text-align: center;
            color: #fff;
            background-color: rgba(0, 0, 0, 0.75);
            transition: background .2s linear, color .2s linear;
            -moz-transition: background .2s linear, color .2s linear;
            -webkit-transition: background .2s linear, color .2s linear;
            -o-transition: background .2s linear, color .2s linear;

        .k-listview:after {
            content: ".";
            display: block;
            height: 0;
            clear: both;
            visibility: hidden;
In this article