Skip to content

Commit cd3d34e

Browse files
committed
[RELEASE] iText 7 pdfOCR 2.0.2
2 parents 30396de + f71835b commit cd3d34e

File tree

100 files changed

+188
-169
lines changed

Some content is hidden

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

100 files changed

+188
-169
lines changed

pdfocr-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.itextpdf</groupId>
77
<artifactId>pdfocr-root</artifactId>
8-
<version>2.0.1</version>
8+
<version>2.0.2</version>
99
</parent>
1010

1111
<artifactId>pdfocr-api</artifactId>

pdfocr-api/src/main/java/com/itextpdf/pdfocr/AbstractPdfOcrEventHelper.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/IImageRotationHandler.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/IOcrEngine.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/IProductAware.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/OcrEngineProperties.java

Lines changed: 4 additions & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -26,6 +26,9 @@ This file is part of the iText (R) project.
2626
import java.util.Collections;
2727
import java.util.List;
2828

29+
/**
30+
* This class contains additional properties for ocr engine.
31+
*/
2932
public class OcrEngineProperties {
3033

3134
/**

pdfocr-api/src/main/java/com/itextpdf/pdfocr/OcrPdfCreator.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/OcrPdfCreatorEventHelper.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/OcrPdfCreatorProperties.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/OcrProcessContext.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/PdfCreatorUtil.java

Lines changed: 1 addition & 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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -174,7 +174,6 @@ static com.itextpdf.kernel.geom.Point calculateImageCoordinates(
174174
* @return list of {@link com.itextpdf.io.image.ImageData} objects
175175
* (more than one element in the list if it is a multipage tiff)
176176
* @throws PdfOcrException if error occurred during reading a file
177-
* @throws IOException if error occurred during reading a file
178177
*/
179178
static List<ImageData> getImageData(final File inputImage, IImageRotationHandler imageRotationHandler)
180179
throws PdfOcrException {

pdfocr-api/src/main/java/com/itextpdf/pdfocr/PdfOcrFontProvider.java

Lines changed: 9 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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -34,6 +34,9 @@ This file is part of the iText (R) project.
3434
import java.io.InputStream;
3535
import org.slf4j.LoggerFactory;
3636

37+
/**
38+
* {@link FontProvider} extension for ocr engine.
39+
*/
3740
public class PdfOcrFontProvider extends FontProvider {
3841

3942
/**
@@ -55,8 +58,12 @@ public PdfOcrFontProvider() {
5558
this.addFont(getDefaultFont(), PdfEncodings.IDENTITY_H);
5659
}
5760

61+
5862
/**
59-
* Creates a new {@link PdfOcrFontProvider} instance.
63+
* Creates a new {@link PdfOcrFontProvider} instance based on provided {@link FontSet} instance and font family.
64+
*
65+
* @param fontSet {@link FontSet} instance
66+
* @param defaultFontFamily font family
6067
*/
6168
public PdfOcrFontProvider(FontSet fontSet,
6269
String defaultFontFamily) {

pdfocr-api/src/main/java/com/itextpdf/pdfocr/PdfOcrMetaInfoContainer.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/ScaleMode.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/TextInfo.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/exceptions/PdfOcrException.java

Lines changed: 3 additions & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -80,6 +80,8 @@ public String getMessage() {
8080

8181
/**
8282
* Gets additional params for Exception message.
83+
*
84+
* @return params for exception message
8385
*/
8486
protected Object[] getMessageParams() {
8587
Object[] parameters = new Object[this.messageParams.size()];

pdfocr-api/src/main/java/com/itextpdf/pdfocr/exceptions/PdfOcrExceptionMessageConstant.java

Lines changed: 5 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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -22,6 +22,9 @@ This file is part of the iText (R) project.
2222
*/
2323
package com.itextpdf.pdfocr.exceptions;
2424

25+
/**
26+
* Class that bundles all the exception message templates as constants.
27+
*/
2528
public class PdfOcrExceptionMessageConstant {
2629

2730
public static final String CANNOT_READ_INPUT_IMAGE = "Cannot read input image";
@@ -34,4 +37,4 @@ public class PdfOcrExceptionMessageConstant {
3437
private PdfOcrExceptionMessageConstant() {
3538
//Private constructor will prevent the instantiation of this class directly
3639
}
37-
}
40+
}

pdfocr-api/src/main/java/com/itextpdf/pdfocr/exceptions/PdfOcrInputException.java

Lines changed: 2 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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -59,4 +59,4 @@ public PdfOcrInputException(Throwable e) {
5959
super(e);
6060
}
6161

62-
}
62+
}

pdfocr-api/src/main/java/com/itextpdf/pdfocr/logs/PdfOcrLogMessageConstant.java

Lines changed: 13 additions & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -22,23 +22,35 @@ This file is part of the iText (R) project.
2222
*/
2323
package com.itextpdf.pdfocr.logs;
2424

25+
/**
26+
* Class that bundles all the log message templates as constants.
27+
*/
2528
public class PdfOcrLogMessageConstant {
29+
30+
/** The constant CANNOT_READ_INPUT_IMAGE. */
2631
public static final String CANNOT_READ_INPUT_IMAGE = "Cannot read input image {0}";
2732

33+
/** The constant PROVIDED_FONT_PROVIDER_IS_INVALID. */
2834
public static final String PROVIDED_FONT_PROVIDER_IS_INVALID =
2935
"Provided FontProvider is invalid. Please check that it contains valid fonts and default font family name.";
3036

37+
/** The constant CANNOT_READ_DEFAULT_FONT. */
3138
public static final String CANNOT_READ_DEFAULT_FONT = "Cannot default read font: {0}";
3239

40+
/** The constant CANNOT_ADD_DATA_TO_PDF_DOCUMENT. */
3341
public static final String CANNOT_ADD_DATA_TO_PDF_DOCUMENT = "Cannot add data to PDF document: {1}";
3442

43+
/** The constant START_OCR_FOR_IMAGES. */
3544
public static final String START_OCR_FOR_IMAGES = "Starting ocr for {0} image(s)";
3645

46+
/** The constant NUMBER_OF_PAGES_IN_IMAGE. */
3747
public static final String NUMBER_OF_PAGES_IN_IMAGE = "Image {0} contains {1} page(s)";
3848

49+
/** The constant COULD_NOT_FIND_CORRESPONDING_GLYPH_TO_UNICODE_CHARACTER. */
3950
public static final String COULD_NOT_FIND_CORRESPONDING_GLYPH_TO_UNICODE_CHARACTER =
4051
"Could not find a glyph corresponding to Unicode character {0} in any of the fonts";
4152

53+
/** The constant PDF_LANGUAGE_PROPERTY_IS_NOT_SET. */
4254
public static final String PDF_LANGUAGE_PROPERTY_IS_NOT_SET = "PDF language property is not set";
4355

4456
private PdfOcrLogMessageConstant() {

pdfocr-api/src/main/java/com/itextpdf/pdfocr/statistics/PdfOcrOutputType.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/statistics/PdfOcrOutputTypeStatisticsAggregator.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/main/java/com/itextpdf/pdfocr/statistics/PdfOcrOutputTypeStatisticsEvent.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/test/java/com/itextpdf/pdfocr/ApiTest.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/test/java/com/itextpdf/pdfocr/OcrPdfCreatorEventHelperTest.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/test/java/com/itextpdf/pdfocr/OcrProcessContextTest.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/test/java/com/itextpdf/pdfocr/PdfA3uTest.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/test/java/com/itextpdf/pdfocr/PdfCreatorUtilTest.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

pdfocr-api/src/test/java/com/itextpdf/pdfocr/PdfFontTest.java

Lines changed: 1 addition & 1 deletion
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-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

0 commit comments

Comments
 (0)