我想将a 从用户填充的 MVC3 视图转换为 pdf。当用户单击按钮时,应在浏览器的新选项卡上打开 PDF,而不是查看。该视图具有内部 CSS 和复选框,以便用户可以选中 pdf 中的复选框,然后可以进行打印。
以下是通过操作结果以 pdf 格式打开的视图
@using Project.Models
@model Student
<!DOCTYPE html>
<html>
<head>
<style>
body
{
background-color:#d0e4fe;
}
/*and other CSS*/
</style>
<script>
//script to check /uncheck checkbox
</script>
</head>
<body>
/* Information of Student through model */
CheckList
<input type="checkbox" name="card1" value="Passport">Passoprt
<input type="checkbox" name="card2" value="Voter">Voter Card
<input type="checkbox" name="card3" value="ID">College id
</html>
我正在使用 itextsharp 库,我想避免使用其他包,如 razorpdf。
这怎么能实现??