Ticket #229 (new defect)

Opened 4 years ago

Last modified 4 years ago

When I export a nomenclature in pdf with several levels, the alignment is not correct

Reported by: yburin35 Owned by:
Priority: minor Milestone: OpenPLM-3.0
Component: forms Version: 2.0.1
Keywords: Cc:


Please see the attached file. Some values of the column 1 (Niveau) appear in the column 2 (Ord.). Thanks.


Assembly_PART_00866_a-bom-4.pdf Download (12.4 KB) - added by yburin35 4 years ago.

Change History

Changed 4 years ago by yburin35

comment:1 Changed 4 years ago by pcosquer


When a BOM is exported to PDF, two templates are involved:

  1.  bom.xhtml
  2. which includes  bom_templates.html

bom_templates.html also renders the html page and it adds a padding:

<td class="Content {% if level != "last" %} level expander open{% endif%} level{{c.level}}" style="padding-left:{{c.level|add:"-1"}}.5em;" >

I think xhtml2pdf (library used to convert an html document to pdf) parsed the "style" attribute but did not expand the column width.

Style and class attributes are superfluous and should be removed when a pdf is rendered. This could be implemented with a new context variable and a if tag in bom_templates.html.

Note: See TracTickets for help on using tickets.