xwikisas / application-diagram

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

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

Closed ane-gabriela closed 4 years ago

ane-gabriela commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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)