2

I don't know how many times had i tried to do this.

In my aplication, I show a huge report in a Modal (Semantic UI) with a option to print that.

The problem is when I print it (using html2canvas then jsPDF) it only shows what is visible in the screen and cuts everything else.

I created a codepen to show my situacion.

there it is

html2canvas(document.getElementById('myModal2'), {
    allowTaint: false,
    useCORS: true
}).then(function(canvas) {
    downloadCanvas(document.getElementById('test'), canvas, 'test.png');
    modalButton.click();
});  

EDIT 1

I tried change the height of the modal content, in the codepen link will work, but in my aplication won't.

something is blocking the html2canvas from seeing all the modal content, here is what it shows.

picture of my problem

the strange part is that when I click to print again, it saves all the modal content (I don't know why).

I tried:

  • created the canvas twice (somehow they know that the file isn't downloaded yet);
  • created the PDF twice (but only the second one will be correct) (can I cancell an download?);
  • change the height in 1px to "fix";

somebody please help me

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.