xwikisas / application-diagram

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

Can't export a diagram as PDF #270

Closed ane-gabriela closed 2 months ago

ane-gabriela commented 6 months ago

Preconditions: Have a diagram page created with added shapes.

  1. Edit the diagram page
  2. Click on File > Export as > PDF...
  3. Click on Export
  4. Choose a name for the diagram
  5. Click on Download

Expected results: The diagram is exported as PDF.

Actual results: The diagram isn't exported

PDFExport

Environment: Windows 11, Chrome 125. Cloud XWiki 15.10.8, Diagram Application (Pro) 1.20.4

mflorea commented 6 months ago

Note that here are two ways you can export a diagram to PDF:

So we need to check:

oanalavinia commented 5 months ago

I am still investigating on this issue, couldn't find the root cause yet.

It's important to mention that the structure of the request altered a little on newer drawio versions. For example there are more parameters for this method and these could be required for the request to work. So a drawio upgrade seems necessary anyway. On another note, I did tried locally to apply these changes and the export still doesn't work, but I might be missing something (there are a lot of changes to consider). Unfortunately, the request response is not giving that much information. I would suggest to go on with the drawio upgrade and that come back at this issue

Until this is fixed, it's important to know that File -> Print could be used as a workaround, and it's actually safer since you don't send your data to an external server. Check https://www.drawio.com/blog/export-pdf#secure-pdf-generation

ilieandriuta commented 5 months ago

Issue reproduced too on XWiki 16.4.0 using Diagram Application (Pro) 1.20.5.

snazare commented 3 months ago

proposal: when clicking on File - Export As - PDF use the File -> Print service. To check again post upgrade to drawio

ane-gabriela commented 2 months ago

@snazare Tested on XWiki 15.10.10 with version 1.21-rc-1, extension id com.xwiki.diagram:application-diagram (drawio24.5.5) - got the same result as above, the diagram is not exported

Steps to reproduce:

  1. While editing the Diagram click on File > Export as > PDF... >Export
  2. Select a name for the exported diagram
  3. Select Device / Download / Open in New Window Option
  4. Click on the Save or OK button depending on the selection made previously

Actual results: No matter the selection made the result is the same - no diagram appears in the export

DownloadResult

snazare commented 2 months ago

to be handled in #288