Create and display a PDF file in Flex / Java

We have Flex on the front and Java on the back. When the user requests a PDF file, the request will go to the Java backend, where the PDF file will be created using Jasper reports. We do not know how to display this PDF file in a browser; since we do not want to use JSP / Servlets, etc. - It should only be flexible. Any suggestions?

+3
source share
3 answers

Flash Player cannot initially create PDF files. This is possible using Adobe AIR, but not in the Flex application. It is best to call navigateToURL () and open the servlet in a new tab / browser window. A servlet can simply write the contents of a PDF file to an OutputStream and set the appropriate HTTP headers.

+1
source

I think this question is old, but it can help others, there is a new library developed by Jasper Forge, which is directly related to JasperReports, I mean that this is not a PDF viewer, but a JasperReport export tool, you can download this from here

JasperServer, , - flash,

+1

Good for starters, PDF files are not always displayed in the browser. It depends on user settings. You essentially drive them into a pdf file, or download it, or a program such as Acrobat Reader opens in a browser to display it.

Not sure how flex does this, I would suggest that if you use Java, one simple servlet can do this.

0
source

Source: https://habr.com/ru/post/1704125/


All Articles