- Is the broken PDF of zero size?
- Do you see the issue only with a certain Live Script or with any (even empty) Live Scripts?
- Could you please post a few of those Java errors? The very first ones would be sufficient.
- I guess, the broken PDF made on the MBP can't be opened even on the MPA. And vice-versa, the PDF made on the MPA opens fine on the MBP. Can you confirm that?
Create PDF of Live Script produces broken PDF file
조회 수: 17 (최근 30일)
이전 댓글 표시
I am running MATLAB 2017a, on a MacBook Pro (2017, 15"), under OS X 10.13.1. When I try to save a Live Script as PDF, I get about 1000 java errors. The PDF is still generated, BUT the PDF file is broken - Acrobat will not open it.
When I open the same Live Script, under the same OS, but on my 2013 MBA, the PDF is generated with a thousand JAVA errors, BUT the PDF is not broken. Adobe Acrobat will open the PDF.
So it would appear that there is some interaction between the new crop of MBPs and MATLAB that is a problem. My MBP is Model Name: MacBook Pro Model Identifier: MacBookPro14,3 Processor Name: Intel Core i7 Processor Speed: 3.1 GHz Number of Processors: 1 Total Number of Cores: 4 L2 Cache (per Core): 256 KB L3 Cache: 8 MB Memory: 16 GB Display: 15.4-inch (2880 x 1800) Graphics: Radeon Pro 560 4 GB ...
My version of Java is current. I typically run with an external Thunderbolt display, but that is not the issue - I get the same result on the MBP if I run only the laptop screen.
For me, and I would guess anyone that is trying to use Live Scripts as a way to generate class-ready materials as PDF that this is a significant problem.
I would add - whether a good PDF is generated or not... seeing all those JAVA errors is disconcerting, and puzzling.
Best, ---jon---
댓글 수: 3
Steffany Reyna Marquez
2017년 11월 15일
Hello! I have exactly the same issue as Jon (a long message error and PDF empty). I run MATLAB 2017a in macOs highSierra (10.13.1). I updated my computer to this last version of macOS yesterday and whenever I click on "export to PDF" I get the following error:
Exception in thread "AWT-EventQueue-0" com.mathworks.util.event.EventListenerInvocationException: Error firing event:
caused by:
java.lang.OutOfMemoryError: Java heap space
at org.apache.commons.io.output.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:322)
at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:463)
at org.apache.fop.fonts.truetype.FontFileReader.<init>(FontFileReader.java:44)
at org.apache.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:204)
at org.apache.fop.fonts.FontAdder.add(FontAdder.java:63)
at org.apache.fop.fonts.FontDetectorFactory$DefaultFontDetector.detect(FontDetectorFactory.java:105)
at org.apache.fop.fonts.FontManager.autoDetectFonts(FontManager.java:229)
at org.apache.fop.fonts.DefaultFontConfigurator.configure(DefaultFontConfigurator.java:82)
at org.apache.fop.render.PrintRendererConfigurator.getCustomFontCollection(PrintRendererConfigurator.java:147)
at org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:127)
at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:170)
at org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:187)
at org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:75)
at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135)
at org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:105)
at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:350)
at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:107)
at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104)
at org.apache.fop.apps.Fop.<init>(Fop.java:78)
at org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:182)
at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:240)
at com.mathworks.hg.print.MWFopFactory.newFop(MWFopFactory.java:137)
at com.mathworks.mde.liveeditor.widget.rtc.export.PDFFileUtils.write(PDFFileUtils.java:69)
at com.mathworks.mde.liveeditor.widget.rtc.export.PDFExporter.writeXSLToPDFWithFile(PDFExporter.java:31)
at com.mathworks.mde.liveeditor.widget.rtc.export.PDFExporter.export(PDFExporter.java:40)
at com.mathworks.mde.liveeditor.LiveEditorClient.handleSaveAsNonMlxFile(LiveEditorClient.java:584)
at com.mathworks.mde.liveeditor.LiveEditorClient.access$700(LiveEditorClient.java:121)
at com.mathworks.mde.liveeditor.LiveEditorClient$5.saveAsAboutToHappen(LiveEditorClient.java:539)
at com.mathworks.widgets.datamodel.AbstractFileBackingStore.saveToFile(AbstractFileBackingStore.java:118)
at com.mathworks.widgets.datamodel.AbstractFileBackingStore.doSaveToFileAndUpdateBackingStore(AbstractFileBackingStore.java:259)
at com.mathworks.widgets.datamodel.AbstractFileBackingStore.doNegotiateSaveAs(AbstractFileBackingStore.java:237)
at com.mathworks.widgets.datamodel.AbstractBackingStore.negotiateSaveAs(AbstractBackingStore.java:131)
at com.mathworks.util.event.EventListenerList$1.invoke(EventListenerList.java:83)
at com.sun.proxy.$Proxy7.listItemSelected(Unknown Source)
at com.mathworks.toolstrip.plaf.TSListCellRenderer.mouseReleased(TSListCellRenderer.java:482)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:740)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:699)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:713)
at java.awt.EventQueue$4.run(EventQueue.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:710)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
I have to say that this error has not appeared before updating to highSierra (I have been working with live scripts for the past 2 months with the older version Sierra).
Hope this helps you to try and find the bug in the software. Best Regards Steffany
채택된 답변
추가 답변 (1개)
Martin Knelleken
2017년 11월 16일
George, Steffany
Thanks for your reply/post. For unknown reasons, you're running out of Java memory on certain machines with the most recent Sierra version. We've to figure out why this happens and how to handle this more nicely.
For now you can try to increase the Java Heap Memory in MATLAB. See https://www.mathworks.com/help/ matlab/matlab_external/java-heap-memory-preferences.html
I expect an increase of 50% would be sufficient.
I hope that helps.
- Martin
댓글 수: 1
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!