-
Notifications
You must be signed in to change notification settings - Fork 2k
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
pdfmake conflict with file-saver #1634
Comments
happens to me too. Using Angular 7 |
Is some error throwed? |
@liborm85 no error, it fails silently this does seem related to that other ticket, @talamatur. Just to be very clear on what I've found when using pdfmake ^0.1.50
|
Ssme here. I guess the problem is in Filesaver 2.0.0 being used twice by our app and pdfmake itself.
|
looking at the issues in the file-saver repo I suspect the way that package is bundled (specifically eligrey/FileSaver.js#498) is the root cause, not an issue with pdfmake |
I can confirm that building pdfMake 1.5.2 (or 1.4.0) with FileSaver.js 1.3.8 make the download-function work again while building it with 2.0.0 breaks it. There is no test setup in the FileSaver.js repository to ensure proper regression, leaving it in the dark where exactly the root cause is of this issue is. As a workaround, I suggest to release pdfMake with 1.3.8 FileSaver.js unless there is a real need for the changes that subsequent releases introduce. |
Upgraded file-saver to 2.0.1. New version 0.1.53 released. |
In my app I am importing pdfMake and downloading a pdf like so:
This works fine. However, after this I added a dependency to the same file-saver version used by pdfMake (^2.0.0). As soon as I
elsewhere in my code, pdfMake silently fails downloading. Depending on an earlier version of file-saver (e.g. 1.3.8) resolves the issue, but this is not a great solution.
The text was updated successfully, but these errors were encountered: