@Shashika Edirisingha Thanks for asking question!
To generate a PDF using Azure services, you'll encounter challenges due to the OS dependencies required for PDF generation, which aren't supported in the Azure App Service sandbox. This limitation is detailed in the Kudu service wiki here.
However, if you have HTML content, there are alternative approaches. This blog article discusses various options and recommends a viable solution for generating HTML-based PDF reports from an Azure App Service.
Let us know.