Skip to content

Commit

Permalink
🔖 [RELEASE] Merge branch 'release/7.0.3' into 'master'
Browse files Browse the repository at this point in the history
DEVSIX-1287, DEVSIX-1289
  • Loading branch information
amedee committed Jun 9, 2017
2 parents 14deebc + 54f234f commit c30f5ca
Show file tree
Hide file tree
Showing 638 changed files with 14,587 additions and 4,964 deletions.
4 changes: 2 additions & 2 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
To build iText 7, [Maven][1] must be installed.
To build **iText 7 Community**, [Maven][1] must be installed.

Running install without a profile will generate the iText 7 jars:
Running install without a profile will generate the **iText 7 Community** jars:
```bash
$ mvn clean install \
-Dmaven.test.skip=true \
Expand Down
54 changes: 28 additions & 26 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to iText
# Contributing to iText 7 Community

We'd love for you to contribute to our source code and to make iText even better than it is
We'd love for you to contribute to our source code and to make **iText 7 Community** even better than it is
today! Here are the guidelines we'd like you to follow:

- [Question or Problem?](#question)
Expand All @@ -15,7 +15,7 @@ today! Here are the guidelines we'd like you to follow:

## <a name="question">Got a Question or Problem?</a>

If you have questions about how to use iText, please direct these to [StackOverflow][stackoverflow].
If you have questions about how to use **iText 7 Community**, please direct these to [Stack Overflow][stackoverflow].

If you are a customer with a [support agreement][support], you also have direct access to our JIRA and our developers.

Expand All @@ -32,7 +32,7 @@ If you would like to implement a new feature then consider what kind of change i

* **Major Changes** that you wish to contribute to the project should be discussed first so that we can better
coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully
accepted into the project.
accepted into the project. Contact us at [community@itextpdf.com](mailto:community@itextpdf.com).
* **Small Changes** can be crafted and submitted to the [GitHub Repository][github] as a [Pull Request][pull].


Expand All @@ -41,7 +41,7 @@ accepted into the project.
### Submitting a Question or an Issue
Before you submit your question or issue, search [Stack Overflow][stackoverflow], maybe your question was already answered.

If your issue appears to be a bug, and hasn't been reported, ask a question on [Stack Overflow][stackoverflow].
If your issue appears to be a bug, and hasn't been reported, ask a question on [Stack Overflow][stackoverflow] to verify that is indeed a bug and not a mistake in your own code.
Help us to maximize the effort we can spend fixing issues and adding new
features, by not reporting duplicate issues. Providing the following information will increase the
chances of your issue being dealt with quickly:
Expand All @@ -55,7 +55,7 @@ chances of your issue being dealt with quickly:
* **Related Issues** - has a similar issue been reported before?
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
causing the problem (line of code or commit)
* **Tag the question** - add the tag 'itext' to your question so we can find it.
* **Tag the question** - add the tag `itext7` to your question so we can find it.

**If you get help, help others. Good karma rulez!**

Expand All @@ -70,11 +70,11 @@ Before you submit your pull request consider the following guidelines:
* Please sign the [iText Contributor License Agreement (iCLA)](#cla) before sending pull
requests for any change of more than 20 significant lines of code (we're not counting curly braces and other syntactical sugar).
We cannot accept code without this agreement.
* Clone iText to your local machine.
* Clone **iText 7 Community** to your local machine.

```shell
git clone git@github.com:itext/itextpdf.git
cd itextpdf
git clone git@github.com:itext/itext7.git
cd itext7
git fetch origin
git checkout -b develop origin/develop
```
Expand All @@ -87,7 +87,7 @@ Before you submit your pull request consider the following guidelines:

* Create your patch, **including appropriate test cases**.
* Follow our [Coding Rules](#rules).
* Run the full iText test suite and ensure that all tests pass.
* Run the full **iText 7 Community** test suite and ensure that all tests pass.
* Commit your changes using a descriptive commit message that follows our
[commit message conventions](#commit-message-format).

Expand All @@ -96,19 +96,19 @@ Before you submit your pull request consider the following guidelines:
```
Note: the optional commit `-a` command line option will automatically `add` and `rm` edited files.

* Now would be a good time to fix up your commits (if you want or need to) with `git rebase --interactive`.
* Now would be a good time to fix up your commits (if you want or need to) with `git rebase --interactive`.
* Build your changes locally to ensure all the tests pass.
* Push your branch to your GitHub account:

```shell
git remote add my-remote git@github.com:my-remote/itextpdf.git
git remote add my-remote git@github.com:my-remote/itext7.git
git push my-remote my-fix-branch
```

* In GitHub, send a pull request to `itextpdf:develop`.
* In GitHub, send a pull request to `itext7:develop`.
* If we suggest changes then:
* Make the required updates.
* Re-run the iText test suite to ensure tests are still passing.
* Re-run the **iText 7 Community** test suite to ensure tests are still passing.
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):

