Copy and Pasting an Image . . .

Everything related to our flagship word processor.
Post Reply
goldste4
Posts: 98
Joined: 2010-02-22 15:06:48

Copy and Pasting an Image . . .

Post 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
Ruchama
Posts: 213
Joined: 2006-08-19 18:35:27

Re: Copy and Pasting an Image . . .

Post 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?
goldste4
Posts: 98
Joined: 2010-02-22 15:06:48

Re: Copy and Pasting an Image . . .

Post 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
Ruchama
Posts: 213
Joined: 2006-08-19 18:35:27

Re: Copy and Pasting an Image . . .

Post 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.
goldste4
Posts: 98
Joined: 2010-02-22 15:06:48

Re: Copy and Pasting an Image . . . bug discovered.

Post 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
User avatar
martin
Official Nisus Person
Posts: 5230
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Copy and Pasting an Image . . .

Post 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)
goldste4
Posts: 98
Joined: 2010-02-22 15:06:48

Re: Copy and Pasting an Image . . .

Post by goldste4 »

Hello Martin, thanks. Just sent in the file. Josh
User avatar
martin
Official Nisus Person
Posts: 5230
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Copy and Pasting an Image . . .

Post 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!
goldste4
Posts: 98
Joined: 2010-02-22 15:06:48

Re: Copy and Pasting an Image . . .

Post by goldste4 »

Thanks Martin for your detective work, and others for their suggestions. Much appreciate the great user support. Josh
Post Reply