Skip to content

Commit

Permalink
[RELEASE] iText pdfHtml 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iText-CI committed Oct 11, 2024
2 parents a793fa9 + ecbba09 commit f824995
Show file tree
Hide file tree
Showing 287 changed files with 702 additions and 587 deletions.
40 changes: 40 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# iText Security Policy

## Reporting a Vulnerability

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.

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.

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:

1. **Do not disclose the vulnerability publicly** until we have had a chance to address it.
2. **Provide a detailed description** of the vulnerability, including steps to reproduce it, if possible.
3. **Include any relevant information** such as the version of pdfHTML you are using, your operating system, and any other pertinent details.

## Security Updates and Patches

When a vulnerability is reported, we will:

1. **Investigate and verify** the vulnerability.
2. **Develop and test** a fix for the vulnerability.
3. **Release a patch** as soon as possible.


## Known Vulnerabilities

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.

## Supported product lines

See [Compatibility Matrix](https://kb.itextpdf.com/itext/compatibility-matrix)

## Security Best Practices

To help ensure the security of your applications using pdfHTML, we recommend the following best practices:

1. **Keep pdfHTML up to date** by regularly checking for and applying updates.
2. **Review and follow** our security guidelines for secure usage.
3. **Monitor your applications** for any unusual activity and investigate any anomalies promptly.

Thank you for helping us keep iText secure!
2 changes: 1 addition & 1 deletion doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = "pdfHTML 5.0.5 API"
PROJECT_NAME = "pdfHTML 6.0.0 API"

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
Expand Down
6 changes: 3 additions & 3 deletions itext.tests/itext.html2pdf.tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

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

[assembly: AssemblyVersion("5.0.5.0")]
[assembly: AssemblyFileVersion("5.0.5.0")]
[assembly: AssemblyInformationalVersion("5.0.5")]
[assembly: AssemblyVersion("6.0.0.0")]
[assembly: AssemblyFileVersion("6.0.0.0")]
[assembly: AssemblyInformationalVersion("6.0.0")]

#if !NETSTANDARD2_0
[assembly: NUnit.Framework.Timeout(300000)]
Expand Down
8 changes: 4 additions & 4 deletions itext.tests/itext.html2pdf.tests/itext.html2pdf.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\itextcore\itext\itext.io\itext.io.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')" />
<PackageReference Include="itext" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')" />
<PackageReference Include="itext" Version="9.0.0" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')" />
<ProjectReference Include="..\..\..\itextcore\itext\itext.kernel\itext.kernel.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.kernel\itext.kernel.csproj')" />
<ProjectReference Include="..\..\..\itextcore\itext\itext.layout\itext.layout.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.layout\itext.layout.csproj')" />
<ProjectReference Include="..\..\..\itextcore\itext\itext.forms\itext.forms.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.forms\itext.forms.csproj')" />
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.csproj')" />
<ProjectReference Include="..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')" />
<PackageReference Include="itext.hyph" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')" />
<PackageReference Include="itext.hyph" Version="9.0.0" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')" />
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
<PackageReference Include="itext.pdftest" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
<PackageReference Include="itext.pdftest" Version="9.0.0" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
<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')" />
<PackageReference Include="itext.bouncy-castle-adapter" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.bouncy-castle-adapter\itext.bouncy-castle-adapter.csproj')" />
<PackageReference Include="itext.bouncy-castle-adapter" Version="9.0.0" Condition="!Exists('..\..\..\itextcore\itext\itext.bouncy-castle-adapter\itext.bouncy-castle-adapter.csproj')" />
<ProjectReference Include="..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.csproj')" />
<ProjectReference Include="..\..\..\itextcore\itext\itext.svg\itext.svg.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.svg\itext.svg.csproj')" />
<ProjectReference Include="..\..\itext\itext.html2pdf\itext.html2pdf.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ Any convert to elements workflow of course doesn't have a PdfDocument.
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>";
ConverterProperties props = new ConverterProperties();
OutlineHandler outlineHandler = new OutlineHandler();
outlineHandler.PutTagPriorityMapping("h1", 1);
outlineHandler.PutTagPriorityMapping("h3", 2);
outlineHandler.PutTagPriorityMapping("p", 3);
outlineHandler.PutMarkPriorityMapping("h1", 1).PutMarkPriorityMapping("h3", 2).PutMarkPriorityMapping("p",
3);
props.SetOutlineHandler(outlineHandler);
HtmlConverter.ConvertToElements(html);
}
Expand Down Expand Up @@ -365,9 +364,9 @@ public virtual void HtmlToElementsToPDFATest() {
PdfOutputIntent intent = new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1", new
FileStream(sourceFolder + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read));
IList<IElement> elements = HtmlConverter.ConvertToElements(htmlFile, new ConverterProperties().SetBaseUri(
sourceFolder).SetCreateAcroForm(true).SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_4));
sourceFolder).SetCreateAcroForm(true).SetPdfAConformance(PdfAConformance.PDF_A_4));
using (Document document = new Document(new PdfADocument(new PdfWriter(outPdf, new WriterProperties().SetPdfVersion
(PdfVersion.PDF_2_0)), PdfAConformanceLevel.PDF_A_4, intent))) {
(PdfVersion.PDF_2_0)), PdfAConformance.PDF_A_4, intent))) {
foreach (IElement element in elements) {
document.Add((IBlockElement)element);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ You should have received a copy of the GNU Affero General Public License
using System;
using System.IO;
using iText.Commons.Utils;
using iText.Html2pdf.Logs;
using iText.Html2pdf.Resolver.Font;
using iText.Kernel.Pdf;
using iText.Pdfa;
Expand Down Expand Up @@ -54,7 +53,7 @@ public virtual void ConvertToPdfA3USimpleTest() {
String cmpPdf = SOURCE_FOLDER + "cmp_simple.pdf";
String destinationPdf = DESTINATION_FOLDER + "simple.pdf";
ConverterProperties converterProperties = new ConverterProperties();
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
using (FileStream fileInputStream = new FileStream(sourceHtml, FileMode.Open, FileAccess.Read)) {
Expand All @@ -69,7 +68,7 @@ public virtual void ConvertToPdfA3USimpleFromStringTest() {
String cmpPdf = SOURCE_FOLDER + "cmp_simple.pdf";
String destinationPdf = DESTINATION_FOLDER + "simple.pdf";
ConverterProperties converterProperties = new ConverterProperties();
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
HtmlConverter.ConvertToPdf("<html>\n" + "<head><title>Test</title></head>\n" + "<body >\n" + "<form>\n" +
Expand All @@ -84,7 +83,7 @@ public virtual void ConvertToPdfA3ASimpleTest() {
String cmpPdf = SOURCE_FOLDER + "cmp_simple_a.pdf";
String destinationPdf = DESTINATION_FOLDER + "simple_a.pdf";
ConverterProperties converterProperties = new ConverterProperties();
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
using (FileStream fileInputStream = new FileStream(sourceHtml, FileMode.Open, FileAccess.Read)) {
Expand All @@ -95,14 +94,14 @@ public virtual void ConvertToPdfA3ASimpleTest() {

//TODO DEVSIX-4201 adapt test when property is added
[NUnit.Framework.Test]
[LogMessage(Html2PdfLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION, Count = 2, LogLevel = LogLevelConstants
.WARN)]
[LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION,
Count = 2, LogLevel = LogLevelConstants.WARN)]
public virtual void ConvertToPdfA3ColorsTest() {
String sourceHtml = SOURCE_FOLDER + "colors.html";
String destinationPdf = DESTINATION_FOLDER + "pdfA3ColorTest.pdf";
String cmpPdf = SOURCE_FOLDER + "cmp_pdfA3ColorTest.pdf";
ConverterProperties converterProperties = new ConverterProperties();
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
using (FileStream fileInputStream = new FileStream(sourceHtml, FileMode.Open, FileAccess.Read)) {
Expand All @@ -118,7 +117,7 @@ public virtual void ConvertToPdfA3UWithCustomFontProviderTest() {
String cmpPdf = SOURCE_FOLDER + "cmp_simple_custom_font.pdf";
String destinationPdf = DESTINATION_FOLDER + "simple_custom_font.pdf";
ConverterProperties converterProperties = new ConverterProperties();
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
DefaultFontProvider fontProvider = new DefaultFontProvider(false, false, false);
Expand All @@ -137,8 +136,8 @@ public virtual void ConvertToPdfA3TaggedTest() {
String cmpPdf = SOURCE_FOLDER + "cmp_pdfA3TaggedTest.pdf";
String destinationPdf = DESTINATION_FOLDER + "pdfA3TaggedTest.pdf";
ConverterProperties converterProperties = new ConverterProperties().SetBaseUri(SOURCE_FOLDER);
PdfADocument pdfADocument = new PdfADocument(new PdfWriter(destinationPdf), PdfAConformanceLevel.PDF_A_3U,
new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1", new FileStream(SOURCE_FOLDER
PdfADocument pdfADocument = new PdfADocument(new PdfWriter(destinationPdf), PdfAConformance.PDF_A_3U, new
PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1", new FileStream(SOURCE_FOLDER
+ "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
pdfADocument.SetTagged();
HtmlConverter.ConvertToPdf(new FileStream(sourceHtml, FileMode.Open, FileAccess.Read), pdfADocument, converterProperties
Expand All @@ -152,7 +151,7 @@ public virtual void ConvertToPdfA3UnreferencedGlyphsTest() {
String html = "<html>\n" + "<head>" + "<title>Test</title></head>\n" + "<body >\n" + "<p>أميرة</p>" + "</body>\n"
+ "</html>";
ConverterProperties converterProperties = new ConverterProperties();
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
DefaultFontProvider fontProvider = new DefaultFontProvider(false, false, false);
Expand All @@ -175,7 +174,7 @@ public virtual void ConvertToPdfA3ArabicFontTest() {
String html = "<html>\n" + "<head>" + "<title>Test</title></head>\n" + "<body >\n" + "<p>أميرة</p>" + "</body>\n"
+ "</html>";
ConverterProperties converterProperties = new ConverterProperties();
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
DefaultFontProvider fontProvider = new DefaultFontProvider(false, false, false);
Expand All @@ -192,7 +191,7 @@ public virtual void ConvertToPdfA3UnreferencedEmojiTest() {
String html = "<html>\n" + "<head>" + "<title>Test</title></head>\n" + "<body >\n" + "<p>\uD83D\uDE09</p>"
+ "</body>\n" + "</html>";
ConverterProperties converterProperties = new ConverterProperties();
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
DefaultFontProvider fontProvider = new DefaultFontProvider(false, false, false);
Expand All @@ -215,7 +214,7 @@ public virtual void ConvertToPdfA3EmojiTest() {
String html = "<html>\n" + "<head>" + "<title>Test</title></head>\n" + "<body>\n" + "<p>\uD83D\uDE09</p>"
+ "</body>\n" + "</html>";
ConverterProperties converterProperties = new ConverterProperties();
converterProperties.SetPdfAConformanceLevel(PdfAConformanceLevel.PDF_A_3U);
converterProperties.SetPdfAConformance(PdfAConformance.PDF_A_3U);
converterProperties.SetDocumentOutputIntent(new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1"
, new FileStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm", FileMode.Open, FileAccess.Read)));
DefaultFontProvider fontProvider = new DefaultFontProvider(false, false, false);
Expand Down
Loading

0 comments on commit f824995

Please sign in to comment.