Reputation: 1
I used a wysiwyg editor (CKEditor) in my web application to provide a basic word processor for the user. I tried to save the output of that CKEditor to pdf document.
I can now generate pdf document but the problem is the output of from CKEditor is in HTML code and it is getting published in pdf as it is.
I want to publish that pdf document as seen in CKEditor, but I dont want those HTML tags in the pdf. Is there any libraries in Java to render or convert that html code to the plain text by eliminating those html tags but retaining their effect i.e. if HTML code has This is Bold then pdf should be saved as This is Bold not like
<b>
This is Bold</b>
Upvotes: 0
Views: 1481
Reputation: 2132
iText is a pretty popular library for converting HTML to PDF. However be mindful of the licensing associated with the version of iText you use if you do choose to use their library.
Upvotes: 0
Reputation: 4251
You can use a library to convert the HTML from ckeditor to PDF. There are quite a few options that will convert HTML to PDF. This flying-saucer project is one a good one: https://code.google.com/p/flying-saucer/.
Upvotes: 1