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

img in drawHTML not working in Chrome #61

Closed
Mathlight opened this issue Jun 6, 2014 · 5 comments
Closed

img in drawHTML not working in Chrome #61

Mathlight opened this issue Jun 6, 2014 · 5 comments

Comments

@Mathlight
Copy link

Hi,

Your example code with the image isn't working in Chrome, but is working in FF.

The code i'm talking about:

rasterizeHTML.drawHTML('<div style="font-size: 20px;">' + 'Some <span style="color: green">HTML</span>' + ' with an image <img src="someimg.png">' + '</div>', canvas);

Will generate the following error in Chrome:
Uncaught TypeError: Parameter 'url' must be a string, not undefined

Please, how can i fix this? I've already added the attribute URL to the image, but that didn't work either...

@cburgmer
Copy link
Owner

cburgmer commented Jun 6, 2014

Thanks for reporting. This is an issue with the library and I am guessing that it's a dependency versioning issue. I'll investigate.

Can you for now install the 0.8.0 version?

$  npm install rasterizehtml@0.8.0

And then just use node_modules/rasterizehtml/dist/rasterizeHTML.allinone.js

@Mathlight
Copy link
Author

v0.8.0 is indeed working. Thank you for your reply and good luck with the investigation....

@cburgmer
Copy link
Owner

cburgmer commented Jun 6, 2014

The dependency inlineresources needed an older version of url which broken when rasterizehtml brought along a new one. The new version of inlineresources now works correctly with newer versions of url.

@Mathlight
Copy link
Author

I can confirm it's working indeed.

@cburgmer
Copy link
Owner

👍

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

No branches or pull requests

2 participants