Hello Lieven,
I guess you mix two different topics:
This thread is about a commandline-tool to convert QET-Elements to SVG.
The screenshot you sent is about export of QET-Schematics.
These are different topics. You should open a new thread in the English Forum...
But to answer your question:
M$-Office would not be my first choice when it comes to dealing with SVG-Graphics!
In my opinion it would be the last choice: only if nothing useful is available, but that's another point...
You are right:
When I export a QET-Schematic to SVG there is much free space right and below of the schematic!
It seems that the picture-size in the SVG-file isn't set correctly. Export to PNG shows the correct view!
So if you want to use the export in a word-processor then maybe PNG-export would be better...
Or you edit the SVG with Inkscape before importing to office: Here you can set the document-size to the contents
(Menu -> Document-Settings -> Button... see attachment)
EDIT:
From whatever reason the width and height of the SVG is calculated too big!
I tried some different folio-sizes and exported them to SVG: It seems to be a constant factor of 16/9 = 1.7777777
With this patch all exported SVGs had the correct width and height:
diff --git a/sources/exportdialog.cpp b/sources/exportdialog.cpp
index a50c5147e..6588ecbc3 100644
--- a/sources/exportdialog.cpp
+++ b/sources/exportdialog.cpp
@@ -411,7 +411,7 @@ void ExportDialog::generateSvg(
// "joue" la QPicture sur un QSvgGenerator
QSvgGenerator svg_engine;
- svg_engine.setSize(QSize(width, height));
+ svg_engine.setSize(QSize((width*9/16), (height*9/16)));
svg_engine.setOutputDevice(&io_device);
QPainter svg_painter(&svg_engine);
picture.play(&svg_painter);
@Laurent and/or @Joshua:
Maybe one of you can check?
In the attachment you find a package with two SVGs:
one exported from original QET-Version and the other exported from my local QET-version with 9-16-patch
Best regards
plc-user