添加字体库设置
This commit is contained in:
@ -44,6 +44,9 @@ public class ExpertSignatureServiceImpl implements ExpertSignatureService {
|
||||
@Value("${mconfig.file.upload-address}")
|
||||
private String uploadAddress;
|
||||
|
||||
@Value("${mconfig.file.font-address}")
|
||||
private String fontAddress;
|
||||
|
||||
|
||||
private String getUploadAddress(String assessRoomId) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
||||
@ -81,7 +84,9 @@ public class ExpertSignatureServiceImpl implements ExpertSignatureService {
|
||||
|
||||
//上传pdf到文档中心
|
||||
String pdfId = PropertyUtils.getSnowflakeId();
|
||||
attachmentClient.upload(pdfId, entity.getFilename(), pdf);
|
||||
String filename = entity.getFilename();
|
||||
filename = filename.substring(0, filename.lastIndexOf(".")) + ".pdf";
|
||||
attachmentClient.upload(pdfId, filename, pdf);
|
||||
return pdfId;
|
||||
}
|
||||
|
||||
@ -119,7 +124,7 @@ public class ExpertSignatureServiceImpl implements ExpertSignatureService {
|
||||
|
||||
File f = new File(path + "merged.pdf");
|
||||
FileOutputStream fos = new FileOutputStream(f);
|
||||
FontSettings.getDefaultInstance().setFontsFolder("/storage/fonts/",true);
|
||||
FontSettings.getDefaultInstance().setFontsFolder(fontAddress, true);
|
||||
try {
|
||||
com.aspose.words.Document doc = new com.aspose.words.Document(path + "merged.docx");
|
||||
doc.save(fos, SaveFormat.PDF);
|
||||
|
@ -173,6 +173,7 @@ mconfig:
|
||||
documentcenter: core-service-document-center #文档中心
|
||||
usercenter: core-service-usercenter-public #用户中心
|
||||
file:
|
||||
font-address: /storage/fonts/
|
||||
upload-address: /storage/reviewReport/
|
||||
document:
|
||||
clientHttpUrl: http://10.242.31.158:8100/auth/oauth/token?grant_type=client_credentials&client_id=bVS46ElU&client_secret=58ea04ba02475c8da2321cc99849d2a10f15b749
|
||||
|
@ -165,6 +165,7 @@ mconfig:
|
||||
documentcenter: core-service-document-center #文档中心
|
||||
usercenter: core-service-usercenter-public #用户中心
|
||||
file:
|
||||
font-address: /storage/fonts/
|
||||
upload-address: /storage/reviewReport/
|
||||
|
||||
document:
|
||||
|
@ -168,6 +168,7 @@ mconfig:
|
||||
documentcenter: core-service-document-center #文档中心
|
||||
usercenter: core-service-usercenter-public #用户中心
|
||||
file:
|
||||
font-address: /storage/fonts/
|
||||
upload-address: /storage/reviewReport/
|
||||
document:
|
||||
clientHttpUrl: http://10.238.25.112:8100/auth/oauth/token?grant_type=client_credentials&client_id=bVS46ElU&client_secret=58ea04ba02475c8da2321cc99849d2a10f15b749
|
||||
|
@ -168,6 +168,7 @@ mconfig:
|
||||
documentcenter: core-service-document-center #文档中心
|
||||
usercenter: core-service-usercenter-public #用户中心
|
||||
file:
|
||||
font-address: /storage/fonts/
|
||||
upload-address: /storage/reviewReport/
|
||||
document:
|
||||
clientHttpUrl: http://10.242.31.158:8100/auth/oauth/token?grant_type=client_credentials&client_id=bVS46ElU&client_secret=58ea04ba02475c8da2321cc99849d2a10f15b749
|
||||
|
Reference in New Issue
Block a user