Minor changes for api.js, font_loader.js and svg.js
This commit is contained in:
parent
7fb6c87774
commit
6d53fc4db7
4 changed files with 11 additions and 14 deletions
|
@ -46,17 +46,10 @@ PDFJS.getDocument(url).then(function(pdf) {
|
|||
container.style.height = viewport.height + 'px';
|
||||
anchor.appendChild(container);
|
||||
|
||||
var renderContext = {
|
||||
viewport: viewport,
|
||||
pageNum: pageNum,
|
||||
container: container
|
||||
};
|
||||
// the next page fetch will start only after this page rendering is done
|
||||
return page.getOperatorList().then(function (opList) {
|
||||
var svgGfx = new SVGGraphics(page.commonObjs, page.objs);
|
||||
var svgGfx = new PDFJS.SVGGraphics(page.commonObjs, page.objs);
|
||||
return svgGfx.loadDependencies(opList).then(function (values) {
|
||||
return svgGfx.beginDrawing(renderContext.viewport,
|
||||
renderContext.pageNum, renderContext.container, opList);
|
||||
container.appendChild(svgGfx.getSVG(viewport, pageNum, opList));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue