Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

137
Views
¿Cómo puedo llenar el papel durante la impresión? ¿Es posible llenar toda la página con esta imagen?

Estoy usando html2canvas para capturar un div en mi Calendario y abrir la imagen en una nueva ventana, luego imprimirla. Pero en la vista previa de impresión, la imagen no llena el papel. Siempre hay espacios en blanco arriba, abajo, izquierda y derecha, quiero que llene la página.

Esto está configurado en "Ajustar al ancho de la página": ingrese la descripción de la imagen aquí Y la escala 100% es peor: ingrese la descripción de la imagen aquí Aquí está mi código:

 function printCalendar(){ var printMaxWidth = "1420px"; var printMaxHeight = "890px"; //Create the option to open a window var option = 'width=' + printMaxWidth + ',height=' + printMaxHeight; var calendartPrintWindow = window.open("", "", option); //Open the document of the window calendartPrintWindow.document.open(); //Html2canvas html2canvas(document.querySelector("#calendarContainer")).then(canvas => { //Insert the created html document inside it calendartPrintWindow.document.write('<img src="'+canvas.toDataURL()+'"/>'); //Close the document the window calendartPrintWindow.document.close(); //Print setTimeout(function(){calendartPrintWindow.print();},100);}); }

"Ajustar al ancho de la página" se ve bien, pero será genial cuando la imagen pueda llenar toda la página. ¿Hay ideas? Gracias.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!