Skip to content

Commit 6b1be7b

Browse files
committed
[RELEASE] iText 7 pdfHTML - 2.1.3
https://github.com/itext/i7n-pdfhtml/releases/tag/2.1.3 * release/2.1.3: [RELEASE] 2.1.3-SNAPSHOT -> 2.1.3 Suppress XML doc related warnings Remove NETStandard.Library dependency as implicit. Update cmp-files for closepath linejoin Do not reset the alignment for RTL elements if it's present. Fix anchor links handling with destinations on elements handled by SpanTagWorker Update port-hash Update port-hash Update cmps related to bold style detection. Default input tags with invalid types. Improve processing of block elements / images inside of a paragraph. Add some new tests for the table's fixed-layout algorithm in case of a negative width remained. Improve contribution guidelines Restore page counter renderer's text after it has been layouted. Update cmp file for rgba opacity test Update port-hash Use whitespace-related utility methods from SXP to avoid duplication Fix javadoc errors Change tests to avoid external resources dependencies Handle inline blocks with display: block style Update cmp-s Update port-hash after release [RELEASE] 2.1.2-SNAPSHOT -> 2.1.3-SNAPSHOT Do not create a new FontProvider instance on ProcessorContext#reset. Reset the existed one instead.
2 parents cd02ad7 + 205e06f commit 6b1be7b

File tree

95 files changed

+1101
-214
lines changed

Some content is hidden

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

95 files changed

+1101
-214
lines changed

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>

itext.tests/itext.html2pdf.tests/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
[assembly: Guid("ae4e5743-0665-4705-9a33-07ea57cdd269")]
1717

18-
[assembly: AssemblyVersion("2.1.2.0")]
19-
[assembly: AssemblyFileVersion("2.1.2.0")]
20-
[assembly: AssemblyInformationalVersion("2.1.2")]
18+
[assembly: AssemblyVersion("2.1.3.0")]
19+
[assembly: AssemblyFileVersion("2.1.3.0")]
20+
[assembly: AssemblyInformationalVersion("2.1.3")]
2121

2222
#if !NETSTANDARD1_6
2323
[assembly: NUnit.Framework.Timeout(300000)]

