For local preview, if it is used
cli/3
, you need to put the pdf filepublic
under the file, create a newstatic
folder, and put it in it
use
Installing vue-pdf
can only use absolute paths, and/
meanspublic
folders, so it needs to be ignored, as follows
import pdf from "vue-pdf"
components:{
pdf
}
<pdf src="/static/aaa.pdf"></pdf>
If it is remote, it is url
Some use pdf.js plug-ins and the like, and in the end it is also your online address, https:xxxx/xxx.com/xxx.pdf + other processing, address