Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

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

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
qwebwkhtmltopdfpaperformat
1 Répondre
1404 Vues
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
Ignorer
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Meilleure réponse

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
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Report missing header, footer and styling when scheduled Résolu
qweb wkhtmltopdf
Avatar
Avatar
Avatar
Avatar
Avatar
7
févr. 19
7232
Report text and header is overlaps when description is too long in QWeb report line.
qweb report wkhtmltopdf
Avatar
Avatar
1
févr. 24
3992
Two paper formats for one report
qweb report paperformat
Avatar
Avatar
Avatar
Avatar
3
mai 24
4041
Qweb external link is OK in HTML but KO in PDF
pdf qweb wkhtmltopdf
Avatar
Avatar
1
sept. 19
8421
Qweb report : Paper-format : What is Output DPI Parameter ? Résolu
qweb odoo paperformat
Avatar
Avatar
1
mai 19
10813
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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