title: HiQPdf not finding the css
body: <p>The website I have written requires a convert web page to PDF functionality. After looking at the options HiQPdf looked like the best option and did all that was needed, currently I am using the free version until testing has finished.</p>
  
  <p>So following the instructions, I create the web page and pass it onto the PDF creator along with a location to find all the linked items (css mainly). The code goes</p>
  
  <pre><code>var model = new SomeKindOfModel
  {
      SetSomeStuff = stuff
  };
  
  string htmlToConvert = RenderRazorViews.RenderViewAsString(ControllerContext, "Print", model);
  string baseUri = $"{Request.Url.Scheme}://{Request.Url.Authority}";
  
  HtmlToPdf htmlToPdfConverter = new HtmlToPdf();
  byte[] pdfBuffer = htmlToPdfConverter.ConvertHtmlToMemory(htmlToConvert, baseUri);
  
  return new FileContentResult(pdfBuffer, "application/pdf");
  </code></pre>
  
  <p>Pretty standard code.</p>
  
  <p>Now when I run this from Visual Studio, it works as I would expect, the resulting pdf looks right, everything is in the correct place. When I publish to file system on my computer it works fine. When I copy the above files to another laptop and access that via it's ipAddress it works fine.</p>
  
  <p>The problem occurs when I use a web deploy package to put it on the main test server. At this point the pdf is created and the text is there but there is no styling, everything is just black on white text. If I include some of the styling in the cshtml file then that is picked up. Everything else on the site works correctly. I have added the local site.css to the bootstrap bundle and neither of them are being picked up</p>
  
  <p>I think the <code>string baseUri</code> line is not pointing the pdf creator to the correct location, but I have looked at what is in the variable and tried lots of different variations and nothing is working.</p>
  
  <p>I have looked at the text in the <code>htmlToConvert</code> and it looks right the links seem to be pointing in the correct direction.</p>
  
  <p>Even adding a link tag to the page with the location of the css hard coded into it isn't picking up the css.</p>
  
  <p>Is there some subtly regarding publishing a web site that I am missing here? Despite many years of developing ASP.NET MVC applications, it's the first time I have actually had to publish a web site, at my previous companies it was always someone else's problem. Here, it's mine.</p>