itext.tests/itext.html2pdf.tests/itext.html2pdf.tests.csproj

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<DefineConstants>DEBUG;TRACE</DefineConstants>
2323
<ErrorReport>prompt</ErrorReport>
2424
<WarningLevel>4</WarningLevel>
25+
<NoWarn>CS1591;CS1570;CS1572;CS1573;CS1574;CS1580;CS1584;CS1658</NoWarn>
2526
</PropertyGroup>
2627
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2728
<DebugType>pdbonly</DebugType>
@@ -30,6 +31,7 @@
3031
<DefineConstants>TRACE</DefineConstants>
3132
<ErrorReport>prompt</ErrorReport>
3233
<WarningLevel>4</WarningLevel>
34+
<NoWarn>CS1591;CS1570;CS1572;CS1573;CS1574;CS1580;CS1584;CS1658</NoWarn>
3335
</PropertyGroup>
3436
<ItemGroup>
3537
<Reference Include="nunit.framework, Version=3.7.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
@@ -48,22 +50,22 @@
4850
<Project>{e2828ac4-3c63-4b2a-b5ad-5f98862775be}</Project>
4951
<Name>itext.forms</Name>
5052
</ProjectReference>
51-
<Reference Include="itext.forms, Version=7.1.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.forms\itext.forms.csproj')">
52-
<HintPath>$(SolutionDir)\packages\itext7.7.1.5\lib\net40\itext.forms.dll</HintPath>
53+
<Reference Include="itext.forms, Version=7.1.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.forms\itext.forms.csproj')">
54+
<HintPath>$(SolutionDir)\packages\itext7.7.1.6\lib\net40\itext.forms.dll</HintPath>
5355
</Reference>
5456
<ProjectReference Include="..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')">
5557
<Project>{56137079-541A-425A-AB97-43AF63793C97}</Project>
5658
<Name>itext.hyph</Name>
5759
</ProjectReference>
58-
<Reference Include="itext.hyph, Version=7.1.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')">
59-
<HintPath>$(SolutionDir)\packages\itext7.hyph.7.1.5\lib\net40\itext.hyph.dll</HintPath>
60+
<Reference Include="itext.hyph, Version=7.1.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')">
61+
<HintPath>$(SolutionDir)\packages\itext7.hyph.7.1.6\lib\net40\itext.hyph.dll</HintPath>
6062
</Reference>
6163
<ProjectReference Include="..\..\..\itextcore\itext\itext.io\itext.io.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')">
6264
<Project>{cee5e7e1-1bf0-4be1-9941-903262ce2f83}</Project>
6365
<Name>itext.io</Name>
6466
</ProjectReference>
65-
<Reference Include="itext.io, Version=7.1.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')">
66-
<HintPath>$(SolutionDir)\packages\itext7.7.1.5\lib\net40\itext.io.dll</HintPath>
67+
<Reference Include="itext.io, Version=7.1.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')">
68+
<HintPath>$(SolutionDir)\packages\itext7.7.1.6\lib\net40\itext.io.dll</HintPath>
6769
</Reference>
6870
<ProjectReference Include="..\..\..\itextcore\itext\itext.kernel\itext.kernel.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.kernel\itext.kernel.csproj')">
6971
<Project>{4e7819e8-7555-4e2e-9a01-d8718a2cfdda}</Project>
@@ -72,43 +74,43 @@
7274
<Reference Include="BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942" Condition="!Exists('..\..\..\itextcore\itext\itext.kernel\itext.kernel.csproj')">
7375
<HintPath>$(SolutionDir)\packages\Portable.BouncyCastle.1.8.1.3\lib\net40\BouncyCastle.Crypto.dll</HintPath>
7476
</Reference>
75-
<Reference Include="itext.kernel, Version=7.1.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.kernel\itext.kernel.csproj')">
76-
<HintPath>$(SolutionDir)\packages\itext7.7.1.5\lib\net40\itext.kernel.dll</HintPath>
77+
<Reference Include="itext.kernel, Version=7.1.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.kernel\itext.kernel.csproj')">
78+
<HintPath>$(SolutionDir)\packages\itext7.7.1.6\lib\net40\itext.kernel.dll</HintPath>
7779
</Reference>
7880
<ProjectReference Include="..\..\..\itextcore\itext\itext.layout\itext.layout.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.layout\itext.layout.csproj')">
7981
<Project>{42173642-db52-44d3-9883-3e34c65c53bc}</Project>
8082
<Name>itext.layout</Name>
8183
</ProjectReference>
82-
<Reference Include="itext.layout, Version=7.1.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.layout\itext.layout.csproj')">
83-
<HintPath>$(SolutionDir)\packages\itext7.7.1.5\lib\net40\itext.layout.dll</HintPath>
84+
<Reference Include="itext.layout, Version=7.1.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.layout\itext.layout.csproj')">
85+
<HintPath>$(SolutionDir)\packages\itext7.7.1.6\lib\net40\itext.layout.dll</HintPath>
8486
</Reference>
8587
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.csproj')">
8688
<Project>{9fc2f0b3-a8d2-46da-8724-72e00e67a8fa}</Project>
8789
<Name>itext.pdfa</Name>
8890
</ProjectReference>
89-
<Reference Include="itext.pdfa, Version=7.1.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.csproj')">
90-
<HintPath>$(SolutionDir)\packages\itext7.7.1.5\lib\net40\itext.pdfa.dll</HintPath>
91+
<Reference Include="itext.pdfa, Version=7.1.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.csproj')">
92+
<HintPath>$(SolutionDir)\packages\itext7.7.1.6\lib\net40\itext.pdfa.dll</HintPath>
9193
</Reference>
9294
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')">
9395
<Project>{f9880dc4-f015-4413-af86-66d0e9512774}</Project>
9496
<Name>itext.pdftest</Name>
9597
</ProjectReference>
96-
<Reference Include="itext.pdftest, Version=7.1.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')">
97-
<HintPath>$(SolutionDir)\packages\itext7.pdftest.7.1.5\lib\net40\itext.pdftest.dll</HintPath>
98+
<Reference Include="itext.pdftest, Version=7.1.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')">
99+
<HintPath>$(SolutionDir)\packages\itext7.pdftest.7.1.6\lib\net40\itext.pdftest.dll</HintPath>
98100
</Reference>
99101
<ProjectReference Include="..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.csproj')">
100102
<Project>{8636f290-00df-403e-b841-e4bfd6d9ce7a}</Project>
101103
<Name>itext.styledxmlparser</Name>
102104
</ProjectReference>
103-
<Reference Include="itext.styledxmlparser, Version=7.1.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.csproj')">
104-
<HintPath>$(SolutionDir)\packages\itext7.7.1.5\lib\net40\itext.styledxmlparser.dll</HintPath>
105+
<Reference Include="itext.styledxmlparser, Version=7.1.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.csproj')">
106+
<HintPath>$(SolutionDir)\packages\itext7.7.1.6\lib\net40\itext.styledxmlparser.dll</HintPath>
105107
</Reference>
106108
<ProjectReference Include="..\..\..\itextcore\itext\itext.svg\itext.svg.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.svg\itext.svg.csproj')">
107109
<Project>{ddec35d2-5781-471d-5ea1-a6e433eddb11}</Project>
108110
<Name>itext.svg</Name>
109111
</ProjectReference>
110-
<Reference Include="itext.svg, Version=7.1.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.svg\itext.svg.csproj')">
111-
<HintPath>$(SolutionDir)\packages\itext7.7.1.5\lib\net40\itext.svg.dll</HintPath>
112+
<Reference Include="itext.svg, Version=7.1.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca" Condition="!Exists('..\..\..\itextcore\itext\itext.svg\itext.svg.csproj')">
113+
<HintPath>$(SolutionDir)\packages\itext7.7.1.6\lib\net40\itext.svg.dll</HintPath>
112114
</Reference>
113115
<ProjectReference Include="..\..\itext\itext.html2pdf\itext.html2pdf.csproj">
114116
<Project>{ff6ba09d-3655-466a-8c17-a7bfd3479ca1}</Project>

