Asp.net mvc 使用jspdf(或类似文件)在mvc中将表格转换为pdf

Asp.net mvc 使用jspdf(或类似文件)在mvc中将表格转换为pdf,asp.net-mvc,pdf-generation,jspdf,Asp.net Mvc,Pdf Generation,Jspdf,我有一个mvc视图中的表 <table> <tr> <th> <span>Trasaction Date</span> </th> <th> <span>Company Name</span> </th> <th>

我有一个mvc视图中的表

<table>
    <tr>
        <th>
            <span>Trasaction Date</span>
        </th>
        <th>
            <span>Company Name</span>
        </th>
        <th>
            <span>Store Name</span>
        </th>
        <th>
            <span>Loan #</span>
        </th>
        <th>
            <span>Customer Name</span>
        </th>
        <th>
            <span>Payment Amount</span>
        </th>
        <th>Tender Type</th>
        <th>
            <span>Transaction Ref</span>
        </th>
        <th>
            <span>IP Address</span>
        </th>
        <th>
            <span>Store ID</span>
        </th>
        <th>
            <span>Originating User</span>
        </th>
        <th></th> 
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Transaction_Date)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Company_Master.Company_Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Location.Loc_Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Account_Loan_Number)
            </td>
            <td>
                <span>@Html.DisplayFor(modelItem => item.Customer_First_Name) </span><span>@Html.DisplayFor(modelItem => item.Customer_Last_Name)</span>
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Payment_Amount)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Tender_Type)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Payment_ID)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.OriginatedVia)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Location.Loc_ID)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Inserted_By)
            </td>
            <td>
                <div id="btndeletediv">
                    <input type="button" id="@(item.Payment_ID)" value="Print" />
                </div>
            </td>
        </tr>
    }
</table>
这张桌子看起来像![本]

当我点击pdfexport按钮时,我想用css在pdf中显示相同的表

我试过使用iTextSharp,但没有成功。如何使用jspdf传递表id或任何类似信息

我尝试过搜索,但找不到任何将表格导出为pdf的人

提前谢谢