- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
以下是我使用 dompdf 显示 pdf 的代码,但错误是 failed to load pdfPDF.js v0.8.787(内部版本:58407cf)消息:InvalidPDFException
表名为 acad_act,数据库名为 pbas_db。数据库连接的详细信息存储在 db_connect.php 中。任何帮助将不胜感激
<?php
include('db_connect.php');
require 'dompdf/dompdf_config.inc.php';
$sqlinv="SELECT * FROM acad_act";
$res_inv = mysql_query($sqlinv) or die(mysql_error());
while ($sql3=mysql_fetch_array($res_inv)) {
$inv_id = $sql3['User_id'];
$date = $sql3['Year'];
$cname = $sql3['Gen_Info_AQ'];
$subtotal = $sql3['Gen_Info_NOC'];
$disc = $sql3['Gen_Info_Place'];
$subtotal2 = $sql3['Gen_Info_Duration'];
$tax = $sql3['Gen_Info_SA'];
$gtotal = $sql3['Gen_Info_Aqyear'];
}
$dompdf= new DOMPDF();
$html .="<html>
<head>
<style>
body {
font-family: arial;
font-size: 13px;
}
table {
width: 100%;
border-collapse: collapse;
}
th {
font-weight: bold;
font-size: 14px;
border: 1px solid #333333;
}
tr {
width: 100%;
}
td {
border: 1px solid #333333;
text-align: center;
padding: 10px;
font-weight: normal!important;
}
</style>
</head><body>";
$html .="
<table>
<thead>
<tr>
<th class=''>Sr.</th>
<th class=''>Particulars</th>
<th class=''>Size</th>
<th class=''>Quantity / Insertion</th>
<th class=''>Rate</th>
<th class=''>Amount</th>
<th class=''>Amount 2</th>
<th class=''>Amount 3</th>
</tr>
</thead>
<tbody>
<tr>
<td>" . $inv_id . "</td>
<td>" . $date . "</td>
<td>" . $cname . "</td>
<td>" . $subtotal . "</td>
<td>" . $disc . "</td>
<td>" . $subtotal2 . "</td>
<td>" . $tax . "</td>
<td>" . $gtotal . "</td>
</tr>
</tbody>
</table>
</body>
</html>";
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("sample.pdf");
exit(0);
?>
最佳答案
异常是由于浏览器安装了pdf.js插件。 pdfjs 没有呈现错误,而是显示了一个不显示错误的异常。只需删除 pdfjs 插件,您就可以看到所需的错误。
关于php - 无法加载 pdf,dompdf 错误 -> PDF.js v0.8.787(构建 : 58407cf) Message: InvalidPDFException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21013210/
我想了解 cf app 命令报告的内存状态。例如如果对于我的应用程序它返回 state since cpu memory disk
我正在从 Adobe CF10 升级到 CF2016,我注意到在 CF2016 中,对缓存查询对象的修改似乎会持久保存回缓存。这在 CF10 中似乎不是这种情况。 例如: SELECT
我的 ColdFusion 10 代码遇到了一个奇怪的问题。我是 ColdFusion 的新手,所以放轻松。之所以奇怪,是因为它似乎不会出现在该平台的旧版本(即 MX 7)中。 先来一点信息: 我有两
我对使用 Cloud Foundry 非常陌生。目前,我正在尝试使用 Cloud Foundry Java 客户端库自动执行将应用程序推送到目标 URL 的任务,但我无法弄清楚如何推送 list 文件
我目前正在制作一个响应式网站,并且正在努力完善我的 CSS。我注意到的一件事是我看过的很多网站都在使用: cf:before, .cf:after { content: " "; display: b
User CF, Item CF 需要多少数据才能给出推荐? 我手动创建了一个小数据集,所以我可以很好地理解算法是如何工作的。 我发现对于我创建的小数据集,Slope-One可以给推荐,User CF
我的.cf 文件夹位于网络映射驱动器U:\.cf 上。当我未连接到公司网络时,我收到此错误,因为驱动器不可用。我使用 Windows 7 FAILED Error read/writing confi
我正在尝试使用“cf logs my-cool-app”命令(CF 6.11 版)查看我在 Bluemix 上运行的应用程序的日志。 如果失败: FAILED Loggregator endpoint
CF-937 在补题…… D 分析 我们发现这些因子都是二进制形式的十进制数,n的范围是$1e5$,16的二进制是$10000$,于是可以枚举1~16,把这些因子预处理出来,对于每个
我的任务是将 CF 代码(大约 70 行)集成到我们的站点中,然后将其配置为与另一个站点的服务器进行通信。但是,我们的托管站点只是一个没有 CF 支持的典型服务器。代码会运行吗?我只知道 CF 是 A
我正在尝试从我的 .Net CF Window 应用程序以编程方式启动资源管理器。但是它抛出了win32异常。我在桌面 .Net 版本中使用了相同类型的代码,并且它总是有效。 (我正在使用 Windo
使用 -c 创建 tar 存档时,修改时间似乎在变化,特别是它切断了小数点后的时间,让 modtime 只是它原来的整数值。 注意: `` [localhost] $ mkdir test [loca
当我在命令提示符下使用cf ic插件时,它显示以下消息: Checking local Docker configuration... Your system was authenticated wi
我正在使用 CF8 和 SQL2000。我在 SQL 表的文本字段中存储了一堆 HTML。当我对该数据执行简单的 CFQUERY 和 CFDUMP 时,它被截断为 64000 个字符。 我已经确认我的
我有一个表单,它有一个面板,其中包含一些文本框和位于面板外的复选框。每次加载表单时,复选框都会获得焦点。 我在表单加载时放置了一个事件处理程序,并尝试将焦点设置在第一个文本框上,而不是将其放在复选框上
这是我在 ARC 下的代码: - (NSString*)encodeURL:(NSString *)string { NSString *anewString = (__bridge NSSt
我为使用 Compact Framework 的数据收集器开发软件。 我正在检查我正在调用的每个方法,我会计算这个方法执行所花费的时间。如果这个时间大于或等于 1 分钟,那么我将抛出异常。我有这个:
我想在 CF App 的环境变量中设置一个 RSA token 。 我尝试用下面的命令设置它 export var1=`cat key.pem` cf set-env app KEY "$var1"
我有一个项目列表,这些项目的格式不统一,需要排序。 item 1, item 3.0 ,item 8 , item 1.0 , item 4, item 5, item 6, ite
对于我们编写和维护的基于 CF Web 服务的 API,我们遇到了令人难以置信的令人沮丧的情况。多年来,我们拥有一个稳定的 API,可以与 Ruby、PHP 和 ColdFusion 客户端愉快地合作
我是一名优秀的程序员,十分优秀!