2006 IR Open Discussion Posted August 20, 2006 Share Posted August 20, 2006 By: Ilievski Bozidar - bobi1978 How to view PDF from the Application 2003-10-28 01:39 Hi. I can generate PDF file that contains my report, and after that I can open this file with Acrobat Reader. But how can I do this from the Java application (i.e. I click on a Button, and the report fills and after that shows on the screen)? By: Matthew Clark - clarkm5 RE: How to view PDF from the Application 2003-10-28 02:46 Hi, Take a look at the webapps demos in the tarball.. it's all in there. You may have to set the content type to something like "Application/PDF" to get Acrobat to load automatically. I have just implemented this myself and it works very well.. by the end of the week, the reports and queries in our system will all be JasperReports generated and available in several formats.. I had to do a little work on some of the exporters to suit our needs but nothing complex (reducing HTML file sizes by removing unnecceary HTML for example) By: Ilievski Bozidar - bobi1978 RE: How to view PDF from the Application 2003-10-28 03:22 Hey, thanks for replay. In a webapp this is done by doing: response.setContentType("Application/PDF"); But I don't run this application in browser (it is NOT jsp application), so I don't have this RESPONSE object. A have a console Java application. Have any idea how to do this? By: Matthew Clark - clarkm5 RE: How to view PDF from the Application 2003-10-28 03:40 Oh ok.. I've not experimented with that.. I should think you use dori.jasper.view.JasperViewer on a generated report file. You can view design files too using dori.jasper.view.JasperDesignViewer I don't the filled report can be viewed without generating a (temporary) file.. (don't quote me though... I've only been exploring JasperReports for a few days) By: Axel Hallez - ahallez RE: How to view PDF from the Application 2003-11-05 06:47 It's not possible directly with JasperReports. I see two possibilities. 1. You look for PDF viewer implemented in Java and integrate it in your app. 2. You launch an external viewer such as Acrobat Reader. The problem here is that you have to provide different call for different platforms. By: Kees Kuip - keeskuip RE: How to view PDF from the Application 2003-11-05 13:01 Take a look at the multivalent project. It can display PDF in swing (and it is opensource!) http://www.cs.berkeley.edu/~phelps/Multivalent/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now