docker run -i -v /var/www/html/designer:/var/www/html/designer uvarc/inkscape:1.0 /usr/bin/inkscape /var/www/html/designer/designer/output/18-design18/0-side0/design-18-0.svg --export-filename=/var/www/html/designer/designer/cache/pdfs-18/design-18-0.pdf
I get this error
ConcreteInkscapeApplication<Gtk::Application>::on_open: Can't use '--export-filename' with multiple input files (output file would be overwritten for each input file). Please use '--export-type' instead and rename manually.
I'm passing only 1 input file but I might be missing something
This question is beyond my experience level, but I can tell you that I found inklinea's Command Line Builder tool very helpful in rooting out command line syntax issues. Good luck!
I wish I could be more helpful. Good luck with your venture. Hopefully the sh doesn't hit the fan! Out of pure curiosity, what sort of a contraption are you building that uses docker to package it up, but needs to convert svgs to pdf with inkscape? If your current approach doesn't work, I wonder if you could use ImageMagick or another utility for the export, although I'm not sure if the output quality is as good using ImageMagick, compared to Inkscape.
It's a product designer module that generates a SVG then gives the option to download a PDF in the admin panel. Some merchants have debian on the server so they can't install inkscape 1.0 yet, that's why I tried using docker
Currently, I'm using `--export-type=pdf` without `--export-filename` in order to avoid the issue. I'm comfortable with inkscape 1.0 because it supports embedded fonts in SVG
Thank you inklinea, I will try the rsvg approach and see how it goes
I'm building the SVG using php/smarty so I base64 encode the fonts inside the file, then I don't need to worry about the fonts being installed on the server, I just pass the svg to inkscape and it converts it
They started supporting embedded fonts in SVg since 1.0
Hi,
When I execute this command
docker run -i -v /var/www/html/designer:/var/www/html/designer uvarc/inkscape:1.0 /usr/bin/inkscape /var/www/html/designer/designer/output/18-design18/0-side0/design-18-0.svg --export-filename=/var/www/html/designer/designer/cache/pdfs-18/design-18-0.pdf
I get this error
ConcreteInkscapeApplication<Gtk::Application>::on_open: Can't use '--export-filename' with multiple input files (output file would be overwritten for each input file). Please use '--export-type' instead and rename manually.
I'm passing only 1 input file but I might be missing something
Any hint is much appreciated
Thank you
Hi unlocompqx,
This question is beyond my experience level, but I can tell you that I found inklinea's Command Line Builder tool very helpful in rooting out command line syntax issues. Good luck!
--ML
Thank you for your reply,
The command works "locally" and only causes a problem on docker.
So this command works fine
inkscape /var/www/html/designer/designer/output/18-design18/0-side0/design-18-0.svg --export-filename=/var/www/html/designer/designer/cache/pdfs-18/design-18-0.pdf
I will try passing it to sh and see how it goes
I wish I could be more helpful. Good luck with your venture. Hopefully the sh doesn't hit the fan! Out of pure curiosity, what sort of a contraption are you building that uses docker to package it up, but needs to convert svgs to pdf with inkscape? If your current approach doesn't work, I wonder if you could use ImageMagick or another utility for the export, although I'm not sure if the output quality is as good using ImageMagick, compared to Inkscape.
It's a product designer module that generates a SVG then gives the option to download a PDF in the admin panel. Some merchants have debian on the server so they can't install inkscape 1.0 yet, that's why I tried using docker
Currently, I'm using `--export-type=pdf` without `--export-filename` in order to avoid the issue.
I'm comfortable with inkscape 1.0 because it supports embedded fonts in SVG
Pun indented 😅
Many thanks for the kind words em1000 :)
I didn't know that Inkscape supported embedded fonts ? Export to pdf may embed them, but I haven't seen Inkscape embedding them ?
If you can't use Inkscape and you want to convert svg to pdf, have you tried using
rsvg-convert
?rsvg-convert --format pdf in.svg > out.pdf
That may do what you want ( excluding some filters ) without needing to use Inkscape at all.
Thank you inklinea, I will try the rsvg approach and see how it goes
I'm building the SVG using php/smarty so I base64 encode the fonts inside the file, then I don't need to worry about the fonts being installed on the server, I just pass the svg to inkscape and it converts it
They started supporting embedded fonts in SVg since 1.0
Cheers