Skip to content

Commit cf3001b

Browse files
committed
[RELEASE] iText pdfHtml 6.1.0
2 parents f913add + 533a616 commit cf3001b

File tree

4,814 files changed

+16195
-5534
lines changed

Some content is hidden

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

4,814 files changed

+16195
-5534
lines changed

BUILDING.md

+18-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,20 @@ $ mvn clean install \
1818
> >(tee mvn.log) 2> >(tee mvn-error.log >&2)
1919
```
2020

21-
You can use the supplied `Vagrantfile` to get a [Vagrant][4] VM ([Ubuntu][5] 14.04 LTS - Trusty Tahr, with [VirtualBox][6]) with all the required software installed.
21+
Starting from version 6.1.0 **pdfHtml** supports native image compilation using [GraalVM][4]. Follow the instructions at
22+
[Getting started](https://www.graalvm.org/latest/getting-started/) to build your first native application out of java sources.
23+
24+
To run tests in native mode [GraalVM][4] for JDK 22 or higher must be installed and native profile must be used as follows
25+
```bash
26+
$ mvn clean install -Pnative -DskipTests=false \
27+
-Dmaven.test.failure.ignore=false \
28+
-DgsExec=$(which gs) \
29+
-DcompareExec=$(which compare) \
30+
-Dmaven.javadoc.failOnError=false \
31+
> >(tee mvn.log) 2> >(tee mvn-error.log >&2)
32+
```
33+
34+
You can use the supplied `Vagrantfile` to get a [Vagrant][5] VM ([Ubuntu][6] 14.04 LTS - Trusty Tahr, with [VirtualBox][7]) with all the required software installed.
2235
```bash
2336
$ vagrant box add ubuntu/trusty64
2437
$ vagrant up
@@ -30,6 +43,7 @@ $ vagrant ssh -- \
3043
[1]: http://maven.apache.org/
3144
[2]: http://www.ghostscript.com/
3245
[3]: http://www.imagemagick.org/
33-
[4]: https://www.vagrantup.com/
34-
[5]: http://www.ubuntu.com/
35-
[6]: https://www.virtualbox.org/
46+
[4]: https://www.graalvm.org/
47+
[5]: https://www.vagrantup.com/
48+
[6]: http://www.ubuntu.com/
49+
[7]: https://www.virtualbox.org/

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The **pdfHtml Community** source code is hosted on [Github][github], where you c
66

77
You can also [build pdfHtml Community from source][building].
88

9+
Starting from version 6.1.0 **pdfHtml** supports native image compilation using GraalVM. See [building] for details.
910

1011
If you have an idea on how to improve **pdfHtml** and you want to submit code,
1112
please read our [Contribution Guidelines][contributing].
@@ -35,4 +36,4 @@ Contact [sales] for more info.
3536
[latest]: https://github.com/itext/i7j-pdfhtml/releases/latest
3637
[sales]: http://itextpdf.com/sales
3738
[gratis]: https://en.wikipedia.org/wiki/Gratis_versus_libre
38-
[pdfHtml]: https://itextpdf.com/products/convert-html-css-to-pdf-pdfhtml
39+
[pdfHtml]: https://itextpdf.com/products/convert-html-css-to-pdf-pdfhtml

pom.xml

+137-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>com.itextpdf</groupId>
77
<artifactId>root</artifactId>
8-
<version>9.0.0</version>
8+
<version>9.1.0</version>
99
<relativePath />
1010
</parent>
1111

1212
<artifactId>html2pdf</artifactId>
13-
<version>6.0.0</version>
13+
<version>6.1.0</version>
1414

1515
<name>pdfHTML</name>
1616
<description>pdfHTML is an iText add-on that lets you to parse (X)HTML snippets and the associated CSS and converts
@@ -58,6 +58,12 @@
5858
<version>${itext.version}</version>
5959
<scope>test</scope>
6060
</dependency>
61+
<dependency>
62+
<groupId>com.itextpdf</groupId>
63+
<artifactId>pdfua</artifactId>
64+
<version>${itext.version}</version>
65+
<scope>test</scope>
66+
</dependency>
6167
</dependencies>
6268

