Browse Source

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

* commit 'f64ff89c6c4468c0564d8aa92dbee148ae1d49a5':
  REPORT-13005 sub标签设置color属性,实际导出没有效果
research/11.0
ju 6 years ago
parent
commit
9f7b4b9fb5
  1. 10
      fine-itext-old/src/com/fr/third/com/lowagie/text/html/simpleparser/HTMLWorker.java
  2. 3
      fine-itext-old/src/com/fr/third/com/lowagie/text/rtf/text/RtfChunk.java
  3. 9
      fine-itext/src/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java

10
fine-itext-old/src/com/fr/third/com/lowagie/text/html/simpleparser/HTMLWorker.java

@ -197,6 +197,9 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener {
if (follow != null) {
HashMap prop = new HashMap();
prop.put(follow, null);
FactoryProperties.insertStyle(h, this.cprops);
prop.putAll(h);
cprops.addToChain(follow, prop);
return;
}
@ -303,7 +306,12 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener {
String[] srcArray = src.split(",");
String base64string = srcArray[srcArray.length -1];
byte[] bytes = decoder.decodeBuffer(base64string);
img = Image.getInstance(bytes);
try {
img = Image.getInstance(bytes);
}catch (Exception e){
}
}
if (img == null) {
if (!src.startsWith("http")) {

3
fine-itext-old/src/com/fr/third/com/lowagie/text/rtf/text/RtfChunk.java

@ -49,7 +49,6 @@
package com.fr.third.com.lowagie.text.rtf.text;
import java.awt.Color;
import java.io.IOException;
import java.io.OutputStream;
@ -59,7 +58,7 @@ import com.fr.third.com.lowagie.text.rtf.RtfElement;
import com.fr.third.com.lowagie.text.rtf.document.RtfDocument;
import com.fr.third.com.lowagie.text.rtf.style.RtfColor;
import com.fr.third.com.lowagie.text.rtf.style.RtfFont;
import com.fr.third.v2.lowagie.text.html.Markup;
import com.fr.third.com.lowagie.text.html.Markup;
/**

9
fine-itext/src/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java

@ -200,6 +200,8 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener {
if (follow != null) {
HashMap prop = new HashMap();
prop.put(follow, null);
FactoryProperties.insertStyle(h, this.cprops);
prop.putAll(h);
cprops.addToChain(follow, prop);
return;
}
@ -306,7 +308,12 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener {
String[] srcArray = src.split(",");
String base64string = srcArray[srcArray.length -1];
byte[] bytes = decoder.decodeBuffer(base64string);
img = Image.getInstance(bytes);
try {
img = Image.getInstance(bytes);
}catch (Exception e){
}
}
if (img == null) {
if (!src.startsWith("http")) {

Loading…
Cancel
Save