Skip to content

Commit f0049dd

Browse files
committed
[RELEASE] iText 7 Core - 7.1.6
https://github.com/itext/itext7/releases/tag/7.1.6 * release/7.1.6: [RELEASE] 7.1.6-SNAPSHOT -> 7.1.6 Throw exception if PdfReader instance is attempted to be reused between PdfDocument instances Add missing copyright headers Do not mark annotations as modified when simply reading them in append mode Fix Names PdfObject not being marked as modified in append mode Catch failed newline glyph retrieval Do not fail the build when there are Javadoc errors Do not fail the build when there are Javadoc errors Remove redundant entries in pom file Combine all static analysis tools into one build step Print Checkstyle and PMD findings to console Skip some phases during static code analysis (qa profile) Bump plugin versions Replace Findbugs with Spotbugs Skip Findbugs when running the test profile Refine Findbugs filters in kernel module Use jdk-8-oracle Add cron trigger to Jenkinsfile Revert regressions introduced in previous edits of Jenkinsfile Refine Findbugs filters in pdfa module Refine Findbugs filters in styled-xml-parser module Refine findbugs filters in sign module Refine Findbugs filters in svg module Refine Findbugs filters in layout module Refine Findbugs filters in forms module Refine Findbugs filters in io module Refine Findbugs filters in pdftest module Refine Findbugs filters in barcodes module Update hashCode and equals methods of some line-processing related classes. Add searching differences in type 3 font forming Add missing copyright headers Change the way of checking transparency on the page SVG: Use actual closePath operator in PDF syntax Allow overriding test timeout for classes extending from ITextTest Add test on advanced stroke properties Refactor PdfType0Font#getToUnicode logic Only package for branches master, develop, 7.0, 7.0-master Use quoted environment variables for gsExec and compareExec Implement image masks filtering Update cmp files for Hebrew acroform test Fix incorrect glyph appearance for hebrew glyphs (fillFieldWithHebrewCase2 test). Added tests for DEVSIX-2069 Increase rebuilding xref table log message severity up to ERROR Improve documentation and naming for signature integrity, authenticity and document coverage checks Add tests for ISA and SWA attacks Remove font-asian duplicates from io-module Add getter for color prop of the form field Wrap old content when flattening fields Add remote repository locations to pom.xml Set color on font when drawing a TextField with MaxLen fix issue in pdfTokenizer, if minus char '-' is found after '.' in a real number then omitt everything after the '.' char. following the adobe reader rule DEVSIX-2674 Unify the criteria which are used to consider a font to be bold. Add info about pdfHTML and pdfSweep to README Extract PdfPage coping excluded keys Update the table's fixed-layout algorithm in case of a negative width remained. SVG paths: Support smooth curves Remove attributes checks of certificate extensions in CertificateVerification class and improve list of known standard extensions Handle noninvertible transformation matricies. Add some tests. Move javadoc and source jar to default build profile Fix bug in styledxmlparser javadocs Upload jars to Artifactory after package phase Skip tests in modules that don't have code Allow empty artifact archives Don't run Unit Tests and Integration Tests in parallel Clean workspace at start of pipeline Run all Maven commands with the withMaven Pipeline plugin Add timeout to all pipeline stages Rename Package stage Reorder pipeline stages according to Maven Lifecycle Add Findbugs filters Add Findsecbugs plugin Move Findbugs to default build profile Update fb-contrib plugin Update Findbugs Maven plugin version Set correct scm links Remove Surefire forking configuration Update Compiler Maven plugin version Inherit MaxLen property for form fields Add some new direction log messages. Complete PdfAcroForm#getAcroForm() javadoc Extract color and fontSize property when creating a form field; normalize button field font size Downgrade exception to worning to allow for a work around implementation of vertical text Simplify PdfFormCopyTest#largeFilePerformanceTest Add control on field. Check null value Add test case Avoid use of MethodHandler add svg and styled-xml-parser to README DEVSIX-2717 Fix OCSPVerifier responder certificate verification Improve contribution guidelines Update PdfAFormFieldTest Allow unknown annotation type in PdfAnnot:makeAnnot Fix documentation of PdfTextExtractor Add more tests Test for text element background opacity Add text element background opacity Remove unused imports and add @category for tests Throw up warning instead of error for larger MediaBox entries Add missing copyright headers Avoid splitting at an hyphen used to denote a negative value Embed OCSP response for all certificates in the chain in PdfSigner#signDetached Support creating OCSP responses for different certificates using TestOcspClient Remove unparsable CP1252 characters for TypeScript Optimize check for words boundary in LocationTextExtractionStrategy Fix possible issues with invalid OpenType anchor data Add javadoc for PdfDocument#setTagged() Avoid fonts creation when fetching the needed data on registerDirectory() Don't fail on initial whitespace in path operator Fix issue with incorrect ref parsing Delete unnecessary maven-javadoc plugin param, delete obsolete profile for javadoc Fix Javadoc errors, eliminate a number of Javadoc warnings Fix problem with excess xref entries in copying PdfPage as XObject Reorder methods in AbstractSvgNodeRenderer for CC Support transparency in SVG, both opacity and rgba Add missing copyright headers SVG: Support for Elliptical paths Add missing copyright headers Support for Text-anchor attribute Implement TSpan support Upgrade Surefire and Failsafe Make default pages handling for open-close scenario more tolerable for invalid /Contents entry Do not add default font to document, just make it indirect SVG: Support (x y)+ parameters in MoveTo path operator Modify the page's resources if necessary. Refactor and improve drawing of text field's appearances. Add some tests. Ignore the Comb flag if the field doesn't have a MaxLen entry. Add test for setLineThrough() behavior with setTextRise() Add a few tests for deferred signing Do not throw an exception if a form field doesn't have /MaxLen and Comb flag is set. Cover the case of updating LTV verification data of PDF in which DSS does not contain VRI entry Introduce barcode constructors which take font as a parameter. Update javadocs a bit. Add new barcode + pdfa tests. Extract background and border color property when creating a form field add missing doc Update rotation documentation [RELEASE] 7.1.5-SNAPSHOT -> 7.1.6-SNAPSHOT Add the reset functionality to FontProvider.
2 parents 6428f0c + 1c4eb51 commit f0049dd

File tree

776 files changed

+12845
-359296
lines changed

Some content is hidden

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

776 files changed

+12845
-359296
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ nbactions*.xml
151151
.pmdruleset.xml
152152

153153
# Ignore generated files
154-
filmfestival.log
154+
*.log
155155

156156
.vagrant/
157+
.vscode/

BUILDING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Running install without a profile will generate the **iText 7 Community** jars:
44
```bash
55
$ mvn clean install \
66
-Dmaven.test.skip=true \
7-
-Dmaven.javadoc.failOnError=false \
87
> >(tee mvn.log) 2> >(tee mvn-error.log >&2)
98
```
109

@@ -14,7 +13,6 @@ $ mvn clean install \
1413
-Dmaven.test.failure.ignore=false \
1514
-DgsExec=$(which gs) \
1615
-DcompareExec=$(which compare) \
17-
-Dmaven.javadoc.failOnError=false \
1816
> >(tee mvn.log) 2> >(tee mvn-error.log >&2)
1917
```
2018

@@ -23,7 +21,7 @@ You can use the supplied `Vagrantfile` to get a [Vagrant][4] VM ([Ubuntu][5] 14.
2321
$ vagrant box add ubuntu/trusty64
2422
$ vagrant up
2523
$ vagrant ssh -- \
26-
'cd /vagrant ; mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.failOnError=false' \
24+
'cd /vagrant ; mvn clean install -Dmaven.test.skip=true' \
2725
> >(tee mvn.log) 2> >(tee mvn-error.log >&2)
2826
```
2927

CONTRIBUTING.md

