From a525849a9d258c6f800927f2442b46179edc265e Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 12 Apr 2018 14:56:31 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-7480=20html=E8=A7=A3=E6=9E=90=E4=B9=8B?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=96=AD=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/third/v2/lowagie/text/pdf/PdfChunk.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfChunk.java b/fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfChunk.java index e65a0a5db..9087921b0 100644 --- a/fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfChunk.java +++ b/fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfChunk.java @@ -59,8 +59,6 @@ import com.fr.third.v2.lowagie.text.Utilities; import com.fr.third.v2.lowagie.text.Chunk; import com.fr.third.v2.lowagie.text.Font; import com.fr.third.v2.lowagie.text.Image; -import com.fr.third.v2.lowagie.text.SplitCharacter; -import com.fr.third.v2.lowagie.text.Utilities; /** * A PdfChunk is the PDF translation of a Chunk. @@ -190,6 +188,7 @@ public class PdfChunk { splitCharacter = (SplitCharacter)noStroke.get(Chunk.SPLITCHARACTER); if (splitCharacter == null) splitCharacter = DefaultSplitCharacter.DEFAULT; + this.height = other.getHeight(); } /** @@ -303,7 +302,7 @@ public class PdfChunk { } return start; } - + /** * Splits this PdfChunk if it's too long for the given width. *

@@ -853,7 +852,16 @@ public class PdfChunk { return 0; return font.width(c); } - + + public String toHtmlString() { + //todo 需要添加其他样式属性 + StringBuffer htmlString = new StringBuffer(); + htmlString.append(""); + htmlString.append(value); + htmlString.append(""); + return htmlString.toString(); + } + public static boolean noPrint(int c) { return ((c >= 0x200b && c <= 0x200f) || (c >= 0x202a && c <= 0x202e)); }