PHP - Resizing image while attaching it with online pdf (mpdf) -


i generating pdf images in it. since images large in size, size of generated pdf large. there way dynamically reduce size of image while attaching pdf.

i tried here

`header('content-type: image/jpeg');` `include('simpleimage.php');` `$image = new simpleimage();` `$image->load($imgpath);` `$image->resizetowidth(150);` `$image->output();` 

note1 : $imgpath passed loop , i'm using mpdf generate pdf.

if in simple_image code using, see imagecopyresampled function in resize method. called in turn resizetowidth method - image being resampled.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -