将pdf文件路径重新编码
<script type="text/javascript">
$(function() {
$("#pdfIframe").attr("src","localhost:8080/pdf/web/viewer.html?file="+encodeURIComponent("${pdfPath}"));
});
//pdfPath是项目路径pdf文件路径
</script>
<iframe width="100%" height="100%" id="pdfIframe" ></iframe>