6369
<repositories>
@@ -94,6 +100,12 @@
94100
<include>**/*.ttf</include>
95101
</includes>
96102
</resource>
103+
<resource>
104+
<directory>src/main/resources</directory>
105+
<includes>
106+
<include>**/*.json</include>
107+
</includes>
108+
</resource>
97109
</resources>
98110
<plugins>
99111
<plugin>
@@ -112,4 +124,127 @@
112124
</plugin>
113125
</plugins>
114126
</build>
127+
128+
<profiles>
129+
<profile>
130+
<id>with-sharpen</id>
131+
<build>
132+
<plugins>
133+
<plugin>
134+
<groupId>sharpen</groupId>
135+
<artifactId>sharpen-maven-plugin</artifactId>
136+
<version>1.0-SNAPSHOT</version>
137+
<executions>
138+
<execution>
139+
<phase>install</phase>
140+
<goals>
141+
<goal>sharpen</goal>
142+
</goals>
143+
</execution>
144+
</executions>
145+
<dependencies>
146+
<dependency>
147+
<groupId>sharpen</groupId>
148+
<artifactId>standard-framework-mapping</artifactId>
149+
<version>1.0-SNAPSHOT</version>
150+
</dependency>
151+
<dependency>
152+
<groupId>sharpen</groupId>
153+
<artifactId>html2pdf-sharpen-mapping</artifactId>
154+
<version>1.0-SNAPSHOT</version>
155+
</dependency>
156+
</dependencies>
157+
<configuration>
158+
<projectName>html2pdf</projectName>
159+
<cSharpTargetFolder>./../../sharp/html2pdf</cSharpTargetFolder>
160+
<cSharpSourceCodeDestination>itext/itext.html2pdf</cSharpSourceCodeDestination>
161+
<cSharpTestCodeDestination>itext.tests/itext.html2pdf.tests</cSharpTestCodeDestination>
162+
<buildDotnet>${sharpen.builddotnet}</buildDotnet>
163+
<showDiff>${sharpen.showdiff}</showDiff>
164+
<sourceCodeFiles>
165+
<file>**/src/main/java/**/*.java</file>
166+
</sourceCodeFiles>
167+
<testCodeFiles>
168+
<file>**/src/test/java/**/*.java</file>
169+
</testCodeFiles>
170+
</configuration>
171+
</plugin>
172+
</plugins>
173+
</build>
174+
</profile>
175+
176+
<profile>
177+
<id>native</id>
178+
<dependencies>
179+
<dependency>
180+
<groupId>org.graalvm.nativeimage</groupId>
181+
<artifactId>svm</artifactId>
182+
<version>22.3.5</version>
183+
<scope>provided</scope>
184+
</dependency>
185+
<dependency>
186+
<groupId>org.bouncycastle</groupId>
187+
<artifactId>bcprov-jdk18on</artifactId>
188+
<version>${bouncycastle.version}</version>
189+
</dependency>
190+
</dependencies>
191+
<build>
192+
<plugins>
193+
<plugin>
194+
<groupId>org.codehaus.mojo</groupId>
195+
<artifactId>build-helper-maven-plugin</artifactId>
196+
<version>3.6.0</version>
197+
<executions>
198+
<execution>
199+
<id>add-source</id>
200+
<phase>generate-sources</phase>
201+
<goals>
202+
<goal>add-source</goal>
203+
</goals>
204+
<configuration>
205+
<sources>
206+
<source>${basedir}/../resources/graalvm</source>
207+
</sources>
208+
</configuration>
209+
</execution>
210+
</executions>
211+
</plugin>
212+
<plugin>
213+
<groupId>org.graalvm.buildtools</groupId>
214+
<artifactId>native-maven-plugin</artifactId>
215+
<version>${native.maven.plugin.version}</version>
216+
<extensions>true</extensions>
217+
<executions>
218+
<execution>
219+
<id>test-native</id>
220+
<goals>
221+
<goal>test</goal>
222+
</goals>
223+
<phase>test</phase>
224+
</execution>
225+
</executions>
226+
<configuration>
227+
<buildArgs>
228+
<arg>
229+
--initialize-at-build-time=org.junit.validator.PublicClassValidator
230+
--initialize-at-build-time=org.junit.platform.engine.TestTag
231+
232+
--enable-url-protocols=http,https,ftp
233+
234+
-H:+AddAllCharsets
235+
<!-- Graalvm requires VisualStudio 2022 on Windows but it also works with earlier versions.
236+
So this is a workaround to run tests on TC agents having earlier VS versions installed. -->
237+
-H:-CheckToolchain
238+
</arg>
239+
</buildArgs>
240+
<skipTests>false</skipTests>
241+
<metadataRepository>
242+
<enabled>true</enabled>
243+
</metadataRepository>
244+
</configuration>
245+
</plugin>
246+
</plugins>
247+
</build>
248+
</profile>
249+
</profiles>
115250
</project>

