Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Artificial Intelligence
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Property Management
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo course gettingstarted community database
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo course gettingstarted community database
About this forum
  1. Getting Started
  2. Fòrum

Avoid Page break inside table due to long content

Subscriure's

Get notified when there's activity on this post

This question has been flagged
qwebpagebreaklong-contentpdfreport
1 Respondre
5076 Vistes
Avatar
Vatsal

I want to continue the content of table on next page but when the content of the table is long, the row of the table breaks to the next page leaving the header of the table on the first page and content on the next page,which leaves behind blank space on the first page. I tried applying page-break-inside: avoid but it does not affect, even tried applying css classes but the problem remains the same.

I am using this particular class for table

class="table table-sm o_main_table"


and below style , class for Table Row

style="border-bottom:1px solid;border-top:1px solid;page-break-inside: avoid" t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''">

0
Avatar
Descartar
Avatar
Javier Garcia
Best Answer

Hi,

page-break-inside: avoid is often ignored by wkhtmltopdf because it uses an older WebKit engine with limited CSS page-break support. The reliable fix is to use the older CSS2 property instead, and apply it correctly:

On the <tr> element:

page-break-inside: avoid;  /* often ignored by wkhtmltopdf */
-webkit-column-break-inside: avoid;  /* sometimes helps */

The actually reliable wkhtmltopdf solution; use a wrapper <div> inside the <td>:

<td>
  <div style="display: block; page-break-inside: avoid;">
    your content here
  </div>
</td>

wkhtmltopdf respects page-break-inside on block-level elements like <div> much better than on <tr> or <td> directly.

Also make sure your wkhtmltopdf version is 0.12.6; older versions have significantly worse page-break support. Check with:

wkhtmltopdf --version

If none of the above fully resolves it, the last resort is to split the table into separate tables per logical group, each wrapped in a page-break-inside: avoid div; not elegant but guaranteed to work.

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Qweb report avoid page break between two product due to long content. Solved
qweb pagebreak report long-content
Avatar
Avatar
Avatar
Avatar
3
de gen. 24
16582
There is an issue with the Odoo 16 PDF report where the content of a table row is moving to the next page.
qweb pdfreport odoov16
Avatar
Avatar
1
de març 25
4258
Page break in qweb report
qweb pagebreak report
Avatar
0
de set. 22
7877
Generate Delivery Report Separately One Click from Sale Order
qweb qweb-report PDF pdfreport
Avatar
Avatar
1
de febr. 22
3868
Odoo 11 - Qweb Report - Break Page - Order Line
qweb pagebreak loop odoo11
Avatar
Avatar
1
de set. 19
7337
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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