creating dynamic pdf with KnpSnappyBundle and branch

I am creating a dynamic pdf which is a grid that shows notes by semesters, the problem is that if I have semesters I must create the pdf.

Suppose there are 5 semesters or more, it only fits up to 4 semesters. I am using the pdf sheet horizontally.


What I need is that somehow it only allows me to show 4 semesters on a sheet and the rest on another page, but loading the name column again, first name and lastname.

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
{% set ArrayMaterias = materias %}
{% set ArrayCalificaciones = calificaciones %}
{% set Semestre = semestre %}
{% set ArrayNombres = nombres %}
{% set Celdas = 8 * Semestre %}
    <table style="table-layout: fixed; width: 100%;" border=1>
                <td style="width: 20px"></td>
                <th style="width: 400px"></th>
                {# Aca es donde se define cambiar a otra pagina #}
                {% for m in materias %}
                    <th style="width: 400px" colspan="8">{{m}}</th>
                {% endfor %}
            <tr style="height: 120px;">
                <td>Apellidos y Nombres</td>
                {% for s in 1.. semestre %}
                    {% for c in calificaciones %}
                        <td><p style="writing-mode: vertical-lr; transform: rotate(180deg);">{{c}}</Tarea> </p></td>
                    {% endfor %}
                {% endfor %}
            {% for n in nombres %}
                {% for ce in 1.. Celdas %}
                {% endfor %}
            {% endfor %}

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *