<?php

namespace Athens\Core\Renderer;

use Athens\Core\Writable\WritableInterface;
use DOMPDF;

/**
 * Class PDFRenderer
 *
 * @package Athens\Core\Renderer
 */
class PDFRenderer extends AbstractRenderer
{

    /**
     * @param WritableInterface $writable
     * @return void
     */
    public function render(WritableInterface $writable)
    {
        $documentName = $writable->getTitle() === true ? $writable->getTitle() : "document";

        $content = $this->getContent($writable);

        $dompdf = new DOMPDF();
        $dompdf->loadHtml($content);
        $dompdf->render();
        $dompdf->stream($documentName . ".pdf");
    }
}

<?php

namespace Athens\Core\Renderer;

use Athens\Core\Writable\WritableInterface;
use Dompdf\Dompdf;

/**
 * Class PDFRenderer
 *
 * @package Athens\Core\Renderer
 */
class PDFRenderer extends AbstractRenderer
{

    /**
     * @param WritableInterface $writable
     * @return void
     */
    public function render(WritableInterface $writable)
    {
        $documentName = ((string)$writable->getTitle()) !== "" ? $writable->getTitle() : "document";

        $content = $this->getContent($writable);

        $dompdf = new Dompdf();
        $dompdf->loadHtml($content);
        $dompdf->render();
        $dompdf->stream($documentName . ".pdf");
    }
}

Update to new DomPDF 7 interface.
Update to new DomPDF 7 interface.
