We help IT Professionals succeed at work.

Best way to represent reports (PDF) in browser front end using JSON from a REST based application

Last Modified: 2015-12-05
We are developing a Java REST based application and we have to convert reports in the following format (PDF, Excel, CSV, XML and HTML) and also there is a requirement to schedule reports at a predetermined intervals.

The data exchange format is JSON, what would be the best way for the user to download reports (for example PDF reports)

1) Do we need to send the PDF content as a JSON response
2) or do we need to send the title of the report and the URL link as the JSON response. In this case the URL link will represent the PDF file on the server side and by clicking the link, the user can download the report from the server
3) or do we need to send the data (row, column etc) as JSON response and then construct the PDF at the client side (browser front end) using any JavaScript libraries?

Or is there any alternate ways (best practices) for the user to download PDF reports in the modern browser (We assume only the latest version of major browsers will be used by our users ex. Firefox, Chrome, IE, Edge, Safari and Opera

Any pointers or links to some useful examples would be of immense help.

Thank you
Watch Question

Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Are you looking for a new reporting tool or just a way/method of sharing information?

Unless you have control over the user's machines don't bet on them having the latest version of a browser.  I work as a consultant and many of our clients are still on older versions of IE including IE8 and 9.




We are targeting for corporate environment and we expect users to use at least Chrome or Firefox.

The front end is built using only  HTML5, CSS 3, JavaScript, jQuery and Bootstrap.
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

SO no reporting tool like Crystal Reports or SSRS is involved.
Is that correct?




We are not using any reporting tools like Crystal Reports or SSRS
Professor Emeritus of MIS at Penn State Erie and Owner, Millet Software
This one is on us!
(Get your first solution completely free - no credit card required)


Thanks a bunch IdoMillet

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.