The background API returns the file stream generated by PDF. How to realize the preview at the front end?

problem description

API returns PDF file stream. Preview it at the front end

the environmental background of the problems and what methods you have tried

  • how can the file stream be obtained through js?
  • how to implement PDF preview?
  • how does PDF.js use file streams?
The

project is from 2016, which version of PDF.js is installed? node version is 4.4.4 and webpack is 1.14.1, crashing.

Sep.07,2021

you can just throw him your address


pdf can be previewed directly in the browser. Put the requested address directly into the address bar. Or embedded iframe. Or what plug-in to display


have you solved the problem? I also have this requirement qwq


want to know how to solve


window.open just preview it directly, as long as the stream is sent from the back end. The front end can be previewed directly.

Menu