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

HTML to PDF - Huge margins on sides of file

$
0
0
I'm using Aspose.Pdf to convert an HTML file to a PDF file. However, I'm seeing huge discrepancies between how the two look - most notably, the left and right margins in the PDF come out as enormous, with all of the content squished into the middle third of the page. The code looks like this:

var pdfGenerator = new Aspose.Pdf.Generator.Pdf();
using (Stream htmlAsStream = File.OpenRead(document.FullPath))
{
pdfGenerator.BindHTML(htmlAsStream, string.Empty);
}
pdfGenerator.Save(pdfPath);

I've attached a .zip file containing the input HTML and the output PDF. I'm trying to figure out what it is about the file that makes it output so strangely, and if there's a way I can fix it.

I am using Aspose.Pdf version 10.1.0.0 and .NET 4.5.50938.

Viewing all articles
Browse latest Browse all 3131

Trending Articles