Skip to content

Commit 14deebc

Browse files
committed
[RELEASE] merging 'release/7.0.2' into 'master'
2 parents 957b001 + 0751be7 commit 14deebc

File tree

1,120 files changed

+26359
-4811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,120 files changed

+26359
-4811
lines changed

BUILDING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Running install without a profile will generate the iText 7 jars:
55
$ mvn clean install \
66
-Dmaven.test.skip=true \
77
-Dmaven.javadoc.failOnError=false \
8-
| tee mvn.log
8+
> >(tee mvn.log) 2> >(tee mvn-error.log >&2)
99
```
1010

1111
To run the tests, [Ghostscript][2] and [Imagemagick][3] must be installed.
@@ -15,7 +15,7 @@ $ mvn clean install \
1515
-DgsExec=$(which gs) \
1616
-DcompareExec=$(which compare) \
1717
-Dmaven.javadoc.failOnError=false \
18-
| tee mvn.log
18+
> >(tee mvn.log) 2> >(tee mvn-error.log >&2)
1919
```
2020

2121
You can use the supplied `Vagrantfile` to get a [Vagrant][4] VM ([Ubuntu][5] 14.04 LTS - Trusty Tahr, with [VirtualBox][6]) with all the required software installed.
@@ -24,7 +24,7 @@ $ vagrant box add ubuntu/trusty64
2424
$ vagrant up
2525
$ vagrant ssh -- \
2626
'cd /vagrant ; mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.failOnError=false' \
27-
| tee mvn.log
27+
> >(tee mvn.log) 2> >(tee mvn-error.log >&2)
2828
```
2929

3030
[1]: http://maven.apache.org/

README.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[iText][itext] consists of several jars.
2+
3+
The iText 7 Core/Community release contains:
4+
- ```kernel-x.y.z.jar```: low-level functionality
5+
- ```io-x.y.z.jar```: low-level functionality
6+
- ```layout-x.y.z.jar```: high-level functionality
7+
- ```forms-x.y.z.jar```: AcroForms
8+
- ```pdfa-x.y.z.jar```: PDF/A-specific functionality
9+
- ```pdftest-x.y.z.jar```: test helper classes
10+
- ```barcode-x.y.z.jar```: use this if you want to create bar codes
11+
- ```hyph-x.y.z.jar```: use this if you want text to be hyphenated
12+
- ```font-asian-x.y.z.jar```: use this is you need CJK functionality (Chinese / Japanese / Korean)
13+
- ```sign-x.y.z.jar```: use this if you need support for digital signatures
14+
15+
The iText 7 Community source code is hosted on [Github][github], where you can also [download the latest releases][latest].
16+
17+
You can also [build iText 7 Community from source][building].
18+
19+
We also have a tool that can help you debug PDFs:
20+
- ```itext-rups-x.y.z.jar```
21+
RUPS is also hosted on [Github][github-rups]
22+
23+
If you have an idea on how to improve iText and you want to submit code,
24+
please read our [Contribution Guidelines][contributing].
25+
26+
iText is dual licensed as [AGPL][agpl]/Commercial software.
27+
28+
AGPL is a free / open source software license.
29+
30+
This doesn't mean the software is gratis!
31+
32+
Buying a license is mandatory as soon as you develop commercial activities
33+
distributing the iText software inside your product or deploying it on a network
34+
without disclosing the source code of your own applications under the AGPL license.
35+
These activities include:
36+
- offering paid services to customers as an ASP
37+
- serving PDFs on the fly in the cloud or in a web application
38+
- shipping iText with a closed source product
39+
40+
Contact [sales] for more info.
41+
42+
[agpl]: LICENSE.md
43+
[building]: BUILDING.md
44+
[contributing]: CONTRIBUTING.md
45+
[extrajars]: EXTRAJARS.md
46+
[itext]: http://itextpdf.com/
47+
[github]: https://github.com/itext/itext7
48+
[latest]: https://github.com/itext/itext7/releases/latest
49+
[github-rups]: http://github.com/itext/rups
50+
[sales]: http://itextpdf.com/sales

barcodes/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.itextpdf</groupId>
77
<artifactId>root</artifactId>
8-
<version>7.0.1</version>
8+
<version>7.0.2</version>
99
</parent>
1010

1111
<artifactId>barcodes</artifactId>

barcodes/src/main/java/com/itextpdf/barcodes/Barcode128.java

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify
@@ -229,19 +229,14 @@ public class Barcode128 extends Barcode1D {
229229
*/
230230
public Barcode128(PdfDocument document) {
231231
super(document);
232-
try {
233-
x = 0.8f;
234-
font = PdfFontFactory.createFont(FontConstants.HELVETICA, PdfEncodings.WINANSI);
235-
size = 8;
236-
baseline = size;
237-
barHeight = size * 3;
238-
textAlignment = ALIGN_CENTER;
239-
codeType = CODE128;
240-
} catch (IOException e) {
241-
throw new RuntimeException("Cannot create font", e);
242-
}
232+
x = 0.8f;
233+
font = document.getDefaultFont();
234+
size = 8;
235+
baseline = size;
236+
barHeight = size * 3;
237+
textAlignment = ALIGN_CENTER;
238+
codeType = CODE128;
243239
}
244-
245240
public enum Barcode128CodeSet {
246241
A,
247242
B,

barcodes/src/main/java/com/itextpdf/barcodes/Barcode1D.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify

barcodes/src/main/java/com/itextpdf/barcodes/Barcode2D.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify

barcodes/src/main/java/com/itextpdf/barcodes/Barcode39.java

+11-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify
@@ -133,20 +133,16 @@ public class Barcode39 extends Barcode1D {
133133
*/
134134
public Barcode39(PdfDocument document) {
135135
super(document);
136-
try {
137-
x = 0.8f;
138-
n = 2;
139-
font = PdfFontFactory.createFont(FontConstants.HELVETICA, PdfEncodings.WINANSI);
140-
size = 8;
141-
baseline = size;
142-
barHeight = size * 3;
143-
generateChecksum = false;
144-
checksumText = false;
145-
startStopText = true;
146-
extended = false;
147-
} catch (IOException e) {
148-
throw new PdfException(e);
149-
}
136+
x = 0.8f;
137+
n = 2;
138+
font = document.getDefaultFont();
139+
size = 8;
140+
baseline = size;
141+
barHeight = size * 3;
142+
generateChecksum = false;
143+
checksumText = false;
144+
startStopText = true;
145+
extended = false;
150146
}
151147

152148
/**

barcodes/src/main/java/com/itextpdf/barcodes/BarcodeCodabar.java

+11-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify
@@ -93,20 +93,16 @@ public class BarcodeCodabar extends Barcode1D {
9393
*/
9494
public BarcodeCodabar(PdfDocument document) {
9595
super(document);
96-
try {
97-
x = 0.8f;
98-
n = 2;
99-
font = PdfFontFactory.createFont(FontConstants.HELVETICA, PdfEncodings.WINANSI);
100-
size = 8;
101-
baseline = size;
102-
barHeight = size * 3;
103-
textAlignment = ALIGN_CENTER;
104-
generateChecksum = false;
105-
checksumText = false;
106-
startStopText = false;
107-
} catch (Exception e) {
108-
throw new PdfException(e.getMessage(), e.getCause());
109-
}
96+
x = 0.8f;
97+
n = 2;
98+
font = document.getDefaultFont();
99+
size = 8;
100+
baseline = size;
101+
barHeight = size * 3;
102+
textAlignment = ALIGN_CENTER;
103+
generateChecksum = false;
104+
checksumText = false;
105+
startStopText = false;
110106
}
111107

112108
/**

barcodes/src/main/java/com/itextpdf/barcodes/BarcodeDataMatrix.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify

barcodes/src/main/java/com/itextpdf/barcodes/BarcodeEAN.java

+9-13
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify
@@ -211,18 +211,14 @@ public class BarcodeEAN extends Barcode1D {
211211
*/
212212
public BarcodeEAN(PdfDocument document) {
213213
super(document);
214-
try {
215-
x = 0.8f;
216-
font = PdfFontFactory.createFont(FontConstants.HELVETICA, PdfEncodings.WINANSI);
217-
size = 8;
218-
baseline = size;
219-
barHeight = size * 3;
220-
guardBars = true;
221-
codeType = EAN13;
222-
code = "";
223-
} catch (IOException e) {
224-
throw new PdfException(e);
225-
}
214+
x = 0.8f;
215+
font = document.getDefaultFont();
216+
size = 8;
217+
baseline = size;
218+
barHeight = size * 3;
219+
guardBars = true;
220+
codeType = EAN13;
221+
code = "";
226222
}
227223

228224
/**

barcodes/src/main/java/com/itextpdf/barcodes/BarcodeEANSUPP.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify

barcodes/src/main/java/com/itextpdf/barcodes/BarcodeInter25.java

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify
@@ -97,19 +97,15 @@ public class BarcodeInter25 extends Barcode1D {
9797
*/
9898
public BarcodeInter25(PdfDocument document) {
9999
super(document);
100-
try {
101-
x = 0.8f;
102-
n = 2;
103-
font = PdfFontFactory.createFont(FontConstants.HELVETICA, PdfEncodings.WINANSI);
104-
size = 8;
105-
baseline = size;
106-
barHeight = size * 3;
107-
textAlignment = ALIGN_CENTER;
108-
generateChecksum = false;
109-
checksumText = false;
110-
} catch (Exception e) {
111-
throw new PdfException(e);
112-
}
100+
x = 0.8f;
101+
n = 2;
102+
font = document.getDefaultFont();
103+
size = 8;
104+
baseline = size;
105+
barHeight = size * 3;
106+
textAlignment = ALIGN_CENTER;
107+
generateChecksum = false;
108+
checksumText = false;
113109
}
114110

115111
/**

barcodes/src/main/java/com/itextpdf/barcodes/BarcodePDF417.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify

barcodes/src/main/java/com/itextpdf/barcodes/BarcodePostnet.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify

barcodes/src/main/java/com/itextpdf/barcodes/BarcodeQRCode.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify

barcodes/src/main/java/com/itextpdf/barcodes/dmcode/DmParams.java

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify
@@ -44,6 +44,16 @@ This file is part of the iText (R) project.
4444
package com.itextpdf.barcodes.dmcode;
4545

4646
public class DmParams {
47+
/**
48+
* Creates a DM code parameter block
49+
* @param height total height
50+
* @param width total width
51+
* @param heightSection height of a single section
52+
* @param widthSection width of a single section
53+
* @param dataSize size of the data
54+
* @param dataBlock size of a data-block
55+
* @param errorBlock size of a error-correction block
56+
*/
4757
public DmParams(int height, int width, int heightSection, int widthSection, int dataSize, int dataBlock, int errorBlock) {
4858
this.height = height;
4959
this.width = width;

barcodes/src/main/java/com/itextpdf/barcodes/dmcode/Placement.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This file is part of the iText (R) project.
4-
Copyright (c) 1998-2016 iText Group NV
4+
Copyright (c) 1998-2017 iText Group NV
55
Authors: Bruno Lowagie, Paulo Soares, et al.
66
77
This program is free software; you can redistribute it and/or modify
@@ -56,6 +56,13 @@ public class Placement {
5656
private Placement() {
5757
}
5858

59+
60+
/**
61+
* Execute the placement
62+
* @param nrow number of rows
63+
* @param ncol number of columns
64+
* @return array containing appropriate values for ECC200
65+
*/
5966
public static short[] doPlacement(int nrow, int ncol) {
6067
int key = nrow * 1000 + ncol;
6168
short[] pc = cache.get(key);

0 commit comments

Comments
 (0)