如何设置在phpword中使用setImageValue上传的图像的高度和宽度?

问题描述 投票:0回答:1

我正在使用此代码,并且它将图像上传到功能良好的docx,但问题是图像的尺寸太小,我需要增加高度和宽度

$ templateProcessor-> setImageValue('image',[$ image_path,['width'=>'height'=> 40]]));它不起作用有可能吗?

    $templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor(asset('docx/job_application.docx'));
    $templateProcessor->setImageValue('image',$image_path);
    $templateProcessor->saveAs('docx/'.$file_name.'.docx');
php laravel laravel-5 phpword
1个回答
0
投票

在您的模板中,将书签设置为$ [image:450:334}

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.