diff --git a/src/PhpSpreadsheet/CachedObjectStorage/Memcache.php b/src/PhpSpreadsheet/CachedObjectStorage/Memcache.php index 06cc1790..aebf52ab 100644 --- a/src/PhpSpreadsheet/CachedObjectStorage/Memcache.php +++ b/src/PhpSpreadsheet/CachedObjectStorage/Memcache.php @@ -253,7 +253,7 @@ class Memcache extends CacheBase implements ICache $this->cachePrefix = substr(md5($baseUnique), 0, 8) . '.'; // Set a new Memcache object and connect to the Memcache server - $this->memcache = new self(); + $this->memcache = new \Memcache(); if (!$this->memcache->addServer($memcacheServer, $memcachePort, false, 50, 5, 5, true, [$this, 'failureCallback'])) { throw new \PhpOffice\PhpSpreadsheet\Exception("Could not connect to MemCache server at {$memcacheServer}:{$memcachePort}"); } diff --git a/src/PhpSpreadsheet/Writer/PDF/DomPDF.php b/src/PhpSpreadsheet/Writer/PDF/DomPDF.php index 4fdfabda..320bca45 100644 --- a/src/PhpSpreadsheet/Writer/PDF/DomPDF.php +++ b/src/PhpSpreadsheet/Writer/PDF/DomPDF.php @@ -88,7 +88,7 @@ class DomPDF extends Core implements \PhpOffice\PhpSpreadsheet\Writer\IWriter } // Create PDF - $pdf = new self(); + $pdf = new \DOMPDF(); $pdf->set_paper(strtolower($paperSize), $orientation); $pdf->load_html( diff --git a/src/PhpSpreadsheet/Writer/PDF/MPDF.php b/src/PhpSpreadsheet/Writer/PDF/MPDF.php index 38b63cc0..4d47903c 100644 --- a/src/PhpSpreadsheet/Writer/PDF/MPDF.php +++ b/src/PhpSpreadsheet/Writer/PDF/MPDF.php @@ -89,7 +89,7 @@ class MPDF extends Core implements \PhpOffice\PhpSpreadsheet\Writer\IWriter } // Create PDF - $pdf = new self(); + $pdf = new \Mpdf\Mpdf(); $ortmp = $orientation; $pdf->_setPageSize(strtoupper($paperSize), $ortmp); $pdf->DefOrientation = $orientation; diff --git a/src/PhpSpreadsheet/Writer/PDF/TcPDF.php b/src/PhpSpreadsheet/Writer/PDF/TcPDF.php index d3ea95f3..c1be5abe 100644 --- a/src/PhpSpreadsheet/Writer/PDF/TcPDF.php +++ b/src/PhpSpreadsheet/Writer/PDF/TcPDF.php @@ -87,7 +87,7 @@ class TcPDF extends Core implements \PhpOffice\PhpSpreadsheet\Writer\IWriter } // Create PDF - $pdf = new self($orientation, 'pt', $paperSize); + $pdf = new \TCPDF($orientation, 'pt', $paperSize); $pdf->setFontSubsetting(false); // Set margins, converting inches to points (using 72 dpi) $pdf->SetMargins($printMargins->getLeft() * 72, $printMargins->getTop() * 72, $printMargins->getRight() * 72);