Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text position is changed in XWiki PDF Export #163

Closed
oanalavinia opened this issue Jun 17, 2020 · 1 comment
Closed

Text position is changed in XWiki PDF Export #163

oanalavinia opened this issue Jun 17, 2020 · 1 comment

Comments

@oanalavinia
Copy link

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
Copy link
Author

oanalavinia commented Jun 17, 2020

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

oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Sep 3, 2020
* prevent adjusting coordinates multiple times
* modified helper methods to consider also undefined or text nodes that would fallback the element to the basic draw.io converter
@oanalavinia oanalavinia self-assigned this Sep 3, 2020
@oanalavinia oanalavinia added this to the 1.15.3 milestone Sep 3, 2020
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Sep 17, 2020
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Sep 17, 2020
oanalavinia added a commit that referenced this issue Oct 6, 2020
* prevent adjusting coordinates multiple times
* modified helper methods to consider also undefined or text nodes that would fallback the element to the basic draw.io converter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant