Text label missing when paste into Word on Mac

User 641f993443

20-04-2014 19:00:26

OS: mac os x 10.8.5


Java: 1.8.0_05


Marvinsketch: 6.2.2


Word: 2011, 14.4.1


Problem: when copy and paste a structure with text label into Word, the text label is gone.


Screen copy is attached.

ChemAxon 4fa3cf533c

23-04-2014 11:58:26

Hello there,


We tried to reproduce your case but we were unable to do so.


What exactly do you mean by "structure with text label" ? Is it a structure and a text box next to it ? And from where does the text label missing, is it missing from sketch, or is it missing from word ? 


Also, Please send us a picture from Sketch about dialog.


 


Regards,


Tamas Fazekas-Vigh

User 641f993443

05-05-2014 20:07:39










tfazekas wrote:

Hello there,


We tried to reproduce your case but we were unable to do so.


What exactly do you mean by "structure with text label" ? Is it a structure and a text box next to it ? And from where does the text label missing, is it missing from sketch, or is it missing from word ? 


Also, Please send us a picture from Sketch about dialog.


 


Regards,


Tamas Fazekas-Vigh



Hi Tamas,


The "structure with text label" means a functional group (like CH3 or Me) which is attached to a chemical structure and interpreted chemically. As shown in attachment 1,  in Marvin Sketch 6.2.2, I created a 3-methylindole, where the NH and CH3 are presented as texts. Additionally, I added a text box. In Marvin Sketch these texts are rendered correctly, both "chemical text" and "text textg"


I copied 3-methylindole and "Text box" by selecting everything by Cmd+A then pressing Cmd+C. However, by pasting into both Word and Preview, the text part (CH3, NH, "Text box") are totally lost. If I changed the output format in "Copy As" from PDF (default, I suppose) to PNG/JPG/BMP, this problem does not occur. Looks like it's related to PDF.


I have attached two screen shots, one is copy-and-paste from Marvin Sketch to Word and Preview. Another is style selection dialogue.

ChemAxon 4fa3cf533c

08-05-2014 12:30:26

Hello,


I've already tried it with an older java, and it did not produce anything like this. We will try to reproduce it with 1.8.0_05 java soon. We use a different library when exporting to pdf on mac, so it might be a compatibility issue with the new java and the library. I'll write to this thread if we found out anything about this issue.


Regards,


Tamas Fazekas-Vigh

ChemAxon 4fa3cf533c

08-05-2014 13:55:39

Hi there,


Please, could you attach the Sketch about dialog (Help -> About MarvinSketch) for further investigation of the issue?


Thanks,


Tamas Fazekas-Vigh

User 641f993443

08-05-2014 17:18:07

Weird, why MarvinSketch is still using Apple Java? My termial shown that Oracle Java 8 is the default VM:



$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)


$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home


$ /usr/libexec/java_home -V
Matching Java Virtual Machines (3):
    1.8.0_05, x86_64:    "Java SE 8"    /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home
    1.6.0_65-b14-462, x86_64:    "Java SE 6"    /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-462, i386:    "Java SE 6"    /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home



Furthermore, in "/System/Library/Frameworks/JavaVM.framework/Versions", I have changed the soft link "CurrentJDK" from Apple Java 6 to Oracle Java8, but in MarvinSketch>Help>About, it still shows Apple Java.



lrwxr-xr-x   1 root  wheel   59 May  8 12:24 CurrentJDK -> /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/
lrwxr-xr-x   1 root  wheel   59 Jan 20 14:02 CurrentJDK.old -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents



Downgrading Java 8 to Java 7 (1.7.0_55) doesn't solve the problem.

ChemAxon 4fa3cf533c

09-05-2014 12:21:48

This is a fairly common issue, you can read more about here. What you have been missing I think, is that you've set the CurrentJDK only and the JRE is still set to Apple Java which is at "/System/Library/Frameworks/JavaVM.framework/Versions/Current".


 