Lines changed: 11 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -70,83 +70,29 @@ Before you submit your pull request consider the following guidelines:
7070
* Please sign the [iText Contributor License Agreement (iCLA)](#cla) before sending pull
7171
requests for any change of more than 20 significant lines of code (we're not counting curly braces and other syntactical sugar).
7272
We cannot accept code without this agreement.
73-
* Clone **iText 7 Community** to your local machine.
74-
75-
```shell
76-
git clone [email protected]:itext/itext7.git
77-
cd itext7
78-
git fetch origin
79-
git checkout -b develop origin/develop
80-
```
81-
82-
* Make your changes in a new git branch based off the develop branch:
83-
84-
```shell
85-
git checkout -b my-fix-branch develop
86-
```
87-
88-
* Create your patch, **including appropriate test cases**.
73+
* Fork the iText repository on GitHub.
74+
* Clone your iText fork to your local machine.
75+
* Make your changes, **including appropriate test cases**.
8976
* Follow our [Coding Rules](#rules).
90-
* Run the full **iText 7 Community** test suite and ensure that all tests pass.
9177
* Commit your changes using a descriptive commit message that follows our
9278
[commit message conventions](#commit-message-format).
93-
94-
```shell
95-
git commit -a
96-
```
97-
Note: the optional commit `-a` command line option will automatically `add` and `rm` edited files.
98-
9979
* Now would be a good time to fix up your commits (if you want or need to) with `git rebase --interactive`.
10080
* Build your changes locally to ensure all the tests pass.
101-
* Push your branch to your GitHub account:
102-
103-
```shell
104-
git remote add my-remote [email protected]:my-remote/itext7.git
105-
git push my-remote my-fix-branch
106-
```
107-
108-
* In GitHub, send a pull request to `itext7:develop`.
81+
* Push your changes to your GitHub account.
82+
* Create a pull request in GitHub.
83+
"Head fork" should be your repository, and the "base fork" should be the iText7 official repository.
10984
* If we suggest changes then:
11085
* Make the required updates.
111-
* Re-run the **iText 7 Community** test suite to ensure tests are still passing.
112-
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
113-
114-
```shell
115-
git fetch origin
116-
git rebase develop -i
117-
git push my-remote my-fix-branch -f
118-
```
86+
* Fix up your commits if needed, with an interactive rebase.
87+
* Re-run the tests and make sure that they are still passing.
88+
* Force push to your GitHub repository. This will update your Pull Request.
11989

12090
That's it! Thank you for your contribution!
12191

12292
#### After your pull request is merged
12393

124-
After your pull request is merged, you can safely delete your branch and pull the changes
125-
from the main (upstream) repository:
126-
127-
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
128-
129-
```shell
130-
git push my-remote --delete my-fix-branch
131-
```
132-
133-
* Check out the develop branch:
134-
135-
```shell
136-
git checkout develop -f
137-
```
138-
139-
* Delete the local branch:
140-
141-
```shell
142-
git branch -D my-fix-branch
143-
```
144-
145-
* Update your develop with the latest upstream version:
146-
147-
```shell
148-
git pull --ff upstream develop
149-
```
94+
After your pull request is merged, you can safely delete your fork and pull the changes
95+
from the main (upstream) repository.
15096

15197

15298
## <a name="rules">Coding Rules</a>

Jenkinsfile

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
#!/usr/bin/env groovy
2+
3+
pipeline {
4+
5+
agent any
6+
7+
environment {
8+
JDK_VERSION = 'jdk-8-oracle'
9+
}
10+
11+
options {
12+
ansiColor('xterm')
13+
buildDiscarder(logRotator(artifactNumToKeepStr: '1'))
14+
compressBuildLog()
15+
parallelsAlwaysFailFast()
16+
retry(1)
17+
skipStagesAfterUnstable()
18+
timeout(time: 60, unit: 'MINUTES')
19+
timestamps()
20+
}
21+
22+
triggers {
23+
cron(env.BRANCH_NAME == 'develop' ? '@midnight' : '')
24+
}
25+
26+
tools {
27+
maven 'M3'
28+
jdk "${JDK_VERSION}"
29+
}
30+
31+
stages {
32+
stage('Clean workspace') {
33+
options {
34+
timeout(time: 5, unit: 'MINUTES')
35+
}
36+
steps {
37+
withMaven(jdk: "${JDK_VERSION}", maven: 'M3') {
38+
sh 'mvn clean'
39+
}
40+
}
41+
}
42+
stage('Compile') {
43+
options {
44+
timeout(time: 5, unit: 'MINUTES')
45+
}
46+
steps {
47+
withMaven(jdk: "${JDK_VERSION}", maven: 'M3') {
48+
sh 'mvn compile test-compile'
49+
}
50+
}
51+
}
52+
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+
}
72+
}
73+
}
74+
}
75+
}
76+
stage('Static Code Analysis') {
77+
options {
78+
timeout(time: 30, unit: 'MINUTES')
79+
}
80+
steps {
81+
withMaven(jdk: "${JDK_VERSION}", maven: 'M3') {
82+
sh 'mvn --activate-profiles qa verify -Dpmd.analysisCache=true'
83+
}
84+
}
85+
}
86+
stage('Artifactory Deploy') {
87+
options {
88+
timeout(time: 5, unit: 'MINUTES')
89+
}
90+
when {
91+
anyOf {
92+
branch "master"
93+
branch "develop"
94+
branch "7.0"
95+
branch "7.0-master"
96+
}
97+
}
98+
steps {
99+
script {
100+
def server = Artifactory.server('itext-artifactory')
101+
def rtMaven = Artifactory.newMavenBuild()
102+
rtMaven.deployer server: server, releaseRepo: 'releases', snapshotRepo: 'snapshot'
103+
rtMaven.tool = 'M3'
104+
def buildInfo = rtMaven.run pom: 'pom.xml', goals: 'package -Dmaven.test.skip=true -Dmaven.javadoc.failOnError=false'
105+
server.publishBuildInfo buildInfo
106+
}
107+
}
108+
}
109+
stage('Archive Artifacts') {
110+
options {
111+
timeout(time: 5, unit: 'MINUTES')
112+
}
113+
steps {
114+
archiveArtifacts allowEmptyArchive: true, artifacts: '**/*.jar'
115+
}
116+
}
117+
}
118+
119+
post {
120+
always {
121+
echo 'One way or another, I have finished \uD83E\uDD16'
122+
}
123+
success {
124+
echo 'I succeeeded! \u263A'
125+
}
126+
unstable {
127+
echo 'I am unstable \uD83D\uDE2E'
128+
}
129+
failure {
130+
echo 'I failed \uD83D\uDCA9'
131+
}
132+
changed {
133+
echo 'Things were different before... \uD83E\uDD14'
134+
}
135+
}
136+
137+
}

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ The iText 7 Core/Community release contains:
1212
- ```hyph-x.y.z.jar```: use this if you want text to be hyphenated
1313
- ```font-asian-x.y.z.jar```: use this is you need CJK functionality (Chinese / Japanese / Korean)
1414
- ```sign-x.y.z.jar```: use this if you need support for digital signatures
15+
- ```styled-xml-parser-x.y.z.jar```: use this if you need support for SVG or html2pdf
16+
- ```svg-x.y.z.jar```: SVG support
1517