```shell
Expand Down Expand Up @@ -152,6 +152,9 @@ from the main (upstream) repository:
## <a name="rules">Coding Rules</a>
To ensure consistency throughout the source code, keep these rules in mind as you are working:

* We develop in Java first, and then port to .NET, so code submissions in Java are preferred.
Nevertheless this shouldn't stop you from making a good pull request to the .NET port.
* All Java code **must** be Java 7. Sorry, no lambda expressions or other Java 8 language features.
* All features or bug fixes **must be tested** by one or more [unit tests][unit-testing].
* All public API methods **must be documented** with JavaDoc. To see how we document our APIs, please check
out the existing [javadocs][javadocs].
Expand All @@ -162,9 +165,9 @@ To ensure consistency throughout the source code, keep these rules in mind as yo

## <a name="commit">Git Commit Guidelines</a>

We have very precise rules over how our git commit messages can be formatted. This leads to **more
We have guidelines on how our git commit messages should be formatted. This leads to **more
readable messages** that are easy to follow when looking through the **project history**. But also,
we use the git commit messages to **generate the iText change log**.
we use the git commit messages to **generate the iText 7 Community change log**.

### Commit Message Format
Each commit message consists of a **subject**, a **body** and a **footer**:
Expand All @@ -177,7 +180,7 @@ Each commit message consists of a **subject**, a **body** and a **footer**:
<footer>
```

Any line of the commit message cannot be longer 70 characters! This allows the message to be easier
Any line of the commit message should not be longer 70 characters! This allows the message to be easier
to read on GitHub as well as in various git tools.

### Subject
Expand All @@ -199,7 +202,7 @@ reference JIRA or GitHub issues that this commit **Closes**.

## <a name="cla">Signing the iCLA</a>

Please sign the iText Contributor License Agreement (iCLA) before sending pull requests. For any larger code
Please sign the **iText Contributor License Agreement (iCLA)** before sending pull requests. For any larger code
changes (more than 20 lines of significant code) to be accepted, the iCLA must be signed. It's a quick process, we promise!

We'll need you to [(digitally) sign and then email, fax or mail the form][cla].
Expand All @@ -208,20 +211,19 @@ We'll need you to [(digitally) sign and then email, fax or mail the form][cla].
## <a name="coc">Contributor Code of Conduct</a>
Please note that this project is released with a [Contributor Code of Conduct][coc]. By participating in this project you agree to abide by its terms.

We use the StackExchange network for free support and GitHub for code hosting. By using these services, you agree to abide by their terms:
* StackExchange: http://stackexchange.com/legal
* Github: https://help.github.com/articles/github-terms-of-service/
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:

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

[cla]: http://itextpdf.com/policy
[coc]: https://github.com/itext/itextpdf/blob/master/CODE_OF_CONDUCT.md
[github]: https://github.com/itext/itextpdf
[itext-dev]: https://lists.sourceforge.net/lists/listinfo/itext-developers
[coc]: CODE_OF_CONDUCT.md
[github]: https://github.com/itext/itext7
[java-style-guide]: http://www.oracle.com/technetwork/java/codeconvtoc-136057.html
[javadocs]: http://itextpdf.com/api
[pull]: https://github.com/itext/itextpdf/pulls
[pull]: https://github.com/itext/itext7/pulls
[sscce]: http://sscce.org/
[stackoverflow]: http://stackoverflow.com/questions/tagged/itext
[stackoverflow]: http://stackoverflow.com/questions/tagged/itext7
[good-questions]: http://stackoverflow.com/help/how-to-ask
[mcve]: http://stackoverflow.com/help/mcve
[support]: http://itextpdf.com/support
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[iText][itext] consists of several jars.
**[iText 7 Community][itext]** consists of several jars.

The iText 7 Core/Community release contains:

- ```kernel-x.y.z.jar```: low-level functionality
- ```io-x.y.z.jar```: low-level functionality
- ```layout-x.y.z.jar```: high-level functionality
Expand All @@ -12,27 +13,28 @@ The iText 7 Core/Community release contains:
- ```font-asian-x.y.z.jar```: use this is you need CJK functionality (Chinese / Japanese / Korean)
- ```sign-x.y.z.jar```: use this if you need support for digital signatures

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

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

We also have a tool that can help you debug PDFs:
We also have a Java tool that can help you debug PDFs:
- ```itext-rups-x.y.z.jar```
RUPS is also hosted on [Github][github-rups]

If you have an idea on how to improve iText and you want to submit code,
If you have an idea on how to improve **iText 7 Community** and you want to submit code,
please read our [Contribution Guidelines][contributing].

