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)
…..
Best Answer