feature(预览):html标签修改

This commit is contained in:
yangjianze
2022-11-15 13:54:26 +08:00
parent 6c60b91901
commit cc4abfdd1e
3 changed files with 4 additions and 8 deletions
@@ -322,10 +322,6 @@ public class IReportServiceImpl implements IReportService {
break;
}
FileUtil.deleteFile(path);
if (StringUtils.isNotBlank(html)){
html = html.replaceAll("<img ", "<img class ='preview-img' ");
html = html.replaceAll("img \\{", ".preview-img {");
}
return html;
}
}
@@ -86,10 +86,10 @@ public class PdfUtil {
buffer.append("</head>\r\n");
buffer.append("<body style=\"background-color:gray;\">\r\n");
buffer.append("<style>\r\n");
buffer.append("img {background-color:#fff; text-align:center; width:100%; max-width:100%;margin-top:6px;}\r\n");
buffer.append(".preview-img {background-color:#fff; text-align:center; width:100%; max-width:100%;margin-top:6px;}\r\n");
buffer.append("</style>\r\n");
for(int i=0;i<baseList.size();i++){
buffer.append("<img src="+baseList.get(i)+" />");
buffer.append("<img class ='preview-img' src="+baseList.get(i)+" />");
}
buffer.append("</body></html>");
@@ -240,10 +240,10 @@ public class PptUtil {
buffer.append("</head>\r\n");
buffer.append("<body style=\"background-color:gray;\">\r\n");
buffer.append("<style>\r\n");
buffer.append("img {background-color:#fff; text-align:center; width:100%; max-width:100%;margin-top:6px;}\r\n");
buffer.append(".preview-img {background-color:#fff; text-align:center; width:100%; max-width:100%;margin-top:6px;}\r\n");
buffer.append("</style>\r\n");
for(int i=0;i<baseList.size();i++){
buffer.append("<img src="+baseList.get(i)+" />");
buffer.append("<img class ='preview-img' src="+baseList.get(i)+" />");
}
buffer.append("</body></html>");