CakePHP 3 print

Hello everyone, I’m a beginner developer. just recently I started with php and it was advised me to use CakePHP after starting with a small application that makes the CRUD on a table contacts. now i would like to print the list of contacts but i do not know how to do someone can help me?

I have found it easier to export to pdf and print the pdf. And there are libraries for php and pdf.