Convert a number of import * as pdfjsLib from 'pdfjs-web/pdfjs'; cases to only specify the necessary imports

Rather than always importing everything from the `web/pdfjs.js`, similar to all other imports we can just choose what we actually need.
This commit is contained in:
Jonas Jenwald 2017-03-28 10:15:02 +02:00
parent 3b35c15d42
commit b2c3f8f081
14 changed files with 89 additions and 86 deletions

View file

@ -13,9 +13,9 @@
* limitations under the License.
*/
import * as pdfjsLib from 'pdfjs-web/pdfjs';
import { CSS_UNITS } from 'pdfjs-web/ui_utils';
import { PDFPrintServiceFactory } from 'pdfjs-web/app';
import { shadow } from 'pdfjs-web/pdfjs';
// Creates a placeholder with div and canvas with right size for the page.
function composePage(pdfDocument, pageNumber, size, printContainer) {
@ -96,7 +96,7 @@ PDFPrintServiceFactory.instance = {
var canvas = document.createElement('canvas');
var value = 'mozPrintCallback' in canvas;
return pdfjsLib.shadow(this, 'supportsPrinting', value);
return shadow(this, 'supportsPrinting', value);
},
createPrintService: function (pdfDocument, pagesOverview, printContainer) {