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

Export to PDF does not work #4

Open
rattkin opened this issue Jun 21, 2016 · 6 comments
Open

Export to PDF does not work #4

rattkin opened this issue Jun 21, 2016 · 6 comments

Comments

@rattkin
Copy link

rattkin commented Jun 21, 2016

Export to pdf with DW2PDF Plugin does not work. Instead of image, this is displayed:

image

Printing works OK.

@andyboeh
Copy link

The diagram is rendered using JavaScript in your web browser, while the PDF created by dw2pdf is rendered on the server using mPDF. Therefore, only the base64 encoded diagram is shown.

@rattkin
Copy link
Author

rattkin commented Jun 28, 2016

What can i do to be able to export the diagram? I need it in the PDF!

@jdehaan
Copy link
Member

jdehaan commented Jul 16, 2016

I tried to dig in the problem but it really seems not so easy to solve. I think I understood quite well what the problem is, it's exactly what you describe. In order to solve it we would "simply" (lol...) need a way to render the bpmnio into a picture or (SVG if supported by PDF) on the server side. This seems to be a kind of headache.
I tried to use dw2pdf in the past but it misses so many things (or other plugin miss things..) so it almost never generates a proper result if the pages make use of many plugin features. I had trouble to get rendered pages with the wrap plugin. This is really a very simple plugin and have also trouble... There is also a ticket for pdf issue in wrap plugin filed.
I understand the need to bring stuff to paper or downloadable content to hand it out to people having no access to the wiki. I am still learning a lot regarding web development. If a solution appears in order to run javascript within dokuwiki on the server then there is a good chance to get it to work.
Unfortunately due to my workload do not expect this to be implemented timely...

@jdehaan jdehaan added enhancement and removed bug labels Jul 16, 2016
@andyboeh
Copy link

One possibility would be using the editor patch: bpmnio-js provides rendering to SVG and, IIRC, also PNG. During editing, we could upload the rendered picture to a cache file. However, as soon as you change the bpmn syntax directly, the picture is lost.

I tried to find a bpmn rendering library for PHP, but couldn't find a good one. Another possibility would be some kind of node.js plugin for DokuWiki that allows server-sided rendering. I'm aware of a php-based node.js interface, but that requires Linux to be running on the server. I quite like the idea of a node.js plugin for DokuWiki as that would solve some rendering issues for other plugins as well - it's a hack, though.

@jdehaan
Copy link
Member

jdehaan commented Jul 17, 2016

I do not know if integrating node.js is a hack, it sounds to me more like the perfect solution. To have a clean rendering the server side should behave as close as possible like the client side rendering. In normal mode the client would do the job, for pdf rendering the server. Unfortunately I am not yet an expert in these topics. I try to get help in order to get more hints on how to do this.

@jdehaan
Copy link
Member

jdehaan commented Jul 25, 2022

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