feature(预览):html标签修改
This commit is contained in:
@@ -322,10 +322,6 @@ public class IReportServiceImpl implements IReportService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
FileUtil.deleteFile(path);
|
FileUtil.deleteFile(path);
|
||||||
if (StringUtils.isNotBlank(html)){
|
|
||||||
html = html.replaceAll("<img ", "<img class ='preview-img' ");
|
|
||||||
html = html.replaceAll("img \\{", ".preview-img {");
|
|
||||||
}
|
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,10 +86,10 @@ public class PdfUtil {
|
|||||||
buffer.append("</head>\r\n");
|
buffer.append("</head>\r\n");
|
||||||
buffer.append("<body style=\"background-color:gray;\">\r\n");
|
buffer.append("<body style=\"background-color:gray;\">\r\n");
|
||||||
buffer.append("<style>\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");
|
buffer.append("</style>\r\n");
|
||||||
for(int i=0;i<baseList.size();i++){
|
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>");
|
buffer.append("</body></html>");
|
||||||
|
|||||||
@@ -240,10 +240,10 @@ public class PptUtil {
|
|||||||
buffer.append("</head>\r\n");
|
buffer.append("</head>\r\n");
|
||||||
buffer.append("<body style=\"background-color:gray;\">\r\n");
|
buffer.append("<body style=\"background-color:gray;\">\r\n");
|
||||||
buffer.append("<style>\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");
|
buffer.append("</style>\r\n");
|
||||||
for(int i=0;i<baseList.size();i++){
|
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>");
|
buffer.append("</body></html>");
|
||||||
|
|||||||
Reference in New Issue
Block a user