Hi support team,
I'm trying to render a PDF with the margins set to 0, and I'm finding that the header section is sometimes misplaced with an empty space above it. Sometimes the PDF is rendered just fine. I'm not sure what triggers the difference.
Here's a snippet of my setup code:
Code: C#
HtmlToPdf.Options.PageSize = PdfPageSizes.Letter;
HtmlToPdf.Options.OutputArea = new RectangleF(0.0f, 0.0f, 8.5f, 11f);
HtmlToPdf.Options.JpegQualityLevel = 100;
HtmlToPdf.Options.PreserveHighResImages = true;
if ( ! header.IsNullOrEmpty() ) HtmlToPdf.Options.HeaderHtmlFormat = header;
if ( ! footer.IsNullOrEmpty() ) HtmlToPdf.Options.FooterHtmlFormat = footer;
HtmlToPdf.ConvertHtml(body, stream);
return stream.ToArray();
And here are screenshots of the good and bad headers can be found at
http://imgur.com/huNzjWhat do you suggest?
Thanks!
James