sayanee / angularjs-pdf

:page_facing_up: An AngularJS directive <ng-pdf> to display PDF files with PDFJS
http://sayan.ee/angularjs-pdf/
MIT License
494 stars 248 forks source link

relativity name #155

Closed kountouretis closed 7 years ago

kountouretis commented 7 years ago

When i try to load pdf with different name than relativity.pdf is not work. For example if i change the $scope.pdfUrl = 'pdf/relativity1.pdf'; is not work

dennybiasiolli commented 7 years ago

Do you have an example of your code? relativity1.pdf is in the same path as relativity.pdf?

kountouretis commented 7 years ago

yes is the same path i put it in the pdf folder. My code is the same with the example. Also i receive this error in console: Uncaught (in promise) Error: Invalid page request at WorkerTransport_getPage [as getPage] (pdf.js:10186) at PDFDocumentProxy_getPage [as getPage] (pdf.js:9028) at b.scope.renderPage (angular-pdf.min.js:2) at angular-pdf.min.js:2

dennybiasiolli commented 7 years ago

Error: Invalid page request Are you trying to get a page that doesn't exists on PDF? In our example default loaded page is 13

kountouretis commented 7 years ago

Yes this is the problem.I changed the page and is work. Thank you.

dennybiasiolli commented 7 years ago

Thanks to you for the feedbak, have a nice day