I was able to verify that some of the issues that I was experiencing are fixed--namely, the loading external css and images. However, I am still having an issue with blank pages and incorrect PdfLayoutResult bounds. I've adjusted my method to only render the height needed for the HTML (by specifying -1). However, when I do this, the rendering emits an extra page again, and still seems to report the wrong height. If there is any clarification you need or if I'm doing something wrong, please let me know. Our client has been waiting for this fix, and will find this very disappointing.
private PdfLayoutResult RenderHtmlToPage(PdfPage currentPage, string html)
{
var clientSize = currentPage.GetClientSize();
//set up html generation
var unitConv = new PdfUnitConvertor();
float htmlWidth = unitConv.ConvertToPixels(clientSize.Width, PdfGraphicsUnit.Point);
float htmlHeight = unitConv.ConvertToPixels(clientSize.Height, PdfGraphicsUnit.Point);
var metafileFormat = new PdfMetafileLayoutFormat() { Layout = PdfLayoutType.Paginate, Break = PdfLayoutBreakType.FitPage };
WebKitHtmlConverter htmlConv = new WebKitHtmlConverter() { EnableHyperlinks = true, EnableJavaScript = true };
htmlConv.WebKitPath = Server.MapPath("QtBin");
//generate html
string htmlStr = HtmlScrubber.ReplaceUnsupportedHtmlCharactersForRender(html).Trim();
string baseUrlStr = string.Format("{0}://{1}", Request.Url.Scheme, Request.Url.Authority);
var mainContentConvResult = htmlConv.Convert(htmlStr, baseUrlStr, (int)htmlWidth, -1);
PdfLayoutResult layoutResult = null;
mainContentConvResult.Render(currentPage, metafileFormat, out layoutResult);
return layoutResult;
}