I am writing Java application with below functionality using docx4j
Input: XHTML div content + .css file
Ouput:PDF or Word File
I could able to convert the xhtml to pdf successfulle but could not retain the styles.
It is working only when styles sent inline
e.g.,
Working
- Code: Select all
<div style="color:red;margin-left:20px;">Text 1</div>
Not working
- Code: Select all
<div class="head-red">Text 1</div>
Is there anyway to read the .css file and apply the style to the Xhtml content.
Thanks is advance.
Regards,
Praveen_J