Hi,
I can see some differences between generated PDF and source HTML files.
The code used to generate PDF from HTML:
string source = @"test.html";
Aspose.Pdf.HtmlLoadOptions htmloptions = new Aspose.Pdf.HtmlLoadOptions(Environment.CurrentDirectory + @"\");
htmloptions.PageInfo.Margin.Top = (float)10;
htmloptions.PageInfo.Margin.Bottom = (float)10;
htmloptions.PageInfo.Margin.Left = (float)10;
htmloptions.PageInfo.Margin.Right = (float)10;
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(source, htmloptions);
doc.Save(@"test.pdf");
I’ve highlighted differences in the image below:
difference.png (141.2 KB)
Also, including HTML file with css and JS files:
HTML.zip (5.1 KB)
Difference 1:
I want to inform you, when I remove language attribute from the line below, it start to render the missing text, but as I understand, pdf should be exact copy of what we see in the browser, if so, please give me more information on why this code does not work with Aspose but works in all browsers.
< script language=“JavaScript1.2”>getBarCde(); </ script >
Difference 2:
I have no idea why this happens.