Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

75
Vistas
I want to generate page as a single pdf file without page break

Hi i want to generate a pdf of big page as one single file without page break.

Below image shows page break upon download(that i want to avoid, want to download as single page).

enter image description here

Question: i don't want to split the page upon download as multiple page. but want a single page.

here is what my working example look like codesandbox demo

Note: any pdf generating plugin is fine for me, if it works.

Please help me thanks in advance !

7 months ago · Juan Pablo Isaza
3 Respuestas
Responde la pregunta

0

Your current styles do not make it easy to set the page media there are just too many conflicts in A4 layout so you need to reconsider the output as A3 or A2 as seen here 4A4 printed without any code box controls, or scale down your output to fit on the A4 page you have set.

enter image description here

7 months ago · Juan Pablo Isaza Denunciar

0

Have you considered an API rest service? Restpack HTML to PDF has a free trial. Worth a shot to see if you can get the correct formatting. The API call's JSON body allows you to specify the px length and width you want. This should avoid pages breaks if you size it correctly. You can read their documentation here

7 months ago · Juan Pablo Isaza Denunciar

0

You can use the CSS properties break-before, break-inside and break-after. In your concrete example, adding this CSS rule avoids all the flex containers splits:

.flex-container {
   break-inside: avoid;
}

Please note that there are some limitations to these rules, and some browsers might produce different results too.

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.