我正在使用TCPDF库版本:5.9.011.我正在尝试以PDF格式执行HTML布局.我试过的例子提供了网站
$html = '<h1>HTML Example</h1>
<h2>List</h2>
Some special characters: < € € € & è è © > \\slash \\\\double-slash \\\\\\triple-slash
';
// output the HTML content
$pdf->writeHTML($html, true, false, true, false, '');
//Close and output PDF document
$pdf->Output('example_006.pdf', 'I');
Run Code Online (Sandbox Code Playgroud)
显然发现生成的PDF只有默认页眉和页脚,中间内容为空.
但是,如果我删除特殊字符,如:
$html = '<h1>HTML Example</h1>
<h2>List</h2>
Some special characters:
';
Run Code Online (Sandbox Code Playgroud)
PDF获取其中指定的中间内容 $html
需要帮助构建查询.我有quantity_price表,列出数量和相应的价格,如下所示
Quantity Price ---------------- 1 -- € 175,35 2.5 -- € 160,65 5 -- € 149,10 10 -- € 143,85
所以最多1个数量的价格将是175,35到2.5,它将是160,65等等.超过10个数量,价格将保持在143,85.
现在,如果我的数量是1.5,那么查询应该返回价格160,65,这意味着找到范围数量所在的位置,然后获得该范围内的最大数量的价格.
在 URL 中有百分号,会向浏览器返回错误的请求(错误 400)。我有一个带有百分比 ( %) 符号的文件名,位于服务器上。
原文件名:
204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1,2%.pdf
Run Code Online (Sandbox Code Playgroud)
点击下载链接后浏览器中的网址:
http://www.example.com/204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1%2C2%25.pdf
Run Code Online (Sandbox Code Playgroud)
这将返回带有“错误请求”的 400 错误。我正在使用 Kohana 3。
现有.htaccess文件内容如下:
RewriteEngine On
RewriteBase /
<Files .*>
Order Deny,Allow
Deny From All
</Files>
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT]
Run Code Online (Sandbox Code Playgroud)