We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

A difference between line widths in PDF and HTML

Hi,


I have found the folowing issue in Aspose HTML conversion to PDF functionality.

It turns out that for this HTML:


first div: paragraph

second div: paragraph

second div: second paragraph

paragraph outside of div

paragraph outside of div

paragraph outside of div

div element

div element

div element

we get different results in the browser and in the PDF.

I'm attaching the outputs of Aspose components and plain html file rendered by IE 7 (in this case).


On the Aspose.png picture you can see that Aspose PDF produced additional line when there’s paragraph inside the div element.


Normally additional lines are created by browser by paragraph and the div element when those are used separately (see green and yellow blocks). But when those two tags are combined together, only one line is produced.


Aspose renders both lines – for paragraph and for div element.

I didn't check if such thing happens when there's div inside the paragraph, but I'm guessing that it behaves the same way.

We are using version 6.6.0.0 of Aspose.PDF library.

HTML conversion was done similar way to the one described on your page:

http://docs.aspose.com/display/pdfnet/How+to+convert+HTML+to+PDF+using+InLineHTML+approach

Our client wished to see the same line widths in PDF as in HTML that was delivered.


Do you see any work-around for this issue?


Regards,

Anna Domachowska,

Kainos

Hi Anna,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code.

Please download and try the latest version of Aspose.Pdf for .NET v6.8 as I tested and there is no issue regarding the extra space in the generated PDF file. However, I found another issue regarding the rendering of the colors in the resultant file. I have logged the issue in our issue tracking system with issue id: PDFNEWNET-33432.

Please do let us know if you still face any issue.

Sorry for the inconvenience,