Can I add images in PNG or TIFF format to a PDF file in Simulink Report Generator and MATLAB Report Generator?
4 views (last 30 days)
Show older comments
MathWorks Support Team
on 27 Jun 2009
Edited: MathWorks Support Team
on 2 Sep 2022
I would like to be able to add images in PNG or TIFF format to a PDF file in Simulink Report Generator and MATLAB Report Generator.
Accepted Answer
MathWorks Support Team
on 2 Sep 2022
Edited: MathWorks Support Team
on 2 Sep 2022
FOP uses a Sun library called JIMI for PNG and TIFF support. Unfortunately, the JIMI release terms do not allow us to distribute it with Report Generator. Users are free to download and install it themselves. Follow these steps:
1. Download JIMI from Sun's website at
2. The downloaded file, jimi1_0.zip, contains the archive JimiProClasses.zip. Unzip/extract JimiProClasses.zip, and rename the file JimiProClasses.zip to jimi.jar.
3. Put this file in $matlabroot/java/jarext. If you do not have write access in this directory, you may put it anywhere you wish. $matlabroot refers to the root MATLAB directory, which can be found by typing the following command at the MATLAB command prompt:
matlabroot
4. Edit your classpath.txt. The default classpath is located in $matlabroot/toolbox/local/classpath.txt. If you do not have write access here, you can copy it to your startup directory and edit it there. Add the JIMI library immediately before $matlabroot/java/jarext/fop.jar. Use jimi.jar saved in $matlabroot/java/jarext or whatever location you are using for jimi.jar.
5. Restart MATLAB.
Your PDF reports should now have full PNG support and limited TIFF support.
Note that you can follow much the same procedure with the newer JAI (Java Advanced Imaging) API, except that installing JAI uses more disk space, is slightly more complicated, and will give the same results.
0 Comments
More Answers (0)
See Also
Categories
Find more on MATLAB Report Generator in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!