Skip to content

Commit f82dfe1

Browse files
committed
[RELEASE] iText 7 Core - 7.1.7
https://github.com/itext/itext7/releases/tag/7.1.7 * release/7.1.7: Ignore tests related to SNAPSHOT being written to extracted images. [RELEASE] 7.1.7-SNAPSHOT -> 7.1.7 Deprecate duplicate methods Documentation and binary compatibility loose ends Add missing copyright headers Add log messages handler in svg Add setFont3Ways test Update javadoc for PdfFormField#drawButton() Fix bytes retrieval from pdf byte string during PdfEncryption init Add missing copyright headers Fix smart-mode serialization content cluttering by internal buffer out-of-range bytes Make explicit fallback to zero more focused when NaN is attempted to be written Add new test for #setPage method of PdfFormField Moved Pkcs12FileHelper from sign module to pdftest module. Exclude modules pdftest, font-asian and hyph from SonarQube analysis Add missing copyright headers Implement disabled pseudo class selector. Minor refactoring. Add missing copyright headers SVG: Support floating numbers with exponent notation in path painting instructions Restore src and cmp in test Implement memory limits aware handler. Filter some SpotBugs expections. Change PdfDocument id generation process Add System out println for compare Xmls method Explicitly fallback to zero when NaN is attempted to be written Make PdfImageXObject more independent of underlying object flushing Implement PageFlushingHelper for deep page structure flushing/releasing Do not skip spotbugs run in the test profile Add one more FormField test with Noto Use pure declarative syntax in the Jenkinsfile Fix poosible issue with incorrect DA Compare Sonar analysis to develop instead of master for other branches than master and develop Add a test which demonstrates margin-collapse processing with a custom renderer. Syncronize DA and DR. Retrieve FormField's font. SVG: Switch to PX as a default font-size metric. Update cmps. Do not fail if the appearance dictionary doesn't contain N entry. Add missing copyright headers Add new unit test for testig Pattern.split functionality in Java Add a getter for a set of fields for flattening in PdfAcroForm Remove invalid determinig of transparency on the page Fix Matrix.toString() Unify names of some tests and resources. Add some new SVG tests for preserveAspectRatio attribute. Add new test that demonstrates bug of PdfReader locking the file when exception occurred during parsing Fix color setting when colorspace needs to be kept Fix close-path operator not being applied Fixup for TestCrlClient making it reusable and more verbose Resolve styles of SVG tag. Add a test. Rotate signature's appearance if page is rotated. Add some new tests. Remove unpredictably failing test. Process scale transformation values correctly. Add some new tests. Fix XMP dc:subject property value type Reuse pdfHTML's font-size resolution algorithms. Minor refactoring. Remove unnecessary Verdana font-family usage from test svgs. Fix DataMatrix barcode porting bug Fix Unicode characters Resolve URL containing in xlink:href attribute of SVG against baseURL Remove unused test resources Add additional file types to .gitattributes Skip SpotBugs in Artifactory Deploy stage Run SonarQube from Jenkinsfile Unify text offset pattern for all justification cases Avoid adding new indirect references to the xref table when its already completely read Run install goal instead of package goal in Artifactory upload phase [RELEASE] 7.1.6-SNAPSHOT -> 7.1.7-SNAPSHOT
2 parents f0049dd + 036bc3c commit f82dfe1

File tree

498 files changed

+7187
-2130
lines changed

Some content is hidden

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

498 files changed

+7187
-2130
lines changed

.gitattributes

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,57 @@
55
# to LF line endings on checkout.
66
*.afm text eol=lf
77
*.cmap text eol=lf
8-
*.crt text eol=lf
9-
*.cs text eol=lf
8+
*.cs text eol=lf ident
9+
*.css text eol=lf
10+
*.htm text eol=lf
1011
*.html text eol=lf
1112
*.java text eol=lf ident
1213
*.lng text eol=lf
1314
*.md text eol=lf
1415
*.pom text eol=lf
1516
*.properties text eol=lf
17+
*.svg text eol=lf
1618
*.txt text eol=lf
1719
*.xfdf text eol=lf
20+
*.xht text eol=lf
21+
*.xhtml text eol=lf
1822
*.xml text eol=lf
23+
port-hash text eol=lf
1924

2025
# Declare files that will always have CRLF line endings on checkout.
2126
*.bat text eol=crlf
2227
*.csproj text eol=crlf
2328
*.sln text eol=crlf
2429

