I used the following source code:
HtmlLoadOptions htmloptions = new HtmlLoadOptions();
Document doc = new Document(sourceFilePath, htmloptions);
doc.Save(outFile, Aspose.Pdf.SaveFormat.Pdf);
I also tried using
htmloptions.PageInfo.Margin.Left = 10;
htmloptions.PageInfo.Margin.Right = 10;
but the format got worse.
Thank you for your help,
Caifang