pdfHtml5 How can I the table where I want to?

pdfHtml5 How can I the table where I want to?

SonicpasSonicpas Posts: 2Questions: 1Answers: 0
edited July 2018 in Free community support

Hi everyone!

I'm using pdfHtml5 to export a table but I'm doing it into a template , I wanna set the table just in the middle of the page but when I use the custom all my template stays above the table.

Someone knows a way to set it in the middle? I share my code and attach a image of the result:

customize: function(doc) {
                            doc.content.splice(1, 0, {
                                    columns: [
                                        [{
                                                text: 'Registro de pagos',
                                                fontSize: 22,
                                                bold: true,
                                                alignment: 'right',
                                                margin: [0, 0, 0, 15],
                                                width: '*'
                                            },
                                            {
                                                stack: [{
                                                        columns: [{
                                                                text: 'Projecto #',
                                                                fontSize: 12,
                                                                alignment: 'right',
                                                                width: '*'

                                                            },
                                                            {
                                                                text: '00001',
                                                                fontSize: 12,
                                                                alignment: 'right',
                                                                width: 100

                                                            }
                                                        ]
                                                    },
                                                    {
                                                        columns: [{
                                                                text: 'Fecha inicio',
                                                                fontSize: 12,
                                                                alignment: 'right',
                                                                width: '*'
                                                            },
                                                            {
                                                                text: 'June 01, 2016',
                                                                fontSize: 12,
                                                                alignment: 'right',
                                                                width: 100
                                                            }
                                                        ]
                                                    },
                                                    {
                                                        columns: [{
                                                                text: 'Fecha Entrega',
                                                                fontSize: 12,
                                                                alignment: 'right',
                                                                width: '*'
                                                            },
                                                            {
                                                                text: 'June 05, 2016',
                                                                fontSize: 12,
                                                                alignment: 'right',
                                                                width: 100
                                                            }
                                                        ]
                                                    },
                                                ]
                                            }
                                        ],
                                    ],
                                },
                                // Billing Headers
                                {
                                    columns: [{
                                        text: 'Estudio 606',
                                        fontSize: 14,
                                        bold: true,
                                        alignment: 'left',
                                        margin: [0, 20, 0, 5],

                                    }]
                                },
                                // Billing Details
                                {
                                    columns: [{
                                        text: 'Primero de Mayo, #606 \n Toluca, Estado de México, México C.P. 50090 \n (722) 385 4119 ',
                                        alignment: 'left'
                                    }]
                                },
                                // Billing Address Title
                                {
                                    columns: [{
                                        text: 'Cliente',
                                        margin: [0, 7, 0, 3],
                                        bold: true
                                    }]
                                },
                                // Billing Address
                                {
                                    columns: [{
                                        text: 'Nombre: \n Direccion: \n   Teléfono: '
                                    }]
                                },
                                // Line breaks
                                '\n\n',

                                // Signature
                                {
                                    columns: [{
                                            text: '',
                                        },
                                        {
                                            stack: [{
                                                    text: '_________________________________',
                                                    style: 'signaturePlaceholder'
                                                },
                                                {
                                                    text: 'Cliente',
                                                    style: 'signatureName'

                                                },
                                                {
                                                    text: 'Banda',
                                                    style: 'signatureJobTitle'

                                                }
                                            ],
                                            width: 180
                                        },
                                    ]
                                }, {
                                    text: 'NOTA:',
                                    style: 'notesTitle'
                                }, {
                                    text: 'Este registro de pagos es un documento acordado entre el representante de Estudios 606 y el cliente \n\n En el presente el cliente se compromete a pagar en su totalidad la cantidad acordada antes de que le sea completado el servicio solicitado, estando de acuerdo que si el pago no se realiza, Estudios 606 se reserva el derecho de entregar el producto final',
                                    style: 'notesText'
                                }

                            );
                        },

                    }],
This discussion has been closed.