Issue 81512 - ChemDraw objects are pasted as low resolution bitmaps
Summary: ChemDraw objects are pasted as low resolution bitmaps
Alias: None
Product: Writer
Classification: Application
Component: open-import (show other issues)
Version: current
Hardware: Mac Mac OS X, all
: P2 Trivial with 4 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2007-09-11 22:58 UTC by pantos
Modified: 2013-01-29 21:59 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

ODT document with a ChemDraw drawing pasted as lowres graphic (7.87 KB, application/vnd.sun.xml.writer)
2007-09-11 23:00 UTC, pantos
no flags Details
Clipboard content viewer (Mac OS X 10.4.x - Tiger version for Intel Mac). Unzip using bunzip2 and tar -xf <file> afterwards (29.82 KB, application/octet-stream)
2007-10-03 07:08 UTC, tino.rachui
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description pantos 2007-09-11 22:58:05 UTC
Description of Problem:
When a chemical drawing is copied from ChemDraw onto clipboard, and then pasted into Writer, it get 
pasted as a low resolution bitmap. In Edit -> Paste Special menu the only option is "bitmap" (source 

Steps to reproduce the problem:
1. copy a drawing from ChemDraw onto clipboard (select -> apple+C)
2. paste into writer (apple + V)

Actual Results:
drawing pasted as  bitmap

Expected Results:
drawing pasted as a high resolution object that can be can be later copied onto clipboard, then pasted 
back in ChemDraw and further modified in this program.

How often does this happen?

Additional Information (OS patch level, drivers, library
version, etc.)
MacOSX, 10.4.10, OpenOffice Aqua alpha version (aquavcl01_20070630.) !same thing happens in the 
latest OpenOffice X11 version! 

I contacted ChemDraw about this issue and here's their answer:

"I got some feedback on this from development. When a copy takes place from ChemDraw, we put a lot 
of different file formats on the clipboard. It is then up to the application in which you want to paste to 
get the correct format from the clipboard. In OpenOffice on Windows the default is bitmap when pasted 
but for OLE manipulation you need the enhanced metafile format. But at least on Windows you have 
the choice of doing this manually through the 'paste as' functionality. On Mac this functionality does 
not seem to be available and OpenOffice is not picking the desired format from the clipboard. It seems 
that this is a limitation on the side of OpenOffice and there is not much we can do about that.

We suggest you contact the OpenOffice people and have a request entered to solve this problem. If 
they do require our assistance with regards to selecting the appropriate format for chemical structures 
from the clipboard they can always contact us.  "
Comment 1 pantos 2007-09-11 23:00:43 UTC
Created attachment 48185 [details]
ODT document with a ChemDraw drawing pasted as lowres graphic
Comment 2 michael.ruess 2007-09-12 07:22:43 UTC
Same problem as issue 14907.

*** This issue has been marked as a duplicate of 14907 ***
Comment 3 michael.ruess 2007-09-12 07:23:15 UTC
Closing duplicate.
Comment 4 Mathias_Bauer 2007-09-12 07:33:00 UTC
Are you sure that this is a duplicate? Issue 14907 is about an import problem in
the metafile import; the current problem seems to be that the metafile import is
not used at all.

My question to the submitter: as you are using Mac OSX - what formats do you see
in the "Paste Special" dialog?
Comment 5 pantos 2007-09-12 10:50:22 UTC
To mba:

I see only "bitmap" with source "unknown".  There are no other options.

Comment 6 Mathias_Bauer 2007-09-12 12:37:54 UTC
So this definitely isn't a duplicate. Reopening.
Comment 7 Mathias_Bauer 2007-09-12 12:43:13 UTC
Now the interesting question is which formats ChemDraw provides to the
clipboard. They claim to provide a MetaFile (EMF) but OOo doesn't offer it to
the user. This leaves three possible explanations:

(1) The ChemDraw developers didn't tell the truth (implausible ;-))
(2) OOo doesn't allow to paste EMF 
(3) OOo and ChemDraw use different identifiers to describe the format

I don't have ChemDraw but I assume that pasting as metafile works on Windows.
Would be nice to get that confirmed. So most probably it is a clipboard issue of
the Mac port.

Tino, do you think that this issue is something for the Mac porting team?
Comment 8 tino.rachui 2007-10-02 21:34:11 UTC
tra -> pantos, mba: I'm happy to have a look at this issue in general and the the formats that ChemDraw 
provides in particular but in order to do this I need first of all ChemDraw. Where do I get it? Is it Freeware?
Comment 9 Mathias_Bauer 2007-10-02 22:40:50 UTC
No, I don't think that it is free software or even "free" software.
What we could try to confirm first is whether pasting EMF works basically in the
Mac version of OOo. 

Does anybody know about an application for MacOS that allows to browse through
the clipboard and show all provided formats? Perhaps the submitter could use
such an application to verify which formats are provided.
Comment 10 tino.rachui 2007-10-03 07:02:47 UTC
I doubt that EMF will be used as data format at all on Mac OS X. According to my experiences PICT or JPEG 
are the picture formats being used. But anyway its probably a good idea to let the submitter check what 
formats are in the clipboard. There is a tool pasteboardpeeker that could serve or purposes here. The 
binary is not that big so I will attach it to this issue. Its fairly simple to use. Just start it copy something to 
the clipboard from within chemdraw select paste in the menu of pasteboardpeeker. In pastboardpeekers 
main window you will see the raw content of the clipboard. Attach this to this issue please.
Comment 11 tino.rachui 2007-10-03 07:08:17 UTC
Created attachment 48664 [details]
Clipboard content viewer (Mac OS X 10.4.x - Tiger version for Intel Mac). Unzip using bunzip2 and tar -xf <file> afterwards
Comment 12 tino.rachui 2007-10-03 07:11:29 UTC
In order to unpack the file:
1. Open a terminal window -> Applications - Utilities - Terminal
2. Change to the dir where the downloaded file resides
3. execute 'bunzip pbpeeker.tar.bz2'
4. execute 'tar -xf pbpeeker.tar'
5. Run pasteboardpeeker
Comment 13 pantos 2007-10-03 14:39:14 UTC
Here's what PasteboardPeeker says about the ChemDraw graphics copied to clipboard:


PasteboardRef: 3348368  ItemCount: 1
   Index: 1  item ID: 1112493904
      "Apple PICT pasteboard type"
      'PICT' P_____ 35796                       X   X       ?            CHMD        7 Gr ph bj            

      'CDIF' ______ 1346  VjCD0100                          ChemDraw 11.0                 {4       5   =  

      'swsD' ______ 468           X     Y         Helvetica d     0                          E   E p X   

      'swsC' ______ 733      ChemDraw10030714382D    7  9  0  0  0  0  0  0  0  0999 V2000E   -0.6733    

Comment 14 tino.rachui 2007-10-04 20:48:23 UTC
tra: Ok from the attached PasteboardPeeker output it becomes obvious that on Mac OS X the only 
ChemDraw clipboard format that OOo can understand is PICT (the old Apple picture format). Actually 
Apple suggest that applications do no longer use PICT but unfortunately a lot continue to do so. Even 
worse some applications use PICT only as a container to transport more current formats like jpeg for 
instance. OOo has an own PICT filter which fails to work when PICT will only be used as container for 
other picture formats. For that reason in the OOo clipboard bridge we use the Apple QuickTime 
converter components to transform every PICT into a bitmap. This may obviously lead to quality losses. 
There is not much I see that OOo could do here to improve the situation at the moment. It might be 
possible that OOo's own PICT filter produces better results when importing a ChemDraw PICT but in 
order to make that work I need to integrate a type detection into the clipboard bridge which 
differentiates "real" PICTs from those that only serve as container for other formats and only convert the 
later ones to bitmap. This is what I wanted to do anyway as a developer from the Impress team fixed 
the OOo PICT filter for me recently but I'm not sure when I'll have the time to actually execute the plan. 
Atm I'm busy with implementing Drag&Drop for OOo. 
Comment 15 daugirdas 2009-10-03 18:06:36 UTC
The issue is very important to me and many other chemists.

Currently, OpenOffice, Neoffice and MS Office 2008 can't insert or open OLE
objects from ChemBioOffice under Tiger and Snow Leopard. iWork and MS Office
2004 (that I don't have and is no longer available) seem to communicate well
with ChemDraw, so it must be doable. I can't really use iWork since they don't
support odf and doc support is rather average.

OpenOffice and Neoffice can display the drawing in the existing document created
on Windows platform, just like under linux. The graphics are not anti-aliased
and look fairly coarse but still readable. If I double click the object a get a
"General error".

Pasting of Chemdraw as OLE objects doesn't work (please fix this - this is so
important). Openoffice inserts a tiny bitmap that can't be scaled up just as
described. However the behaviour of NeoOffice is slightly different, and it
inserts a huge diagram across the whole page that could be scaled down
reasonable. No anti-aliasing is applied though.

Under windows xp Openoffice can handle OLE well enough.

ChemBioOffice is available as free trial from Cambridgesoft.

I would love to have a fully functional OSS alternative package or at least
built in support in OOO for cdx format. It really shows why proprietary software
is evil.

Please try to implement iWork style OLE support for Mac OOO port. I would be
very grateful. 
Comment 16 pantos 2009-11-13 01:41:59 UTC
Hi Guys,
CambridgeSoft, the makers of ChemDraw (now ChemBioDraw), have released a new version (12.0). The 
problem with OpenOffice still presists when it comes to pasting in Writer. I did the Pasteboardpeeker 
trick you suggested a while back and I got the following:

PasteboardRef: 5471488  ItemCount: 1
   Index: 1  item ID: 1112493904
      "Apple PICT pasteboard type"
      'PICT' P_____ 15422  <>     A m           X   X     s              CHMD          Gr ph bj            

      'CDIF' ______ 1416  VjCD0100                          ChemDraw 12.0    e_          9q        5   =  

      'swsD' ______ 542           X     Y         Helvetica d     0                          D   E}      

      'swsC' ______ 981      ChemDraw11130901332D   10 11  0  0  0  0  0  0  0  0999 V2000E   -1.4289    

      'JPEG' PT____ 8497        JFIF     X X     tExif  MM *                 >           F             i  

      'jp2 ' PT____ 123725      jP          ftypjp2     jp2    ijp2h    ihdr                  colr          

      '8BPS' PT____ 46572  8BPS                              8BIM         X       X      8BIM       lMM *  

      'GIFf' PT____ 1173  GIF89a                           ,                             H           L    

      'BMP ' PT____ 1978038  BM .      6                           F\  F\                                    

      'TPIC' PT____ 39698                                                                                  

      "NeXT TIFF v4.0 pasteboard type"
      'TIFF' PT____ 1978350  MM *  .                                                                         

      "Apple PNG pasteboard type"
      'PNGf' PT____ 20461   PNG        IHDR                     pHYs  \F  \F   CA    IDATx      :n P +    {

      '.SGI' PT____ 62120                                                                                  

      '' PT____ 10786  v/1     channels chlist I   A                 B                 G               

      'CDIF' ______ 1416  VjCD0100                          ChemDraw 12.0    e_          9q        5   =  

      'swsD' ______ 542           X     Y         Helvetica d     0                          D   E}      

      'swsC' ______ 981      ChemDraw11130901332D   10 11  0  0  0  0  0  0  0  0999 V2000E   -1.4289    

Is this more helpful in finding a solution?

Thanks! BTW loads of chemists would love to have this issue fixed. It prevents us from using OOo
Comment 17 drc_007 2010-01-08 07:58:31 UTC
This link may provide additional insight

It looks like ChemDraw actually adds multiple formats to the clipboard, but only the PICT format contains 
the chemical information needed for round-trip editing.
Comment 18 alex.thurgood 2011-03-07 09:30:11 UTC
Hi all,

Just FYI, albeit without ChemDraw, for a while now there has been BkChem, a python based chemical structure drawing app. It will import and export files in several formats, including export to ODG format. The advantage of BkChem is that the ODG files are directly editable/copiable objects within Writer or Calc :-)), thus avoiding the problems with clipboard import.