Skip to content

Commit f824995

Browse files
committed
[RELEASE] iText pdfHtml 6.0.0
2 parents a793fa9 + ecbba09 commit f824995

File tree

287 files changed

+702
-587
lines changed

Some content is hidden

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

287 files changed

+702
-587
lines changed

SECURITY.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# iText Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
We are committed to maintaining the security of our software. If you discover a security vulnerability, we encourage you to report it to us as soon as possible.
6+
7+
To report a vulnerability, please visit our [Vulnerability Reporting Page](https://itextpdf.com/report-vulnerability), or email [[email protected]]([email protected]). If you do not receive a response in 2 business days, please follow up as we may not have received your message.
8+
9+
We follow the procedure of Coordinated Vulnerability Disclosure (CVD) and, to protect the ecosystem, we request that those reporting do the same. Please visit the above page for more information, and follow the steps below to ensure that your report is handled promptly and appropriately:
10+
11+
1. **Do not disclose the vulnerability publicly** until we have had a chance to address it.
12+
2. **Provide a detailed description** of the vulnerability, including steps to reproduce it, if possible.
13+
3. **Include any relevant information** such as the version of pdfHTML you are using, your operating system, and any other pertinent details.
14+
15+
## Security Updates and Patches
16+
17+
When a vulnerability is reported, we will:
18+
19+
1. **Investigate and verify** the vulnerability.
20+
2. **Develop and test** a fix for the vulnerability.
21+
3. **Release a patch** as soon as possible.
22+
23+
24+
## Known Vulnerabilities
25+
26+
The iText Knowledge Base has a page for known [Common Vulnerabilities and Exposures](https://kb.itextpdf.com/itext/cves) (CVEs), please check it to ensure your vulnerability has not already been disclosed or addressed.
27+
28+
## Supported product lines
29+
30+
See [Compatibility Matrix](https://kb.itextpdf.com/itext/compatibility-matrix)
31+
32+
## Security Best Practices
33+
34+
To help ensure the security of your applications using pdfHTML, we recommend the following best practices:
35+
36+
1. **Keep pdfHTML up to date** by regularly checking for and applying updates.
37+
2. **Review and follow** our security guidelines for secure usage.
38+
3. **Monitor your applications** for any unusual activity and investigate any anomalies promptly.
39+
40+
Thank you for helping us keep iText secure!

doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
3232
# title of most generated pages and in a few other places.
3333
# The default value is: My Project.
3434

35-
PROJECT_NAME = "pdfHTML 5.0.5 API"
35+
PROJECT_NAME = "pdfHTML 6.0.0 API"
3636

3737
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
3838
# could be handy for archiving the generated documentation or if some version

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("5.0.5.0")]
19-
[assembly: AssemblyFileVersion("5.0.5.0")]
20-
[assembly: AssemblyInformationalVersion("5.0.5")]
18+
[assembly: AssemblyVersion("6.0.0.0")]
19+
[assembly: AssemblyFileVersion("6.0.0.0")]
20+
[assembly: AssemblyInformationalVersion("6.0.0")]
2121

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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@
4444
</ItemGroup>
4545
<ItemGroup>
4646
<ProjectReference Include="..\..\..\itextcore\itext\itext.io\itext.io.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')" />
47-
<PackageReference Include="itext" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')" />
47+
<PackageReference Include="itext" Version="9.0.0" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')" />
4848
<ProjectReference Include="..\..\..\itextcore\itext\itext.kernel\itext.kernel.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.kernel\itext.kernel.csproj')" />
4949
<ProjectReference Include="..\..\..\itextcore\itext\itext.layout\itext.layout.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.layout\itext.layout.csproj')" />
5050
<ProjectReference Include="..\..\..\itextcore\itext\itext.forms\itext.forms.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.forms\itext.forms.csproj')" />
5151
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.csproj')" />
5252
<ProjectReference Include="..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')" />
53-
<PackageReference Include="itext.hyph" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')" />
53+
<PackageReference Include="itext.hyph" Version="9.0.0" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')" />
5454
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
55-
<PackageReference Include="itext.pdftest" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
55+
<PackageReference Include="itext.pdftest" Version="9.0.0" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
5656
<ProjectReference Include="..\..\..\itextcore\itext\itext.bouncy-castle-adapter\itext.bouncy-castle-adapter.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.bouncy-castle-adapter\itext.bouncy-castle-adapter.csproj')" />
57-
<PackageReference Include="itext.bouncy-castle-adapter" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.bouncy-castle-adapter\itext.bouncy-castle-adapter.csproj')" />
57+
<PackageReference Include="itext.bouncy-castle-adapter" Version="9.0.0" Condition="!Exists('..\..\..\itextcore\itext\itext.bouncy-castle-adapter\itext.bouncy-castle-adapter.csproj')" />
5858
<ProjectReference Include="..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.csproj')" />
5959
<ProjectReference Include="..\..\..\itextcore\itext\itext.svg\itext.svg.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.svg\itext.svg.csproj')" />
6060
<ProjectReference Include="..\..\itext\itext.html2pdf\itext.html2pdf.csproj" />

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,8 @@ Any convert to elements workflow of course doesn't have a PdfDocument.
151151
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>";
152152
ConverterProperties props = new ConverterProperties();
153153
OutlineHandler outlineHandler = new OutlineHandler();
154-
outlineHandler.PutTagPriorityMapping("h1", 1);
155-
outlineHandler.PutTagPriorityMapping("h3", 2);
156-
outlineHandler.PutTagPriorityMapping("p", 3);
154+
outlineHandler.PutMarkPriorityMapping("h1", 1).PutMarkPriorityMapping("h3", 2).PutMarkPriorityMapping("p",
155+
3);
157156
props.SetOutlineHandler(outlineHandler);
158157
HtmlConverter.ConvertToElements(html);
159158
}
@@ -365,9 +364,9 @@ public virtual void HtmlToElementsToPDFATest() {
365364
PdfOutputIntent intent = new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1", new
366365
FileStream(sourceFolder + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read));
367366
IList<IElement> elements = HtmlConverter.ConvertToElements(htmlFile, new ConverterProperties().SetBaseUri(
368-
sourceFolder).SetCreateAcroForm(true).SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_4));
367+
sourceFolder).SetCreateAcroForm(true).SetPdfAConformance(PdfAConformance.PDF_A_4));
369368
using (Document document = new Document(new PdfADocument(new PdfWriter(outPdf, new WriterProperties().SetPdfVersion
370-
(PdfVersion.PDF_2_0)), PdfAConformanceLevel.PDF_A_4, intent))) {
369+
(PdfVersion.PDF_2_0)), PdfAConformance.PDF_A_4, intent))) {
371370
foreach (IElement element in elements) {
372371
document.Add((IBlockElement)element);
373372
}

itext.tests/itext.html2pdf.tests/itext/html2pdf/HtmlConverterPdfA3Test.cs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ You should have received a copy of the GNU Affero General Public License
2323
using System;
2424
using System.IO;
2525
using iText.Commons.Utils;
26-
using iText.Html2pdf.Logs;
2726
using iText.Html2pdf.Resolver.Font;
2827
using iText.Kernel.Pdf;
2928
using iText.Pdfa;
@@ -54,7 +53,7 @@ public virtual void ConvertToPdfA3USimpleTest() {
5453
String cmpPdf = SOURCE_FOLDER + "cmp_simple.pdf";
5554
String destinationPdf = DESTINATION_FOLDER + "simple.pdf";
5655
ConverterProperties converterProperties = new ConverterProperties();
57-
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
56+
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
5857
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
5958
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
6059
using (FileStream fileInputStream = new FileStream(sourceHtml, FileMode.Open, FileAccess.Read)) {
@@ -69,7 +68,7 @@ public virtual void ConvertToPdfA3USimpleFromStringTest() {
6968
String cmpPdf = SOURCE_FOLDER + "cmp_simple.pdf";
7069
String destinationPdf = DESTINATION_FOLDER + "simple.pdf";
7170
ConverterProperties converterProperties = new ConverterProperties();
72-
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
71+
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
7372
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
7473
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
7574
HtmlConverter.ConvertToPdf("<html>\n" + "<head><title>Test</title></head>\n" + "<body >\n" + "<form>\n" +
@@ -84,7 +83,7 @@ public virtual void ConvertToPdfA3ASimpleTest() {
8483
String cmpPdf = SOURCE_FOLDER + "cmp_simple_a.pdf";
8584
String destinationPdf = DESTINATION_FOLDER + "simple_a.pdf";
8685
ConverterProperties converterProperties = new ConverterProperties();
87-
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
86+
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
8887
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
8988
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
9089
using (FileStream fileInputStream = new FileStream(sourceHtml, FileMode.Open, FileAccess.Read)) {
@@ -95,14 +94,14 @@ public virtual void ConvertToPdfA3ASimpleTest() {
9594

9695
//TODO DEVSIX-4201 adapt test when property is added
9796
[NUnit.Framework.Test]
98-
[LogMessage(Html2PdfLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION, Count = 2, LogLevel = LogLevelConstants
99-
.WARN)]
97+
[LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION,
98+
Count = 2, LogLevel = LogLevelConstants.WARN)]
10099
public virtual void ConvertToPdfA3ColorsTest() {
101100
String sourceHtml = SOURCE_FOLDER + "colors.html";
102101
String destinationPdf = DESTINATION_FOLDER + "pdfA3ColorTest.pdf";
103102
String cmpPdf = SOURCE_FOLDER + "cmp_pdfA3ColorTest.pdf";
104103
ConverterProperties converterProperties = new ConverterProperties();
105-
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
104+
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
106105
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
107106
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
108107
using (FileStream fileInputStream = new FileStream(sourceHtml, FileMode.Open, FileAccess.Read)) {
@@ -118,7 +117,7 @@ public virtual void ConvertToPdfA3UWithCustomFontProviderTest() {
118117
String cmpPdf = SOURCE_FOLDER + "cmp_simple_custom_font.pdf";
119118
String destinationPdf = DESTINATION_FOLDER + "simple_custom_font.pdf";
120119
ConverterProperties converterProperties = new ConverterProperties();
121-
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
120+
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
122121
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
123122
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
124123
DefaultFontProvider fontProvider = new DefaultFontProvider(false, false, false);
@@ -137,8 +136,8 @@ public virtual void ConvertToPdfA3TaggedTest() {
137136
String cmpPdf = SOURCE_FOLDER + "cmp_pdfA3TaggedTest.pdf";
138137
String destinationPdf = DESTINATION_FOLDER + "pdfA3TaggedTest.pdf";
139138
ConverterProperties converterProperties = new ConverterProperties().SetBaseUri(SOURCE_FOLDER);
140-
PdfADocument pdfADocument = new PdfADocument(new PdfWriter(destinationPdf), PdfAConformanceLevel.PDF_A_3U,
141-
new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1", new FileStream(SOURCE_FOLDER
139+
PdfADocument pdfADocument = new PdfADocument(new PdfWriter(destinationPdf), PdfAConformance.PDF_A_3U, new
140+
PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1", new FileStream(SOURCE_FOLDER
142141
+ "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
143142
pdfADocument.SetTagged();
144143
HtmlConverter.ConvertToPdf(new FileStream(sourceHtml, FileMode.Open, FileAccess.Read), pdfADocument, converterProperties
@@ -152,7 +151,7 @@ public virtual void ConvertToPdfA3UnreferencedGlyphsTest() {
152151
String html = "<html>\n" + "<head>" + "<title>Test</title></head>\n" + "<body >\n" + "<p>أميرة</p>" + "</body>\n"
153152
+ "</html>";
154153
ConverterProperties converterProperties = new ConverterProperties();
155-
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
154+
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
156155
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
157156
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
158157
DefaultFontProvider fontProvider = new DefaultFontProvider(false, false, false);
@@ -175,7 +174,7 @@ public virtual void ConvertToPdfA3ArabicFontTest() {
175174
String html = "<html>\n" + "<head>" + "<title>Test</title></head>\n" + "<body >\n" + "<p>أميرة</p>" + "</body>\n"
176175
+ "</html>";
177176
ConverterProperties converterProperties = new ConverterProperties();
178-
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
177+
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
179178
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
180179
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
181180
DefaultFontProvider fontProvider = new DefaultFontProvider(false, false, false);
@@ -192,7 +191,7 @@ public virtual void ConvertToPdfA3UnreferencedEmojiTest() {
192191
String html = "<html>\n" + "<head>" + "<title>Test</title></head>\n" + "<body >\n" + "<p>\uD83D\uDE09</p>"
193192
+ "</body>\n" + "</html>";
194193
ConverterProperties converterProperties = new ConverterProperties();
195-
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
194+
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
196195
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
197196
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
198197
DefaultFontProvider fontProvider = new DefaultFontProvider(false, false, false);
@@ -215,7 +214,7 @@ public virtual void ConvertToPdfA3EmojiTest() {
215214
String html = "<html>\n" + "<head>" + "<title>Test</title></head>\n" + "<body>\n" + "<p>\uD83D\uDE09</p>"
216215
+ "</body>\n" + "</html>";
217216
ConverterProperties converterProperties = new ConverterProperties();
218-
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
217+
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
219218
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
220219
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
221220
DefaultFontProvider fontProvider = new DefaultFontProvider(false, false, false);

0 commit comments

Comments
 (0)