Converting html page to pdf- always in landscape

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;

Hi Tim,


Thanks for your inquriy. We will appreciate it if you please share your sample HTML document here, we will look into it an will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,

I am having the exact opposite problem. In that, I try to force to Landscape and it always renders as portrait.

maria-2:
I am having the exact opposite problem. In that, I try to force to Landscape and it always renders as portrait.
Hi Maria,

Thanks for contacting support.

Can you please share the resource file, so that we can test the scenario in our environment. We are sorry for this inconvenience.