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!
Related
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.
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:
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
When I'm coding in HTML and use input tag, sublime autocompletion gives me <input></input>. I'd love sublime gives me <input />.
How can I change this? (my sublime is version 3)
I saw this:
How to change default code snippets in Sublime Text 3?
and this video (portuguese audio):
https://www.youtube.com/watch?v=9iTu3C9FzX4
Sublime's HTML autocompletions are done in a Python script.
Install PackageResourceViewer using Package Control (if it isn't already installed)
From the Command Palette, select PackageResourceViewer - Open Resource
Select HTML
Select html_completions.py
Find the line ('input\tTag', 'input type=\"$1\" name=\"$2\">'),
Change it to ('input\tTag', 'input type=\"$1\" name=\"$2\" />'),
Save the file
I'me trying to use ImageMagick to convert SVG files to PNG.
The SVG file is as follows:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<image xlink:href="picture.jpg" width="200" height="200"/>
</svg>
No matter what method I use the final result doesn't include the image. Other SVG elements have rendered correctly.
I've tried:
convert test.svg test.png
rsvg-convert -o test.png test.svg
I've tried changing the image path to use file:///, absolute paths, remote urls, and url encoded variations of each. I've also formatted my file with and without a doctype.
I'm using librsvg 2.36.3 and ImageMagick 6.8.0-10
I have been able to use phantomjs to convert them but it seems like overkill for this one task.
Please help!
For me, installing gtk3 (or probably more specifically "shared-mime-info" helped. (and re-installing rsvg afterwards AND using absolute "file:///" uri for href AND having image file in same directory as svg file)
More info (I'm still confused what exactly is going on):
I think the problem is not with rsvg directly, but with gdk-pixbuf(2) library
I found the place in the code where gdk-pixbuf is used to load the image. I confirmed (using printf debuggin) that it doesn't throw an error (seems to load pixbuf just fine) even if the uri in the href does not point to a file.
the gtk3 dependency should only be necessary for rsvg-view-3 tool, not for rsvg, but it seems to be (or one of the dependencies that got pulled in when I installed gtk3)
It still works even after uninstalling gtk3. It even still works after uninstalling gtk3, then rebuilding rsvg (./configure detects: "gtk3: no"), so I figure it must have to do with one of the dependencies that got pulled when I installed gtk3:
atk-2.10.0-1-i686
hicolor-icon-theme-0.12-2-any
gtk-update-icon-cache-2.24.22-1-i686
libtasn1-3.3-2-i686
p11-kit-0.20.1-1-i686
gnutls-3.2.5-1-i686
libcups-1.7.0-1-i686
libxinerama-1.1.3-2-i686
shared-mime-info-1.2-1-i686
libgusb-0.1.6-1-i686
nspr-4.10.1-2-i686
js-17.0.0-1-i686
polkit-0.112-1-i686
shared-color-profiles-0.1.5-1-any
dconf-0.18.0-1-i686
colord-1.0.2-2-i686
recordproto-1.14.2-1-any
libxtst-1.2.2-1-i686
at-spi2-core-2.10.1-1-i686
at-spi2-atk-2.10.0-1-i686
xkeyboard-config-2.10.1-1-any
libxkbcommon-0.3.1-1-i686
(I'm leaving these here in case it's not the lib I identified in the end)
So I tried removing these deps in groups and rebuilding and testing in between. Turns out the one making it work is...
* shared-mime-info