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

Wiki links in PDF generated by the FOP export are relative #87

js-ddev opened this issue Nov 21, 2019 · 1 comment

Wiki links in PDF generated by the FOP export are relative #87

js-ddev opened this issue Nov 21, 2019 · 1 comment


Copy link

@js-ddev js-ddev commented Nov 21, 2019

Steps to reproduce :

  1. Insert wiki links into a diagram using Diagram application 1.11
  2. In view mode, export the page in PDF using the XWiki export feature (FOP)
  3. Open the PDF file (exported-with-XWiki.pdf) into a PDF viewer application, the wiki links won't open because they are relative (/Sandbox...).

On the contrary, absolute links are fine.
And PDF files created using the Export as PDF option in the XWiki diagram edit mode contain the whole link and therefore can be used in any PDF reader application (exported-with-drawio.pdf)

Tested on Firefox / Ubuntu

Copy link

@mflorea mflorea commented Nov 29, 2019

I fixed it but we'll have to rethink the way we do PDF export of diagrams. ATM we generate a SVG of the diagram when the diagram is edited and we use this SVG when the diagram is exported to PDF. The issue is that this SVG has absolute URLs and embedded images which means it's not going to be updated if you:

  • rename some page that is linked
  • change the server URL
  • export and import on a different server with a different URL
  • change the image attachments that are embedded
  • etc.

Basically the SVG we generate is made to be portable (you can download it and view it on a different computer and it will look the same) but it's not "live". You need to re-save the diagram if you want to update it. And if you have lots of diagram, this may be complex (e.g. you create 100 diagrams and then change the server URL).

@mflorea mflorea closed this as completed Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants