diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 460ac965f..78217f0bb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,6 @@
-# Contributing to iText 7 Community
+# Contributing to iText Community
-We'd love for you to contribute to our source code and to make **iText 7 Community** even better than it is
+We'd love for you to contribute to our source code and to make **iText Community** even better than it is
today! Here are the guidelines we'd like you to follow:
- [Question or Problem?](#question)
@@ -15,7 +15,7 @@ today! Here are the guidelines we'd like you to follow:
## Got a Question or Problem?
-If you have questions about how to use **iText 7 Community**, please direct these to [Stack Overflow][stackoverflow].
+If you have questions about how to use **iText Community**, please direct these to [Stack Overflow][stackoverflow].
If you are a customer with a [support agreement][support], you also have direct access to our JIRA and our developers.
@@ -55,7 +55,7 @@ chances of your issue being dealt with quickly:
* **Related Issues** - has a similar issue been reported before?
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
causing the problem (line of code or commit)
-* **Tag the question** - add the tag `itext7` to your question so we can find it.
+* **Tag the question** - add the tag `itext` to your question so we can find it.
**If you get help, help others. Good karma rulez!**
@@ -79,7 +79,7 @@ Before you submit your pull request consider the following guidelines:
* Build your changes locally to ensure all the tests pass.
* Push your changes to your GitHub account.
* Create a pull request in GitHub.
-"Head fork" should be your repository, and the "base fork" should be the iText7 official repository.
+"Head fork" should be your repository, and the "base fork" should be the iText official repository.
* If we suggest changes then:
* Make the required updates.
* Fix up your commits if needed, with an interactive rebase.
@@ -111,7 +111,7 @@ To ensure consistency throughout the source code, keep these rules in mind as yo
We have guidelines on how our git commit messages should be formatted. This leads to **more
readable messages** that are easy to follow when looking through the **project history**. But also,
-we use the git commit messages to **generate the iText 7 Community change log**.
+we use the git commit messages to **generate the iText Community change log**.
These guidelines were taken from Chris Beams' blog post [How to Write a Git Commit Message][git-commit].
@@ -169,7 +169,7 @@ We use the [Stack Exchange][stackoverflow] network for free support and [GitHub]
[javadocs]: https://itextpdf.com/api
[pull]: https://github.com/itext/i7j-pdfhtml/pulls
[sscce]: http://sscce.org/
-[stackoverflow]: https://stackoverflow.com/questions/tagged/itext7
+[stackoverflow]: https://stackoverflow.com/questions/tagged/itext
[good-questions]: https://stackoverflow.com/help/how-to-ask
[mcve]: https://stackoverflow.com/help/mcve
[support]: https://itextpdf.com/support
diff --git a/README.md b/README.md
index 2a7095d96..b9bcd7947 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-**[pdfHtml][pdfHtml]** is an [iText 7][itext] add on.
+**[pdfHtml][pdfHtml]** is an [iText][itext] add on.
This add on will allow you to easily convert HTML to PDF or iText objects.
@@ -35,4 +35,4 @@ Contact [sales] for more info.
[latest]: https://github.com/itext/i7j-pdfhtml/releases/latest
[sales]: http://itextpdf.com/sales
[gratis]: https://en.wikipedia.org/wiki/Gratis_versus_libre
-[pdfHtml]: http://itextpdf.com/itext7/pdfHtml
\ No newline at end of file
+[pdfHtml]: https://itextpdf.com/products/convert-html-css-to-pdf-pdfhtml
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 8f9aaa209..b8d83e4a2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,20 +5,20 @@
com.itextpdfroot
- 8.0.1
+ 8.0.2html2pdf
- 5.0.1
+ 5.0.2pdfHTMLpdfHTML is an iText add-on that lets you to parse (X)HTML snippets and the associated CSS and converts
them to PDF.
- scm:git:ssh://git@git.itextsupport.com:7999/i7j/html2pdf.git
- https://git.itextsupport.com/projects/I7J/repos/html2pdf
+ git@github.com:itext/i7j-pdfhtml.git
+ https://github.com/itext/i7j-pdfhtml
diff --git a/src/main/java/com/itextpdf/html2pdf/ConverterProperties.java b/src/main/java/com/itextpdf/html2pdf/ConverterProperties.java
index 62fe9c610..bfed9482e 100644
--- a/src/main/java/com/itextpdf/html2pdf/ConverterProperties.java
+++ b/src/main/java/com/itextpdf/html2pdf/ConverterProperties.java
@@ -22,10 +22,10 @@ This file is part of the iText (R) project.
*/
package com.itextpdf.html2pdf;
+import com.itextpdf.commons.actions.contexts.IMetaInfo;
import com.itextpdf.html2pdf.attach.ITagWorkerFactory;
import com.itextpdf.html2pdf.attach.impl.OutlineHandler;
import com.itextpdf.html2pdf.css.apply.ICssApplierFactory;
-import com.itextpdf.commons.actions.contexts.IMetaInfo;
import com.itextpdf.layout.font.FontProvider;
import com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription;
import com.itextpdf.styledxmlparser.resolver.resource.IResourceRetriever;
@@ -326,8 +326,11 @@ public boolean isCreateAcroForm() {
* If createAcroForm is set, then when the form is encountered in HTML, AcroForm will be created, otherwise
* a visually identical, but not functional element will be created. Please bare in mind that the created
* Acroform may visually differ a bit from the HTML one.
+ *
+ * When enabling this acroform creation, it will disable the immediateFlushing property.
*
* @param createAcroForm true if an AcroForm needs to be created
+ *
* @return the {@link ConverterProperties} instance
*/
public ConverterProperties setCreateAcroForm(boolean createAcroForm) {
diff --git a/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java b/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java
index e76548b29..db6ea5754 100644
--- a/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java
+++ b/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java
@@ -30,7 +30,7 @@ This file is part of the iText (R) project.
*/
public final class PdfHtmlProductData {
private static final String PDF_HTML_PUBLIC_PRODUCT_NAME = "pdfHTML";
- private static final String PDF_HTML_VERSION = "5.0.1";
+ private static final String PDF_HTML_VERSION = "5.0.2";
private static final int PDF_HTML_COPYRIGHT_SINCE = 2000;
private static final int PDF_HTML_COPYRIGHT_TO = 2023;
diff --git a/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/HtmlTagWorker.java b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/HtmlTagWorker.java
index da6038789..a44a9efde 100644
--- a/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/HtmlTagWorker.java
+++ b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/HtmlTagWorker.java
@@ -31,6 +31,7 @@ This file is part of the iText (R) project.
import com.itextpdf.html2pdf.attach.util.WaitingInlineElementsHelper;
import com.itextpdf.html2pdf.css.CssConstants;
import com.itextpdf.html2pdf.html.AttributeConstants;
+import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant;
import com.itextpdf.io.font.PdfEncodings;
import com.itextpdf.kernel.pdf.PdfDocument;
import com.itextpdf.kernel.pdf.PdfString;
@@ -45,15 +46,24 @@ This file is part of the iText (R) project.
import com.itextpdf.styledxmlparser.node.IElementNode;
import com.itextpdf.styledxmlparser.node.INode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* TagWorker class for the {@code html} element.
*/
public class HtmlTagWorker implements ITagWorker {
- /** The iText document instance. */
+ private static final Logger LOGGER = LoggerFactory.getLogger(HtmlTagWorker.class);
+
+ /**
+ * The iText document instance.
+ */
private Document document;
- /** Helper class for waiting inline elements. */
+ /**
+ * Helper class for waiting inline elements.
+ */
private WaitingInlineElementsHelper inlineHelper;
/**
@@ -65,14 +75,19 @@ public class HtmlTagWorker implements ITagWorker {
public HtmlTagWorker(IElementNode element, ProcessorContext context) {
// TODO DEVSIX-4261 more precise check if a counter was actually added to the document
boolean immediateFlush =
- context.isImmediateFlush() && !context.getCssContext().isPagesCounterPresent();
+ context.isImmediateFlush() && !context.getCssContext().isPagesCounterPresent()
+ && !context.isCreateAcroForm();
+ if (context.isImmediateFlush() && context.isCreateAcroForm()) {
+ LOGGER.info(Html2PdfLogMessageConstant.IMMEDIATE_FLUSH_DISABLED);
+ }
PdfDocument pdfDocument = context.getPdfDocument();
document = new HtmlDocument(pdfDocument, pdfDocument.getDefaultPageSize(), immediateFlush);
document.setRenderer(new HtmlDocumentRenderer(document, immediateFlush));
DefaultHtmlProcessor.setConvertedRootElementProperties(element.getStyles(), context, document);
- inlineHelper = new WaitingInlineElementsHelper(element.getStyles().get(CssConstants.WHITE_SPACE), element.getStyles().get(CssConstants.TEXT_TRANSFORM));
+ inlineHelper = new WaitingInlineElementsHelper(element.getStyles().get(CssConstants.WHITE_SPACE),
+ element.getStyles().get(CssConstants.TEXT_TRANSFORM));
String lang = element.getAttribute(AttributeConstants.LANG);
if (lang != null) {
diff --git a/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/ImgTagWorker.java b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/ImgTagWorker.java
index 9699498b1..f141e0b6a 100644
--- a/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/ImgTagWorker.java
+++ b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/ImgTagWorker.java
@@ -36,6 +36,8 @@ This file is part of the iText (R) project.
import com.itextpdf.layout.element.Image;
import com.itextpdf.layout.properties.ObjectFit;
import com.itextpdf.styledxmlparser.node.IElementNode;
+import com.itextpdf.svg.element.SvgImage;
+import com.itextpdf.svg.xobject.SvgImageXObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -71,6 +73,8 @@ public ImgTagWorker(IElementNode element, ProcessorContext context) {
if (imageXObject != null) {
if (imageXObject instanceof PdfImageXObject) {
image = new HtmlImage((PdfImageXObject) imageXObject);
+ } else if (imageXObject instanceof SvgImageXObject) {
+ image = new SvgImage((SvgImageXObject) imageXObject);
} else if (imageXObject instanceof PdfFormXObject) {
image = new HtmlImage((PdfFormXObject) imageXObject);
} else {
diff --git a/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/ObjectTagWorker.java b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/ObjectTagWorker.java
index 8719cb40c..296edccd9 100644
--- a/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/ObjectTagWorker.java
+++ b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/ObjectTagWorker.java
@@ -31,7 +31,6 @@ This file is part of the iText (R) project.
import com.itextpdf.html2pdf.util.SvgProcessingUtil;
import com.itextpdf.commons.utils.FileUtil;
import com.itextpdf.commons.utils.MessageFormatUtil;
-import com.itextpdf.kernel.pdf.PdfDocument;
import com.itextpdf.layout.IPropertyContainer;
import com.itextpdf.layout.element.Image;
import com.itextpdf.styledxmlparser.node.IElementNode;
@@ -117,17 +116,10 @@ private boolean isSvgImage(String typeAttribute) {
@Override
public void processEnd(IElementNode element, ProcessorContext context) {
- if (context.getPdfDocument() != null) {
- PdfDocument document = context.getPdfDocument();
- //Create Image object
-
- if (res != null) {
- image = processUtil.createImageFromProcessingResult(res, document);
- AccessiblePropHelper.trySetLangAttribute(image, element);
- }
-
- } else {
- LOGGER.error(Html2PdfLogMessageConstant.PDF_DOCUMENT_NOT_PRESENT);
+ // Create Image object
+ if (res != null) {
+ image = processUtil.createSvgImageFromProcessingResult(res);
+ AccessiblePropHelper.trySetLangAttribute(image, element);
}
}
diff --git a/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/SvgTagWorker.java b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/SvgTagWorker.java
index f7107198a..139eaabb4 100644
--- a/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/SvgTagWorker.java
+++ b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/SvgTagWorker.java
@@ -68,9 +68,9 @@ public SvgTagWorker(IElementNode element, ProcessorContext context) {
@Override
public void processEnd(IElementNode element, ProcessorContext context) {
- if (context.getPdfDocument() != null && processingResult != null) {
+ if (processingResult != null) {
SvgProcessingUtil util = new SvgProcessingUtil(context.getResourceResolver());
- svgImage = util.createImageFromProcessingResult(processingResult, context.getPdfDocument());
+ svgImage = util.createSvgImageFromProcessingResult(processingResult);
AccessiblePropHelper.trySetLangAttribute(svgImage, element);
context.endProcessingInlineSvg();
diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtil.java b/src/main/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtil.java
index ca7df748e..edc62e004 100644
--- a/src/main/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtil.java
+++ b/src/main/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtil.java
@@ -26,8 +26,6 @@ This file is part of the iText (R) project.
import com.itextpdf.html2pdf.attach.ProcessorContext;
import com.itextpdf.html2pdf.css.CssConstants;
import com.itextpdf.commons.utils.MessageFormatUtil;
-import com.itextpdf.kernel.colors.Color;
-import com.itextpdf.kernel.colors.DeviceRgb;
import com.itextpdf.kernel.colors.gradients.StrategyBasedLinearGradientBuilder;
import com.itextpdf.kernel.pdf.xobject.PdfFormXObject;
import com.itextpdf.kernel.pdf.xobject.PdfImageXObject;
diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/util/ListStyleApplierUtil.java b/src/main/java/com/itextpdf/html2pdf/css/apply/util/ListStyleApplierUtil.java
index 853008b6b..e7d0e3707 100644
--- a/src/main/java/com/itextpdf/html2pdf/css/apply/util/ListStyleApplierUtil.java
+++ b/src/main/java/com/itextpdf/html2pdf/css/apply/util/ListStyleApplierUtil.java
@@ -53,6 +53,8 @@ This file is part of the iText (R) project.
import com.itextpdf.styledxmlparser.node.IElementNode;
import com.itextpdf.styledxmlparser.node.IStylesContainer;
+import com.itextpdf.svg.element.SvgImage;
+import com.itextpdf.svg.xobject.SvgImageXObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -145,6 +147,8 @@ public static void applyListStyleImageProperty(Map cssProps, Pro
Image image = null;
if (imageXObject instanceof PdfImageXObject) {
image = new Image((PdfImageXObject) imageXObject);
+ } else if (imageXObject instanceof SvgImageXObject) {
+ image = new SvgImage((SvgImageXObject) imageXObject);
} else if (imageXObject instanceof PdfFormXObject) {
image = new Image((PdfFormXObject) imageXObject);
} else {
diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/util/VerticalAlignmentApplierUtil.java b/src/main/java/com/itextpdf/html2pdf/css/apply/util/VerticalAlignmentApplierUtil.java
index 31757d9f2..eb96078d6 100644
--- a/src/main/java/com/itextpdf/html2pdf/css/apply/util/VerticalAlignmentApplierUtil.java
+++ b/src/main/java/com/itextpdf/html2pdf/css/apply/util/VerticalAlignmentApplierUtil.java
@@ -141,7 +141,7 @@ public static void applyVerticalAlignmentForInlines(Map cssProps
String vAlignVal = cssProps.get(CssConstants.VERTICAL_ALIGN);
if (vAlignVal != null) {
- // TODO DEVSIX-1750 for inline images and tables (inline-blocks) v-align is not supported
+ // TODO DEVSIX-1961 for inline images and tables (inline-blocks) v-align is not supported
float textRise = 0;
diff --git a/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java b/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java
index e27e0c4f9..34dad6edf 100644
--- a/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java
+++ b/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java
@@ -119,6 +119,7 @@ public final class Html2PdfLogMessageConstant {
public static final String PAGE_SIZE_VALUE_IS_INVALID = "Page size value {0} is invalid.";
/** The Constant PDF_DOCUMENT_NOT_PRESENT. */
+ @Deprecated
public static final String PDF_DOCUMENT_NOT_PRESENT = "PdfDocument is not present";
/** The Constant QUOTES_PROPERTY_INVALID. */
@@ -171,6 +172,7 @@ public final class Html2PdfLogMessageConstant {
public static final String ELEMENT_DOES_NOT_FIT_CURRENT_AREA = "Element does not fit current area";
public static final String OPTGROUP_NOT_SUPPORTED_IN_INTERACTIVE_SELECT = "Option groups are not supported in "
+ "interactive mode";
+ public static final String IMMEDIATE_FLUSH_DISABLED = "Setting createAcroForm disables immediateFlush property";
private Html2PdfLogMessageConstant() {
//Private constructor will prevent the instantiation of this class directly
diff --git a/src/main/java/com/itextpdf/html2pdf/resolver/font/DefaultFontProvider.java b/src/main/java/com/itextpdf/html2pdf/resolver/font/DefaultFontProvider.java
index a2626c82a..328ed6e84 100644
--- a/src/main/java/com/itextpdf/html2pdf/resolver/font/DefaultFontProvider.java
+++ b/src/main/java/com/itextpdf/html2pdf/resolver/font/DefaultFontProvider.java
@@ -38,7 +38,7 @@ This file is part of the iText (R) project.
/**
* The default {@link BasicFontProvider} for pdfHTML, that, as opposed to
- * the font provider in iText 7's styled-xml-parser, also includes a
+ * the font provider in iText's styled-xml-parser, also includes a
* series of fonts that are shipped with the add-on.
*/
public class DefaultFontProvider extends BasicFontProvider {
diff --git a/src/main/java/com/itextpdf/html2pdf/resolver/resource/HtmlResourceResolver.java b/src/main/java/com/itextpdf/html2pdf/resolver/resource/HtmlResourceResolver.java
index 880e8e82d..5c27d36ef 100644
--- a/src/main/java/com/itextpdf/html2pdf/resolver/resource/HtmlResourceResolver.java
+++ b/src/main/java/com/itextpdf/html2pdf/resolver/resource/HtmlResourceResolver.java
@@ -32,6 +32,7 @@ This file is part of the iText (R) project.
import com.itextpdf.styledxmlparser.resolver.resource.IResourceRetriever;
import com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver;
import com.itextpdf.svg.converter.SvgConverter;
+import com.itextpdf.svg.element.SvgImage;
import com.itextpdf.svg.processors.ISvgProcessorResult;
import com.itextpdf.svg.processors.impl.SvgConverterProperties;
@@ -49,7 +50,7 @@ public class HtmlResourceResolver extends ResourceResolver {
private static final String SVG_PREFIX = "data:image/svg+xml";
private static final Pattern SVG_IDENTIFIER_PATTERN = Pattern.compile(",[\\s]*(
+
+ Test paragraph
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae
+ fringilla mauris. Quisque commodo eget nisi sed pretium. Mauris luctus nec
+ lacus in ultricies. Mauris vitae hendrerit arcu, ac scelerisque lacus.
+ Aliquam lobortis in lacus sit amet posuere. Fusce iaculis urna id neque
+ dapibus, eu lacinia lectus dictum.
+
+
+
+ Praesent condimentum dui dui, sit amet rutrum diam tincidunt eu. Cras
+ suscipit porta leo sit amet rutrum. Sed vehicula ornare tincidunt.
+ Curabitur a ipsum ac diam mattis volutpat ac ut elit. Nullam luctus justo
+ non vestibulum gravida. Morbi metus libero, pharetra non porttitor a,
+ molestie nec nisi.
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/VerticalAlignmentTest/cmp_verticalAlignmentTest14.pdf b/src/test/resources/com/itextpdf/html2pdf/css/VerticalAlignmentTest/cmp_verticalAlignmentTest14.pdf
index b9987dd28..729bf6595 100644
Binary files a/src/test/resources/com/itextpdf/html2pdf/css/VerticalAlignmentTest/cmp_verticalAlignmentTest14.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/VerticalAlignmentTest/cmp_verticalAlignmentTest14.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/VerticalAlignmentTest/cmp_verticalAlignmentTest15.pdf b/src/test/resources/com/itextpdf/html2pdf/css/VerticalAlignmentTest/cmp_verticalAlignmentTest15.pdf
index 7233f2790..9c6c07747 100644
Binary files a/src/test/resources/com/itextpdf/html2pdf/css/VerticalAlignmentTest/cmp_verticalAlignmentTest15.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/VerticalAlignmentTest/cmp_verticalAlignmentTest15.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementAlwaysTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementAlwaysTest.pdf
new file mode 100644
index 000000000..1ab11e162
Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementAlwaysTest.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementDivAlwaysTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementDivAlwaysTest.pdf
new file mode 100644
index 000000000..473e80935
Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementDivAlwaysTest.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterPageColumnTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterPageColumnTest.pdf
new file mode 100644
index 000000000..77b584d4f
Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterPageColumnTest.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterPageInsideColumnTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterPageInsideColumnTest.pdf
index d5676e2ba..9e3330791 100644
Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterPageInsideColumnTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterPageInsideColumnTest.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidTest.pdf
index e481640f1..748f6f48d 100644
Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidTest.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeInnerElementAlwaysTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeInnerElementAlwaysTest.pdf
new file mode 100644
index 000000000..27dd5efa0
Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeInnerElementAlwaysTest.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeInnerElementDivAlwaysTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeInnerElementDivAlwaysTest.pdf
new file mode 100644
index 000000000..d3410dd3f
Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeInnerElementDivAlwaysTest.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforePageColumnTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforePageColumnTest.pdf
new file mode 100644
index 000000000..8c5988922
Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforePageColumnTest.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforePageInsideColumnTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforePageInsideColumnTest.pdf
index 871407326..c492f1be4 100644
Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforePageInsideColumnTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforePageInsideColumnTest.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAvoidTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAvoidTest.pdf
index 7ed7ae6a2..9dbad6e62 100644
Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAvoidTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAvoidTest.pdf differ
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/pageBreakAfterInnerElementAlwaysTest.html b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/pageBreakAfterInnerElementAlwaysTest.html
new file mode 100644
index 000000000..741f5cf47
--- /dev/null
+++ b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/pageBreakAfterInnerElementAlwaysTest.html
@@ -0,0 +1,31 @@
+
+
+