diff --git a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java b/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java index 74628ff53..2c5e436f2 100644 --- a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java +++ b/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java @@ -244,7 +244,8 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener { } if (tag.equals(HtmlTags.NEWLINE)) { if (currentParagraph == null) { - currentParagraph = new Paragraph(); + currentParagraph = FactoryProperties + .createParagraph(cprops); } currentParagraph.add(factoryProperties .createChunk("\n", cprops)); @@ -553,8 +554,7 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener { } if (tag.equals("a")) { if (currentParagraph == null) { - currentParagraph = FactoryProperties - .createParagraph(cprops); + currentParagraph = new Paragraph(); } boolean skip = false; if (interfaceProps != null) {