Overall composition
I tried printing a form with Spring MVC and JasperReports 1/3 (JasperReports settings) ← This article I tried printing a form with Spring MVC and JasperReports 2/3 (form template creation) I tried printing the form with Spring MVC and JasperReports 3/3 (Spring MVC control) Extra edition (Variables edition) of printing forms with Spring MVC and JasperReports
Is this the best? The fonts distributed by IPA are embedded in a commercial free Java library called JasperReports.
See here for the procedure ~~ (or rather Marupaku) ~~
AMG-Solution Co., Ltd. How to output PDF in Java? ~ Jasper Reports Settings ~ https://amg-solution.jp/blog/1519
First, open the Eclipse marketplace and search for "** Jasper **"
Install Jasper Studio there
Installation is complete.
Let's use Maven to make JasperReports library available for projects
pom.xml
<!-- Jasper Report -->
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
</dependency>
<!-- Jasper Report -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
JasperReports is a library for Spring IO Platform, so you don't need to write version information, right?
However, Japanese cannot be output as it is. Therefore, download the free fonts distributed by IPA.
https://ja.osdn.net/projects/ipafonts/releases/ ↑ Download ** IPAexfont00201.zip ** from here.
For the time being, we have everything. We will set this up!
Include IPA fonts in JasperReport. ** Window **> ** Settings **> ** JasperStudio **> ** Open Fonts ** and click ** Add ** to open the font addition screen
When you open the setting screen ** IPAexg ** in Family Name Set the downloaded .ttf file in TrueType (.ttf) Set PDF Encoding to ** Identity-H ** Check ** Embed this font PDF document **.
This completes the PDF embedding settings.
Click ** Finish ** when you're done
Recommended Posts