如何在pdf中保存Bootstrap网格

时间:2015-04-28 13:22:40

标签: jquery twitter-bootstrap pdf

我希望我的客户端在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">
               .....
                 .....

更新
我正在寻找开源pdf-export

1 个答案:

答案 0 :(得分:1)

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

 $("#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