How to view pdf files on mobile

first, let"s talk about the requirements raised by customers: upload a pdf file in the background and view the contents of the pdf file, and the front-end mobile end can also view the pdf content online
upload and view the content on the background PC side (this is easy, nesting an iframe is done), but if you open the pdf using iframe on the mobile side, it will be automatically converted to a download file, so you find pdf.js to deal with the pdf file, but to no avail.

The

page has a canvas tag but is blank
clipboard.png

vue-pdf

clipboard.png

clipboard.png

clipboard.png

finally, the mobile end is the nailing application, and then the page is developed with vue

Please give me more advice if you know something about this problem.

if you need to add, please put forward

Dec.22,2021

see if you can use the native methods provided by nails to preview pdf files. Related methods, https://open-doc.dingtalk.com.


have done a preview with pdf.js before, but there are still many pits in the middle. Post the demo address: https://github.com/Lushenggan..


I've written it in pdf.js before, and the function is fine. I can check it or turn the page, but it's too blurry on mobile, but later I can't find a better solution. Customers have opinions, but there's nothing I can do about it. It just goes away


directly window.open ("pdf link") .
but the backend needs to configure the pdf path in the service, which can be accessed directly by clicking on it.


how did you finally solve it? tell me that I also met

.
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-1e5453b-5a2ef.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-1e5453b-5a2ef.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?