modelmat / sphinxcontrib-drawio

Sphinx extension for including draw.io files.
MIT License
39 stars 17 forks source link

More a question rather than a bug... #88

Open FredM67 opened 10 months ago

FredM67 commented 10 months ago

I've a drawio file in an "sphinx" md file. ` ```{drawio-figure} drawio/my_graph.drawio :alt: My graph :align: center

My graph ``

On default this graph is tranformed as a svg file.

I'd like to make it clickable to download this graph as a pdf.

How could I do that ? I could call drawio by hand, store the pdf file by hand, .... Is there any "all-in-one" solution, so that sphinxcontrib-drawio creates both file at "once" ?

Thx for your support...

I didn't find any other way to ask my question (The Discussion tab is not available).

modelmat commented 10 months ago

No, this isn't possible with the extension at the moment.

It could be done, if you wanted, -- generating the PDFs always would be reasonably "trivial" for every image -- but as to having SVG inline and click become a PDF, not sure (we currently subclass the existing Sphinx Figure type, so unless that supports it it would have to be modified a reasonable amount to get clickability).

(Don't worry about creating issues for questions, I'm pretty sure this repo predates the Discussions tab anyway which is probably why it's disabled.)

FredM67 commented 10 months ago

Well that'd be cool to have this extension produce a pdf file (for the HTML builder). I think I could deal with some workaround for the "clickable" stuff.