It is posible. You should generate the HTML structure somewhere (Power Apps or Power Automate) and then convert it with the Onedrive action to convert HTML to PDF.
Be cautious because if you are using the Power Apps Trigger in the Power Automate and a lot of data can be an issue because will be a timeout in the Flow and no response will be returned to the Power App in order to manage the UX. The timeout happends when the execution take more than 2 minutes.
In case that you are in the timeout issue then you should extend the big effort to a Azure Functions or API.