Orientation selection in dompdf cake 4.0.10

Hi all, I was using dompdf for years in cake 3.7.9. During migration to cake 4.0.10 the change of orientation from landscape to portrait and back is not recognized on controller level. Changing the orientation in bootstrap.php is working fine. The results as pdf-document are correct except the orientation. Could anyone give a hint, what to change?
I have compared my code with

There is no difference. Here is the controller code:

public function indexpdf($userlevel = null) {
    $orient = 'landscape';
    $actYear = Configure::read('actualYear');
    $usersTable = TableRegistry::get('Users');
    $users = $usersTable
            ->find()
            ->where(['member LIKE' => '%1%'])
            ->order(['username' => 'ASC']);

   // $this->viewBuilder()->enableAutoLayout(false); 
    $this->viewBuilder()->setClassName('CakePdf.Pdf');
    $this->viewBuilder()->setOption('pdfConfig',[
         [  'orientation' => 'landscape',
            'download' => true,
            'filename' => 'user_index' . $actYear . '.pdf']
    ]);

    $this->set('orientation', substr($orient, 0, 1));
    $this->set(compact('users'));
    // $this->set('_serialize', ['users']);
}

    public function setBirthOrder() {
    $users = $this->Users->getBirthdayUsers();
    foreach ($users as $user) {
         $datum = explode('-', serialize($user->birthday));
        //dd($datum);
        $user->b_month = $datum[1];
        $user->b_day =  $datum[2];
        $this->Users->save($user);
    }
}
public function birthlistpdf($userlevel = null) {
    $orient = 'portrait';
    $users = $this->Users->getBirthdayUsers();

// dd($query);
$this->viewBuilder()->setOptions([
‘pdfConfig’ => [
‘orientation’ => $orient,
‘filename’ => ‘birthlist’ . ‘.pdf’
]
]);
//dd($users);
$this->set(‘orientation’, substr($orient, 0, 1));
$this->set( compact(‘users’));
}