src/main/java/com/itextpdf/html2pdf/ConverterProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2024 Apryse Group NV
3+
Copyright (c) 1998-2025 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/main/java/com/itextpdf/html2pdf/HtmlConverter.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2024 Apryse Group NV
3+
Copyright (c) 1998-2025 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -26,7 +26,6 @@ This file is part of the iText (R) project.
2626
import com.itextpdf.commons.utils.FileUtil;
2727
import com.itextpdf.html2pdf.attach.Attacher;
2828
import com.itextpdf.html2pdf.exceptions.Html2PdfException;
29-
import com.itextpdf.html2pdf.resolver.font.DefaultFontProvider;
3029
import com.itextpdf.kernel.pdf.DocumentProperties;
3130
import com.itextpdf.kernel.pdf.PdfDocument;
3231
import com.itextpdf.kernel.pdf.PdfWriter;
@@ -38,6 +37,7 @@ This file is part of the iText (R) project.
3837
import com.itextpdf.styledxmlparser.IXmlParser;
3938
import com.itextpdf.styledxmlparser.node.IDocumentNode;
4039
import com.itextpdf.styledxmlparser.node.impl.jsoup.JsoupHtmlParser;
40+
import com.itextpdf.styledxmlparser.resolver.font.BasicFontProvider;
4141

4242
import java.io.File;
4343
import java.io.FileInputStream;
@@ -428,11 +428,11 @@ private static ConverterProperties setDefaultFontProviderForPdfA(PdfDocument doc
428428
properties = new ConverterProperties();
429429
}
430430
if (properties.getFontProvider() == null) {
431-
properties.setFontProvider(new DefaultFontProvider(false, true, false));
431+
properties.setFontProvider(new BasicFontProvider(false, true, false));
432432
}
433433
} else if (document == null && properties != null && properties.getPdfAConformance() != null) {
434434
if (properties.getFontProvider() == null) {
435-
properties.setFontProvider(new DefaultFontProvider(false, true, false));
435+
properties.setFontProvider(new BasicFontProvider(false, true, false));
436436
}
437437
}
438438
return properties;

src/main/java/com/itextpdf/html2pdf/ProcessorContextCreator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2024 Apryse Group NV
3+
Copyright (c) 1998-2025 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2024 Apryse Group NV
3+
Copyright (c) 1998-2025 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -30,9 +30,9 @@ This file is part of the iText (R) project.
3030
*/
3131
public final class PdfHtmlProductData {
3232
private static final String PDF_HTML_PUBLIC_PRODUCT_NAME = "pdfHTML";
33-
private static final String PDF_HTML_VERSION = "6.0.0";
33+
private static final String PDF_HTML_VERSION = "6.1.0";
3434
private static final int PDF_HTML_COPYRIGHT_SINCE = 2000;
35-
private static final int PDF_HTML_COPYRIGHT_TO = 2024;
35+
private static final int PDF_HTML_COPYRIGHT_TO = 2025;
3636

3737
private static final ProductData PDF_HTML_PRODUCT_DATA = new ProductData(PDF_HTML_PUBLIC_PRODUCT_NAME,
3838
ProductNameConstant.PDF_HTML, PDF_HTML_VERSION, PDF_HTML_COPYRIGHT_SINCE, PDF_HTML_COPYRIGHT_TO);

src/main/java/com/itextpdf/html2pdf/actions/events/PdfHtmlProductEvent.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2024 Apryse Group NV
3+
Copyright (c) 1998-2025 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/main/java/com/itextpdf/html2pdf/attach/Attacher.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2024 Apryse Group NV
3+
Copyright (c) 1998-2025 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/main/java/com/itextpdf/html2pdf/attach/IHtmlProcessor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2024 Apryse Group NV
3+
Copyright (c) 1998-2025 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/main/java/com/itextpdf/html2pdf/attach/IOutlineMarkExtractor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2024 Apryse Group NV
3+
Copyright (c) 1998-2025 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/main/java/com/itextpdf/html2pdf/attach/ITagWorker.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2024 Apryse Group NV
3+
Copyright (c) 1998-2025 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/main/java/com/itextpdf/html2pdf/attach/ITagWorkerFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2024 Apryse Group NV
3+
Copyright (c) 1998-2025 Apryse Group NV
44
Authors: Apryse Software.
55
66
This program is offered under a commercial and under the AGPL license.

0 commit comments

Comments
 (0)