Convert SVG to DXF in Inkscape CLI - svg

I wonder how can we convert SVG to DXF in Inkscape CLI mode. IN GUI to export/save svg to dxf we can do it from file menu by doing Save As
i went through inkscape cli document : https://inkscape.org/doc/inkscape-man.html
here mostly export words is used , so i tried
inkscape --export-type=out.dxf in.svg
inkscape --export-filename=out.dxf in.svg
but no success giving me errpr
InkFileExportCmd::export: Unknown export type: out.dxf. Allowed values: [svg,png,ps,eps,pdf,emf,wmf,xaml].
however in GUI under FILE -> SAVE AS we can see a lot of file formats including DXF

You need to run the extension from the command line, using the available parameters. Find it in your Inkscape installation folder, inside the directory /share/inkscape/extensions.
So, in the most basic version:
python3 dxf_outlines.py --output="yourfile.dxf" "yourfile.svg"
You can also type
python3 dxf_outlines.py -h
to find out all about the options.

I tried using sample code:
// command:
C:\>F:\inkscape\bin\inkscape --export-filename=F:\aaa.dxf F:\valve.svg
Although there was no tracing back messages, but it succeeded:

Related

opening svg with foreignobject with inkscape

I'm trying to get the foreignObject example from https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject working. What I do is:
copy the source code
save as a file e.g. /tmp/test.svg
open with inkscape e.g. inkscape /tmp/test.svg
Then inkscape doesn't display the HTML text and on the command line the warning "WARNING: unknown type: svg:foreignObject" appears.
I have "Inkscape 1.1.2 (0a00cf5339, 2022-02-04)" on ubuntu.
Thanks!

Inkscape is not opening (I am currently using manjaro linux)

I tried to open Inkscape via gui icon but it's not opening
when i am trying to open it via CLI this was the output
$inkscape
inkscape: error while loading shared libraries: libpoppler.so.118: cannot open shared object file: No such file or directory
I actually searched on the internet but could not resolve it with those explanations.
these are some more information
$which inkscape
/usr/bin/inkscape
$pacman -Q poppler inkscape
poppler 21.11.0-1
inkscape 1.1.2-1
$ldd $(which inkscape) | fgrep libpoppler
libpoppler.so.118 => not found
libpoppler-glib.so.8 => /usr/bin/../lib/inkscape/../libpoppler-glib.so.8 (0x00007fafaaa28000)
libpoppler.so.115 => /usr/bin/../lib/inkscape/../libpoppler.so.115 (0x00007fafa8a8e000)
I don't know if you are still in the need of help but I had the same problem and found out that installing poppler-glib saved my install of inkscape.

unable to open Encapsulated PostScript (EPS) file in ubuntu 20.04

I have many .eps files in a folder . I just want them to see how it looks. So i tried to open .eps file using document viewer it doesnot open. Again i tried through gv file.eps still it gives error like undefined Obj.....again when i tried to open through gimp file.eps there is also some problem like opening failed: Could not interpret PostScript file. I donot know why such types of problem exist in ubuntu 20.04(may be library problem). If it is required to install some extra packages let me know. I hope some solutions from experts side. Thanks.

DXF to SVG using Inkscape CLI on Mac OS

I'm trying to convert DXF files (from Fusion360) to plain SVG files using the Inkscape CLI. It works fine with one small annoyance: the Inkscape GUI promps me on how to read the dxf file (the settings in there are fine, all I do is click ok).
It's the same dialog you get when importing a dxf file through the Gui.
The command I'm running:
/Applications/Inkscape.app/Contents/Resources/bin/inkscape -z -l <absolutePath>/output.svg <absolutePath>/input.dxf
I've also tried this with no success with regard to the dialog popup:
/Applications/Inkscape.app/Contents/Resources/bin/inkscape -z -f <absolutePath>/input.dxf -l <absolutePath>/output.svg
-z means no GUI. Which works in terms of no Inkscape instance starting (XQuartz is starting though), but the pesky dialog can just assume ok and move on rather than checking with me for an ok click.
To be clear, the actual export is just fine. It's only the Gui dialog that's crashing my CLI-high :)
In short: any chance on flagging that dialog to go ahead without actual interaction from my part?
Specs:
MacOS 10.13.
Inkscape 0.91

Remove icon from pyinstaller when creating command line tool

I'm using windows and I've just created this command line tool. I'm trying to package it with pyinstaller and since its a command line tool, I don't want any icon on it including pyinstaller's default icon. I tried setting icon=none at the spec file side but still it created it with the icon. Any Idea how to solve it?
I know that this is really old post, but you can always remove icon by using the argument -i "NONE", for example
pyinstaller file.py -i "NONE"

Resources