Error when using print: Java exception occurred: java.lang.IllegalStateException: Graphics state stack should be empty at this point
古いコメントを表示
When running a matlab script that uses the print function, I receive the following error:
Error using print (line 82)
There was a problem while generating the output: Java exception occurred:
java.lang.IllegalStateException: Graphics state stack should be empty at this point
at org.apache.xmlgraphics.ps.PSGenerator.resetGraphicsState(Unknown Source)
at org.apache.xmlgraphics.ps.PSGenerator.showPage(Unknown Source)
at org.apache.xmlgraphics.java2d.ps.PSDocumentGraphics2D.writePageTrailer(Unknown Source)
at org.apache.xmlgraphics.java2d.ps.AbstractPSDocumentGraphics2D.closePage(Unknown Source)
at org.apache.xmlgraphics.java2d.ps.AbstractPSDocumentGraphics2D.finish(Unknown Source)
at com.mathworks.hg.print.FOPPSVectorStrategy.endJob(FOPPSVectorStrategy.java:212)
at com.mathworks.hg.util.HGVectorOutputHelper.close(HGVectorOutputHelper.java:239)
Error in save_figs_to_pdf (line 38)
print(handle,'-dpsc2', tmpfile_ps, '-append', '-fillpage');
end
Any idea on the cause or how to fix it? The script continues to work on the computer it was written on, but doesn't seem to work on the several others tried. Is there some setting in MATLAB or the computers that could be adjusted to make this work?
1 件のコメント
Anand Patel
2017 年 12 月 27 日
Without complete reproduction steps, it would be hard to tell. You should contact Mathworks support about this.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Call Java from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!