-2

What are the libraries that can be used to display a pdf viewer in browser using java?

I have tried using gdocumentviewer(Jquery solution) but it seems to only work with pdf urls. I cannot use url for pdf in my case since pdf file is stored in a location under my C:/tmp/pdffiles and not under my Webcontent directory.

Manish Basdeo
  • 6,139
  • 22
  • 68
  • 102

1 Answers1

0

Use an iframe. Instead of pointing to the PDF URL (that you don't have), make it pointing to an Action URL.

From within that Action, read your file and return its content as an InputStream using a Stream Result.

Community
  • 1
  • 1
Andrea Ligios
  • 49,480
  • 26
  • 114
  • 243