How does the front end display the file flow on the server side using pdf.js?

The

background interface looks like this http://192.168.96.40:8081/xx/getPdf?keyId=xxx1123, link opens directly in the browser and displays a window for downloading the file:

now the requirement is to preview the file directly on the browser client. I tried to use pdf.js

<iframe src="../test/js/pdfjs/web/viewer.html?file=http://192.168.96.40:8081/xx/getPdf?keyId=xxx1123" width="100%" height="750"></iframe>

it is not possible to preview the pdf file directly. Is there any other way to preview the pdf file stream on the server side on the client side?

Apr.01,2021

pdf.js is not used correctly. Please learn the official document
https://github.com/mozilla/pd.


write a Base64 data stream of PDF returned by the background two days ago, and use pdf.js to preview the demo, of the PDF file. Click the article link below to see
http://www.chenhanpeng.com/PD.


have you solved this problem?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37d12-2c0ab.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37d12-2c0ab.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?