iText is dual licensed as [AGPL][agpl]/Commercial software.
**iText 7** is dual licensed as [AGPL][agpl]/[Commercial software][sales].

AGPL is a free / open source software license.

This doesn't mean the software is gratis!
This doesn't mean the software is [gratis][gratis]!

Buying a license is mandatory as soon as you develop commercial activities
distributing the iText software inside your product or deploying it on a network
without disclosing the source code of your own applications under the AGPL license.
These activities include:

- offering paid services to customers as an ASP
- serving PDFs on the fly in the cloud or in a web application
- shipping iText with a closed source product
Expand All @@ -42,9 +44,9 @@ Contact [sales] for more info.
[agpl]: LICENSE.md
[building]: BUILDING.md
[contributing]: CONTRIBUTING.md
[extrajars]: EXTRAJARS.md
[itext]: http://itextpdf.com/
[github]: https://github.com/itext/itext7
[latest]: https://github.com/itext/itext7/releases/latest
[github-rups]: http://github.com/itext/rups
[sales]: http://itextpdf.com/sales
[sales]: http://itextpdf.com/sales
[gratis]: https://en.wikipedia.org/wiki/Gratis_versus_libre
3 changes: 1 addition & 2 deletions barcodes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>7.0.2</version>
<version>7.0.3</version>
</parent>

<artifactId>barcodes</artifactId>
Expand All @@ -23,7 +23,6 @@
<groupId>com.itextpdf</groupId>
<artifactId>kernel</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>

Expand Down
6 changes: 1 addition & 5 deletions barcodes/src/main/java/com/itextpdf/barcodes/Barcode128.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,12 @@ This file is part of the iText (R) project.
*/
package com.itextpdf.barcodes;

import com.itextpdf.io.font.FontConstants;
import com.itextpdf.io.font.PdfEncodings;
import com.itextpdf.kernel.PdfException;
import com.itextpdf.kernel.color.Color;
import com.itextpdf.kernel.font.PdfFontFactory;
import com.itextpdf.kernel.geom.Rectangle;
import com.itextpdf.kernel.pdf.PdfDocument;
import com.itextpdf.kernel.pdf.canvas.PdfCanvas;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

Expand Down Expand Up @@ -344,7 +340,7 @@ public static String getRawText(String text, boolean ucc, Barcode128CodeSet code
throw new PdfException(PdfException.ThereAreIllegalCharactersForBarcode128In1);
}
c = text.charAt(0);
char currentCode = START_B;
char currentCode = getStartSymbol(codeSet);
int index = 0;
if ((codeSet == Barcode128CodeSet.AUTO || codeSet == Barcode128CodeSet.C) && isNextDigits(text, index, 2)) {
currentCode = START_C;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,6 @@ public int getTotalECCodewords() {
return ecCodewordsPerBlock * getNumBlocks();
}

/**
* @return
*/
public ECB[] getECBlocks() {
return ecBlocks;
}
Expand Down
11 changes: 8 additions & 3 deletions barcodes/src/test/java/com/itextpdf/barcodes/Barcode128Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,13 @@ This file is part of the iText (R) project.
import com.itextpdf.kernel.utils.CompareTool;
import com.itextpdf.test.ExtendedITextTest;
import com.itextpdf.test.annotations.type.IntegrationTest;

import java.io.IOException;

import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import java.io.IOException;

@Category(IntegrationTest.class)
public class Barcode128Test extends ExtendedITextTest {

Expand Down Expand Up @@ -112,4 +111,10 @@ public void barcode02Test() throws IOException, PdfException, InterruptedExcepti

Assert.assertNull(new CompareTool().compareByContent(destinationFolder + filename, sourceFolder + "cmp_" + filename, destinationFolder, "diff_"));
}

@Test
public void barcodeRawValueGenerationTest01() {
Assert.assertEquals(new String(new byte[] {103, 17, 18, 19, 20, 21, 17, 18, 19, 20, 21}), Barcode128.getRawText("1234512345", false, Barcode128.Barcode128CodeSet.A));
}

}
10 changes: 9 additions & 1 deletion font-asian/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>7.0.2</version>
<version>7.0.3</version>
</parent>

<artifactId>font-asian</artifactId>
Expand All @@ -28,6 +28,14 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javadoc.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
6 changes: 1 addition & 5 deletions forms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>7.0.2</version>
<version>7.0.3</version>
</parent>

<artifactId>forms</artifactId>
Expand All @@ -17,13 +17,11 @@
<groupId>com.itextpdf</groupId>
<artifactId>kernel</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>layout</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
Expand All @@ -35,15 +33,13 @@
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>${bouncycastle.version}</version>
<type>jar</type>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>${bouncycastle.version}</version>
<type>jar</type>
<scope>test</scope>
<optional>true</optional>
</dependency>
Expand Down

0 comments on commit c30f5ca

Please sign in to comment.