From the course: Complete Guide to Spring MVC
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
PDF and Excel overview - Spring Tutorial
From the course: Complete Guide to Spring MVC
PDF and Excel overview
- [Instructor] PDF and Excel. Spring MVC supports generating documents, like PDF and Excel files, dynamically using AbstractPdfView and AbstractXlsxView classes. These views are ideal for exporting reports, invoices, or other structured data directly from your web application. Let's look at creating PDF documents in Spring MVC. First, we want to create a custom PDF view. So here I've created a PdfView class that extends AbstractPdfView to define the content and structure of the PDF. In this class, you'll want to retrieve data from the model and then add content to the PDF document. Next, configure the ViewResolver. Map the custom view to its corresponding route in your configuration, and then of course, add your required dependencies. Add the iText, which is deprecated for commercial use, or OpenPDF library to your project. When I say deprecated for commercial use, there are a few open source options that you can use for personal projects. Now we'll look at creating Excel documents in…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Groovy Markup overview4m 23s
-
(Locked)
Thymeleaf4m 34s
-
(Locked)
FreeMarker overview3m 24s
-
(Locked)
Script views overview4m 42s
-
(Locked)
JSP and JSTL overview3m 54s
-
(Locked)
RSS and Atom4m 18s
-
(Locked)
PDF and Excel overview3m 43s
-
(Locked)
Jackson overview5m 3s
-
(Locked)
XML marshalling4m 31s
-
(Locked)
XSLT views overview5m 51s
-
(Locked)
-
-
-