Why can't I print from the Editor Window after upgrading from R2013a to R2014a
1 view (last 30 days)
Show older comments
MathWorks Support Team
on 25 Sep 2014
Edited: MathWorks Support Team
on 7 Apr 2021
I am not able to print a script file. In MATLAB R2013a I was able to print any file. How do I print my MATLAB files in Version R2014a?I am able to print figures, but when I try to click print from Editor Window, I get an error and the system print dialog does not appear.
Exception in thread "AWT-EventQueue-0" com.mathworks.util.event.EventListenerInvocationException: Error firing event:
caused by:
java.lang.NullPointerException
at sun.print.Win32PrintService.getMediaPrintables(Unknown Source)
at sun.print.Win32PrintService.isSupportedMediaPrintableArea(Unknown Source)
at sun.print.Win32PrintService.isAttributeValueSupported(Unknown Source)
at sun.print.RasterPrinterJob.isSupportedValue(Unknown Source)
at sun.print.RasterPrinterJob.setAttributes(Unknown Source)
at sun.awt.windows.WPrinterJob.setAttributes(Unknown Source)
at sun.print.RasterPrinterJob.printDialog(Unknown Source)
at com.mathworks.widgets.text.print.PrintSettings.showPrintDialog(PrintSettings.java:734)
at com.mathworks.widgets.SyntaxTextPaneBase.printDocument(SyntaxTextPaneBase.java:1703)
at com.mathworks.widgets.SyntaxTextPane.printDocument(SyntaxTextPane.java:109)
at com.mathworks.widgets.SyntaxTextPaneMultiView.printDocument(SyntaxTextPaneMultiView.java:821)
at com.mathworks.mde.editor.EditorView.doPrint(EditorView.java:1429)
at com.mathworks.mde.editor.EditorView.access$2400(EditorView.java:99)
at com.mathworks.mde.editor.EditorView$11.update(EditorView.java:1027)
at com.mathworks.mde.editor.EditorAction$ObservableAction.actionPerformed(EditorAction.java:47)
at com.mathworks.mwswing.ChildAction.actionPerformed(ChildAction.java:214)
at com.mathworks.toolstrip.factory.TSFactory$ListListenerBridge.listItemSelected(TSFactory.java:1350)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.mathworks.util.event.EventListenerList$1.invoke(EventListenerList.java:72)
at $Proxy8.listItemSelected(Unknown Source)
at com.mathworks.toolstrip.plaf.TSListCellRenderer.mouseReleased(TSListCellRenderer.java:476)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
.....
Accepted Answer
MathWorks Support Team
on 1 Apr 2021
Edited: MathWorks Support Team
on 7 Apr 2021
Developers need to know if this issue is resolved by 17b-pre. Please update the geck with this information.
Please regenerate your MATLAB preferences. Sometimes when MATLAB is upgraded, the preferences are not migrated correctly.Please see the following MATLAB answers page to regenerate your preferences:
0 Comments
More Answers (0)
See Also
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!