Skip to content

Commit 2e932a8

Browse files
committed
[RELEASE] iText 8.0.3
2 parents 323f77f + 87c49fd commit 2e932a8

File tree

3,453 files changed

+26659
-5761
lines changed

Some content is hidden

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

3,453 files changed

+26659
-5761
lines changed

BUILDING.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,8 @@ $ mvn clean install \
4242
> >(tee mvn.log) 2> >(tee mvn-error.log >&2)
4343
```
4444

45-
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.
46-
```bash
47-
$ vagrant box add ubuntu/trusty64
48-
$ vagrant up
49-
$ vagrant ssh -- \
50-
'cd /vagrant ; mvn clean install -Dmaven.test.skip=true' \
51-
> >(tee mvn.log) 2> >(tee mvn-error.log >&2)
52-
```
45+
[1]: https://maven.apache.org/
46+
47+
[2]: https://www.ghostscript.com/
5348

54-
[1]: http://maven.apache.org/
55-
[2]: http://www.ghostscript.com/
56-
[3]: http://www.imagemagick.org/
57-
[4]: https://www.vagrantup.com/
58-
[5]: http://www.ubuntu.com/
59-
[6]: https://www.virtualbox.org/
49+
[3]: https://www.imagemagick.org/

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at http://itextpdf.com/contact. All
58+
reported by contacting the project team at https://itextpdf.com/contact. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -68,7 +68,7 @@ members of the project's leadership.
6868
## Attribution
6969

7070
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at [http://contributor-covenant.org/version/1/4][version]
71+
available at [https://contributor-covenant.org/version/1/4][version]
7272

73-
[homepage]: http://contributor-covenant.org
74-
[version]: http://contributor-covenant.org/version/1/4/
73+
[homepage]: https://contributor-covenant.org
74+
[version]: https://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Please note that this project is released with a [Contributor Code of Conduct][c
159159

160160
We use the [Stack Exchange][stackoverflow] network for free support and [GitHub][github] for code hosting. By using these services, you agree to abide by their terms:
161161

162-
* StackExchange: [http://stackexchange.com/legal](http://stackexchange.com/legal)
162+
* StackExchange: [https://stackexchange.com/legal](https://stackexchange.com/legal)
163163
* Github: [https://help.github.com/articles/github-terms-of-service/](https://help.github.com/articles/github-terms-of-service/)
164164

165165
[cla]: https://itextpdf.com/en/how-buy/legal/itext-contributor-license-agreement
@@ -168,7 +168,8 @@ We use the [Stack Exchange][stackoverflow] network for free support and [GitHub]
168168
[java-style-guide]: https://www.oracle.com/technetwork/java/codeconvtoc-136057.html
169169
[javadocs]: https://itextpdf.com/api
170170
[pull]: https://github.com/itext/itext7/pulls
171-
[sscce]: http://sscce.org/
171+
172+
[sscce]: https://sscce.org/
172173
[stackoverflow]: https://stackoverflow.com/questions/tagged/itext
173174
[good-questions]: https://stackoverflow.com/help/how-to-ask
174175
[mcve]: https://stackoverflow.com/help/mcve
@@ -180,4 +181,4 @@ We use the [Stack Exchange][stackoverflow] network for free support and [GitHub]
180181
[git-commit-end]: https://chris.beams.io/posts/git-commit/#end
181182
[git-commit-imperative]: https://chris.beams.io/posts/git-commit/#imperative
182183
[git-commit-wrap-72]: https://chris.beams.io/posts/git-commit/#wrap-72
183-
[git-commit-why-not-how]: https://chris.beams.io/posts/git-commit/#why-not-how
184+
[git-commit-why-not-how]: https://chris.beams.io/posts/git-commit/#why-not-how

README.md

Lines changed: 185 additions & 40 deletions
Large diffs are not rendered by default.

assets/iText_Logo_Small.png

9.56 KB
Loading

barcodes/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.itextpdf</groupId>
66
<artifactId>root</artifactId>
7-
<version>8.0.2</version>
7+
<version>8.0.3</version>
88
</parent>
99
<artifactId>barcodes</artifactId>
1010
<name>iText - barcodes</name>

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

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2023 Apryse Group NV
3+
Copyright (c) 1998-2024 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -23,8 +23,8 @@ This file is part of the iText (R) project.
2323
package com.itextpdf.barcodes;
2424

2525
import com.itextpdf.barcodes.exceptions.BarcodesExceptionMessageConstant;
26-
import com.itextpdf.kernel.exceptions.PdfException;
2726
import com.itextpdf.kernel.colors.Color;
27+
import com.itextpdf.kernel.exceptions.PdfException;
2828
import com.itextpdf.kernel.font.PdfFont;
2929
import com.itextpdf.kernel.geom.Rectangle;
3030
import com.itextpdf.kernel.pdf.PdfDocument;
@@ -33,6 +33,10 @@ This file is part of the iText (R) project.
3333
import java.util.HashMap;
3434
import java.util.Map;
3535

36+
/**
37+
* BarCode 128 is a high-density linear barcode symbology defined in ISO/IEC 15417:2007.
38+
* It is used for alphanumeric or numeric-only barcodes. It can encode all 128 characters of ASCII
39+
*/
3640
public class Barcode128 extends Barcode1D {
3741

3842
/** A type of barcode */
@@ -228,17 +232,31 @@ public Barcode128(PdfDocument document, PdfFont font) {
228232
this.textAlignment = ALIGN_CENTER;
229233
this.codeType = CODE128;
230234
}
235+
236+
/**
237+
* The code set to be used to start encoding.
238+
*/
231239
public enum Barcode128CodeSet {
232240
A,
233241
B,
234242
C,
235243
AUTO
236244
}
237245

246+
/**
247+
* Sets the code set to use.
248+
*
249+
* @param codeSet the code set to use.
250+
*/
238251
public void setCodeSet(Barcode128CodeSet codeSet) {
239252
this.codeSet = codeSet;
240253
}
241254

255+
/**
256+
* Get the code set that is used.
257+
*
258+
* @return the code set.
259+
*/
242260
public Barcode128CodeSet getCodeSet() {
243261
return this.codeSet;
244262
}

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

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2023 Apryse Group NV
3+
Copyright (c) 1998-2024 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -23,18 +23,31 @@ This file is part of the iText (R) project.
2323
package com.itextpdf.barcodes;
2424

2525
import com.itextpdf.io.font.FontProgram;
26-
import com.itextpdf.kernel.geom.Rectangle;
27-
import com.itextpdf.kernel.pdf.canvas.PdfCanvas;
2826
import com.itextpdf.kernel.colors.Color;
2927
import com.itextpdf.kernel.font.PdfFont;
28+
import com.itextpdf.kernel.geom.Rectangle;
3029
import com.itextpdf.kernel.pdf.PdfArray;
3130
import com.itextpdf.kernel.pdf.PdfDocument;
31+
import com.itextpdf.kernel.pdf.canvas.PdfCanvas;
3232
import com.itextpdf.kernel.pdf.xobject.PdfFormXObject;
3333

34+
/**
35+
* Base class for the barcode types that have 1D representation.
36+
* This means all data is encoded in the width of the bars. And the height of the bars is constant.
37+
*/
3438
public abstract class Barcode1D {
3539

40+
/**
41+
* Constant that defines left alignment.
42+
*/
3643
public static final int ALIGN_LEFT = 1;
44+
/**
45+
* Constant that defines right alignment.
46+
*/
3747
public static final int ALIGN_RIGHT = 2;
48+
/**
49+
* Constant that defines center alignment.
50+
*/
3851
public static final int ALIGN_CENTER = 3;
3952

4053
// Android-Conversion-Skip-Block-Start (java.awt library isn't available on Android)
@@ -134,6 +147,11 @@ public abstract class Barcode1D {
134147
*/
135148
protected String altText;
136149

150+
/**
151+
* Creates new {@link Barcode1D} instance.
152+
*
153+
* @param document The document
154+
*/
137155
protected Barcode1D(PdfDocument document) {
138156
this.document = document;
139157
}
@@ -192,6 +210,11 @@ public void setFont(PdfFont font) {
192210
this.font = font;
193211
}
194212

213+
/**
214+
* Gets the size of the text.
215+
*
216+
* @return the size
217+
*/
195218
public float getSize() {
196219
return size;
197220
}
@@ -527,6 +550,11 @@ public void fitWidth(float width) {
527550
setX(x * width / getBarcodeSize().getWidth());
528551
}
529552

553+
/**
554+
* Gets the descender value of the font.
555+
*
556+
* @return the descender value of the font
557+
*/
530558
protected float getDescender() {
531559
final float sizeCoefficient = FontProgram.convertTextSpaceToGlyphSpace(size);
532560
return font.getFontProgram().getFontMetrics().getTypoDescender() * sizeCoefficient;

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2023 Apryse Group NV
3+
Copyright (c) 1998-2024 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -22,12 +22,17 @@ This file is part of the iText (R) project.
2222
*/
2323
package com.itextpdf.barcodes;
2424

25-
import com.itextpdf.kernel.geom.Rectangle;
26-
import com.itextpdf.kernel.pdf.canvas.PdfCanvas;
2725
import com.itextpdf.kernel.colors.Color;
26+
import com.itextpdf.kernel.geom.Rectangle;
2827
import com.itextpdf.kernel.pdf.PdfDocument;
28+
import com.itextpdf.kernel.pdf.canvas.PdfCanvas;
2929
import com.itextpdf.kernel.pdf.xobject.PdfFormXObject;
3030

31+
/**
32+
* This is a class that is used to implement the logic common to all 2D barcodes.
33+
* A 2D barcode is a barcode with two dimensions; this means that
34+
* data can be encoded vertically and horizontally.
35+
*/
3136
public abstract class Barcode2D {
3237

3338
protected static final float DEFAULT_MODULE_SIZE = 1;

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2023 Apryse Group NV
3+
Copyright (c) 1998-2024 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -22,12 +22,22 @@ This file is part of the iText (R) project.
2222
*/
2323
package com.itextpdf.barcodes;
2424

25+
import com.itextpdf.kernel.colors.Color;
2526
import com.itextpdf.kernel.font.PdfFont;
2627
import com.itextpdf.kernel.geom.Rectangle;
27-
import com.itextpdf.kernel.pdf.canvas.PdfCanvas;
28-
import com.itextpdf.kernel.colors.Color;
2928
import com.itextpdf.kernel.pdf.PdfDocument;
29+
import com.itextpdf.kernel.pdf.canvas.PdfCanvas;
3030

31+
/**
32+
* This class represents the barcode Code 39.
33+
* <p>
34+
* Code 39 is a variable length, discrete
35+
* barcode symbology defined in ISO/IEC 16388:2007.
36+
* <p>
37+
* The Code 39 specification defines 43 characters, consisting of uppercase letters (A through Z), numeric digits (0
38+
* through 9) and a number of special characters (-, ., $, /, +, %, and space). An additional character (denoted '*') is
39+
* used for both start and stop delimiters. Each character is composed of nine elements: five bars and four spaces.
40+
*/
3141
public class Barcode39 extends Barcode1D {
3242

3343
/**

0 commit comments

Comments
 (0)