

InternalResourceViewResolver: to resolve view names to JSP pages.ResourceBundleViewResolver: to resolve view names specified in the views.properties file.Writing Spring Configuration FileConfigure Spring MVC and view resolvers in spring-mvc.xml file under WEB-INF directory as follows:
#Lowagie pdfwriter api pdf#
Configuring PDF View ClassCreate views.properties file under the project’s classpath (which is under src directory in the Eclipse project), with the following line: pdfView.(class)= tells the Spring’s view resolver to pick the class to render response for the view name “ pdfView”.ħ. We will configure Spring to pick up this view class as described below. Public abstract class AbstractITextPdfView extends AbstractView The method buildPdfDocument() uses the iText API to generate a simple PDF document that contains a list of books in tabular format. * The code here is almost identical to the AbstractPdfView class. * This class is a work around for working with iText 5.x in Spring. Here is code of the subclass ( AbstractITextPdfView.java ): package Instead, we recommend to subclass the AbstractView class to create an iText 5.x-compatible version. it is using the package com.lowagie.* (iText version = 5.x)The old iText version is no longer available nor supported, so subclassing AbstractPdfView class (as of Spring 3.x) is discouraged.

However, it has a big drawback which the AbstractPdfView class only supports old API version of iText i.e. Subclassing AbstractView Class to Work with iText 5.xSpring 3.x provides an AbstractPdfView abstract class which can be subclassed to create a helper class for generating PDF documents. So after extracting the distribution archive, put the itextpdf-5.4.2.jar file to the project’s classpath. As of this writing, the latest version of iText is 5.4.2.
