Minor changes for api.js, font_loader.js and svg.js

This commit is contained in:
pramodhkp 2014-08-14 00:29:28 +05:30
parent 7fb6c87774
commit 6d53fc4db7
4 changed files with 11 additions and 14 deletions

View file

@ -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));
});
});
});