Hope you are doing well. Thank you for writing in!
Per the description, I understand that you want to convert word/excel files to PDF.
We suggest printing the file to PDF using the print options. This setting will help you set the page numbers and create a PDF per your requirements.
You may take reference from the link: Print to PDF
Hope this helps.