Skip to content

Commit 58dfb66

Browse files
committed
[RELEASE] Merge branch 'release/1.0.2' into 'master'
2 parents 8fd1cf7 + 5127516 commit 58dfb66

File tree

1,006 files changed

+29321
-33133
lines changed

Some content is hidden

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

1,006 files changed

+29321
-33133
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<uri>
4+
<schemeSettings>
5+
<add name="http" genericUriParserOptions="DontUnescapePathDotsAndSlashes"/>
6+
<add name="https" genericUriParserOptions="DontUnescapePathDotsAndSlashes"/>
7+
</schemeSettings>
8+
</uri>
9+
</configuration>

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("1.0.1.0")]
19-
[assembly: AssemblyFileVersion("1.0.1.0")]
20-
[assembly: AssemblyInformationalVersion("1.0.1")]
18+
[assembly: AssemblyVersion("1.0.2.0")]
19+
[assembly: AssemblyFileVersion("1.0.2.0")]
20+
[assembly: AssemblyInformationalVersion("1.0.2")]
2121

2222
#if !NETSTANDARD1_6
2323
[assembly: NUnit.Framework.Timeout(300000)]
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
2+
<PropertyGroup Label="Configuration">
3+
<SignAssembly>True</SignAssembly>
4+
<DelaySign>False</DelaySign>
5+
<RootNamespace></RootNamespace>
6+
</PropertyGroup>
7+
<PropertyGroup>
8+
<TargetFrameworks>netcoreapp1.0;net40</TargetFrameworks>
9+
</PropertyGroup>
10+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net40' ">
11+
<OutputType>library</OutputType>
12+
</PropertyGroup>
13+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
14+
<OutputType>Library</OutputType>
15+
<DefineConstants>NETSTANDARD1_6</DefineConstants>
16+
</PropertyGroup>
17+
<PropertyGroup>
18+
<AssemblyOriginatorKeyFile>itext.snk</AssemblyOriginatorKeyFile>
19+
</PropertyGroup>
20+
<PropertyGroup>
21+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
22+
<ApplicationIcon />
23+
<OutputTypeEx>library</OutputTypeEx>
24+
<StartupObject />
25+
<AssemblyName>itext.html2pdf.tests</AssemblyName>
26+
</PropertyGroup>
27+
<ItemGroup>
28+
</ItemGroup>
29+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
30+
<PackageReference Include="Microsoft.NETCore.App">
31+
<Version>1.0.0</Version>
32+
</PackageReference>
33+
</ItemGroup>
34+
<ItemGroup>
35+
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.0" />
36+
<PackageReference Include="NUnit" Version="3.7.1" />
37+
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
38+
</ItemGroup>
39+
<ItemGroup>
40+
<None Include="App.config" />
41+
<None Include="itext.snk" />
42+
<None Include="packages.config" />
43+
</ItemGroup>
44+
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
45+
<Reference Include="System" />
46+
<Reference Include="System.Core" />
47+
</ItemGroup>
48+
<ItemGroup>
49+
<ProjectReference Include="..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj" />
50+
<ProjectReference Include="..\..\..\itextcore\itext\itext.kernel\itext.kernel.netstandard.csproj" />
51+
<ProjectReference Include="..\..\..\itextcore\itext\itext.layout\itext.layout.netstandard.csproj" />
52+
<ProjectReference Include="..\..\..\itextcore\itext\itext.forms\itext.forms.netstandard.csproj" />
53+
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.netstandard.csproj" />
54+
<ProjectReference Include="..\..\..\itextcore\itext\itext.hyph\itext.hyph.netstandard.csproj" />
55+
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj" />
56+
<ProjectReference Include="..\..\..\typography\itext\itext.typography\itext.typography.netstandard.csproj" />
57+
<ProjectReference Include="..\..\itext\itext.html2pdf\itext.html2pdf.netstandard.csproj" />
58+
</ItemGroup>
59+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp1.0'">
60+
<PackageReference Include="Microsoft.NET.Test.Sdk">
61+
<Version>15.0.0</Version>
62+
</PackageReference>
63+
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation">
64+
<Version>4.3.0</Version>
65+
</PackageReference>
66+
</ItemGroup>
67+
</Project>

