Skip to content
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

Uncaught invalid image, images dictionary should contain dataURL entries (or local file paths in node.js) #2767

Closed
andrewhamili opened this issue Aug 14, 2024 · 1 comment
Labels

Comments

@andrewhamili
Copy link

andrewhamili commented Aug 14, 2024

#1501

https://github.com/andrewhamili/nestjs-pdfmake.git

@liborm85 liborm85 added the bug label Aug 14, 2024
@liborm85
Copy link
Collaborator

Throwed error message is wrong, fixed by commit 757735f. Released in version 0.2.12.

Correct error message is:
Invalid image: Not supported image definition: {"url":"https://picsum.photos/640/480"} Images dictionary should contain dataURL entries (or local file paths in node.js)

Loading images from url addresses is supported only on browser version of pdfmake. On server (on node.js) is not supported, see
documenation:

// in browser is supported loading images via url (https or http protocol) (minimal version: 0.1.67)
snow: 'https://picsum.photos/seed/picsum/200/300',

Will be solved in version 0.3, see #2375.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants