Skip to content

Capture not expanding when element uses CSS "zoom" #732

Open

Description

@Mallander

I have a tool using HTML 2 Canvas which also utilizes CSS "zoom" to allow for larger areas to be drawn/printed - however for some reason the capture area of HTML 2 Canvas does not change when zooming out in the div.

You can test this for yourself here: http://www.thermmark.co.uk/planner (Zoom out 1-2 levels and draw a grid in the main area - the capture area for HTML 2 Canvas keeps to a very small area

Is there a possible fix/change for this?

Activity

  1. Dayjo commented on Feb 24, 2016

    @Dayjo

    I have this issue too.

    I was wondering about whether it should remove the zoom property on the element first, then scale it down the appropriate amount within the canvas. Potentially this would make a good option as you may want the canvas image to be the same size of the rendered 'zoomed' version of the content.

    Certain elements seem to be totally missed out of an element with the zoom property.

  2. EWhite613 commented on Jun 10, 2016

    @EWhite613

    Made a quick JSFiddle to showcase this issue. http://jsfiddle.net/50pm7p2w/2/

  3. niklasvh commented on Dec 12, 2017

    @niklasvh
    Owner

    Updated example for 1.0.0 http://jsfiddle.net/50pm7p2w/24/

  4. harshini66 commented on Dec 20, 2018

    @harshini66

    how to scale canvas.. i got only blurry canvas.. How can i overcome this? is there any syntax in html2canvas for getting higher resolution?

  5. peterdTopaz commented on Aug 4, 2023

    @peterdTopaz

    When zooming a webpage and using html2canvas to capture that webpage, html2canvas doesn't capture the webpage appropriately. The captured contents are skewed compared to the zoomed in webpage. Has there been any progress with this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions