Why do I receive the error "Cannot find the directory for Ghostscript" when I try to run my stand-alone application created by the MATLAB Compiler?

10 views (last 30 days)
I have a stand-alone application that prints to a pdf-file. When I run the stand-alone created by the MATLAB Compiler, I receive this error message:
Can not find the directory for Ghostscript in D:\MATLABR13sp1\bin\win32
This code will reproduce the problem:
function printtest
surf(peaks);
print -dpdf

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
This is a bug in MATLAB Compiler 3.0.1 (R13SP1) in the way that the Compiler handles printing.
To work around this issue, copy the directory $MATLAB\sys\ghostscript to $MRTL\bin\$ARCH\sys\ghostscript (where $MGRTL is the root of your MGLINSTALLER installation and $ARCH is your architecture). You will also need to add $MGRTL\bin\$ARCH\ to your PATH. If you are unsure how to do this, see the Related Solution.

More Answers (0)

MathWorks Support

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R13SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!