Cakepdf: undefined method Cake\View\ViewBuilder::options()

in the migration note: https://book.cakephp.org/4/en/appendices/4-0-migration-guide.html stated that:

The _serialize , _jsonOptions and _jsonp special view variables of JsonView are now deprecated. Instead you should use viewBuilder()->setOption($optionName, $optionValue) to set these options.

I try:

public function view($id = null)
{
$user = $this->Users->get($id);
$this->viewBuilder()->setOptions([
‘pdfConfig’ => [
‘orientation’ => ‘portrait’,
‘download’ => true
]
]);
$this->set(‘user’, $user);

Error: Cannot convert value of type string to integer

Why this happen and how can i solve this. Thanks