Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

Setting image using PHPExcel it width is changed

images php coding issues or problems here.

Moderators: macek, egami, gesf

Setting image using PHPExcel it width is changed

Postby mstdmstd » Thu Jul 31, 2014 5:43 am

Using PHPExcel library I show image in excel sheet with code like :

Code: Select all
  $objDrawingPType = new PHPExcel_Worksheet_Drawing();
  $objDrawingPType->setWorksheet( $this->ExcelActiveSheetObj );
  $objDrawingPType->setName(basename($attach_file));
  $objDrawingPType->setPath($attach_file);
  $cell_coords = $this->int_coordsto_chars( $image_row, $image_col );

  $objDrawingPType->setCoordinates( $cell_coords );
  $objDrawingPType->setOffsetX(0);
  $objDrawingPType->setOffsetY(0);
It works but the image it resized by the width, say if this column is autosized then width of image is bigger then it was in original image. I want this image to keep its size as it is.
mstdmstd
New php-forum User
New php-forum User
 
Posts: 7
Joined: Sun Mar 30, 2014 4:45 am

Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.