Margins and image does not work together aspose 10.3

I have the following code snippet. When the pdf is rendered the image shows ontop of the header, and not below as it should. If I do not set the margins the pdf is rendered correctly. Please help.

var document = new Aspose.Pdf.Document();
document.Pages.Add();
document.PageInfo.Margin = new MarginInfo(188, 188, 37, 37);
document.Pages[1].PageInfo.Margin = new MarginInfo(188, 188, 37, 37);

var htmlFragment = new HtmlFragment(htmlString);
var header = new Aspose.Pdf.HeaderFooter();
header.Paragraphs.Add(htmlFragment);
document.Pages[1].Header = header;

var img = new Aspose.Pdf.Image();
img.ImageStream = ms; //get image from memory stream
img.HorizontalAlignment = HorizontalAlignment.Center;
document.Pages[1].Paragraphs.Add(img);

Hi Andres,


Thanks for using our API’s,

I have tested the scenario and have observed that when setting page margin information, the image which is added in body area of PDF file, appears in Header section. However when margin information is removed, the image properly appears in page body section. For the sake of correction, I have logged this problem
as PDFNEWNET-38582 in our issue tracking system. We will further
look into the details of this problem and will keep you updated on the status
of correction. Please be patient and spare us little time. We are sorry for
this inconvenience.