1618
The **iText 7 Community** source code is hosted on [Github][github], where you can also [download the latest releases][latest].
1719

1820
You can also [build iText 7 Community from source][building].
1921

20-
We also have a Java tool that can help you debug PDFs:
21-
- ```itext-rups-x.y.z.jar```
22-
RUPS is also hosted on [Github][github-rups]
22+
We also provide opensource add-ons and tools to complement the core functionality:
23+
- [pdfHTML][pdfhtml] — allows you to easily convert HTML to PDF or iText objects
24+
- [pdfSweep][pdfsweep] — a highly efficient PDF tool to merge, split and redact data
25+
- [RUPS][rups] — a Java tool that can help you debug PDFs
2326

2427
If you have an idea on how to improve **iText 7 Community** and you want to submit code,
2528
please read our [Contribution Guidelines][contributing].
@@ -44,9 +47,11 @@ Contact [sales] for more info.
4447
[agpl]: LICENSE.md
4548
[building]: BUILDING.md
4649
[contributing]: CONTRIBUTING.md
47-
[itext]: http://itextpdf.com/
50+
[itext]: https://itextpdf.com/
4851
[github]: https://github.com/itext/itext7
4952
[latest]: https://github.com/itext/itext7/releases/latest
50-
[github-rups]: http://github.com/itext/rups
51-
[sales]: http://itextpdf.com/sales
53+
[sales]: https://itextpdf.com/sales
5254
[gratis]: https://en.wikipedia.org/wiki/Gratis_versus_libre
55+
[rups]: https://github.com/itext/rups
56+
[pdfhtml]: https://github.com/itext/i7j-pdfhtml
57+
[pdfsweep]: https://github.com/itext/i7j-pdfsweep

