PDF export with table composed with table-cell

Hello,

I writed an xwiki application with pages containing some tables without html code (th/td/etc.) but using div and CSS “display: table-cell” instead ie: http://www.senktec.com/2014/01/using-css-display-table-cell-for-columns/

Unfortunaly PDF export doesn’t export table correctly.
I checked on https://xmlgraphics.apache.org/fop/compliance.html that table-cell is well supported. It is.

When I PDF export my page, “Final XHTML for export” containing my table-row/cell style:

<div class="Bloc" style="display: block; "><div class="TitreBloc" style="display: block; float: left; background-color: transparent; font-weight: bold; font-style: italic; color: black; ">Contexte</div>
<div class="SMQrow" style="display: table-row; "><div class="SMQcolumn1" style="display: table-cell; width: 30em; padding-bottom: 0.3em; padding-right: 1em; ">DG Mxxx * :</div><div class="SMQcolumn2 SMQcolumnNormalWidth" style="display: table-cell; padding-bottom: 0.3em; padding-right: 1em; ">DGAxxx</div></div>
<div class="SMQrow" style="display: table-row; "><div class="SMQcolumn1" style="display: table-cell; width: 30em; padding-bottom: 0.3em; padding-right: 1em; ">Contrat xxxxxx</div><div class="SMQcolumn2 SMQcolumnNormalWidth" style="display: table-cell; padding-bottom: 0.3em; padding-right: 1em; ">DGxxxx/div></div>

but on “Intermediary XSL-FO” all table-row/cell missing and use fo:block instead:

<fo:block role="html:div"><fo:block-container role="html:div"

I checked https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/xhtml2fo.xsl but didn’t found some “table-cell” style.

To resume my question: how to display table in PDF export when on my xwiki page my table is formating with div/table-cll/row in CSS?

Ty

Pascal B

Could be an issue with CSS4J, how we use it, or FOP. Plenty of possible problems.

This requires an analysis and debugging the code (including debugging the code of CSS4J/FOP).

Could you show a screenshot of what you get? Also, IMO you should open a jira issue for this.

Ok I created an example on http://playground.xwiki.org/xwiki/bin/view/Sandbox/TableToPDFExport/ to show PDF result of table with table-cell/row.

Note, on my xwiki I added CSS instruction in ./skins/flamingo/pdf.css

https://jira.xwiki.org/browse/XWIKI-14650