angular-pdfjs-viewer | PDF.js viewer directive for AngularJS | Document Editor library
kandi X-RAY | angular-pdfjs-viewer Summary
kandi X-RAY | angular-pdfjs-viewer Summary
PDF.js viewer directive for AngularJS
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Invoked when page is loaded
- Returns a PDF buffer as an array
- Get location
- Get file name
angular-pdfjs-viewer Key Features
angular-pdfjs-viewer Examples and Code Snippets
Community Discussions
Trending Discussions on angular-pdfjs-viewer
QUESTION
I am struggling to get angular-pdfjs-viewer
working in my angular app that's written in Typescript
.
I am always getting a red error message with the text:
PDF.js v1.7.354 (build: 0f7548ba)
Message: stream must have data
The PDF data is coming from an ASP.NET WebAPI controller, and the architecture of our application has the front facing website and the API both deployed as two independent web applications.
Due to this, I am wanting to download the PDF in the angular controller, and set the PDF source to the data
attribute of the directive.
The WebAPI returns the PDF like this:
...ANSWER
Answered 2017-Dec-05 at 12:03Well, it turns out that I was using
QUESTION
I'm using main-bower-files to get files via gulp to a certain folder. But certain css files are missing, even though they are inside bower_components folder.
For example CSS file viewer.css from "pdf.js-viewer" is not copied even though .js file from the same folder is.
Any idea what could be wrong? Any tips appreciated!
...ANSWER
Answered 2017-Oct-28 at 07:04I figured it out.
Needed some more reading it seems: you can override the "main" files that are set by each package in it's own bower.json (some packages might even be without bower.json) by editing your bower.json like this:
QUESTION
Is there any pdf viewer component for to see pdf in my angular app. I am tried angular-pdfjs-viewer but it does not work well. I have only a link to pdf file in server.
Thanks in advance
...ANSWER
Answered 2017-Aug-12 at 04:20You can display the pdf using an iframe inside your application, have the url in a $scope
variable as below
$scope.yourURL = "pdfUrl";
Then
QUESTION
I would like to use this to show PDF in my SPA.
I tried to build a single example but it didn't work. Look this Plunker
http://plnkr.co/edit/nZAjYr?p=preview
In this example my pdf is in http://example.com/file.pdf
I really don't know where is the error, maybe it be in my controler:
...ANSWER
Answered 2017-Jun-23 at 10:15Your controller should look something like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install angular-pdfjs-viewer
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page