Generating Docx and Pdf files based on Freemarker template

The product raises the requirement of generating a word document and a pdf document respectively, which need to contain data, which need to have corresponding styles such as font size, tables, paragraphs and so on. The initial idea was to use Apache POI, but after looking at that large piece of code for filling in value operations, it was found ...

Posted on Thu, 10 Oct 2019 20:22:54 -0700 by hillbilly928

java on ftl template generation html and word (realize online preview function, save)

Problem Description: The earliest attempt has been made to generate word from XML template. Although the file format is retained a lot, the word generated by this template is transferred to html. It is problematic to use XWPF Document and HWPF Document in pure poi, because word is essentially xml, a ...

Posted on Wed, 18 Sep 2019 23:17:23 -0700 by roice

MyBatis Plus-6-Code Generator

Code generator 1.1 Code Generator MP provides a large number of custom settings, and the generated code can fully meet all kinds of requirements. MP code generator can be generated: entity class (can choose whether to support AR), Mapper interface, Mapper mapping file, Service layer, Controller layer. 2.1 Primary Key Policy Selection MP support ...

Posted on Wed, 04 Sep 2019 20:24:02 -0700 by pcjackson06

freemarker Exports Excel with Complex Styles

Code address: gitee https://gitee.com/suveng/demo/tree/master/chapter.002 The code is stored in the chapter.002 directory under demo. Each module is a separate springboot application, which can run the application directly. Environmental Science springboot 2.1.2 Freemarker 2.3.28 JDK1.8 step 1. Find the corresponding Excel template I found a ...

Posted on Sun, 25 Aug 2019 05:52:20 -0700 by jimmyhumbled

java generates PDF dynamically according to template

1. Requirement description: According to business needs, dynamic configurable PDF documents need to be generated on the server side to facilitate data visualization. II. Solutions:iText+FreeMarker+JFreeChart Generates Dynamic Configurable PDF DocumentsiText has a powerful PDF processing capability, but the style and typesetting are not well con ...

Posted on Sat, 06 Jul 2019 17:15:38 -0700 by jayrulez

Spring MVC Components and Configuration Details

Upload file parser MultipartResolver When loading the component, look for a Bean named multipartResolver of type MultipartResolver. As a component of this type. The component is not implemented by default and needs user display definition. Otherwise, there will be no component in the dispatcher servlet. Configuring this component should ...

Posted on Sat, 13 Apr 2019 20:45:32 -0700 by mewright

Android Template Making

This paper introduces the knowledge of template and how to make Android template and use it in detail, so as to reduce unnecessary repetitive work. For example, if I want to create a new module in my work, I don't need to create MVP related classes: Model, View, Presenter, Entity, etc. This article is devoted to template-related knowledge, so t ...

Posted on Fri, 12 Apr 2019 02:15:31 -0700 by Skaara

Spring Boot Series (V) web Development - Thymeleaf, FreeMarker Template Engine

The previous articles described how returning json data provides a good RESTful api, and now we show how to render the processed data onto the page. Spring Boot uses a template engine Spring Boot recommends template engines such as Thymeleaf, FreeMarker, Velocity, Groovy, Mustache, etc. JSP is not recommended. Spring Boot provides a good defa ...

Posted on Mon, 11 Feb 2019 03:36:17 -0800 by pneudralics

@ Controller Advice intercepts exceptions and handles them uniformly

In spring 3.2, the @Controller Advice annotation was added, which can be used to define @ExceptionHandler, @InitBinder, @ModelAttribute, and applied to all @RequestMapping. I. Introduction Create MyController Advice and add the @Controller Advice annotation. package com.sam.demo.controller; import org.springframework.ui.Model; import or ...

Posted on Sat, 02 Feb 2019 02:09:17 -0800 by BSkopnik

On freemarker Static Generation of html Page Scrambling

When FreeMarker generates static pages, if the encoding is inconsistent, it will generate scrambling code. Especially when dealing with Chinese, if the same encoding is not specified, it will generate scrambling code in Chinese. Therefore, in the development, we should try to ensure that the encoding is consistent. The following ...

Posted on Mon, 28 Jan 2019 16:39:14 -0800 by leatherback