itext.tests/itext.html2pdf.tests/itext/html2pdf/Html2ElementsTest.cs

Lines changed: 49 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,49 @@
11
/*
2-
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2017 iText Group NV
4-
Authors: iText Software.
5-
6-
This program is free software; you can redistribute it and/or modify
7-
it under the terms of the GNU Affero General Public License version 3
8-
as published by the Free Software Foundation with the addition of the
9-
following permission added to Section 15 as permitted in Section 7(a):
10-
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
11-
ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
12-
OF THIRD PARTY RIGHTS
13-
14-
This program is distributed in the hope that it will be useful, but
15-
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16-
or FITNESS FOR A PARTICULAR PURPOSE.
17-
See the GNU Affero General Public License for more details.
18-
You should have received a copy of the GNU Affero General Public License
19-
along with this program; if not, see http://www.gnu.org/licenses or write to
20-
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21-
Boston, MA, 02110-1301 USA, or download the license from the following URL:
22-
http://itextpdf.com/terms-of-use/
23-
24-
The interactive user interfaces in modified source and object code versions
25-
of this program must display Appropriate Legal Notices, as required under
26-
Section 5 of the GNU Affero General Public License.
27-
28-
In accordance with Section 7(b) of the GNU Affero General Public License,
29-
a covered work must retain the producer line in every PDF that is created
30-
or manipulated using iText.
31-
32-
You can be released from the requirements of the license by purchasing
33-
a commercial license. Buying such a license is mandatory as soon as you
34-
develop commercial activities involving the iText software without
35-
disclosing the source code of your own applications.
36-
These activities include: offering paid services to customers as an ASP,
37-
serving PDFs on the fly in a web application, shipping iText with a closed
38-
source product.
39-
40-
For more information, please contact iText Software Corp. at this
41-
address: [email protected] */
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2017 iText Group NV
4+
Authors: iText Software.
5+
6+
This program is free software; you can redistribute it and/or modify
7+
it under the terms of the GNU Affero General Public License version 3
8+
as published by the Free Software Foundation with the addition of the
9+
following permission added to Section 15 as permitted in Section 7(a):
10+
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
11+
ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
12+
OF THIRD PARTY RIGHTS
13+
14+
This program is distributed in the hope that it will be useful, but
15+
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16+
or FITNESS FOR A PARTICULAR PURPOSE.
17+
See the GNU Affero General Public License for more details.
18+
You should have received a copy of the GNU Affero General Public License
19+
along with this program; if not, see http://www.gnu.org/licenses or write to
20+
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21+
Boston, MA, 02110-1301 USA, or download the license from the following URL:
22+
http://itextpdf.com/terms-of-use/
23+
24+
The interactive user interfaces in modified source and object code versions
25+
of this program must display Appropriate Legal Notices, as required under
26+
Section 5 of the GNU Affero General Public License.
27+
28+
In accordance with Section 7(b) of the GNU Affero General Public License,
29+
a covered work must retain the producer line in every PDF that is created
30+
or manipulated using iText.
31+
32+
You can be released from the requirements of the license by purchasing
33+
a commercial license. Buying such a license is mandatory as soon as you
34+
develop commercial activities involving the iText software without
35+
disclosing the source code of your own applications.
36+
These activities include: offering paid services to customers as an ASP,
37+
serving PDFs on the fly in a web application, shipping iText with a closed
38+
source product.
39+
40+
For more information, please contact iText Software Corp. at this
41+
42+
*/
4243
using System;
4344
using System.Collections.Generic;
4445
using iText.Layout.Element;
4546
using iText.Layout.Properties;
46-
using System.Collections.Generic;
47-
using System.Reflection;
48-
using System.IO;
49-
using Versions.Attributes;
50-
using iText.Kernel;
5147
using iText.Test;
5248

