Reputation: 185
In npm ng2-pdf-viewer is it possible that we can view images, excel, and other documents. I have base64 string of all documents but I want to view not only pdf but all documents. Is it possible? If so, can anyone help me?
Upvotes: 1
Views: 2943
Reputation: 714
As the repo details it, ng2-pdf-viewer
is just for PDF files. If you need to display Excel documents, photos, and so on, you should use a different component.
You can make a function that picks which component to use depending on what file type you have, but you cannot display them all in ng2-pdf-viewer
.
ViewerJS is an example of a Framework that supports both PDF and office documents (Open Document Format).
Upvotes: 1