Closed mdali602 closed 7 years ago
Hi @mdali602 , Have you included PDFJS in your sources?
@mdali602 did you resolved your issue?
I have the same problem. I am including sources like this:
require.config({
paths : {
moment : '/addons/osst/bower_components/moment/moment',
text: '../../../../bower_components/requirejs-plugins/lib/text',
json: '../../../../bower_components/requirejs-plugins/src/json',
pdfjs : '/addons/osst/bower_components/pdfjs-dist/build/pdf',
pdf : '/addons/osst/bowercomponents/angular-pdf/dist/angular-pdf.min'
}
});
define([
'angular',
'lodash',
'json!addons/osst/widgets/osst-summary/base-config.json',
'moment',
'pdfjs',
'pdf'
], function(angular, , widgetConfig, moment, pdf) {
'use strict';
var control = angular.module('control', ['commonsEvents', 'dataExchangeServices', 'pdf']);
control.controller('control', ['$scope', '$rootScope', '$log', 'events', '$compile', '$filter',
function($scope, $rootScope, $log, events, $compile, $filter) {
...........
any help please?
@sblantipodi can you please provide a full example of your code on jsfiddle?
this library seems broken while using requirejs. define('pdfjs-dist/build/pdf', ['exports'], factory); why use exports?
and why not use the newer pdfjs? https://github.com/mozilla/pdfjs-dist/blob/master/build/pdf.js#L12184
why use exports?
This is in pdfjs code, not in our directive.
and why not use the newer pdfjs?
Because latest pdf.js stable version is v1.7.225
I'm getting error: ReferenceError: PDFJS is not defined.
The complete error is as follows:-
ionic.bundle.js:26771 ReferenceError: PDFJS is not defined at link (http://localhost:8100/js/angular-pdf/angular-pdf.js:7:2319) at invokeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:22970:9) at nodeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:22369:11) at http://localhost:8100/lib/ionic/js/ionic.bundle.js:22709:13 at processQueue (http://localhost:8100/lib/ionic/js/ionic.bundle.js:29104:28) at http://localhost:8100/lib/ionic/js/ionic.bundle.js:29120:27 at Scope.$eval (http://localhost:8100/lib/ionic/js/ionic.bundle.js:30372:28) at Scope.$digest (http://localhost:8100/lib/ionic/js/ionic.bundle.js:30188:31) at Scope.$apply (http://localhost:8100/lib/ionic/js/ionic.bundle.js:30480:24) at done (http://localhost:8100/lib/ionic/js/ionic.bundle.js:24801:47)
Please suggest me why this is happening...