HTML to PDF how can i convert into PDF?

This is my Controller function …

public function exportpdf()
        {
            $invoice = $this->Countries->find();
            $this->viewBuilder()->setClassName('CakePdf.Pdf');
            $this->viewBuilder()->options([
                'pdfConfig' => [
                    'orientation' => 'portrait',
                    'filename' => 'certificate_'
                ],
                
            ]);
            $this->set('invoice', $invoice);
        }
///////////////////////////////////    this is bootstrap.php setup ////

Configure::write('CakePdf', [
    'engine' => [
        'className' => 'CakePdf.WkHtmlToPdf',
        'binary' => '/usr/bin/wkhtmltopdf', //LINUX
        //'binary' => 'C:\PROGRA~1\wkhtmltopdf\bin\wkhtmltopdf.exe', //WINDOWS
        'options' => [
            'print-media-type' => true,
            'outline' => true,
            'dpi' => 96
        ]
    ],
    'pageSize' => 'Letter',
]); 

But when i call the function it’s was long run but not any output.