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

"Textbox" shape isn't showing in XWiki PDF export #100

Closed
ane-gabriela opened this issue Dec 10, 2019 · 2 comments
Closed

"Textbox" shape isn't showing in XWiki PDF export #100

ane-gabriela opened this issue Dec 10, 2019 · 2 comments

Comments

@ane-gabriela
Copy link

@ane-gabriela ane-gabriela commented Dec 10, 2019

Steps to reproduce:

  1. Create a new Diagram
  2. Add the Textbox shape (with Heading)
  3. Click Save & View
  4. Access More actions > Export > Export as PDF
  5. Deselect all options > Export

Expected results: The shape / text is shown properly.

Actual results: "[Not supported by viewer]" appears instead of the shape / text.

Environment: XWiki 8.4.5 with Chrome 78 and Diagram Application (Pro) 1.12

Textbox

PDFExportTextbox

@mflorea
Copy link
Collaborator

@mflorea mflorea commented Dec 11, 2019

We need to debug the createAlternateContent function. Currently the expected behavior is to view the HTML inner text in PDF export (as a fallback for the SVG foreign object which is not supported by Apache FOP).

@oanalavinia oanalavinia self-assigned this Dec 16, 2019
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Jan 17, 2020
* first version for basic text shapes inserted: simple short text, headers, lists (without their corresponding numbers or bullets), rudimentar text wrap
* handle recursively the html elements and their children, from inside a foreignObject element; add style, wrap text, change height if needed
* on todo list: better wrap text, since it still allocates a wrong number of words per computed row; add the defined style of an element; add style for specific not handled tags
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Jan 20, 2020
* changed the function for measuring word width
* refactoring and update comments
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Jan 30, 2020
oanalavinia added a commit that referenced this issue Jan 30, 2020
* first version for basic text shapes inserted: simple short text, headers, lists (without their corresponding numbers or bullets), rudimentar text wrap
* handle recursively the html elements and their children, from inside a foreignObject element; add style, wrap text, change height if needed
* on todo list: better wrap text, since it still allocates a wrong number of words per computed row; add the defined style of an element; add style for specific not handled tags

* changed the function for measuring word width
* refactoring and update comments

* added variable for line height
@oanalavinia
Copy link

@oanalavinia oanalavinia commented Jan 30, 2020

The fix is just a first version of how inserted text is seen in xwiki pdf export. The resulted pdf will not be 100% accurate (e.g. the alignment will be center, regardless of what was set)

An example of differences that can be seen:

Created diagram:
created_diagram
Exported diagram
exported_diagram

Besides the rendering of basic text shapes (simple short text, headers) this fix also manages lists (without their corresponding numbers or bullets)

@oanalavinia oanalavinia removed this from the 1.13 milestone Jan 31, 2020
@oanalavinia oanalavinia added this to the 1.12.2 milestone Jan 31, 2020
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

3 participants