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

Free Support Forum - aspose.com

Issue with CSS when converting html to pdf

Hi,

I’m having some problems with the conversion from HTML to PDF.
Is the CSS float supported? How to manage it correctly? In the pdf output (00633090550.pdf) the elements with the “float:***” style have been formatted wrong.
If i change from “float:left” to “vertical-align:top; display: inline-block” the layout become more similar to the original html file. (the two html are different only on line 59)
With this solution i have a new problem with the pagination layout (inline-block_00633090550.pdf), i don’t understand why after the first table/section the second one goes in a new page.

Regards Riccardo.



Hi Riccardo,


Thanks for contacting support.

Is the CSS float supported? How to manage it correctly? In the pdf output (00633090550.pdf) the elements with the “float:***” style have been formatted wrong.

I have tested the scenario and have managed to reproduce the problem that HTML file having float is not converting to PDF properly. For the sake of correction, I have logged a ticket PDFJAVA-36630 in our issue tracking system.

With this solution i have a new problem with the pagination layout (inline-block_00633090550.pdf), i don’t understand why after the first table/section the second one goes in a new page

I have also tested the scenario and have managed to reproduce the problem that the converted PDF file content after first table/section goes to the second page. For the sake of correction, I have logged another ticket PDFJAVA-36631 in our issue tracking system.

We will further look into the details of these tickets and will keep you updated on their resolution within this forum thread. Please be patient and spare us little time. We are sorry for the inconvenience.

Best Regards,




The issues you have found earlier (filed as PDFJAVA-36630) have been fixed in Aspose.PDF for Java 20.1.