Answer the question
In order to leave comments, you need to log in
Why do images in a spreadsheet (PhpSpreadsheet) have a dotted background?
I have an image with a transparent background. If you print only it, then the background remains transparent (nothing is filled). And if you throw it into a document (PhpSpreadsheet) and convert it to PDF, then it has a lot of dots in the background with the same interval.
The image is inserted quite simply:
$img = new Drawing();
$img->setPath($imagePath);
$img->setOffsetX(0);
$img->setOffsetY(0);
$img->setCoordinates('A' . $this->row);
$img->setWidth(940);
$img->setWorksheet($sheet);
$this->savePdf($Excel);
if ($this->returnFile) {
return $this->fileName;
}
$file = Storage::disk('local')->get("temp/$this->fileName.pdf");
$response = Response::make($file, 200);
$response->header("Content-Type", "application/pdf");
return $response;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question