TCPDF 缩放和质量问题 [英] TCPDF scaling and quality issue

查看:41
本文介绍了TCPDF 缩放和质量问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从图像流生成 PDF,但实际图像的大小总是有一点差异,并且图像也会缩小.

I am generating PDF from image stream but there is always a little difference in the size of actual image and the image scales down as well .

我正在使用 TCPDF 类

I am using TCPDF class for it

请帮忙....

推荐答案

将图像文档设置为 72dpi 的分辨率和 A4 的文档大小(或您在 tcpdf 中设置的任何大小).

Set up your image document at a resolution of 72dpi and the document size of A4 (or whatever size you set in tcpdf).

然后当你调用 $tcpdf->image('/path/to/image.ext') 图像应该是正确的大小.

Then when you call $tcpdf->image('/path/to/image.ext') the image should be the correct size.

为单位思考 - 像素在 tcpdf 生成的 pdf 空间中用处不大.

Think in points - pixels aren't much use in a tcpdf-generated pdf space.

这篇关于TCPDF 缩放和质量问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