5349
namespace iText.Html2pdf {
@@ -143,5 +139,13 @@ public virtual void HtmlElementsTest07() {
143139
NUnit.Framework.Assert.IsTrue(lst[i] is Paragraph);
144140
}
145141
}
142+
143+
/// <exception cref="System.IO.IOException"/>
144+
[NUnit.Framework.Test]
145+
public virtual void HtmlToElementsTest08() {
146+
// this test checks whether iText fails to process meta tag inside body section or not
147+
String html = "<html><p>Hello world!</p><meta name=\"author\" content=\"Bruno\"><table><tr><td>123</td><td><456></td></tr><tr><td>Long cell</td></tr></table><p>Hello world!</p></html>";
148+
HtmlConverter.ConvertToElements(html);
149+
}
146150
}
147151
}

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

Lines changed: 41 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,49 @@
11
/*
2-
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2017 iText Group NV
4-
Authors: iText Software.
5-
6-
This program is free software; you can redistribute it and/or modify
7-
it under the terms of the GNU Affero General Public License version 3
8-
as published by the Free Software Foundation with the addition of the
9-
following permission added to Section 15 as permitted in Section 7(a):
10-
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
11-
ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
12-
OF THIRD PARTY RIGHTS
13-
14-
This program is distributed in the hope that it will be useful, but
15-
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16-
or FITNESS FOR A PARTICULAR PURPOSE.
17-
See the GNU Affero General Public License for more details.
18-
You should have received a copy of the GNU Affero General Public License
19-
along with this program; if not, see http://www.gnu.org/licenses or write to
20-
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21-
Boston, MA, 02110-1301 USA, or download the license from the following URL:
22-
http://itextpdf.com/terms-of-use/
23-
24-
The interactive user interfaces in modified source and object code versions
25-
of this program must display Appropriate Legal Notices, as required under
26-
Section 5 of the GNU Affero General Public License.
27-
28-
In accordance with Section 7(b) of the GNU Affero General Public License,
29-
a covered work must retain the producer line in every PDF that is created
30-
or manipulated using iText.
31-
32-
You can be released from the requirements of the license by purchasing
33-
a commercial license. Buying such a license is mandatory as soon as you
34-
develop commercial activities involving the iText software without
35-
disclosing the source code of your own applications.
36-
These activities include: offering paid services to customers as an ASP,
37-
serving PDFs on the fly in a web application, shipping iText with a closed
38-
source product.
39-
40-
For more information, please contact iText Software Corp. at this
41-
address: [email protected] */
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2017 iText Group NV
4+
Authors: iText Software.
5+
6+
This program is free software; you can redistribute it and/or modify
7+
it under the terms of the GNU Affero General Public License version 3
8+
as published by the Free Software Foundation with the addition of the
9+
following permission added to Section 15 as permitted in Section 7(a):
10+
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
11+
ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
12+
OF THIRD PARTY RIGHTS
13+
14+
This program is distributed in the hope that it will be useful, but
15+
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16+
or FITNESS FOR A PARTICULAR PURPOSE.
17+
See the GNU Affero General Public License for more details.
18+
You should have received a copy of the GNU Affero General Public License
19+
along with this program; if not, see http://www.gnu.org/licenses or write to
20+
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21+
Boston, MA, 02110-1301 USA, or download the license from the following URL:
22+
http://itextpdf.com/terms-of-use/
23+
24+
The interactive user interfaces in modified source and object code versions
25+
of this program must display Appropriate Legal Notices, as required under
26+
Section 5 of the GNU Affero General Public License.
27+
28+
In accordance with Section 7(b) of the GNU Affero General Public License,
29+
a covered work must retain the producer line in every PDF that is created
30+
or manipulated using iText.
31+
32+
You can be released from the requirements of the license by purchasing
33+
a commercial license. Buying such a license is mandatory as soon as you
34+
develop commercial activities involving the iText software without
35+
disclosing the source code of your own applications.
36+
These activities include: offering paid services to customers as an ASP,
37+
serving PDFs on the fly in a web application, shipping iText with a closed
38+
source product.
39+
40+
For more information, please contact iText Software Corp. at this
41+
42+
*/
4243
using System;
4344
using System.IO;
4445
using iText.IO.Util;
4546
using iText.Kernel.Utils;
46-
using System.Collections.Generic;
47-
using System.Reflection;
48-
using System.IO;
49-
using Versions.Attributes;
50-
using iText.Kernel;
5147
using iText.Test;
5248

