xwikisas / application-diagram

Create various types of diagrams using draw.io
GNU Lesser General Public License v2.1
0 stars 8 forks source link

Text position is changed in XWiki PDF Export #163

Closed oanalavinia closed 3 years ago

oanalavinia commented 4 years ago

Steps to reproduce

  1. Create a diagram
  2. And some text (simple text or shapes with text inside)
  3. Add other text (simple text or shapes with text inside) and separate rows by Enter
  4. Click Save & View
  5. Access More actions > Export > Export as PDF

Expected result In the PDF the text is well positioned compared to the position from the diagram editor

Actual result In the PDF only the text that contains Enter is well positioned (really close to the position from the editor view) and in the other case the text is moved to the left

Editor: editor

PDF export: pdf_export

oanalavinia commented 4 years ago

So the workaround will be to add an 'Enter' and the end of the text, which is not seen but will fix the view in XWiki PDF export

Investigation: Starting with #118 elements that contain an Enter are treated separate from the ones that does not contain it, so the problem should be in how the width is calculated in the first case