Compare commits
4 Commits
1.0.0
...
268769c02c
| Author | SHA1 | Date | |
|---|---|---|---|
| 268769c02c | |||
| 837028762b | |||
| 7f1c9af201 | |||
| 434a751575 |
@@ -98,10 +98,6 @@ services:
|
||||
- GRAMER_CUSTOMIZE_LIST="%"
|
||||
- GRAMER_CUSTOMIZE_LIST_STRING_DELIMITING=","
|
||||
ports:
|
||||
# 用于通过http访问libreoffice
|
||||
- 3000:3000
|
||||
# 用于通过https访问libreoffice
|
||||
- 3001:3001
|
||||
# 文书转换服务端口,用于document-api远程调用document-server
|
||||
- 9004:9004
|
||||
volumes:
|
||||
|
||||
@@ -18,14 +18,14 @@ cp ../document-server/jodconverter-document-server/target/application.yml app/
|
||||
|
||||
#amd64
|
||||
echo 开始构建amd64镜像...
|
||||
docker buildx build --platform linux/amd64 -t document-server:1.0 ./
|
||||
docker buildx build --platform linux/amd64 -t yhl452493373/document-server:1.0 ./
|
||||
rm -rf document-server-1.0.tar.gz
|
||||
docker save document-server:1.0 | gzip > document-server-1.0.tar.gz
|
||||
echo amd64镜像构建成功.
|
||||
|
||||
#arm64
|
||||
echo 开始构建arm64镜像...
|
||||
docker buildx build --platform linux/arm64 -t document-server:1.0.arm64 ./
|
||||
docker buildx build --platform linux/arm64 -t yhl452493373/document-server:1.0.arm64 ./
|
||||
rm -rf document-server-1.0.arm64.tar.gz
|
||||
docker save document-server:1.0.arm64 | gzip > document-server-1.0.arm64.tar.gz
|
||||
echo arm64镜像构建成功.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.optima.document.test.bean;
|
||||
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
import com.deepoove.poi.data.Pictures;
|
||||
import com.optima.document.api.DocumentService;
|
||||
import com.optima.document.test.config.DocumentServiceConfig;
|
||||
@@ -45,8 +46,16 @@ public class DocumentConverter {
|
||||
params.put("departmentList", departmentList);
|
||||
|
||||
byte[] bytes = Files.readAllBytes(Paths.get("/Users/yanghuanglin/Downloads/02.png"));
|
||||
|
||||
params.put("img", Pictures.ofBytes(bytes).size(48, 27).create());
|
||||
|
||||
List<PictureRenderData> imgList = new ArrayList<>();
|
||||
imgList.add(Pictures.ofBytes(bytes).size(48, 27).create());
|
||||
imgList.add(Pictures.ofBytes(bytes).size(48, 27).create());
|
||||
params.put("imgList", imgList);
|
||||
|
||||
params.put("urlImg",Pictures.ofUrl("https://xct.cdhncy.cn/file/city/2025/10/28/fa03c40bdfc64a4f9e1241ebda6b3fda_1761641676690.jpeg").create());
|
||||
|
||||
// 生成word,并转为pdf
|
||||
byte[] generatedWord = documentService.generateWord(Files.readAllBytes(sourceFile.toPath()), params);
|
||||
byte[] wordedToPdf = documentService.wordToPdf(generatedWord, true);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user