dqq22391 2013-03-21 11:18
浏览 534
已采纳

如何在php中使用html2pdf手动更改pdf的高度和宽度

i am using html2pdf to convert html to pdf... actually i have a large size of html container like 12x12in (inches). and i have used A4 size for the first time then my html content not showing completely till as per the size (12x12 in) then i have look into your site and i found all paper size here.. thanks for that important info... but now, when i have used A3 size i have found, my all html content inside the pdf file....but there are so much space at the bottom of my contents in pdf... So i want to know... IS there any way to reduce this space from the pdf or any other way to convert html to pdf with manually defined page height and width...

Thanks in Advance.

  • 写回答

2条回答 默认 最新

  • dtyrxmoj20617 2013-03-21 12:42
    关注

    The constructor of the HTML2PDF class says, that the $format parameter is the same as in the tcpdf class. The constructor of the tcpdf class says about the $format parameter:

    @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit) ...

    With a little bit of calculation, this make it possible to set the page size to 12'' x 12''. The default unit is millimeters.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥60 用visual studio编写程序,利用间接平差求解水准网
  • ¥15 Llama如何调用shell或者Python
  • ¥20 谁能帮我挨个解读这个php语言编的代码什么意思?
  • ¥15 win10权限管理,限制普通用户使用删除功能
  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)
  • ¥65 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案