I first open this file: https://media.inkscape.org/media/resources/file/Flag_of_Canada_19211957.svg. I select the entire image by pressing Ctrl + A. I copy the image by pressing Ctrl + C. I then make a new file by pressing Ctrl + N. I then paste the image in to the new file by pressing Ctrl + V. The image I get is however black. How do I fix this?
Seems the same here with macOS; cmd+C don´t do anything - but right-click copy+cmd+V will - and copy&paste from the edit menu will do either.
If you compare the header of the XML-tree of the file you linked and the new one as Inkscape SVG you´ll notice some differences that might cause this issue. Or this is intentional to avoid copy&pasting by default.
Looks like a typical use of CSS for the styles. I don't think it is trying to be obstructive.
I am searching for an extension that replaces the css with inline styles, but I'm not getting far.
The dropper can be used to replace manually (click with dropper 2x) and select-same beforehand works for all. Downside seems that the z order gets wonky on copy/paste. Grouping before copy/paste seems to resolve the z-order issue.
The image still comes black in the new file though when I paste it into it. I am not trying to paste the image into the same file. I am trying to paste the image into a new file.
It's not just saving as Inkscape SVG ; it's closing Inkscape and restart, loading the new flag file. And maybe it's the way clipboard on macOS works. At least just cmd+C don't work on the original file.
How come you (Tyler Durden) and I are getting black fills and Polygon is not getting black fills? Do I have to change the fill color every time I copy the image? Thank you.
Of course not. I believe it's how this SVG is set up.(compare it in a text editor aside an Inkscape file) I don' t have an "normal" SVG at hand, because I'm on an iPad right now. Will upload or redirect to some later for you to test - or does this happen with all SVGs on your system? Then it's a more serious problem than I initially thought.
Question is how to go about with it in Inkscape when copy&paste don´t work on this? Have you tried maybe a Clean Up Document followed by save as Optimised SVG which will convert CSS to XML regarding the dialog. Copy&paste on this works here as well.
I don't think grouping helps here as I am getting black fills regardless of any groups. Could it be that my Inkscape is malfunctioning? If yes, how do I fix my Inkscape? Would I have to get a new Inkscape? If yes, what new Inkscape should I get? Thank you.
The file is the same as https://media.inkscape.org/media/resources/file/Flag_of_Canada_19211957.svg. The Inkscape website renamed the file because it removes any parentheses and hyphens in any file name uploaded to it. You can rename the file back to Flag_of_Canada_(1921–1957).svg after downloading the file so that you have the same file name as me. Thank you.
I can't reproduce your problem using Inkscape 1.1 and macOS 10.15 on my very old MacBook Air. Copy and paste work as expected. All the CSS styles in the original are converted to inline styles in the copy. Duplicating retains the CSS styles of the original. The copies render perfectly when pasted into the original file or any other file.
I do not get black fills if I paste a copy into the same file. I only get black fills if I paste the image into a different file. I am currently using Inkscape version 0.92.4 on Windows 10 version 2004. If the problem persists, I can send you the file so that you can copy it for me. Thank you.
The attached fiel from reply#7 (optimized SVG) still don´t work for you? I will attache 3 more converted files. Testing the original with other SVG editors makes me wonder Inkscape handles it so well; Affinity Designer and Vectonator are displaying most of the parts in "black" on loading. Intaglio refuses to open it at all with error message: File: SVGConverter.mm Line: 614.
The optimized SVG from reply #7 gives black fills when I copy it into a new file. The files Flag_of_Canada_Pixelmator.svg and Flag_of_Canada_Rev.svg from reply #25 work fine. I will use these images from now on. Can you tell me more on how did you fix the problem so that I can fix the problem myself the next time I come across a similar problem? Thank you.
I first open this file: https://media.inkscape.org/media/resources/file/Flag_of_Canada_19211957.svg. I select the entire image by pressing Ctrl + A. I copy the image by pressing Ctrl + C. I then make a new file by pressing Ctrl + N. I then paste the image in to the new file by pressing Ctrl + V. The image I get is however black. How do I fix this?
Seems the same here with macOS; cmd+C don´t do anything - but right-click copy+cmd+V will - and copy&paste from the edit menu will do either.
If you compare the header of the XML-tree of the file you linked and the new one as Inkscape SVG you´ll notice some differences that might cause this issue. Or this is intentional to avoid copy&pasting by default.
Looks like a typical use of CSS for the styles. I don't think it is trying to be obstructive.
I am searching for an extension that replaces the css with inline styles, but I'm not getting far.
The dropper can be used to replace manually (click with dropper 2x) and select-same beforehand works for all. Downside seems that the z order gets wonky on copy/paste. Grouping before copy/paste seems to resolve the z-order issue.
Do you know where the dropper is in Inkscape? Do you know where select-same beforehand works for all is? Thank you.
As I wrote "save as" Inkscape SVG solves the issues with this file - maybe first close and reopen. "D" for Eyedropper? Shift+D for stroke color then.
The image still comes black in the new file though when I paste it into it. I am not trying to paste the image into the same file. I am trying to paste the image into a new file.
Not so here. Copy+paste via menu or right-click works flawlessly.
In case you didn´t found the Inkscape file here it is again:
Must be something special about Polygon's setup. Saving as Inkscape SVG still produces black fills on .92.2 (on WIn) and 1.2 (on Linux).
It's not just saving as Inkscape SVG ; it's closing Inkscape and restart, loading the new flag file. And maybe it's the way clipboard on macOS works. At least just cmd+C don't work on the original file.
How come you (Tyler Durden) and I are getting black fills and Polygon is not getting black fills? Do I have to change the fill color every time I copy the image? Thank you.
Interesting....seems grouping before copy helps, even on the original.
Of course not. I believe it's how this SVG is set up.(compare it in a text editor aside an Inkscape file) I don' t have an "normal" SVG at hand, because I'm on an iPad right now. Will upload or redirect to some later for you to test - or does this happen with all SVGs on your system? Then it's a more serious problem than I initially thought.
The original svg was probably generated in AI or such, using css instead of inline styles. Not too unusual.
Question is how to go about with it in Inkscape when copy&paste don´t work on this? Have you tried maybe a Clean Up Document followed by save as Optimised SVG which will convert CSS to XML regarding the dialog. Copy&paste on this works here as well.
Copy/paste to new document works if grouped before copying.
Clean up doc has found no unused defs.
Optimized svg does not help in v .92. Can't check 1.1 here for a few days.
I don't think grouping helps here as I am getting black fills regardless of any groups. Could it be that my Inkscape is malfunctioning? If yes, how do I fix my Inkscape? Would I have to get a new Inkscape? If yes, what new Inkscape should I get? Thank you.
Please describe your OS & version, Inkscape version and any system extras like tablets, multiple monitors, flux capacitors, etc.
I am currently using Inkscape version 0.92.4 on Windows 10 version 2004. I currently have one monitor and no flux capacitors or tablets.
Not sure what the issue could be. Attached is a recording of Inkscape .92.2 on Win 8.1.
Here is a video that shows that pasting the image in a new file after grouping gives black fills:
https://inkscape.org/gallery/item/27713/final_60d6a5f6a9f0d500daa40d34_245802.mp4
How would I find out what the issue is? Could it be that my Inkscape is malfunctioning? If yes, how do I fix my Inkscape?
The file in the video has a different name, and could be a different file. Please share that exact file to ensure we are not confusing the issue.
The file is the same as https://media.inkscape.org/media/resources/file/Flag_of_Canada_19211957.svg. The Inkscape website renamed the file because it removes any parentheses and hyphens in any file name uploaded to it. You can rename the file back to Flag_of_Canada_(1921–1957).svg after downloading the file so that you have the same file name as me. Thank you.
I can't reproduce your problem using Inkscape 1.1 and macOS 10.15 on my very old MacBook Air. Copy and paste work as expected. All the CSS styles in the original are converted to inline styles in the copy. Duplicating retains the CSS styles of the original. The copies render perfectly when pasted into the original file or any other file.
I do not get black fills if I paste a copy into the same file. I only get black fills if I paste the image into a different file. I am currently using Inkscape version 0.92.4 on Windows 10 version 2004. If the problem persists, I can send you the file so that you can copy it for me. Thank you.
The attached fiel from reply#7 (optimized SVG) still don´t work for you? I will attache 3 more converted files. Testing the original with other SVG editors makes me wonder Inkscape handles it so well; Affinity Designer and Vectonator are displaying most of the parts in "black" on loading. Intaglio refuses to open it at all with error message: File: SVGConverter.mm Line: 614.
The optimized SVG from reply #7 gives black fills when I copy it into a new file. The files Flag_of_Canada_Pixelmator.svg and Flag_of_Canada_Rev.svg from reply #25 work fine. I will use these images from now on. Can you tell me more on how did you fix the problem so that I can fix the problem myself the next time I come across a similar problem? Thank you.