barcodes/findbugs-filter.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<FindBugsFilter>
3+
<Match>
4+
<Class name="com.itextpdf.barcodes.BarcodeDataMatrix"/>
5+
<Method name="EdifactEncodation"/>
6+
<Bug pattern="CC_CYCLOMATIC_COMPLEXITY"/>
7+
</Match>
8+
<Match>
9+
<Class name="com.itextpdf.barcodes.Barcode128"/>
10+
<Method name="setCode"/>
11+
<Bug pattern="DM_BOXED_PRIMITIVE_TOSTRING"/>
12+
</Match>
13+
<Match>
14+
<Or>
15+
<And>
16+
<Class name="com.itextpdf.barcodes.BarcodeDataMatrix"/>
17+
<Method name="setCode" params="java.lang.String"/>
18+
</And>
19+
<And>
20+
<Class name="com.itextpdf.barcodes.BarcodeQRCode"/>
21+
<Method name="regenerate"/>
22+
</And>
23+
</Or>
24+
<Bug pattern="EXS_EXCEPTION_SOFTENING_NO_CONSTRAINTS"/>
25+
</Match>
26+
<Match>
27+
<Class name="com.itextpdf.barcodes.BarcodeEAN"/>
28+
<Method name="convertUPCAtoUPCE"/>
29+
<Bug pattern="LSC_LITERAL_STRING_COMPARISON"/>
30+
</Match>
31+
<Match>
32+
<Or>
33+
<And>
34+
<Class name="com.itextpdf.barcodes.BarcodePDF417"/>
35+
<Or>
36+
<Method name="append" params="int,int"/>
37+
<Method name="dumpList"/>
38+
</Or>
39+
</And>
40+
<And>
41+
<Or>
42+
<Class name="com.itextpdf.barcodes.qrcode.BitArray"/>
43+
<Class name="com.itextpdf.barcodes.qrcode.BitMatrix"/>
44+
<Class name="com.itextpdf.barcodes.qrcode.BitVector"/>
45+
<Class name="com.itextpdf.barcodes.qrcode.ByteMatrix"/>
46+
<Class name="com.itextpdf.barcodes.qrcode.GF256Poly"/>
47+
<Class name="com.itextpdf.barcodes.qrcode.QRCode"/>
48+
</Or>
49+
<Method name="toString"/>
50+
</And>
51+
</Or>
52+
<Bug pattern="LSYC_LOCAL_SYNCHRONIZED_COLLECTION"/>
53+
</Match>
54+
<Match>
55+
<Class name="com.itextpdf.barcodes.BarcodePostnet"/>
56+
<Or>
57+
<Field name="TYPE_PLANET"/>
58+
<Field name="TYPE_POSTNET"/>
59+
</Or>
60+
<Bug pattern="MS_SHOULD_BE_FINAL"/>
61+
</Match>
62+
</FindBugsFilter>

barcodes/pom.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<parent>
55
<groupId>com.itextpdf</groupId>
66
<artifactId>root</artifactId>
7-
<version>7.1.5</version>
7+
<version>7.1.6</version>
88
</parent>
99
<artifactId>barcodes</artifactId>
1010
<name>iText 7 - barcodes</name>
11-
<url>http://itextpdf.com/</url>
11+
<url>https://itextpdf.com/</url>
1212
<dependencies>
1313
<dependency>
1414
<groupId>com.itextpdf</groupId>
@@ -24,6 +24,16 @@
2424
</dependencies>
2525
<build>
2626
<plugins>
27+
<plugin>
28+
<groupId>com.github.spotbugs</groupId>
29+
<artifactId>spotbugs-maven-plugin</artifactId>
30+
<version>${spotbugs.version}</version>
31+
<configuration>
32+
<threshold>High</threshold>
33+
<failOnError>true</failOnError>
34+
<excludeFilterFile>findbugs-filter.xml</excludeFilterFile>
35+
</configuration>
36+
</plugin>
2737
<plugin>
2838
<groupId>org.apache.maven.plugins</groupId>
2939
<artifactId>maven-failsafe-plugin</artifactId>

0 commit comments

Comments
 (0)