I create a method to convert the HTML to HTMLString and convert it to pdf and I put the baseUrl; however, there are no pictures in pdf.
public FileResult PrintTest3(int id)
{
var viewModel = new StandardIndexData();
viewModel.Title = _context.Titles.Where(i => i.Id == id).FirstOrDefault();
viewModel.Sections = _context.Sections;
viewModel.FileManagers = _context.FileManagers.ToArray();
viewModel.Items = _context.Items.Include(i=>i.FileManagers);
var html = Helper.RenderRazorViewToString(this, "DisplayAll",viewModel);
HtmlToPdf oHtmlToPdf = new HtmlToPdf();
//var baseUrl = "~//Images";
PdfDocument oPdfDocument = oHtmlToPdf.ConvertHtmlString(html, _dir);
byte[] pdf = oPdfDocument.Save();
oPdfDocument.Close();
return File(pdf, "application/pdf", "Test.pdf");
}