HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › PDF rendering issue with display:inline
- This topic has 2 replies, 3 voices, and was last updated Jan 29, 2019
16:15:48 byPD4ML.
-
AuthorPosts
-
September 12, 2018 at 21:48#27192
We are using pd4ml java library to convert html to pdf, I need to display multiple HTML paragraphs. Paragraphs should display next to each other without any line break. If I set paragraph style “display: inline” it works well in browser. When it’s converted to PDF, display is not same as it’s creating new line before paragraph. Following release notes I also tried “display: inline-block”, but that didn’t work either.
<!DOCTYPE html> <html> <head> <style> .nav p { display: inline; background-color:red; } </style> </head> <body> <div class="nav"> Football is a family of team sports that involve, to varying degrees, kicking a ball with a foot to score a goal. Unqualified, the word football is understood to refer to whichever form of football is the most popular in the regional context in which the word appears. There are a number of references to traditional, ancient, or prehistoric ball games played by indigenous peoples in many different parts of the world.[3][4][5] Contemporary codes of football can be traced back to the codification of these games at English public schools during the nineteenth century <p >The expansion of the British Empire allowed these rules of football to spread to areas of British influence outside the directly controlled Empire.[8] By the end of the nineteenth century, distinct regional codes were already developing: Gaelic football, for example, deliberately incorporated the rules of local traditional football games in order to maintain their heritage.In 1888 The various codes of football share certain common elements and can be grouped into two main classes of football: carrying codes like American football, Canadian football, rugby union and rugby league, where the ball is moved about the field while being held in the hands or thrown Contact Us </div> </body> </html>January 29, 2019 at 16:12#30154Hi,
If you check the supported list of CSS properties you will see display inline is not supported. I would be happy if someone proved me wrong!
January 29, 2019 at 16:15#30155Give a try to PD4ML v4: https://github.com/zxfr/pd4ml-examples/
-
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.