Apart from this, could you please try to save the molecule to pdf via the "Save as" menu option in the file menu, and check the result for missing text ? 


Thanks,


Tamas Fazekas-Vigh

User 641f993443

09-05-2014 17:13:42

1. I have linked both "Current" and "CurrentJDK" to "/System/Library/Frameworks/JavaVM.framework/Versions/A", where "A" is a directory contains JAVA 7.



drwxr-xr-x   8 root  wheel  272 May  9 11:40 A


lrwxr-xr-x   1 root  wheel    1 May  9 11:40 Current -> A


lrwxr-xr-x   1 root  wheel    1 May  9 11:56 CurrentJDK -> A



But still, MarvinSketch>Help>About shows Apple Java.


2. Save document to PDF popped out the following error message:



ERROR: 


font definition Helvetica-Light does not contain a valid family name


 


STACK TRACE:


java.lang.IllegalArgumentException: font definition Helvetica-Light does not contain a valid family name


at chemaxon.struc.graphics.MFont.<init>(MFont.java:104)


at chemaxon.marvin.io.image.exporter.ImageExport.parseOption(ImageExport.java:521)


at chemaxon.marvin.io.MolExportModule.open(MolExportModule.java:222)


at chemaxon.marvin.io.image.exporter.ImageExport.open(ImageExport.java:235)


at chemaxon.marvin.io.formats.vectgraphics.PdfExport.open(PdfExport.java:77)


at chemaxon.common.swing.io.output.FileSaver.createExportModule(FileSaver.java:414)


at chemaxon.common.swing.io.output.FileSaver.overwriteWholeFile(FileSaver.java:474)


at chemaxon.common.swing.io.output.FileSaver.overwriteWholeFile(FileSaver.java:549)


at chemaxon.common.swing.io.output.FileSaver.overwriteSingleFile(FileSaver.java:354)


at chemaxon.common.swing.io.output.FileSaver.overwrite(FileSaver.java:348)


at chemaxon.common.swing.io.output.FileSaver.save(FileSaver.java:167)


at chemaxon.common.swing.io.output.FileSaver.startSave(FileSaver.java:162)


at chemaxon.common.swing.io.output.FileSaver.showIfPossible(FileSaver.java:92)


at chemaxon.common.swing.io.output.FileSaver.preformSave(FileSaver.java:84)


at chemaxon.marvin.sketch.swing.SketchPanel.doSave(SketchPanel.java:2089)


at chemaxon.marvin.sketch.swing.actions.SaveAction.actionPerformed(SaveAction.java:28)


at chemaxon.marvin.uif.module.support.ShortcutBinding$DelegatingAction.actionPerformed(ShortcutBinding.java:467)


at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1645)


at javax.swing.JComponent.processKeyBinding(JComponent.java:2859)


at javax.swing.JComponent.processKeyBindings(JComponent.java:2905)


at javax.swing.JComponent.processKeyEvent(JComponent.java:2822)


at java.awt.Component.processEvent(Component.java:6191)


at java.awt.Container.processEvent(Container.java:2084)


at java.awt.Component.dispatchEventImpl(Component.java:4776)


at java.awt.Container.dispatchEventImpl(Container.java:2142)


at java.awt.Component.dispatchEvent(Component.java:4604)


at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1856)


at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:722)


at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1000)


at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:865)


at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:686)


at java.awt.Component.dispatchEventImpl(Component.java:4648)


at java.awt.Container.dispatchEventImpl(Container.java:2142)


at java.awt.Window.dispatchEventImpl(Window.java:2492)


at java.awt.Component.dispatchEvent(Component.java:4604)


at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)


at java.awt.EventQueue.access$400(EventQueue.java:82)


at java.awt.EventQueue$2.run(EventQueue.java:676)


at java.awt.EventQueue$2.run(EventQueue.java:674)


at java.security.AccessController.doPrivileged(Native Method)


at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)


at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)


at java.awt.EventQueue$3.run(EventQueue.java:690)


