0

I want to have a PDF viewer. I have the pdf file content in hand (Not the PDF File).

How can I display it as a pdf viewer. Like in pdfjs.

Please help.

Thanks in advance

masterFly
  • 1,072
  • 12
  • 24

1 Answers1

1

I figure it out. PDFjs still does the trick. When we have pdf content in hand we can give a backend script file name as the src for pdfjs.

Ex: openpdf.php

Then just echo (output) the pdf content as the response. Make sure to use the content type as "applicatoin/pdf" in response header.

Thats it... Cheers...!!!

masterFly
  • 1,072
  • 12
  • 24