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

214
Views
¿Encadenar varios elementos en HTML2PDF?

I have a page that looks like this: https://www.pdffiller.com/jsfiller-desk16/?isShareViaLink=1&requestHash=0b686d3412abda4ce3280790c21ed048547fe38efb37cfe5eedfc9ab11dc5674&lang=en&projectId=1109967956&loader=tips&MEDIUM_PDFJS=true#9d3d7d408e8045169526ca212483a79f

[Perdón por el enlace largo]

Lamentablemente, no puedo guardar el PDF, así que intento imprimir todas las páginas. Cada página tiene un elemento div con [data-page-id="0"] wjere id=0 es el número de página, comenzando desde 0.

Tengo un script de muestra aquí.

 async function testShot() {

 var element = document.querySelector(`div[data-page-id="0"]`);

 await html2pdf(element, {
 margin: 0,
 width: "1442px",
 html2canvas: {
 scale: 1,
 height: element.offsetHeight,
 width: element.offsetWidth,
 },
 height: "1866.12px",
 filename: "test.pdf",
 image: { type: "png", quality: 0.98 },
 });
}

Y funciona, pero ¿cómo puedo encadenar esto para múltiples elementos en 1 pdf?

almost 4 years ago · Santiago Trujillo
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!