Some questions in using pascoual:pdfjs in meteor ,need help

I’m using paschal:pdfs in meteor project ,There are some question as below:
1.PDF file store in MONGOLDB
2.When i catch the PDF file form mongoldb to render in client,the chrome can render,and safari & mobile phone web browser can’t,something with me ?can someone give me some suggestions to fix those problems?

best Regards

tom Wang


my code as below:

var v_content=Session.get(“PDF”);
swal("render start ");
PDFJS.workerSrc = “/packages/pascoual_pdfjs/build/pdf.worker.js”;
swal("render worksrc over "+v_content.num);
PDFJS.getDocument(v_content.content).then(function (pdf) {
swal("render start 0 ");
// Fetch the first page
//document.getElementById(‘page_count’).textContent = pdf.numPages;
pdf.getPage(1).then(function(page) {
var scale = 1;
swal("render start 1 ");
var viewport = page.getViewport(scale);
// Prepare canvas using PDF page dimensions
var canvas = document.getElementById(‘pdfcanvas’);
var context = canvas.getContext(‘2d’);
canvas.height = viewport.height;
canvas.width = viewport.width;
var pdffile={num:1,content:v_content.content};
//document.getElementById(‘page_num’).textContent = 1;
swal("render start 2 ");
// Render PDF page into canvas context
page.render({canvasContext: context, viewport: viewport});
swal("render start 3 ");