Before Width: | Height: | Size: 616 KiB |
Before Width: | Height: | Size: 616 KiB |
Before Width: | Height: | Size: 616 KiB |
Before Width: | Height: | Size: 798 KiB |
Before Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 616 KiB |
Before Width: | Height: | Size: 616 KiB |
Before Width: | Height: | Size: 539 KiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 268 KiB |
Before Width: | Height: | Size: 894 KiB |
Before Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 539 KiB |
Before Width: | Height: | Size: 275 KiB |
Before Width: | Height: | Size: 616 KiB |
Before Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 586 KiB |
Before Width: | Height: | Size: 377 KiB |
Before Width: | Height: | Size: 3.8 MiB |
Before Width: | Height: | Size: 377 KiB |
Before Width: | Height: | Size: 220 KiB |
Before Width: | Height: | Size: 2.3 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 532 KiB |
Before Width: | Height: | Size: 236 KiB |
Before Width: | Height: | Size: 370 KiB |
Before Width: | Height: | Size: 159 KiB |
Before Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 657 KiB |
Before Width: | Height: | Size: 519 KiB |
Before Width: | Height: | Size: 546 KiB |
Before Width: | Height: | Size: 539 KiB |
Before Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 6.1 MiB |
Before Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 156 KiB |
Before Width: | Height: | Size: 616 KiB |
Before Width: | Height: | Size: 741 KiB |
Before Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 310 KiB |
Before Width: | Height: | Size: 272 KiB |
Before Width: | Height: | Size: 5.8 MiB |
Before Width: | Height: | Size: 972 KiB |
Before Width: | Height: | Size: 469 KiB |
Before Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 608 KiB |
Before Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 192 KiB |
Before Width: | Height: | Size: 616 KiB |
Before Width: | Height: | Size: 573 KiB |
Before Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 669 KiB |
Before Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 141 KiB |
Before Width: | Height: | Size: 644 KiB |
Before Width: | Height: | Size: 377 KiB |
Before Width: | Height: | Size: 2.3 MiB |
Before Width: | Height: | Size: 269 KiB |
Before Width: | Height: | Size: 123 KiB |
Before Width: | Height: | Size: 616 KiB |
Before Width: | Height: | Size: 220 KiB |
Before Width: | Height: | Size: 669 KiB |
Before Width: | Height: | Size: 175 KiB |
Before Width: | Height: | Size: 220 KiB |
@ -1,25 +0,0 @@
|
|||||||
package com.dsideal.QingLong.Util;
|
|
||||||
|
|
||||||
import com.aspose.words.*;
|
|
||||||
|
|
||||||
public class ReplaceAndInsertImage implements IReplacingCallback {
|
|
||||||
public String url;
|
|
||||||
|
|
||||||
public ReplaceAndInsertImage(String url) {
|
|
||||||
this.url = url;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int replacing(ReplacingArgs e) throws Exception {
|
|
||||||
//获取当前节点
|
|
||||||
Node node = e.getMatchNode();
|
|
||||||
//获取当前文档
|
|
||||||
Document document = (Document) node.getDocument();
|
|
||||||
DocumentBuilder builder = new DocumentBuilder(document);
|
|
||||||
// //将光标移动到指定节点
|
|
||||||
builder.moveTo(node);
|
|
||||||
// //插入图片
|
|
||||||
builder.insertImage(url);
|
|
||||||
return ReplaceAction.REPLACE;
|
|
||||||
}
|
|
||||||
}
|
|