Invoice / Quote Page numbers

I’m trying to add paging to my pdf file to, but can someone explain how to add this? Where do i add witch code.
my coding knowledge is not that good :roll_eyes: