-1

I was trying to preview this pdf like any other base64 pdf and it was returning blank screen so i checked the content and it left me puzzled. I'm using a $.ajax response to get its response. How can I possibly preview the response? Also what kind of encoding are these?

Preview of response : JVBERi0xLjUKJeLjz9MKMSAwIG9iago8PC9Db250ZW50cyAyIDAgUi9UeXBlL1BhZ2Uv... Content-Disposition: inline; filename="Report.pdf" Content-Length: 5948 Content-Type: application/octet-stream Actual-Response: PDF STRING IMAGE

2 Answers2

0

You can use pdf.js to do so. Its tutorial is available here: http://usefulangle.com/post/20/pdfjs-tutorial-1-preview-pdf-during-upload-wih-next-prev-buttons

Ansh Gujral
  • 291
  • 1
  • 3
  • 13
0

if pdf.js is not working ,you can try translate response to img, pdf.js i think is the best way to solve pdf preview

kaykiek
  • 26
  • 2