itext.tests/itext.html2pdf.tests/itext.html2pdf.tests.netstandard.csproj

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@
2525
<StartupObject />
2626
<AssemblyName>itext.html2pdf.tests</AssemblyName>
2727
</PropertyGroup>
28-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
29-
<PackageReference Include="Microsoft.NETCore.App">
30-
<Version>1.0.0</Version>
31-
</PackageReference>
32-
</ItemGroup>
3328
<ItemGroup>
3429
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.0" />
3530
<PackageReference Include="NUnit" Version="3.7.1" />
@@ -40,21 +35,24 @@
4035
<None Include="itext.snk" />
4136
<None Include="packages.config" />
4237
</ItemGroup>
38+
<PropertyGroup>
39+
<NoWarn>1701;1702;1591;1570;1572;1573;1574;1580;1584;1658</NoWarn>
40+
</PropertyGroup>
4341
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
4442
<Reference Include="System" />
4543
<Reference Include="System.Core" />
4644
</ItemGroup>
4745
<ItemGroup>
4846
<ProjectReference Include="..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
49-
<PackageReference Include="itext7" Version="7.1.5" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
47+
<PackageReference Include="itext7" Version="7.1.6" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
5048
<ProjectReference Include="..\..\..\itextcore\itext\itext.kernel\itext.kernel.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.kernel\itext.kernel.netstandard.csproj')" />
5149
<ProjectReference Include="..\..\..\itextcore\itext\itext.layout\itext.layout.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.layout\itext.layout.netstandard.csproj')" />
5250
<ProjectReference Include="..\..\..\itextcore\itext\itext.forms\itext.forms.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.forms\itext.forms.netstandard.csproj')" />
5351
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.netstandard.csproj')" />
5452
<ProjectReference Include="..\..\..\itextcore\itext\itext.hyph\itext.hyph.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.netstandard.csproj')" />
55-
<PackageReference Include="itext7.hyph" Version="7.1.5" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.netstandard.csproj')" />
53+
<PackageReference Include="itext7.hyph" Version="7.1.6" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.netstandard.csproj')" />
5654
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
57-
<PackageReference Include="itext7.pdftest" Version="7.1.5" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
55+
<PackageReference Include="itext7.pdftest" Version="7.1.6" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
5856
<ProjectReference Include="..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.netstandard.csproj')" />
5957
<ProjectReference Include="..\..\..\itextcore\itext\itext.svg\itext.svg.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.svg\itext.svg.netstandard.csproj')" />
6058
<ProjectReference Include="..\..\itext\itext.html2pdf\itext.html2pdf.netstandard.csproj" />

itext.tests/itext.html2pdf.tests/itext/html2pdf/ExtendedFontPropertiesTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ private void WriteToDocument(Document doc, byte[] bytes) {
128128
private void GenerateTestHtml(String destinationFolder, String fileName, byte[] bytes) {
129129
String htmlPath = destinationFolder + DOCUMENT_PREFIX + fileName + ".html";
130130
FileStream @out = new FileStream(htmlPath, FileMode.Create);
131+
@out.Write(bytes);
131132
System.Console.Out.WriteLine("html: file:///" + UrlUtil.ToNormalizedURI(htmlPath).AbsolutePath + "\n");
132133
@out.Dispose();
133134
}

itext.tests/itext.html2pdf.tests/itext/html2pdf/Html2PdfTest.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ source product.
4545
using iText.IO.Util;
4646
using iText.Kernel.Utils;
4747
using iText.Test;
48-
using iText.Test.Attributes;
4948

5049
namespace iText.Html2pdf {
5150
public class Html2PdfTest : ExtendedITextTest {
@@ -149,9 +148,7 @@ public virtual void HelloDivDocumentTest() {
149148
/// <exception cref="System.IO.IOException"/>
150149
/// <exception cref="System.Exception"/>
151150
[NUnit.Framework.Test]
152-
[LogMessage(iText.Html2pdf.LogMessageConstant.WORKER_UNABLE_TO_PROCESS_OTHER_WORKER)]
153151
public virtual void ABlockInPTagTest() {
154-
//TODO after DEVSIX-2002 fix change cmp_ file and remove expected LogMessage annotation
155152
HtmlConverter.ConvertToPdf(new FileInfo(sourceFolder + "aBlockInPTag.html"), new FileInfo(destinationFolder
156153
+ "aBlockInPTag.pdf"));
157154
System.Console.Out.WriteLine("html: file:///" + UrlUtil.ToNormalizedURI(sourceFolder + "aBlockInPTag.html"

0 commit comments

Comments
 (0)