Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyecto
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

How To Change QWEB Footer Height ( Bottom-Margin ) In Specific Page ( Last Page )

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
qwebwkhtmltopdfpaperformat
1 Responder
1392 Vistas
Avatar
Phu

Hello Everyone,


​ ​Page 1 ​ ​ ​ ​ ​ ​ ​ ​ ​ ​​​Page 2


##################              ##################

#                                    #             #                            ​    ​   #

#        HEADER              #             #         HEADER             # 

#                                    #             #                            ​         #

################## ​ ​ ​ ​##################

#                                    #             #            ​ ​   ​ ​   ​#

#        ARTICLE             #             #        ARTICLE              #       

#                                    #             #                            ​  ​   #

#                                    #             #                              ​      #

#                                    #             #                              ​      #

#                                    #             #                            ​        #

#                                    #             #                              ​      # 

################## ​ ​ ​​##################

#        {blank_space}    # ​ ​ ​​#         Sign Here          #

#    ​ ​ ​ ​   # Footer ​#    ​ ​ ​ ​  # ​ #​ ​ ​ ​ ​  ​#

#       Page number       # ​ ​ ​ ​#       Page number      #

################## ​ ​ ​ ​##################


Here's my Footer

i apply this report_qweb_element_page_visibility oca module 

so my sign section only appear on last page


My problem is the blank space on the first page is there anyway to have dynamic footer height or ( move my signing section to article and make it appear before footer even though my article on the 2nd page only have 1 line of content )
odoo 18


I'm really confuse with wkhtmltopdf 

Please Help, Thank !


​           <div class="footer">

                        <div class="last-page" name="Signing Section">

                            <p>____ Person 1____</p>

                            <p>____ Sign Here ____</p>

                            <p>____ Person 2____</p>

                            <p>____ Sign Here ____</p>

                            <p>____ Person 3____</p>

                            <p>____ Sign Here ____</p>

                            <p>____ Person 4____</p>

                            <p>____ Sign Here ____</p>

                        </div>


                        <div name="display-page-number">

                            Page <span class="page"/> of <span class="topage"/>

                        </div>

                    </div>



0
Avatar
Descartar
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Mejor respuesta

Hi,


It’s really a wkhtmltopdf limitation in Odoo QWeb reports rather than just a CSS issue.


- In Odoo reports, the footer section is fixed-height across all pages (wkhtmltopdf requirement).

- When you use the OCA report_qweb_element_page_visibility module to only show the sign block on the last page, that empty “reserved space” in the footer still exists on all pages, even when hidden,  because wkhtmltopdf allocates it at rendering time.

-That’s why you see the big blank space on page 1, even though the sign area is invisible.


wkhtmltopdf treats the header/footer as static templates, separate from the main content flow.

So the footer height is determined by the tallest footer across all pages. If your last page footer is large (signatures), that height is applied to every page.


Possible solution.


1- Move the signature block into the main body


    Instead of putting the signature in the <div class="footer">, you:

          - Place it in the article/content area.

          - Use report_qweb_element_page_visibility to display it only on the last page.

          - This way, the footer stays small, and the signature’s height does not affect earlier pages.

          - Eg :- <div class="article">

    <!-- your main content -->


    <div class="last-page" name="sign-section">

        <p>____ Person 1 ____</p>

        <p>____ Sign Here ____</p>

        ...

    </div>

</div>


<div class="footer">

    <div name="display-page-number">

        Page <span class="page"/> of <span class="topage"/>

    </div>

</div>


2- Use two different footers

           You can define two footers in QWeb and tell wkhtmltopdf:

         -  Use short footer for all pages except last.

        -   Use tall footer with signatures for the last page.


Hope it helps.

0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
Report missing header, footer and styling when scheduled Resuelto
qweb wkhtmltopdf
Avatar
Avatar
Avatar
Avatar
Avatar
7
feb 19
7221
Report text and header is overlaps when description is too long in QWeb report line.
qweb report wkhtmltopdf
Avatar
Avatar
1
feb 24
3976
Two paper formats for one report
qweb report paperformat
Avatar
Avatar
Avatar
Avatar
3
may 24
4035
Qweb external link is OK in HTML but KO in PDF
pdf qweb wkhtmltopdf
Avatar
Avatar
1
sept 19
8416
Qweb report : Paper-format : What is Output DPI Parameter ? Resuelto
qweb odoo paperformat
Avatar
Avatar
1
may 19
10798
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now