2530
# Denote all files that are truly binary and should not be modified.
31+
*.aif binary
32+
*.aiff binary
2633
*.bmp binary
34+
*.cer binary
2735
*.cmp binary
36+
*.crt binary
2837
*.dib binary
2938
*.gif binary
39+
*.icc binary
3040
*.j2k binary
3141
*.jb2 binary
3242
*.jp2 binary
43+
*.jpc binary
3344
*.jpg binary
3445
*.key binary
3546
*.otf binary
47+
*.p12 binary
3648
*.pdf binary
3749
*.pfb binary
50+
*.pfm binary
3851
*.png binary
52+
*.snd binary
3953
*.tif binary
4054
*.tiff binary
4155
*.ttc binary
4256
*.ttf binary
57+
*.u3d binary
58+
*.wav binary
4359
*.wmf binary
60+
*.woff binary
61+
*.woff2 binary

Jenkinsfile

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pipeline {
1111
options {
1212
ansiColor('xterm')
1313
buildDiscarder(logRotator(artifactNumToKeepStr: '1'))
14-
compressBuildLog()
1514
parallelsAlwaysFailFast()
1615
retry(1)
1716
skipStagesAfterUnstable()
@@ -50,25 +49,16 @@ pipeline {
5049
}
5150
}
5251
stage('Run Tests') {
53-
stages {
54-
stage('Surefire (Unit Tests)') {
55-
options {
56-
timeout(time: 30, unit: 'MINUTES')
57-
}
58-
steps {
59-
withMaven(jdk: "${JDK_VERSION}", maven: 'M3') {
60-
sh 'mvn --activate-profiles test test -DgsExec="${gsExec}" -DcompareExec="${compareExec}" -Dmaven.test.skip=false'
61-
}
62-
}
63-
}
64-
stage('Failsafe (Integration Tests)') {
65-
options {
66-
timeout(time: 30, unit: 'MINUTES')
67-
}
68-
steps {
69-
withMaven(jdk: "${JDK_VERSION}", maven: 'M3') {
70-
sh 'mvn --activate-profiles test verify -DgsExec="${gsExec}" -DcompareExec="${compareExec}" -Dmaven.test.skip=false -Dmaven.javadoc.skip=true'
71-
}
52+
options {
53+
timeout(time: 30, unit: 'MINUTES')
54+
}
55+
environment {
56+
SONAR_BRANCH_TARGET= sh (returnStdout: true, script: '[ $BRANCH_NAME = master ] && echo master || echo develop').trim()
57+
}
58+
steps {
59+
withMaven(jdk: "${JDK_VERSION}", maven: 'M3') {
60+
withSonarQubeEnv('Sonar') {
61+
sh 'mvn --activate-profiles test test verify org.jacoco:jacoco-maven-plugin:prepare-agent org.jacoco:jacoco-maven-plugin:report sonar:sonar -DgsExec="${gsExec}" -DcompareExec="${compareExec}" -Dmaven.test.skip=false -Dmaven.test.failure.ignore=false -Dmaven.javadoc.skip=true -Dsonar.branch.name="${BRANCH_NAME}" -Dsonar.branch.target="${SONAR_BRANCH_TARGET}"'
7262
}
7363
}
7464
}
@@ -83,6 +73,13 @@ pipeline {
8373
}
8474
}
8575
}
76+
stage("Quality Gate") {
77+
steps {
78+
timeout(time: 1, unit: 'HOURS') {
79+
waitForQualityGate abortPipeline: true
80+
}
81+
}
82+
}
8683
stage('Artifactory Deploy') {
8784
options {
8885
timeout(time: 5, unit: 'MINUTES')
@@ -101,7 +98,7 @@ pipeline {
10198
def rtMaven = Artifactory.newMavenBuild()
10299
rtMaven.deployer server: server, releaseRepo: 'releases', snapshotRepo: 'snapshot'
103100
rtMaven.tool = 'M3'
104-
def buildInfo = rtMaven.run pom: 'pom.xml', goals: 'package -Dmaven.test.skip=true -Dmaven.javadoc.failOnError=false'
101+
def buildInfo = rtMaven.run pom: 'pom.xml', goals: 'install -Dmaven.test.skip=true -Dspotbugs.skip=true -Dmaven.javadoc.failOnError=false'
105102
server.publishBuildInfo buildInfo
106103
}
107104
}

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>7.1.6</version>
7+
<version>7.1.7</version>
88
</parent>
99
<artifactId>barcodes</artifactId>
1010
<name>iText 7 - barcodes</name>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ private int C40OrTextEncodation(byte[] text, int textOffset, int textLength, byt
10501050
for (i = unlatch + 1; i < dataOffset; i++) {
10511051
if (data[i] == EXTENDED_ASCII)
10521052
i++;
1053-
if (data[i] >= -127 && data[i] <= -27)
1053+
if (data[i] >= (byte) 129 && data[i] <= (byte) 229)
10541054
amountOfEncodedWithASCII++;
10551055
amountOfEncodedWithASCII++;
10561056
}

barcodes/src/test/java/com/itextpdf/barcodes/BarcodeDataMatrixTest.java

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,28 @@ This file is part of the iText (R) project.
5252
import com.itextpdf.kernel.utils.CompareTool;
5353
import com.itextpdf.test.ExtendedITextTest;
5454
import com.itextpdf.test.annotations.type.IntegrationTest;
55+
import java.io.IOException;
5556
import org.junit.Assert;
5657
import org.junit.BeforeClass;
5758
import org.junit.Rule;
5859
import org.junit.Test;
5960
import org.junit.experimental.categories.Category;
6061
import org.junit.rules.ExpectedException;
6162

62-
import java.io.IOException;
63-
6463
@Category(IntegrationTest.class)
6564
public class BarcodeDataMatrixTest extends ExtendedITextTest {
6665

67-
public static final String sourceFolder = "./src/test/resources/com/itextpdf/barcodes/";
6866
public static final String destinationFolder = "./target/test/com/itextpdf/barcodes/BarcodeDataMatrix/";
67+
public static final String sourceFolder = "./src/test/resources/com/itextpdf/barcodes/";
68+
69+
@Rule
70+
public ExpectedException junitExpectedException = ExpectedException.none();
6971

7072
@BeforeClass
7173
public static void beforeClass() {
7274
createOrClearDestinationFolder(destinationFolder);
7375
}
7476

75-
@Rule
76-
public ExpectedException junitExpectedException = ExpectedException.none();
77-
7877
@Test
7978
public void barcode01Test() throws IOException, PdfException, InterruptedException {
8079
String filename = "barcodeDataMatrix.pdf";
@@ -271,4 +270,19 @@ public void barcode15Test() {
271270
int result = barcodeDataMatrix.setCode(str, str.length, 0);
272271
Assert.assertEquals(BarcodeDataMatrix.DM_NO_ERROR, result);
273272
}
273+
274+
@Test
275+
public void barcode16Test() throws IOException, PdfException, InterruptedException {
276+
String filename = "barcode16Test.pdf";
277+
PdfDocument document = new PdfDocument(new PdfWriter(destinationFolder + filename));
278+
279+
PdfCanvas canvas = new PdfCanvas(document.addNewPage());
280+
BarcodeDataMatrix barcode = new BarcodeDataMatrix();
281+
barcode.setCode("999999DILLERT XANG LIMITON 18 000");
282+
canvas.concatMatrix(1, 0, 0, 1, 100, 600);
283+
barcode.placeBarcode(canvas, ColorConstants.BLACK, 3);
284+
document.close();
285+
286+
Assert.assertNull(new CompareTool().compareByContent(destinationFolder + filename, sourceFolder + "cmp_" + filename, destinationFolder));
287+
}
274288
}
Binary file not shown.

font-asian/pom.xml

Lines changed: 4 additions & 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>7.1.6</version>
7+
<version>7.1.7</version>
88
</parent>
99
<artifactId>font-asian</artifactId>
1010
<name>iText 7 - Asian fonts</name>
@@ -15,6 +15,9 @@
1515
<name>Various licenses (see individual files)</name>
1616
</license>
1717
</licenses>
18+
<properties>
19+
<sonar.skip>true</sonar.skip>
20+
</properties>
1821
<build>
1922
<plugins>
2023
<plugin>

forms/pom.xml

Lines changed: 7 additions & 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>7.1.6</version>
7+
<version>7.1.7</version>
88
</parent>
99
<artifactId>forms</artifactId>
1010
<name>iText 7 - forms</name>
@@ -20,6 +20,12 @@
2020
<artifactId>layout</artifactId>
2121
<version>${project.version}</version>
2222
</dependency>
23+
<dependency>
24+
<groupId>com.itextpdf</groupId>
25+
<artifactId>font-asian</artifactId>
26+
<version>${project.version}</version>
27+
<scope>test</scope>
28+
</dependency>
2329
<dependency>
2430
<groupId>com.itextpdf</groupId>
2531
<artifactId>pdftest</artifactId>

0 commit comments

Comments
 (0)