Hi luiz silva ,
I made a reference to the session, because certain data can only be retrieved when we have a certain user session. Imagine that if the data you want to extract is not allowing access to anonymous users, then no data will be displayed.
Nevertheless:
1) open the demo component, which contains the essential code to use:
2) use the action print to pdf (perhaps the best option in your case).
3) validate that you are providing the correct page URL.

I hope this helps you to get closer of solution.
Regards!