In this article, we will display the PDF on the browser as a response to the .Net5 Web API endpoint. Create A .Net5 Web API Sample Application: Now let's create a .Net5 Web API sample application to begin our coding. API Endpoint To Load PDF From Physical Path: Now we are going to create a web API endpoint that will read the PDF file from the server physical folder. So first let's add a sample pdf file in our API server, so create 'wwwroot' folder(framework understandable folder to store the static files). Now add the 'pdf' folder inside of the 'wwwroot' folder and then add our sample pdf file as below. Create a new controller like 'PdfController.cs' inside of the 'Controllers' folder. Controllers/PdfController.cs: using System.IO; using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; namespace Dot5.PDF.OnBrowser.Controllers { [ApiController] [Route("[controller]")] public cl