Closed vic1707 closed 3 years ago
If you're using version 8.1.1., pdf.js 2.7.673 is not the "bleeding edge" version. It should load pdf-2.8.230.js instead. I suspect the library runs into an error message when it's trying to load pdf-2.7.673.js, so it's true, the error message consists of pure HTML code.
Maybe that's also the storybook bug. I'm not familiar with storybook, so I'd benefit from a reproducer. Can you send me a project showing the error, but without requiring me to install third-party libraries?
In fact one of the advantages of storybook is that it's independent from a ng serve
, so the error of loading pdf.js 2.7.673
isn't storybook related (at least for this ng serve
screen shot.
If you want i can add you to the private repo i'm talking about
Yes, I think that'd be helpful. Plus, I'm curious what you're doing. :)
invitation sent ^^
Be aware that the change tobleeding-edge
hasn't been commited and that the reader.component doesn't contain anything from the lib for the moment (due to it not functioning at the moment).
Off topic: at the moment I don't updating to the bleeding edge branch. I'm always happy when somebody does, because it helps me to spot potential bugs early, but I'm not sure what the pdf.js team is currently doing. They seem to develop an all-new scripting engine, but I don't know how to include that engine, so it's possible updating to the bleeding edge branch introduces bugs. The quality standard of pdf.js is extraordinarily high, but it's possible I need to do something I'm not aware of to include the new features.
I'd love to be able to help you and will try to do my best. Unfortunately as I'm completely new to website development in general i don't even know where to start :cold_sweat:, but i'll look at it as much as possible and see it as a learning project !
If you have any question about my repo, do not hesitate, send me an email or if you prefer we can use a direct-chat app of your choice ^^
Already did. :) But maybe my e-mail didn't arrive? BTW, website development isn't difficult.
For some reason you ended up in the spam folder... I replied to it just now.
Issue fixed for ng serve
. Problem was caused by missing imports, and wrong output for angular.json
.
I submitted changes for the docs according to this issue.
As for Storybook, I still have no clue. But the Storybook component if used in ng serve
it works well.
Is it still an issue you're trying to solve?
Describe the bug Getting
MIME
error. in two cases :bleeding-edge
assets
folder andbleeding-edge
)In both cases the console is reporting the same thing...
Additionnal infos : Storybook as complete access to the assets folder given to it from the lib. (with direct link i can access any file from the assets folder of lib) :
http://localhost:6006/assets/viewer-2.7.673.min.js
is redirecting just fine.Version info
Desktop (please complete the following information):
To Reproduce Use the
bleeding-edge
version ?Demo PDF file
https://pdfviewer.net/assets/pdfs/The Public Domain - Enclosing the Commons of the Mind.pdf
Screenshots BLEEDING-EDGE
ng serve
storybook
NORMAL ASSETS FOLDER :
ng serve
: no problem at allstorybook
: with this time an error on the reader it-self (nothing when usingbleeding-edge
):