-
-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot Open Local File pdf in Ionic 2 #157
Comments
The problem with this is the version of PDFJS-dist that is being used. NPM seems to ignore the pdfjs-dist version in package.json and installs version 1.9. A quick work around: |
See method |
Im getting the same error. |
Hi
Remove the NPM package lock, node_modules and run `npm install [email protected]`. Hopefully that helps.
On Thu, Oct 19, 2017 at 4:44 PM +0100, "Yashrad" <[email protected]> wrote:
Im getting the same error.
I generate a pdf file and write it to the device dataDirectory , and get the same error trying to set the pdf Source. downgrading pdfjs-dist didnt help as well.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Is there a solution for this issue ?
My use case is try to view previously 'downloaded' pdfs on a ionic3 app Any help would be appreciated |
Hi, How to resolve the problem ? |
This work with the file directly in asset folder and with the next url : |
If your having issues it's because of a the new versions of PDFjs library supplied by Mozilla. Try working with version 1.0.2: Hopefully this will help. |
You can not open PDF file directly, first you will need to convert it to ArrayBuffer Yo can check the solution here |
Hello,
Sorry i want to ask about my issue, i already run with
ionic serve
and i try to open local pdf file, it can work properly, but after i try to check in www/ folder especially on index.html, just clicked it once, show in browser, but file is not loaded and show an error like this :So can you help me to solve this issue ? thanks.
The text was updated successfully, but these errors were encountered: