From the course: Extend Web Application Functionality on Microsoft Azure
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Implementing the code to generate a PDF file using Puppeteer - Azure Tutorial
From the course: Extend Web Application Functionality on Microsoft Azure
Implementing the code to generate a PDF file using Puppeteer
- [Instructor] Okay, so now we need to implement the code for generating the PDF files, and for that we're going to use Puppeteer. That's why we added PuppeteerSharp which is the .net implementation of Puppeteer. Okay, so let's go ahead and create the following method, private static. For here, I want to return a stream. So I want to do that asynchronously. And let's name this ConvertHTMLtoPDFAsync. So we're going to take the HTML content for that. Okay, so now the first thing that we need to do is download Chromium. The thing about Puppeteer is that it uses Chromium, but it needs to download the executable of Chromium. So that's why that's the first step. We need to create a new browser fetcher object. So browser fetcher equals new browser fetcher. And this is going to take a browser fetcher option. So let's do that. Browser fetcher options equals browser fetcher options. And specifically I want to set the path,…
Contents
-
-
-
Creating PDF files with Azure Functions and Puppeteer38s
-
(Locked)
Configuring the existing cloud resources1m 49s
-
(Locked)
Creating the repository and the Azure Functions project4m 21s
-
(Locked)
Implementing and testing the SQL trigger5m 8s
-
(Locked)
Implementing the code to generate HTML content7m 24s
-
(Locked)
Implementing the code to generate a PDF file using Puppeteer6m 56s
-
(Locked)
Implementing the Blob output binding in the Function4m 59s
-
(Locked)
Provisioning the Function app using the Azure Portal1m 9s
-
(Locked)
Manually deploying the Azure Function to the Function app4m 44s
-
-
-
-
-