Hi,
I have one question: you want export on server or client side?
If it's in client side, you can do through jspdf easily, if you want to do on the server side, it's a little bit more complex, but there are several php libs to do it.
I can do wherever you want, but first i need to know