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.
source
share