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

Custom canvas positioning #922

Closed
slawom opened this issue Aug 3, 2016 · 1 comment
Closed

Custom canvas positioning #922

slawom opened this issue Aug 3, 2016 · 1 comment

Comments

@slawom
Copy link

slawom commented Aug 3, 2016

I am creating a canvas before calling html2canvas in order to achieve better quality (found this solution in one of the answers here), but the problem that I am now facing is that there is a gap at the top of my image. Seems like the scanned div is correct, but the image is shifted like its taking the header into the consideration.

` var canvas = createCanvas();

    html2canvas(elementToExport, {

        canvas: canvas,
        useCORS: true,
        allowTaint: true,
        letterRendering: true

    }).then(function(canvas) {

        // do the rest 

   }); 

`

@slawom
Copy link
Author

slawom commented Aug 3, 2016

This is the top of my image. The idea is to not get the black gap. When I dont use the custom canvas it works fine, but the image is low quality

screen shot 2016-08-03 at 19 04 09

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