I´m trying to open a pdf that I have created using iText library in my browser, but it fails. This is the code I´m using to send to browser
File file = n
You should set the Header and ContentType before you write the data. And set the Content Type to application/pdf.
application/pdf