xwikisas / application-diagram

Create various types of diagrams using draw.io
GNU Lesser General Public License v2.1
0 stars 7 forks source link

PDF export with SVG is rendered badly #207

Open NolwennR opened 2 years ago

NolwennR commented 2 years ago

When trying to export pages containing diagrams, pdf result is different using SVG or image : Diagram : image

Using SVG export image

Using png export: image

Is there any way to select image for pdf export by default ? Any time a new diagram is created, we have to change the DiagramClass property exportUsingSVG to No.

oanalavinia commented 2 years ago

Hi @NolwennR ! For now there is no official configuration of changing the default value of "exportUsingSVG". Inside Diagram Template this property default value is set to true and the page is not modifiable.

What you can do is to create your own Template and Template Provider For the Template page, you should add in object mode a Diagram.DiagramClass object and set exportUsingSVG to the value that you want to be the default ("No" in your case). After this, while creating the new TemplateProvider, you need to select your Template and copy the rest of the configurations from the old Diagram.DiagramTemplateProvider.

Now it will look like this when a new page is created (you can add what name and description you think it's best): image

Let me know if you need more details!