1

Is there a client side Javascript framework similar to jasper report in Java.My requirement is to generate both PDF and Excel at client side(browser) without doing it at server side. I have found that there are javascript libraries like JsPDF and PDFkit to generate PDF and different library for generate Excel which make the development effort much harder.I want some thing exactly similar to what is done by jasper report.Also if it can be added using NPM without manual importing to the code and use it then it is much suitable for my requirement.

1

4 Answers 4

1

i believe jquery datatable comes with all you need check it out https://datatables.net/extensions/buttons/examples/initialisation/export.html

Sign up to request clarification or add additional context in comments.

1 Comment

Thanx Fadi for your response.Pls find my reply mentioned above.
1

I am afraid you have to use two separate libraries that best fit your needs, one for PDF and another for Excel. If you think about it, it makes sense.

It is a huge undertaking to render PDFs with plain Javascript, just look at the complexity of PDF.js alone! Excel is no different. These are complex formats.

Your use case is to render PDF and Excel. Somebody else might want to render PDF and DOC. You get the idea, there are tons of different formats out there, and there is no single library to handle them all. Even if someone had enough resources to build something like that, it would probably be broken up into modules that you can pick and choose based on your needs. A single framework would be too big to be practical for the web.

1 Comment

Yep after doing R & D for couple of days I concluded to use 2 different libraries for generate PDF and Excel since there is no single client side framework to dot it as you said :).Thanx for commenting.
0

Thanx Fadi and Axel for your prompt response.Yes the solution you have mentioned is a good one which is not known by me.There is a limitation in that solution when it is going to be used for my requirement.Refer the following screen shot of the report that I have to generate as PDF and Excel using javascript library.In that report it is not only the data table which need to be included to the document.But also some detail on the top and a logo.Also the application is developed using EmberJS and this jquery table plugin cant be used since we are using the Ember table which cant be replaced by this Jquery table.Is there an alternative solutions except Jquery data table?

enter image description here

3 Comments

i am afraid you have to go back to the previous solutions like JsPDF and other libreries to get your work done. as far as i know - of course i may be wrong- there isn't a library to do exactly what you want. if you found solution please let me know about it
btw if i want to do this page to pdf i would convert this page to canvas and then from canvas to pdf there is many libraries that can help you with that for html to canvas:- html2canvas.hertzen.com and canvas to pdf JsPDF
Yep I'm also felt that since for 2 days I have looking for a library which enables both PDF and Excel generation and unable to find one which is suitable for my requirement.There are framework which only enables either PDF or Excel not both.BTW thanx for your reply and sure I will let you know if I find one that I'm looking for.Thanx again.
0

https://jsreport.net, for those still looking, check this out!

Credits: jsreport Author

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.