From a0304dcde3de021cf5a88b89a5732dfbd78861d0 Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Tue, 9 Jun 2020 16:00:44 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-32592=20html=20=E4=BB=A5=E3=80=81
?= =?UTF-8?q?=20or=20
=20=E6=A0=87=E7=AD=BE=E5=BC=80=E5=A4=B4=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E4=B8=A2=E5=A4=B1line-height=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lowagie/text/html/simpleparser/HTMLWorker.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 eeafc9659..166f27f3e 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 @@ -228,7 +228,8 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener { if (tag.equals(HtmlTags.ANCHOR)) { cprops.addToChain(tag, h); if (currentParagraph == null) { - currentParagraph = new Paragraph(); + currentParagraph = FactoryProperties + .createParagraph(cprops); } stack.push(currentParagraph); currentParagraph = new Paragraph(); @@ -236,7 +237,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)); @@ -249,7 +251,8 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener { // end with a break, but a trailing break is always inserted. boolean addLeadingBreak = true; if (currentParagraph == null) { - currentParagraph = new Paragraph(); + currentParagraph = FactoryProperties + .createParagraph(cprops); addLeadingBreak = false; } if (addLeadingBreak) { // Not a new paragraph @@ -545,7 +548,8 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener { } if (tag.equals("a")) { if (currentParagraph == null) { - currentParagraph = new Paragraph(); + currentParagraph = FactoryProperties + .createParagraph(cprops); } boolean skip = false; if (interfaceProps != null) {