Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在从图像流生成 PDF,但实际图像的大小总是有一点差异,并且图像也会按比例缩小。
我正在使用 TCPDF 类
请帮忙....
以 72dpi 的分辨率和 A4 的文档大小(或您在 tcpdf 中设置的任何大小)设置您的图像文档。
那么当你调用$tcpdf->image('/path/to/image.ext')图像时应该是正确的大小。
$tcpdf->image('/path/to/image.ext')
以点为单位思考——像素在 tcpdf 生成的 pdf 空间中用处不大。