[JAVA] I tried printing a form with Spring MVC and JasperReports 1/3 (JasperReports settings)

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

Preparation Incorporate JasperReports into Eclipse

First, open the Eclipse marketplace and search for "** Jasper **"

Install Jasper Studio there

image.png

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!

Incorporate IPA fonts into JasperReports

Include IPA fonts in JasperReport. ** Window **> ** Settings **> ** JasperStudio **> ** Open Fonts ** and click ** Add ** to open the font addition screen

image.png

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.

image.png

Click ** Finish ** when you're done

Continued next time

Recommended Posts

I tried printing a form with Spring MVC and JasperReports 1/3 (JasperReports settings)
I tried printing a form with Spring MVC and JasperReports 3/3 (Spring MVC control)
I tried printing a form with Spring MVC and JasperReports 2/3 (form template creation)
I tried printing a form with Spring MVC and JasperReports Extra edition (Variables edition)
I tried printing a form with Spring MVC and JasperReports Extra edition (image edition)
I tried to implement file upload with Spring MVC
I tried to create a shopping site administrator function / screen with Java and Spring
I tried GraphQL with Spring Boot
I tried Flyway with Spring Boot
I tried connecting to MySQL using JDBC Template with Spring MVC
I tried to create a Spring MVC development environment on Mac
I made a simple search form with Spring Boot + GitHub Search API.
I tried playing with BottomNavigationView a little ①
I tried Lazy Initialization with Spring Boot 2.2.0
I introduced OpenAPI (Swagger) to Spring Boot (gradle) and tried various settings
I tried Spring.
Just input and output images with Spring MVC
I also tried WebAssembly with Nim and C
I tried to link JavaFX and Spring Framework.
I tried to break a block with java (1)
How to create an Excel form using a template file with Spring MVC
I tried to clone a web application full of bugs with Spring Boot
[I tried] Spring tutorial
I tried to read and output CSV with Outsystems
Spring Security usage memo: Cooperation with Spring MVC and Boot
I started MySQL 5.7 with docker-compose and tried to connect
[Ruby] I made a crawler with anemone and nokogiri.
Spring Boot with Spring Security Filter settings and addictive points
I tried to get started with Spring Data JPA
I tried Spring Batch
I made a Restful server and client in Spring.
I tried OCR processing a PDF file with Java
I wrote a test with Spring Boot + JUnit 5 now
I tried to create a java8 development environment with Chocolatey
I tried to modernize a Java EE application with OpenShift.
[Rails] I tried to create a mini app with FullCalendar
Spring Boot Introductory Guide I tried [Accessing Data with JPA]
I tried to verify this and that of Spring @ Transactional
I want to make a list with kotlin and java!
I want to make a function with kotlin and java!
Create a blog with Jekyll and GitHub Pages @ Initial Settings
I tried JAX-RS and made a note of the procedure
I tried to create a padrino development environment with Docker
I tried OCR processing a PDF file with Java part2
I tried to get started with Swagger using Spring Boot
I made a simple MVC sample system using Spring Boot
Java Config with Spring MVC
I tried DI with Ruby
I tried Spring State machine
I tried UPSERT with PostgreSQL.
I tried BIND with Docker
I tried to express the result of before and after of Date class with a number line
I tried Spring Boot introductory guide [Building a RESTful Web Service]
I get a 404 error when testing forms authentication with Spring Security
I tried running a letter of credit transaction application with Corda 1
Create a parent-child relationship form with form_object (I also wrote a test)
I tried to make an Android application with MVC now (Java)
I tried deploying a Docker container on Lambda with Serverless Framework
Spring Boot Introductory Guide I tried [Consuming a RESTful Web Service]
I tried to make a group function (bulletin board) with Rails
I tried to make a machine learning application with Dash (+ Docker) part1 ~ Environment construction and operation check ~