- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在尝试呈现 pdf 时遇到此错误。我正在为游戏框架使用 Nicolas Leroux 的 PDF 模块。
这是整个堆栈跟踪:Pastebin .谷歌搜索仅显示 4 个结果。他们建议删除我已删除的任何 float 属性和位置属性,只是为了试一试。我仍然面临这个问题。有没有人能够解决这个问题?
编辑:这是呈现 pdf 的 html:
#{extends 'main.html' /} #{set title:'Salary Details' /}
<html>
<head>
<title>Employee Name</title>
<style>
body {
font: 9pt Arial, Helvetica, sans-serif;
}
.container {
margin: 0 auto;
width: 1000px;
border: 1px solid black;
padding: 12px;
}
.logoClass {
width: 200px;
height: 85px;;
}
.companyAddressClass {
width: 60%;
margin: 0 auto;
font-size: 17px;
font-weight: bold;
text-align: center;
}
.empClass table {
width: 100%;
border: 1px solid #ccc;
border-collapse: collapse;
margin: 10px 0px;
}
.empClass table th,td {
border: 1px solid #ccc;
padding: 5px 5px;
}
.empClass table th {
background: #f2f2f2;
}
</style>
</head>
<body onload="window.print();">
%{for(int i=0;i<dataList.size ();i=i+1){}%
<div class="container" style="page-break-after:#{if i == dataList.size()-1} avoid;#{/if} #{else} always; #{/else}">
<div class="logoClass"></div>
<div class="companyAddressClass">
${dataList.get(i).distributorName},<br /> ${dataList.get(i).city},<br />
${dataList.get(i).state} <br /> <br /> <span>Payslip for the
month of ${dataList.get(i).salaryMonth}</span>
</div>
<br class="clear" />
<div class="empClass">
<table border="1">
<tr>
<td>Employee No: ${dataList.get(i).employeeNumber}</td>
<td>Location: ${dataList.get(i).location}</td>
</tr>
<tr>
<td>Name: ${dataList.get(i).employeeName}</td>
<td>Salary for the M/O: ${dataList.get(i).salaryMonth}</td>
</tr>
<tr>
<td>Bank Name: ${dataList.get(i).bankName}</td>
<td>Designation: ${dataList.get(i).designation}</td>
</tr>
<tr>
<td>Bank Acc No: ${dataList.get(i).accountNumber}</td>
<td>Join Date: ${dataList.get(i).joinDate}</td>
</tr>
<tr>
<td>PF No: ${dataList.get(i).pfNumber}</td>
<td>Gender: ${dataList.get(i).gender}</td>
</tr>
<tr>
<td>ESI No: ${dataList.get(i).esiNumber}</td>
<td>LOP: ${dataList.get(i).lop}</td>
</tr>
<tr>
<td>PAN No: ${dataList.get(i).panNumber}</td>
<td>Days Worked: ${dataList.get(i).daysWorked}</td>
</tr>
</table>
</div>
<br />
<div class="empClass">
<table border="1">
<tr>
<th colspan="3">Earnings</th>
<th colspan="2">Deductions</th>
</tr>
<tr>
<th align="left">Header</th>
<th align="right">Actual</th>
<th align="right">Paid</th>
<th align="left">Header</th>
<th align="right">Paid</th>
</tr>
<tr>
<td>Basic</td>
<td align="right">${dataList.get(i).basic}</td>
<td align="right">${dataList.get(i).basic}</td>
<td>PF</td>
<td align="right">${dataList.get(i).pf}</td>
</tr>
<tr>
<td>HRA</td>
<td align="right">${dataList.get(i).hra}</td>
<td align="right">${dataList.get(i).hra}</td>
<td>ESICEE</td>
<td align="right">${dataList.get(i).esicee}</td>
</tr>
<tr>
<td>Conveyance Allowance</td>
<td align="right">${dataList.get(i).conveynanceAllowance}</td>
<td align="right">${dataList.get(i).conveynanceAllowance}</td>
<td>ESICEE(PWS)</td>
<td align="right">${dataList.get(i).esiceePWS}</td>
</tr>
<tr>
<td>Medical Allowance</td>
<td align="right">${dataList.get(i).medicalAllowances}</td>
<td align="right">${dataList.get(i).medicalAllowances}</td>
<td>PT</td>
<td align="right">${dataList.get(i).pt}</td>
</tr>
<tr>
<td>Special Allowance</td>
<td align="right">${dataList.get(i).specialAllowance}</td>
<td align="right">${dataList.get(i).specialAllowance}</td>
<td>PT(PWS)</td>
<td align="right">${dataList.get(i).ptPWS}</td>
</tr>
<tr>
<td>Incentives</td>
<td align="right">${dataList.get(i).midMonthAmountPWS}</td>
<td align="right">${dataList.get(i).midMonthAmountPWS}</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Other Allowances</td>
<td align="right">${dataList.get(i).otherAllowance}</td>
<td align="right">${dataList.get(i).otherAllowance}</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" align="right">Total
Earnings:${dataList.get(i).totalEarnings}</td>
<td colspan="2" align="right">Total Deduction
:${dataList.get(i).totalDeduction}</td>
</tr>
<tr>
<td colspan="3"> </td>
<td colspan="2" align="right"><strong>Salary Credited
: ${dataList.get(i).salaryCredited}</strong></td>
</tr>
</table>
<table>
<thead>
<tr>
<th>Position Title</th>
<th>City Name</th>
<th>State Name</th>
</tr>
</thead>
<thead>
<tr>
..
..
..
..
<th>${dataList.get(i).positionTitle}</th>
<th>${dataList.get(i).cityName}</th>
<th>${dataList.get(i).stateName}</th>
</tr>
</thead>
</table>
<br>
<table>
<thead>
<tr>
<th>Some Header</th>
<th>Some Header</th>
<th>Some Header</th>
<th>Some Header</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">Values</td>
..
..
..
..
..
</tr>
</tbody>
</table>
</div>
<div>
<span style="font-size: 15px; font-weight: bold;"> Salary
Credited Amount(In Words): ${dataList.get(i).salaryCreditedInWord} </span>
</div>
</div>
<br />
<br />
%{}}%
</body>
</html>
我用的是Windows 7和Tomcat6作为测试环境,和大家过来的环境一样here面临着麻烦。
谢谢。
最佳答案
This commit是解决您的问题的方法。你可以download the whole class并将其放入您的源代码中,这样您就不必重建库 jar。
关于java - 尝试呈现 pdf 时获取此 "org.xhtmlrenderer.render.BlockBox cannot be cast to org.xhtmlrenderer.newtable.TableBox",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13137401/
我很确定我不会是第一个被这个绊倒的人,但我找不到答案。这是作业。 class Tier{} class Fisch extends Tier{} class Vogel extends Tier{}
在接收器开发人员指南中如下: Applications running on the Google Cast receiver device (receiver applications) are a
最近我制作了一个自定义本地 Flask 网站,用于从本地设备转换到连接到我的电视的 RPi4。有一个 GUI它也可以通过 GET 请求控制,这是转换工作的主要方式,实际上是通过 GET 请求将数据从
最近我因为某些原因重置了我的路由器,所以当我尝试将它连接到 chromecast 时,Chromecast 没有在其列表中列出我的 wifi 名称。 之前它工作正常,所以我选择其他并手动输入我的网络名
做这样的 Actor 阵容的好方法是什么? seq { yield (box "key", box "val") } |> Seq.cast 因为这看起来非常难看: seq { yield (box
我继承的遗留 Web 应用程序是在经典 ASP 中为新西兰乐施会定制编写的,它在用户提交的输入上运行字符串替换,删除字符串“cast”,大概是因为 cast 函数。 然而,这意味着我们的参与者都不能拥
我去了三星网站并下载了 Media Control SDK 包。当我在我的 Galaxy S3 Android 4.3 上使用 AllShare Cast 视频播放器时,我的智能电视(在同一网络中)出
如何在 BigQuery 中查看 INT64 的二进制表示形式?将其转换为 BYTES 类型也可以。 最佳答案 正如@Elliot Brossard 所述,INT64 如何执行是一个实现问题。类型表示
Google 的文档要求我们设置自己的网络服务器来托管 receiver.html。 是否有任何人都可以使用的默认公共(public) chrome-cast 接收器? 我只需要非常基本的接收器,与
我在 Eclipse 3.6 (Helios) 中运行某人的代码时遇到问题。代码是用 OpenJDK 7 编写的。我运行的是 Windows 7,我必须为它安装 Java 7。我之前使用的是 Java
所以我有一些 COM 类型,它们的名称很难记住、又长又笨重,所以如果可以避免的话,我宁愿在从对象进行转换时不必键入它们。使用 Seq.cast 它将推断所需的类型并根据需要进行强制转换。 这是一个用
假设您不关心编译器和机器的转换风格,以下之间是否存在明显差异: #include #include #include static int64_t tosigned (void *p) {
我的测试类 XString 有两个转换运算符。但是编译器不会为 fooA 使用显式转换 operator const wchar_t*()。为什么? class XString { public:
我有以下代码: T imageCollectionItem; // This checks if image actually exists, if it doesn't it gets the ne
这有点假设,因为我不太担心性能 - 只是想知道一般来说哪个选项实际上最快/最有效,或者是否没有任何区别。 假设我有以下支持重载的访问者模板代码: #define IMPLEMENT_VISITOR_W
我目前正在存储复选框的真/假状态。在注册表中检查值以在下次加载表单时重置。 加载表单时,我获取值并像这样设置复选框。 string value = (string)Registry.GetValue(
enum Gender { Male, Female } var k = new[] { Gender.Male }.Cast().ToList().Cast().ToList(); //alrigh
我正在按照 https://codelabs.developers.google.com/codelabs/cast-receiver#0 上的教程构建一个 chrome cast 自定义接收器。我无
我看不懂以下作品 SELECT price, CAST(price AS DECIMAL(10,2)) FROM orders; 但是更新失败: UPDATE orders SET price = C
在 Cast v3 中,如何手动更改“停止转换”按钮的颜色? 我可以为其他所有内容更改转换对话框或媒体路由器的样式,但“停止转换”按钮似乎会根据背景颜色切换为黑色/蓝色。 我的主题:
我是一名优秀的程序员,十分优秀!