Create an excel and pdf from html


I want to know how could I create a pdf file and an excel file taking the html render of a page in enonic xp.

Thank you for your help

Hi Mr. Romero!

Unfortunately, there is no support for doing this in Enonic XP. What you need to do, is build some kind of converter yourself, using Java library or a library in another high level programming language. This code may be executed in an XP-site, just like other Java code.

Wish you good luck with your project!

Sincerely Yours,
Jørgen Siveisind

Hi Jørgen

Thank you for your answer. Could you suggested me any Java library in order to convert html to pdf file and html to excel file?

I really appreciate your help
Diego Romero

I worked on a CMS plugin that made PDF files from HTML. I don’t have the source code now, but if somebody could find the Fettskolen plugin, that might help.

There are some options mentioned in this Stack Overflow thread.

Thanks for the input Michael!

I have looked at that “Fettskolen” project, and it seems you used the same “Flying Saucer” library, that is recommended in this StackOverflow post. Since that plugin was done for a customer, I can not share the source code without permission, but the User’s guide in the Flying Saucers project seems pretty extensive, so it should be fairly easy to work with.

So: Diego: That is our suggestion.