Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Page Contents don't fit on page

$
0
0
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

Viewing all articles
Browse latest Browse all 3131

Trending Articles