Mobile preview PDF file

We have a need for the phone to preview the PDF file, which is opened through URL.
the problem now is: you can directly open the preview using window.location.href = url, iOS phone, but Android phone needs to download before preview. I wonder if anyone has encountered it? How to realize that both iOS and android can directly open the URL preview PDF file?

Apr.07,2021

you can use pdf.js, but you need to deploy to the server, and then adjust the cross-domain. Finally, the front end can preview pdf online via url


Don't download it in case it doesn't work for nothing. Haha


my problem is just the opposite. I'm going to download it. How to download ios


there is also a problem if you preview with pdf.js or pdfh5.js, that is, you cannot preview large and complex pdf files, which will cause webview memory overflow and cause app flashover on the mobile side. On the mobile side, it is best to preview pdf, with android or ios native methods. The performance and experience will be much better than pdf.js

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