I am trying to convert html to a pdf in landscape orientation, but it is always come out as portrait.
My code is pretty simple:
I am passing in an options object with options.PageInfo.IsLandscape = false and this is staying as expected. I expect I am missing something simple, but everything i found has been old and the objects that they use no longer exist.public static Document GetPdfDocumentFromHtml(string html, HtmlLoadOptions options = null){ApplyLicense();if (options == null){options = new HtmlLoadOptions();options.PageInfo.Margin.Bottom = 10;options.PageInfo.Margin.Top = 20;options.PageInfo.Margin.Left = 10;options.PageInfo.Margin.Right = 10;options.PageInfo.IsLandscape = false;}Document doc = new Document(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(html)), options);return doc;}