Sfoglia il codice sorgente

更新word图片插入

pull/100/head
xiaoying 10 mesi fa
parent
commit
0459c15463
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. +2
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/utils/WordUtils.java

+ 2
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/utils/WordUtils.java Vedi File

@@ -11,6 +11,7 @@ import java.awt.*;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;

@@ -229,7 +230,7 @@ public class WordUtils {
*/
public void insertImg(String imgUrl, int imageAlign, int weight, int height, int percent, int heightPercent, int weightPercent, int rotation) throws MalformedURLException, IOException, DocumentException {
// 添加图片
Image img = Image.getInstance(imgUrl);
Image img = Image.getInstance(new URL(imgUrl));
if (img == null)
return;
img.setAbsolutePosition(0, 0);

Loading…
Annulla
Salva