Hello,
I have been attempting several things in order to simply get html contents to fit on a letter size page. As you will see from the attached PDF they seem to be shifted over to the right.
Code:
var basePath = "C:/Users/Administrator/Desktop/html/";
var loadOptions = new HtmlLoadOptions(basePath);
//load the file
doc = new Document("C:/Users/Administrator/Desktop//html/smalltest.html", loadOptions);
foreach (Page page in doc.Pages)
{
page.SetPageSize(612, 792);
page.PageInfo.IsLandscape = false;
}
doc.Save("C:/Users/Administrator/Desktop/HTMLviaDOM.pdf");
Thanks,
Grant
I have been attempting several things in order to simply get html contents to fit on a letter size page. As you will see from the attached PDF they seem to be shifted over to the right.
Code:
var basePath = "C:/Users/Administrator/Desktop/html/";
var loadOptions = new HtmlLoadOptions(basePath);
//load the file
doc = new Document("C:/Users/Administrator/Desktop//html/smalltest.html", loadOptions);
foreach (Page page in doc.Pages)
{
page.SetPageSize(612, 792);
page.PageInfo.IsLandscape = false;
}
doc.Save("C:/Users/Administrator/Desktop/HTMLviaDOM.pdf");
Thanks,
Grant