---
title: "pdf and maven"
author: "eric2500"
date: "2013-07-12T23:27:09Z"
tags: []
categories: ["编程语言"]
slug: "pdf-and-maven"
draft: false
lastmod: "2013-07-12T23:29:38Z"
id: 1905311
url: "https://eric2500.iteye.com/blog/1905311"
---

<span style="color:green">    For writing pdf, download the jar file, and install it to local by commands below.</span>

```java

mvn install:install-file -DgroupId=com.martin -DartifactId=itextpdf -Dversion=5.4.2 -Dpackaging=jar -Dfile=D:\123\itextpdf-5.4.2.jar

mvn install:install-file -DgroupId=com.martin -DartifactId=itext-pdfa -Dversion=5.4.2 -Dpackaging=jar -Dfile=D:\123\itext-pdfa-5.4.2.jar

mvn install:install-file -DgroupId=com.martin -DartifactId=itext-xtra -Dversion=5.4.2 -Dpackaging=jar -Dfile=D:\123\itext-xtra-5.4.2.jar

```

<span style="color:green">    Add dependencies</span>

```java

			<dependency>
				<groupId>com.martin</groupId>
				<artifactId>itextpdf</artifactId>
				<version>5.4.2</version>
			</dependency>
			<dependency>
				<groupId>com.martin</groupId>
				<artifactId>itext-pdfa</artifactId>
				<version>5.4.2</version>
			</dependency>
			<dependency>
				<groupId>com.martin</groupId>
				<artifactId>itext-xtra</artifactId>
				<version>5.4.2</version>
			</dependency>

```