Ticket #229 (new defect)

Opened 3 years ago

Last modified 3 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:

Description

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

Attachments

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

Change History

Changed 3 years ago by yburin35

comment:1 Changed 3 years ago by pcosquer

Hi,

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.