Ng2-pdf-viewer: Cannot read property 'getPage' of undefined

Created on 1 Jan 2018  路  10Comments  路  Source: VadimDez/ng2-pdf-viewer

i have installed 3.0.5 ng2-pdf-viewer version and still getting this error.
i was hoping this error was resolve in previous versions.

stale

All 10 comments

I seem to get the same issue. Any resolution on this.

I think you have something missing in npm package.

@dalbir can you please tell me exactly what am i missing in npm package.

pdfjs-dist and types/pdf are the dependency, you need to install these packages also.

@dalbir no you don't need to install it manually, it will be installed automatically by installing ng2-pdf-viewer as it depends on it.

@VadimDez please suggest me a solution. my project deadline is very close.

@muhammadali208 please provide more details such as how you use this module or just show some code.
You can as well check the demo project and how to use pdf-viewer component:
https://github.com/VadimDez/ng2-pdf-viewer/tree/master/src/app

@VadimDez I don't know the reason but some time npm missed to add the dependency in package.config and in that case I have to clean npm cache and then install these dependency manually. One of my colleague have same problem. @muhammadali208 I suggest you just clean the npm cache and trying to install again, and check the installation in ng_module folder. And you should also check pdf file is exists or not at given path.

@dalbir Thanks, running npm cache verify and deleting/reinstalling all dependencies did the trick.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xmran picture xmran  路  4Comments

kevinariasf picture kevinariasf  路  6Comments

RahmatAliMalik5 picture RahmatAliMalik5  路  5Comments

Gianlu82b19 picture Gianlu82b19  路  4Comments

sabarinathancs picture sabarinathancs  路  4Comments