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

Partially styled elements from a paragraph are not correctly shown in XWiki PDF export #113

Closed
oanalavinia opened this issue Feb 5, 2020 · 1 comment
Assignees
Milestone

Comments

@oanalavinia
Copy link

@oanalavinia oanalavinia commented Feb 5, 2020

Steps to reproduce:

  1. Create a new Diagram
  2. Add the Textbox shape (with Heading)
  3. Apply bold style only for a part of the text
  4. Click Save & View
  5. Access More actions > Export > Export as PDF > Export

Expected result:: Styling is the same.
Actual result: The styled element is shown above the paragraph

Created:
svg

PDF export:
pdf

@oanalavinia oanalavinia self-assigned this Feb 5, 2020
@oanalavinia oanalavinia added this to the 1.13 milestone Feb 5, 2020
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Feb 5, 2020
… XWiki PDF export xwikisas#113

* refactoring
* add bold and italic style for elements when needed
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Feb 5, 2020
… XWiki PDF export xwikisas#113

* if this paragraph has partially styled nodes, fallback to display only the text and ignore any bold, links.. elements
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Feb 6, 2020
… XWiki PDF export xwikisas#113

* refactoring
* better variable names
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Feb 6, 2020
oanalavinia added a commit that referenced this issue Feb 6, 2020
… XWiki PDF export #113 (#114)

* refactoring
* add bold and italic style for elements when needed
* if this paragraph has partially styled nodes, fallback to display only the text and ignore any bold, links.. elements
* better variable names
@oanalavinia

This comment has been minimized.

Copy link
Author

@oanalavinia oanalavinia commented Feb 6, 2020

The fix for this issue is to fallback to displaying only the text of those paragraphs, ignoring any styles.

This is done since is too complex to calculate the coordinates of the styled node, considering that you have to look at the last node added and it may be needed to wrap the text.

@oanalavinia oanalavinia closed this Feb 6, 2020
@oanalavinia oanalavinia modified the milestones: 1.13, 1.12.3 Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.