Hi Ahammad,
One possible solution is to transform input data in html format & then further convert intermediate html to pdf using "Convert file" or "Convert file using path" action under onedrive connector:

You need to test this action to check if it suits you. Please note that it's a preview action.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.