5349
namespace iText.Html2pdf {

itext.tests/itext.html2pdf.tests/itext/html2pdf/ResourceResolverTest.cs

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,48 @@ public virtual void ResourceResolverTest07()
9494
/// <exception cref="System.IO.IOException"/>
9595
/// <exception cref="System.Exception"/>
9696
[NUnit.Framework.Test]
97-
public virtual void ResourceResolverTest08() {
98-
String outPdf = destinationFolder + "resourceResolverTest08.pdf";
99-
String cmpPdf = sourceFolder + "cmp_resourceResolverTest08.pdf";
100-
HtmlConverter.ConvertToPdf(new FileInfo(sourceFolder + "resourceResolverTest08.html"), new FileInfo(outPdf
97+
public virtual void ResourceResolverTest09()
98+
{
99+
String outPdf = destinationFolder + "resourceResolverTest09.pdf";
100+
String cmpPdf = sourceFolder + "cmp_resourceResolverTest09.pdf";
101+
HtmlConverter.ConvertToPdf(new FileInfo(sourceFolder + "resourceResolverTest09.html"), new FileInfo(outPdf
101102
));
102-
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, cmpPdf, destinationFolder, "diff08_"
103+
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, cmpPdf, destinationFolder, "diff09_"
103104
));
104105
}
105-
106+
107+
/// <exception cref="System.IO.IOException"/>
108+
/// <exception cref="System.Exception"/>
109+
[NUnit.Framework.Test]
110+
public virtual void ResourceResolverTest10()
111+
{
112+
String outPdf = destinationFolder + "resourceResolverTest10.pdf";
113+
String cmpPdf = sourceFolder + "cmp_resourceResolverTest10.pdf";
114+
using (FileStream fileInputStream = new FileStream(sourceFolder + "resourceResolverTest10.html", FileMode.Open, FileAccess.Read),
115+
fileOutputStream = new FileStream(outPdf, FileMode.Create)) {
116+
HtmlConverter.ConvertToPdf(fileInputStream, fileOutputStream, new ConverterProperties().SetBaseUri("%homepath%"));
117+
NUnit.Framework.Assert.IsNull(
118+
new CompareTool().CompareByContent(outPdf, cmpPdf, destinationFolder, "diff10_"));
119+
}
120+
}
121+
122+
/// <exception cref="System.IO.IOException"/>
123+
/// <exception cref="System.Exception"/>
124+
[NUnit.Framework.Test]
125+
public virtual void ResourceResolverTest11()
126+
{
127+
String outPdf = destinationFolder + "resourceResolverTest11.pdf";
128+
String cmpPdf = sourceFolder + "cmp_resourceResolverTest11.pdf";
129+
using (FileStream fileInputStream = new FileStream(sourceFolder + "resourceResolverTest11.html", FileMode.Open, FileAccess.Read),
130+
fileOutputStream = new FileStream(outPdf, FileMode.Create))
131+
{
132+
HtmlConverter.ConvertToPdf(fileInputStream, fileOutputStream, new ConverterProperties().SetBaseUri("https://en.wikipedia.org/wiki/Welsh_Corgi"));
133+
NUnit.Framework.Assert.IsNull(
134+
new CompareTool().CompareByContent(outPdf, cmpPdf, destinationFolder, "diff11_"));
135+
}
136+
}
137+
138+
106139
// TODO test with absolute http links for resources?
107140
// TODO test with http base URI?
108141
}

0 commit comments

Comments
 (0)