at java.awt.EventQueue$3.run(EventQueue.java:688)


at java.security.AccessController.doPrivileged(Native Method)


at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)


at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)


at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)


at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)


at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)


at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)


at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)


at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)




Why "Helvetica-Light" is here? I have "Helvetica" as default font in "File>Document Style" and "Edit>Preferences".


But wait, after changing font settings in "Edit>Preferences" from "Helvetica" to "Arial", then save as PDF, the error message disappeared and a correct PDF file is generated. Both Adobe Reader and Apple Preview can render it correctly. However, copy from MarvinSketch then paste into Preview or Word still produces an incomplete structure without texts.

ChemAxon 4fa3cf533c

12-05-2014 12:42:38

This pretty much looks like a bug at our part. It seems that we consume the exception that arises from copy, so it does not occur there. I'll pick this issue up in our tracking system and we will inform you when it is done. 


In the mean time please try to adjust both Atom font settings and Circle Charge font settings from Helvetica to Arial, or Lucida Sans as a workaround for this problem. This might not solve the copy issue, so if it remains please fall back to copy as image (if it is acceptable) or save as pdf instead of copy.


 


Thanks for your report,


Tamas Fazekas-Vigh

User 641f993443

12-05-2014 13:35:51

I setted those fonts to Arial, but didn't help.

ChemAxon 4fa3cf533c

12-05-2014 14:23:59

Please, for further investigation of this issue, could you send me the PDF document you got from Copy as PDF? I myself used Clipboard Viewer 1.3, which allows to look and save the clipboard contents to a file, but feel free to choose any other tool. 


Saving any molecule to pdf while using Helvetica fonts produced the same exception you got, but copying as pdf did produce a good pdf file for me, there were no missing fonts or text labels in it.


 


Thanks, 


Tamas Fazekas-Vigh

User 641f993443

12-05-2014 17:26:53

Attachment 1: marvin-arial-clipboard.pdf


This pdf was generated by copying (Cmd+K) a pyrrole with all font settings using Arial from MarvinSketch, then extracted using Clipboard Viewer provided by Apple. This pdf can be rendered correctly by  Adobe Reader, which shows embedded Type1 Helvetica instead of Arial. Apple Preview failed rendering it correctly.


Attachment 2: marvin-arial-save.pdf


This pdf was generated by saving (Cmd+K) a pyrrole with all font settings using Arial from MarvinSketch in PDF format. This PDF can be rendered correctly by both Adobe Reader and Apple Preview. Adobe Reader shows no embedded font.


Attachment 3: chemdraw-helvetica-clipboard.pdf


This pdf was generated by copying (Cmd+K) a pyrrole with all font settings using Helvetica from Chemdraw, then extracted using Clipboard Viewer provided by Apple. This PDF can be rendered correctly by both Adobe Reader and Apple Preview. Adobe Reader shows embedded Truetype Helvetica.

User 641f993443

12-05-2014 17:29:46

Attachment 4: marvin-helvetica-clipboard.pdf


This pdf was generated by copying (Cmd+K) a pyrrole with all font settings using Helvetica from MarvinSketch, then extracted using Clipboard Viewer provided by Apple. This pdf can be rendered correctly by Adobe Reader, which shows embedded Type1 Helvetica instead of Arial. Apple Preview failed rendering it correctly.


Furthermore, applying fc-update -f did not help.


Attachment 5: marvin-to-chemdraw.pdf


Copying a structure from Marvin to Chemdraw, popped a dialogue about invalid SansSerif font. This dialogue continuously appearing no matter how I set the font in "Document Style" and "Preferences".

ChemAxon 4fa3cf533c

19-05-2014 07:41:40

Sorry for the late answer, and thank you for providing these pdf documents. It identifies the problem more accurately. We will look into at and we will inform you when it is done. 


 


Thank you again, for reporting this issue.

User 641f993443

23-05-2014 20:50:17

This problem remains in marvinsketch 6.3. However, on another computer using OS X 10.9, this problem disappeared.