Browse Source

CUSTBUG-43276 pdf导出后。html显示的图片被裁切了

bugfix/10.0
Hugh.C 5 years ago
parent
commit
5d860c477b
  1. 7
      fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfChunk.java

7
fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfChunk.java

@ -788,10 +788,11 @@ public class PdfChunk {
public String toHtmlString() {
StringBuffer htmlString = new StringBuffer();
if(this.isImage()){
htmlString.append("<img src='").append(image.getSrcString()).append("'").append("/>");
if (this.isImage()) {
htmlString.append("<img src='").append(image.getSrcString()).append("'").
append(" style='width:").append(image.getPlainWidth()).append("px").
append(" height:").append(image.getPlainHeight()).append("px'").append("/>");
return htmlString.toString();
}
//todo 需要添加其他样式属性
htmlString.append("<span style='");

Loading…
Cancel
Save