Disable "Created with Inkscape (http://www.inkscape.org/)" comment.

Asked by Jared Dalton on 2019-02-26

Hi Inkscape-Team,
I was wondering, is there a way to avoid adding the "Created with Inkscape (http://www.inkscape.org/)" comment?
Thank you for your help.

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
Jared Dalton
Solved:
2019-02-28
Last query:
2019-02-28
Last reply:
2019-02-28
Hachmann (marenhachmann) said : #1

Yes. That comment is part of the template.

You can either:

- create a custom template where you have edited the comment out (with a text editor) or
- save as 'optimized SVG' and check the option to remove comments from the file

Jared Dalton (jareddalton) said : #2

Hachmann, thank you for your help.

Where would I find the template? I was not able to find a suitable answer. ~/.config/inkscape/templates is empty.

The "save as 'optimized SVG' and check the option to remove comments from the file" still saves the file with the comment. I am using Inkscape 0.92.4 (2019-01-14) on an Arch Linux system. Bug report?

Hachmann (marenhachmann) said : #3

You create the template, either as 'default.svg' in the folder you named, or as something like 'no_comment.svg' in the same folder.

default.svg is automatically loaded for empty documents, other templates are accessible via File > New from template.

The comment is removed for me when saving as optimized SVG. What is your version of python-scour?
Mine is 0.36.2 .

Jared Dalton (jareddalton) said : #4

I was able to save a new SVG (created from the default.svg in /templates) without the comment (which I had deleted) Unfortunately a line break is added after '<?xml version="1.0" encoding="UTF-8"?>' which is not like that in my template.

$ scour --version
0.37

I did not test if the comment was added with previous versions of scour.

Hachmann (marenhachmann) said : #5

For saving with line breaks or not, there is a setting in 'Save as Optimized SVG' / scour, on the first tab.

Inkscape always adds line breaks for new XML tags, when saving as 'Inkscape SVG', as far as I know. You can only select to 'inline attributes'. See Edit > Preferences > Input/Output > SVG output.

Accidentally, there's also a bug report for comments:
https://github.com/scour-project/scour/issues/226

And an old one that is supposed to be fixed:
https://github.com/scour-project/scour/issues/25

Jared Dalton (jareddalton) said : #6

The input/output options work for me, although the line-break stays. However, it's all good so far with the new template.

> Accidentally, there's also a bug report for comments:
> https://github.com/scour-project/scour/issues/226

Let's see what happens with this one.
Thank you for your time and help.