+ pg.setProgress(80);
+
+ // ZIP order is not correct for us
+ Collections.sort(images);
+ pg.setProgress(90);
+
+ for (String uuid : images) {
+ try {
+ chap.getParagraphs().add(new Paragraph(new URL(uuid)));
+ } catch (Exception e) {
+ Instance.syserr(e);
+ }
+ }
+
+ if (meta.getCover() == null && !images.isEmpty()) {
+ InputStream in = Instance.getCache().open(new URL(images.get(0)),
+ this, true);
+ try {
+ BufferedImage fcover = ImageIO.read(in);
+ meta.setCover(fcover);
+ meta.setFakeCover(true);
+ } finally {
+ in.close();
+ }
+ }
+
+ pg.setProgress(100);