itext는 Java 및 .NET에서만 지원하는 PDF 라이브러리

다양한 메소드를 이용하여 PDF파일을 쉽고 빠르게 만들 수 있다.

현재 itext는 유료버전과 무료버전으로 배포되어 있음.

학사 시스템을 가정하고 해당 학생의 재학증명서와 성적증명서를 itext로 제작해 해당 학생에 맞는 문서를 만들고 미리보기와 다운로드를 할 수 있다.

pom.xml 파일에 dependency를 추가해 준다.

<!-- <https://mvnrepository.com/artifact/com.itextpdf/itext7-core> -->
<dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>itext7-core</artifactId>
    <version>8.0.0</version>
    <type>pom</type>
</dependency>

Untitled

Untitled

Untitled

  1. localhost/itext/main URL 요청시 해당 컨트롤러에 매핑해준 로그인 페이지로 이동한다.
// 로그인 페이지로 이동
@GetMapping("/main")
public String main() {
	return "main";
}