如何在pdf中保存Bootstrap网格

我希望我的客户端下载bootstrap网格中的所有内容,因为pdf有任何插件

这是我的自举网格

<div class="container-fluid">
            <div class="row">
                <h3 class="text-center"><strong>ABC AGREEMENT</strong></h3>
            </div>
            <div class="row">
                <h4 class="text-center"><strong>(the “Agreement”)</strong></h4>
            </div>
            <div class="row">
                <div class="span12 text-center">
                    <h4>
                        THIS AGREEMENT <small> is made on</small> 
                        <input name="getdate" type="text" class="form-control" placeholder="click to show datepicker"  id="datepick">
                    </h4>   
                </div>
            </div>
            <div class="row">
                <div class="span12 text-center">
                   <h5>BETWEEN</h5>
                </div>
            </div>
            <div class="row">
                <div class="span12">
               .....
                 .....

Update
我正在寻找opensource pdf-export

回答(1)

2 years ago

试试这个,将其添加到您的脚本:

$("#grid").kendoGrid({
            toolbar: ["pdf"],
            pdf: {
                allPages: true,
                fileName: "Kendo UI Grid Export.pdf",
                proxyURL: "http://demos.telerik.com/kendo-ui/service/export"
            },
            dataSource: {
              type: "odata",
              transport: {
                  read: {
                      url: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Employees",
                  }
              },
              pageSize: 5
            },
            columns: [
                { title: "Photo", width: 140 },
                { title: "Details", width: 350 },
                { title: "Country" },
                { title: "EmployeeID" }
            ],
            rowTemplate: kendo.template($("#rowTemplate").html()),
            altRowTemplate: kendo.template($("#altRowTemplate").html()),
            height: 500,
            scrollable: true,
            pageable: true
        });

http://demos.telerik.com/kendo-ui/grid/pdf-export