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

Adding multiple styles to a text element breaks the text display in XWiki PDF Export #153

Closed
oanalavinia opened this issue May 28, 2020 · 1 comment · Fixed by #165
Closed

Comments

@oanalavinia
Copy link

oanalavinia commented May 28, 2020

Steps to reproduce:

  1. Create a new Diagram
  2. Add a Text shape
  3. Add multiple styles to it (bold and a link)
  4. Click Save & View
  5. Access More actions > Export > Export as PDF

Expected results:
The PDF looks like the diagram.

Actual results:
The PDF text display is broken as there are multiple elements generated for the same line with the styles specified.

From:
5

To:
6

Tested with Diagram Application 1.13.2, XWiki 11.10.4

@oanalavinia oanalavinia added this to the 1.13.3 milestone May 28, 2020
@oanalavinia oanalavinia modified the milestones: 1.13.3, 1.14.1 Jun 5, 2020
@oanalavinia oanalavinia removed this from the 1.14.1 milestone Jun 17, 2020
@oanalavinia oanalavinia self-assigned this Jun 25, 2020
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Jul 9, 2020
…Wiki PDF Export xwikisas#153

* when multiple styles are added to an element, traverse all children and keep the styles to just one element
* treat 'a' and 'li' cases differently since for them a container is returned instead of the given alt
* move functionality to a defined method
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Jul 14, 2020
…Wiki PDF Export xwikisas#153

* fixed for partially styled elements also, since this case is treated differently
* identify partially styled elements even if they are not first level children; use these elements when converting them to svg instead of the root element and add needed styles at the end
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Jul 14, 2020
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Jul 20, 2020
oanalavinia added a commit that referenced this issue Jul 20, 2020
…Wiki PDF Export #153 (#165)

* when multiple styles are added to an element, traverse all children and keep the styles to just one element
* treat 'a' and 'li' cases differently since for them a container is returned instead of the given alt
* move functionality to a defined method
* fixed for partially styled elements also, since this case is treated differently
* identify partially styled elements even if they are not first level children; use these elements when converting them to svg instead of the root element and add needed styles at the end
@oanalavinia oanalavinia added this to the 1.15.1 milestone Jul 20, 2020
@ane-gabriela
Copy link

ane-gabriela commented Nov 25, 2021

#213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants