C3D Posted February 8, 2020 Posted February 8, 2020 Hello I'm use to copy past svg code on sublim with Mac from AD or AP. I have set Preference/general/ copy as svg text It work very wel on mac but now I try on a Windows and it don't work ! I don't find any solution on forum and I hope that there is one !!! Thank you Quote
walt.farrell Posted February 8, 2020 Posted February 8, 2020 What evidence leads you to believe it doesn't work on Windows, @C3D? If I enable that option, copy something in Designer, and then examine the clipboard contents with a clipboard viewer I see an SVG version of the object I copied is available. With the option off, no SVG version is available in the clipboard. You can also copy something, then in Designer or Photo you can do a Edit > Paste Special, and you'll see an SVG version is available if you have the option enabled and the object supports it. Perhaps you're trying to copy something that doesn't support that option? Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
C3D Posted February 8, 2020 Author Posted February 8, 2020 Thank you for answer I use this every day on mac it work It's the first time I try the same on window, nothing to copy even with a simple rectangle svg. I don't have a clipboard viewer but the option is "on" on my window10 setting Quote
walt.farrell Posted February 8, 2020 Posted February 8, 2020 8 minutes ago, C3D said: nothing to copy even with a simple rectangle svg. Sorry; I'm not sure what you mean there. What are you copying from, and what are you trying to paste into? Have you tried using Edit > Paste Special in Designer or Photo to show that there is SVG data in the clipboard? Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
Wosven Posted February 8, 2020 Posted February 8, 2020 That's strange, I usually copy from AD to inkScape and vice-versa without any problem. EDIT: but it's not pasting as XML in text editors. Quote
C3D Posted February 8, 2020 Author Posted February 8, 2020 Yes if I use Edit > Paste Special in Designer, I paste the svg. So there is well something in the clipboard. But if I want to paste in text editor (sublim or notepad) : nothing Quote
Fritz_H Posted February 8, 2020 Posted February 8, 2020 27 minutes ago, C3D said: Yes if I use Edit > Paste Special in Designer, I paste the svg. So there is well something in the clipboard. But if I want to paste in text editor (sublim or notepad) : nothing a workaround: needed: Editor (e.g. Notepad++* etc.) and "InsideClipboard" ** copy the Object in Designer open InsideClipboard or click on refresh if its already open. find the line which says "Scalable Vector Graphics" in column "Format Name" click that line once, the contents of this section will be displayed below. select all (CTRL-A) and copy that (CTRL-C) paste the XML into your favorite Editor. * https://notepad-plus-plus.org/** https://www.nirsoft.net/utils/inside_clipboard.html kind regards Fritz Quote
C3D Posted February 8, 2020 Author Posted February 8, 2020 Ok this work... I'm disapointed that it dont work directly like I'm used to on my Mac ...? A little idea of the reason why a direct copy /paste don't work ? Thank you for this alternative solution, it's always better that save as svg and reopen svg file ... Quote
Fritz_H Posted February 8, 2020 Posted February 8, 2020 @C3D Quote A little idea of the reason why a direct copy /paste don't work ? I guess that is because the Clipboard contains far more Data than just the XML. If you check my Screenshot above, there are 8 components (parts?) and almost all of them are bigger ("Size") than the XML (OK, the SVG contained just a square...) Perhaps a developer from Serif can explain briefly, how the Clipboard of Windows-Operating-System is handled and why it contains so much extra-Data... Thanks in Advance. Fritz Quote
walt.farrell Posted February 9, 2020 Posted February 9, 2020 When I copy a rectangle in Designer, while the Preference to copy items as SVG is enabled, my clipboard has the following contents: Windows applications have a choice of what kind of data they will accept, and what kinds of data they will paster from the clipboard. Both the image/x-inkscape-svg and Scalable Vector Graphics versions contain the xml text, but the text editor you're pasting into needs to be coded to accept one of those formats. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
walt.farrell Posted February 9, 2020 Posted February 9, 2020 9 hours ago, Lagarto said: This seems to have been discussed already back in 2016, so over three years ago, and it seems there is no development. From this thread it appears that on macOS the option really puts the SVG object on the Clipboard as text (an XML tag). But I cannot check whether on macOS items are always also placed as SVG graphic objects, and the option only has the effect of placing the object on the Clipboard ALSO as a text object. Good find, though I'll point out that mostly that discussion has been about it not working on Mac. Also, the first page of the discussion is from 2016 and 2017, but the later part of it is from January, 2019. R C-R 1 Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
R C-R Posted February 9, 2020 Posted February 9, 2020 11 hours ago, Lagarto said: Interestingly, on Windows the option is named "Copy Items as SVG" (rather than "Copy as svg text", as quoted by OP -- I do not have macOS version of Affinity apps so I cannot check this) ... In the U.S. English Mac versions it is also named "Copy Items as SVG," so no difference in that respect. 11 hours ago, Lagarto said: On macOS I understand the option completely: there the Publisher/Designer item is probably copied onto the Clipboard both as SVG (graphic object) and -- optionally --- as text (an xml tag). I can't claim to understand it completely but in the macOS below are the clipboard contents with & without the "Copy Items as SVG" option enabled with a single rectangle object copied: Several of the types like the PDF & PNG ones are duplicates of each other. Only with the option enabled is there a 'plain-text' type, but it is empty. The two TIFF types are empty with it disabled, populated if it is enabled. Anyway, the bottom line is in the macOS among other things "Copy Items as SVG" does place on the clipboard an SVG object formatted as text in an XML wrapper. EDIT: Actually, on closer inspection, the XML wrapper just includes a reference to the SVG object. The object itself is stored in a subfolder in /var/folders/ as "Clipboard.svg." Like @walt.farrell mentioned above for Windows, in the macOS what gets pasted into another app depends on what type(s) of data they will accept, so that has to be taken into account. walt.farrell 1 Quote All 3 1.10.8, & all 3 V2.5.7 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
R C-R Posted February 9, 2020 Posted February 9, 2020 45 minutes ago, walt.farrell said: Good find, though I'll point out that mostly that discussion has been about it not working on Mac. Also, the first page of the discussion is from 2016 and 2017, but the later part of it is from January, 2019. DUH! If I had just reread that discussion before I posted to this one my previous post would have been much shorter & to the point, plus I would not have had to edit it. Anyway, I think for both Mac & Windows, it all comes down to what what types of data apps will accept from the clipboard, just like Walt said earlier in this discussion, & what they do with that data. I am certain of one thing only: this is much more complicated than it seems. The clipboard usually contains several different types of data. Some of them may just be pointers to data stored somewhere else. An app may accept several different types & use them in combination with a local app context to determine what (if anything) gets pasted. The OS may enforce security restrictions that limit what kind of data an app can see or pass to the clipboard. Third party additions that directly or indirectly affect clipboard contents, where they are stored, or how they are referenced may cause unexpected behavior, as might things like Apple's "universal clipboard" that works across multiple devices. Quote All 3 1.10.8, & all 3 V2.5.7 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
R C-R Posted February 9, 2020 Posted February 9, 2020 29 minutes ago, Lagarto said: I compiled now ClipboardViewer v4.0 by Apple, and could confirm that Affinity apps indeed copy SVG data as UTF-8 string on the Clipboard, when "Copy Items as SVG" is checked. Yeah, that is yet another thing I botched in my first post. Where I said the 2 clipboard data types with arrows pointing to them contain SVG data as text, I should have said that about the public.utf8-plain-text item instead. I blame it all on not ingesting enough coffee before posting! 🤪 Quote All 3 1.10.8, & all 3 V2.5.7 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
R C-R Posted February 9, 2020 Posted February 9, 2020 16 minutes ago, Lagarto said: What is crucial in the screenshot you had taken is the line "public.utf-8-plain-text", that shows when the "Copy SVG" option is turned on. It is just that the earlier Clipboard Viewers seem to be buggy in this respect as they do not show the actual content (it appears to be empty, but is not). You are all too right about that. The old version 2.0 Clipboard Viewer I still use is indeed buggy -- it always shows the content immediately after anything is copied to the clipboard (& if needed I hit the Reload button), but after that it is completely flakey, particularly for plain-text & maybe a few other data types. The thing is, I know this, but sometimes I forget to recopy whatever I am checking to the clipboard. Just another of my many dumb mistakes. Quote All 3 1.10.8, & all 3 V2.5.7 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
C3D Posted February 10, 2020 Author Posted February 10, 2020 Wow Thank you for these clear and detailled answers !! Very instructive Quote
R C-R Posted February 10, 2020 Posted February 10, 2020 5 hours ago, Lagarto said: It seems it is not related to a bug in the Clipboard Viewer, after all. I had another look on this and it seems that the plain-text format SVG code placed on the Clipboard by Affinity apps really "expires" within a fairly short time ... That is consistent with what I see with Clipboard Viewer, 2.0, but even if I wait several minutes, as long as I don't copy anything else to the clipboard, TextEdit (among other apps) pastes the plain text version into a new or existing document in that app for as long as Affinity Designer is running on my Mac, including after I close the document in AD. However, if I quit Affinity Designer, that won't work -- the paste command in TextEdit is greyed out, Finder > Edit > Show Clipboard says "Clipboard contents: None," etc. Moreover, this happens whether or not "Copy Items as SVG" is checked & regardless of what kind of data I copy to the clipboard in AD. This does not happen with TextEdit, BBEdit, or any other app I tested -- anything copied to the clipboard in those apps remains on the clipboard after I quit them. So my tentative conclusion is the clipboard data does not 'expire' because it doesn't get used quickly enough by some other app but because quitting Affinity Designer 'expires' it. Of course, I can't test this on Windows but I suspect it does the same thing. If I am right about all this & AD is just 'overly aggressive' about cleaning up when quit, it hopefully will be easy enough for the developers to fix in a future release. For now, as a workaround just not quitting AD until the desired data is pasted into another app should work. Quote All 3 1.10.8, & all 3 V2.5.7 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
R C-R Posted February 10, 2020 Posted February 10, 2020 3 minutes ago, Lagarto said: On Windows the SVG data is placed on Clipboard as non-text data so this feature cannot be tested. I am not a Windows user so I cannot test this for myself but this earlier post by @walt.farrell seems to suggest that with "Copy items as SVG" enabled, Windows does place the SVG data on the clipboard as text. 7 minutes ago, Lagarto said: But I have now tested this so many times on macOS (Mojave) that I can say it behaves inconsistently (=erratically): sometimes the data stays there, sometimes it "appears" to be getting expired for no obvious reasons. I have not tested this exhaustively on my iMac (also running Mojave) but so far there is nothing erratic about it: as long as AD is running & nothing else is copied to the clipboard, with "Copy items as SVG" enabled the text version remains on the clipboard & can be pasted into other apps like TextEdit or BBEdit as text. It is also what I see with Finder > Edit > Show Clipboard. It even pastes as text into some places I would not expect it to, like in the Search field in Apple Messages, Apple Mail, Finder windows, & Spotlight searches. It also consistently is removed from the clipboard (leaving it empty) the moment I quit AD. Time permitting, I will try to do more testing but at least on my iMac it 'expires' exclusively for one of three reasons: I quit AD I copy something else to the clipboard I paste it into a location in an app that does not accept XML formatted text & instead pastes either nothing or pastes one of the other data types on the clipboard like a hypertext link, a PNG image, etc. I need do more testing with the 3rd procedure to see if it is the same with different apps, but that seems to be the only potential source of inconsistency I have as yet not fully explored. Quote All 3 1.10.8, & all 3 V2.5.7 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
walt.farrell Posted February 10, 2020 Posted February 10, 2020 32 minutes ago, R C-R said: seems to suggest that with "Copy items as SVG" enabled, Windows does place the SVG data on the clipboard as text. Yes, Affinity puts text data in the Clipboard with that option active. However, when it does that it does not supply a .txt format, but a Scalable Vector Graphics format and an inkscape-related svg format. Both contain text, but as they are not labeled as text it's likely that most text editors won't recognize them as such. I believe the screenshots above from Mac included a text version, which is not present on Windows. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.