Laravel 5.3与barryvdh / laravel-dompdf的pdf渲染问题

Call to undefined method Barryvdh\DomPDF\PDF::setOrientation()

I am getting the above error on saving pdf.

 PDF::loadHTML($flight_plan_pdf_content)
   ->setPaper('a4')
   ->setOrientation('portrait')
   ->save($filePath . $fileName);

About mentioned is my code.

the same code is working with laravel 5.2 and "barryvdh/laravel-dompdf": "0.6.*",

Looking at barryvdh/laravel-dompdf I can see that this is correct call

setPaper($paper, $orientation = 'portrait')

so for your example it should be

 PDF::loadHTML($flight_plan_pdf_content)
   ->setPaper('a4')
   ->save($filePath . $fileName);

no need for setting portrait since it's default value.

EDIT: This is related to the latest 0.7 version. If you are using any other just add 'portrait' as the second parameter to the setPaper function