第一步:下載鏈接:http://mozilla.github.io/pdf.js/getting_started/#download
第二步:將下載的文件放在項目中。
第三步:在項目中想要預覽的地方給個鏈接例如("<a class="pdf" style="" href="/pdfjs/web/viewer.html?file=/{{$res -> project_plan_file}}" >{{$res -> project_name}}.pdf</a>");
/pdfjs/web/viewer.html?file=/ 這一塊是你將pdfjs放置的位置;
{{$res -> project_plan_file}} 這一塊是你的pdf文件的在項目中的路徑;
第四步:現在在手機中就可以預覽