I am using the following code in my struts2 action for converting HTML to PDF using flying saucer: It is just printing the style code just as it is and does not applying it.