Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 图像宽度单位在0.13和0.14之间的差异_Php_Phpword - Fatal编程技术网

Php 图像宽度单位在0.13和0.14之间的差异

Php 图像宽度单位在0.13和0.14之间的差异,php,phpword,Php,Phpword,在我的项目中,我使用PHPWord 0.13以以下方式添加图像: $section->addImage(public_path('img/picture.jpg'),['width'=>Converter::cmToPixel(16)]); 它的工作原理类似于魅力,但现在我更新到0.14,并注意到图像比以前更大。 要模拟相同的行为,我应该将其更改为: $section->addImage(public_path('img/picture.jpg'),['width'=>

在我的项目中,我使用PHPWord 0.13以以下方式添加图像:

$section->addImage(public_path('img/picture.jpg'),['width'=>Converter::cmToPixel(16)]);
它的工作原理类似于魅力,但现在我更新到0.14,并注意到图像比以前更大。 要模拟相同的行为,我应该将其更改为:

$section->addImage(public_path('img/picture.jpg'),['width'=>Converter::cmToPoint(16)]);
cmToPixel->cmToPoint

为什么会这样?我有很多使用cmToPixel的文件和很多图像。 我可以通过做一些全球性的事情来“修复”这个问题吗

addLine也会发生这种情况
谢谢

这是为了修复而更改的,恐怕您无法设置全局属性来修复此问题