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

Javascript html2canvas cant get background and Icon #432

Closed
rajamuthukaruppan opened this issue Aug 28, 2014 · 13 comments
Closed

Javascript html2canvas cant get background and Icon #432

rajamuthukaruppan opened this issue Aug 28, 2014 · 13 comments

Comments

@rajamuthukaruppan
Copy link

I'm using html2canvas v0.4.1 for screenshot. I'm facing issues like background css not getting rendered.

I have a div with the css below :
div{
background: linear-gradient(to bottom, #eeeeee 0%, #bababa 100%) repeat scroll 0 0 rgba(0, 0, 0, 0)
}

This background not getting rendered. Please any one give me the solution.

Thanks

@brcontainer
Copy link
Contributor

Welcome @rajamuthukaruppan

Fixed in 0.5.0-rc (Tested in Chrome and Firefox for Desktop).

@rajamuthukaruppan
Copy link
Author

Hi brcontainer,
I'm not able to find 0.5.0-rc. I can find only 0.4 as the latest version. I think 0.5 not yet released. Please help me out this

Thanks
Raja Muthukaruppan

@usmonster
Copy link
Contributor

@rajamuthukaruppan 0.5 is what's on the master branch, you'll need to check it out or download the file from https://raw.githubusercontent.com/niklasvh/html2canvas/master/build/html2canvas.js .

@rajamuthukaruppan
Copy link
Author

originalwebpage
html2canvas_screenshot
chrome

Thank you usmonstor. Background color issue resolved now.
I've uploaded 3 images

  1. original page screenshot
  2. html2canvas screenshot taken from firefox 31.0.
  3. html2canvas screenshot taken from chrome 36.0.

But still facing some issues as follows

  1. Highchrarts are missing in both browsers.
  2. Some css issues in currency block in both browsers.
  3. Text overlapping in chrome
  4. By default gray color background has been applied in body part only in firefox .
    plz help me out on this

Thanks and Regards
Raja M

Thanks and Regards
Raja M

@brcontainer
Copy link
Contributor

Send an simple example in jsfiddle

@rajamuthukaruppan
Copy link
Author

function capture() {
html2canvas(document.body, {
onrendered: function (canvas) {
window.open(canvas.toDataURL());;
}
});
}

@brcontainer
Copy link
Contributor

the use of the code we already know, what I need is an example of the problem (use jsFiddle)

Thanks

@rajamuthukaruppan
Copy link
Author

Plz find the jsFiddle link

http://jsfiddle.net/rmv61hrk/1/

@niklasvh
Copy link
Owner

niklasvh commented Sep 2, 2014

SVG rendering isn't supported yet #95

@brcontainer
Copy link
Contributor

Note: @rajamuthukaruppan I know that @niklasvh has already detected your problem, but for future problems more correctly use the search tools.

You used the jsFiddle without following the instructions, so your example does not work error. I fixed their initial failures, link follows (see the difference):

My update: http://jsfiddle.net/rmv61hrk/2/
Original: http://jsfiddle.net/rmv61hrk/1/

Jsfiddle guide: http://doc.jsfiddle.net/tutorial.html

I'm just passing you this not to criticize you, but to help you to get you the answers you seek the quickest way.

Good luck!

For help you, in current issue (about SVG), see my comment in: #95 (comment)

@rajamuthukaruppan
Copy link
Author

Thanks for the help and support :)

@niklasvh
Copy link
Owner

niklasvh commented Oct 7, 2014

SVG and canvas rendering should both work in 0.5 now

@niklasvh niklasvh closed this as completed Oct 7, 2014
@prashant22saxena
Copy link

where can i get 0.5 version cdn

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

5 participants