Have tried many searches on google as well as these forums and can not seem to find a solution to this problem. We have some html reports that we want to convert to a PDF and when I load them into a document object, it does not seem to allow for me to change the page orientation. It always renders as landscape even after changing multiple pageinfo settings.
Below is some example code....
var loadOptions = new HtmlLoadOptions("http://localhost:8080"); loadOptions.PageInfo.Height = PageSize.A4.Height; loadOptions.PageInfo.Width = PageSize.A4.Width;Document pdfDocument = new Document(memStream, loadOptions);
pdfDocument.PageInfo.Height = PageSize.A4.Height;
pdfDocument.PageInfo.Width = PageSize.A4.Width;