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

Can't export a diagram as PDF #270

Closed
ane-gabriela opened this issue May 27, 2024 · 6 comments
Closed

Can't export a diagram as PDF #270

ane-gabriela opened this issue May 27, 2024 · 6 comments

Comments

@ane-gabriela
Copy link

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
Copy link
Collaborator

mflorea commented May 28, 2024

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

  • From the diagram editor: the diagram is sent to a remote service to perform the conversion to PDF. This remote service is configurable, but by default diagrams.net is used which we don't control. Such a remote service can obviously be down, have access limits, misbehave or change its behavior in a way that is not backwards compatible with our version of draw.io
  • from the page view mode: the diagram is exported to PDF by us, which is normally more reliable

So we need to check:

  • if the failure is temporary or related to some service limits
  • if the failure is caused by some specific diagram content
  • if the failure is caused by a change in the service URL or expected parameters
  • if the failure is caused by a change in the service implementation that is not backwards compatible with our version of draw.io

@snazare snazare assigned oanalavinia and unassigned snazare Jun 4, 2024
@oanalavinia
Copy link

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
Copy link

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

@snazare
Copy link

snazare commented Aug 6, 2024

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

@ane-gabriela
Copy link
Author

@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
Copy link

snazare commented Oct 3, 2024

to be handled in #288

@snazare snazare closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants