sphinxcontrib-drawio icon indicating copy to clipboard operation
sphinxcontrib-drawio copied to clipboard

:format: pdf does not create anything !

Open FredM67 opened this issue 2 years ago • 4 comments

Describe the bug

{drawio-image} drawio/test.drawio
:format: pdf

Does not output any file. All other formats are producing files.

To Reproduce

{drawio-image} drawio/test.drawio
:format: pdf

then make html

Expected behaviour According to documentation, a pdf file should be created.

Setup Information

  • OS: Ubuntu 22.04.3
  • Python: 3.10.12
  • Version: 0.0.16

FredM67 avatar Sep 02 '23 22:09 FredM67

It looks like the the docs need to be updated, but you should be getting the following error:

DrawIO Error:
invalid export format 'pdf' specified for builder 'html'

The pdf format is only supported for the latex builder.

jdillard avatar Sep 03 '23 02:09 jdillard

Well I don't get any error nor warning.

But I don't understand why? For the latex buider, I'd say that it needs an image format as for HTML to produce a global pdf document 🤔

Would it be hard to update the module?

FredM67 avatar Sep 03 '23 07:09 FredM67

Would it be hard to update the module?

I'm not sure, feel free to find out and open a PR!

jdillard avatar Sep 03 '23 17:09 jdillard

Well, in fact, what I need looks trivial, but it's not trivial ! I've a drawio file with 2 pages. In the doc, I've 2 directives :drawio-figure:, one for each page. And after the 2 figures, I'd like to put a link to download the whole pdf (with both pages). Something like: {download}`My file<pdf/myfile.pdf>` Not sure, how to solve that ! Would it be possible to call some code inside config.py to produce this pdf ? I'm new to python... my domain is C++....so I'd appreciate any help, advice, ...

Thx

FredM67 avatar Sep 03 '23 18:09 FredM67