Page 1 of 1
Copy and Pasting an Image . . .
Posted: 2010-11-05 20:13:09
by goldste4
Hello All,
Whenever I copy or cut and paste some text and an associated image (e.g., a Jpeg), the text pastes just fine, but where the image should appear, there is only the name of the image file that was inserted (as plain text). Any thoughts about how to cut/copy and paste inserted images from one part of a file to another without having to manually reinsert the image file each time (or what I might be doing wrong)?
Thanks in advance,
Josh
Re: Copy and Pasting an Image . . .
Posted: 2010-11-06 15:11:43
by Ruchama
I can reproduce what you are describing by using 'copy text only' command. using 'copy' copies the image itself as well. Have you tried using the command from the menu?
Re: Copy and Pasting an Image . . .
Posted: 2010-11-06 16:19:54
by goldste4
Hello,
Thanks for the suggestions. Unfortunately, I get the same result—no image, only the file name of the image—whether I use those keyboard short cuts (which is what I normally do) or I select 'copy' and 'paste' from the edit menu. Perhaps even more strangely, when I Cmd-C in NWP and then switch to MS Word and hit Cmd-V the image is pasted, so clearly the image is being copied into the clipboard. However, when I go to edit the clipboard (in NWP), all I see is the name of the image file. That said, I've never edited the clipboard before, so I really don't know what I'm supposed to see. . .
Any suggestions?
Thanks,
Josh
Re: Copy and Pasting an Image . . .
Posted: 2010-11-06 16:33:06
by Ruchama
I can only tell you that my clipboard includes the picture when copied through normal copy, and include only its file name when copied with 'text only' command. so clearly there is a bug somewhere. you could try to take out to the desktop nisus plist file from the preferences folder, in case something is stuck there.
Re: Copy and Pasting an Image . . . bug discovered.
Posted: 2010-11-07 05:37:12
by goldste4
Well, I think I narrowed down the problem (and discovered a bug in NWP, I think).
I've now found that if the image file inserted has spaces in the file name, then when the image is copy and pasted in NWP, only the file name will paste and not the image. However, if the image file inserted does not have spaces in the file name, then the copy and pasting of the image works just fine. Why this should be, I don't know, but at least I have a work around until the problem can be fixed!
Josh
Re: Copy and Pasting an Image . . .
Posted: 2010-11-08 11:21:18
by martin
This sounds pretty strange. It's very unlikely the image file name has anything to do with whether or not the image comes through in a copy-paste. Can you send us the document where the copy-paste doesn't duplicate the image? (via the menu Help > Send Feedback is best)
Re: Copy and Pasting an Image . . .
Posted: 2010-11-08 12:07:39
by goldste4
Hello Martin, thanks. Just sent in the file. Josh
Re: Copy and Pasting an Image . . .
Posted: 2010-11-08 13:55:18
by martin
Thanks Josh, I've taken a look and worked out what was going on. It turns out you were right in your suspicion that this was an issue with the file name, but not with spaces. The character that triggered the problem is the Em Dash, which is encoded differently than a regular dash. If you change the em dash to a normal dash, the image copy-pastes without problem.
Perhaps even more strangely, when I Cmd-C in NWP and then switch to MS Word and hit Cmd-V the image is pasted, so clearly the image is being copied into the clipboard
The problem is with NWP's decoding of the pasteboard. Specifically it's a bug in our RTFD decoder (and not with the RTF decoder). When you copy something, it's placed onto the clipboard in a whole slew of formats. Depending on which application you paste the content into, a different format may be used. NWP will prefer RTFD because it's slightly more efficient with regard to images, as the images are kept as separate files/attachments instead of being inlined/escaped in the RTF. This is actually the cause of the bug as well: the em dash isn't decoded properly, so NWP can't find an image attachment with a matching file name.
We'll get this fixed, thanks for your help!
Re: Copy and Pasting an Image . . .
Posted: 2010-11-08 14:12:34
by goldste4
Thanks Martin for your detective work, and others for their suggestions. Much appreciate the great user support. Josh