Browse Source

Merge pull request #38 in CORE/base-third from ~KERRY/base-third:feature/10.0 to feature/10.0

* commit '9a0511497a439d5099e1844eadefc77951159031':
  REPORT-7480 html解析之分页断开
10.0
superman 7 years ago
parent
commit
1faaa753c2
  1. 16
      fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfChunk.java

16
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 <CODE>PdfChunk</CODE> is the PDF translation of a <CODE>Chunk</CODE>.
@ -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 <CODE>PdfChunk</CODE> if it's too long for the given width.
* <P>
@ -853,7 +852,16 @@ public class PdfChunk {
return 0;
return font.width(c);
}
public String toHtmlString() {
//todo 需要添加其他样式属性
StringBuffer htmlString = new StringBuffer();
htmlString.append("<span>");
htmlString.append(value);
htmlString.append("</span>");
return htmlString.toString();
}
public static boolean noPrint(int c) {
return ((c >= 0x200b && c <= 0x200f) || (c >= 0x202a && c <= 0x202e));
}

Loading…
Cancel
Save