|
|
@@ -297,14 +297,12 @@ public class RateService {
|
|
|
this.addList(imageUrllist, rate.getFinance());
|
|
|
this.addList(imageUrllist, rate.getProperty());
|
|
|
|
|
|
- String filename = "img.pdf";
|
|
|
+ String filename = "img" + UUID.randomUUID() + ".pdf";
|
|
|
File file = null;
|
|
|
|
|
|
Document doc = new Document(PageSize.A4, 20, 20, 20, 20);
|
|
|
try {
|
|
|
FileOutputStream os = new FileOutputStream(filename);
|
|
|
-
|
|
|
-// FileOutputStream os = new FileOutputStream(tempFile);
|
|
|
PdfWriter.getInstance(doc, os);
|
|
|
|
|
|
doc.open();
|
|
|
@@ -321,7 +319,9 @@ public class RateService {
|
|
|
}
|
|
|
// b = os.toByteArray();
|
|
|
|
|
|
- file = File.createTempFile("img", "pdf");
|
|
|
+ file = new File(filename);
|
|
|
+ System.out.println(filename);
|
|
|
+ System.out.println(file.getName());
|
|
|
InputStream is = new FileInputStream(file);
|
|
|
files.add(is);
|
|
|
|