douyou7102 2014-06-26 17:14
浏览 66
已采纳

wkhtmltopdf从文件随机空框生成PDF

I'm using wkhtmltopdf to create a pdf from a file (using PHP if that's important) and it's working great except for a random empty box. Here is what I've tried to get the box to go away:

  1. Changed encoding for wkhtmltopdf to be UTF-8
  2. Made sure the file was encoded using UTF-8
  3. Checked the MySql database that it's pulling from to make sure that the encoding was UTF-8
  4. Doubled/Tripled checked to make sure there is no extra character at the end of the line.
  5. Deleted and re-inserted the database row
  6. Rendered everything except that database row and the box wasn't there, so I know it's that entry.

Here is a copy and paste of the box from Adobe Reader in case it helps:

  • 写回答

1条回答 默认 最新

  • doxp30826 2014-06-26 17:41
    关注

    Finally figured it out. It appears that the issue wasn't with the text or database row at all. It was trying to use Helvetica. I'm not sure why this caused an issue on just that one row, but it did. I switched to Arial and it works perfectly.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条