kylec32 / dokuwiki_plantumlparser

A plugin to have a user's browser display a SVG PlantUML diagram generated at http://plantuml.com/
MIT License
8 stars 12 forks source link

PDF Export with dw2pdf shows uml graphs as text output #20

Open TrustyTim opened 5 years ago

TrustyTim commented 5 years ago

Hi there I recently switched form the standard plantuml plugin to your new plantumlparser plugin due to a platform change. The uml graphs are shown correctly on the wiki page. I use the dw2pdf plugin as default to export the wiki page to a PDF. Now I have the problem that in the pdf the uml diagram is only shown as text, not as image.

Do you have any idea what goes wrong?

kylec32 commented 5 years ago

A bug with this plugin and the dw2pdf working together was just fixed in https://github.com/kylec32/dokuwiki_plantumlparser/issues/22. Is this what you are talking about. Other than that I'm not seeing any issues with the integration.

frissner commented 1 year ago

Hi, i've been running into same behaviour. It doesn't match #22 since there's no graphic output at all. Just the plantuml syntax.

I'm running current master-branch of the plugin (addcfe3 on Jun 3, 2021)

Could you provide an example for a dw2pdf-renderable diagram? just to make sure, that i didn't miss any plantuml commands for rendering...

Best, Florian

frissner commented 1 year ago

After further investigation i found out, that this issue occures when the responses from plantuml-server is too late. In this case the method PlantUmlDiagram.getSVG returns an empty string so there is nothing to render in PDF.

This behaviour can be resolved either by sending requests to plantuml-server using the php-curl or by configuring a response-cache on the pkantuml-server (not tested yet)

I plan to implement the php-curl solution...

frissner commented 1 year ago

Please check if plantuml server uses selfsigned certs (or certs valid only in your company).

When dokuwiki connects to planuml server it tries toverify HTTPS certs and fails.

To correct this import all certs into cert-store of the dokuwiki server. Here is how it's done: https://gist.github.com/kekru/deabd57f0605ed95d5c8246d18483687

Don't forget to import not only the servers cert but also the cert chain.