+ pg.setProgress(85);
+
+ // ZIP order is not correct for us
+ List<String> imagesList = new ArrayList<String>(images.keySet());
+ Collections.sort(imagesList);
+
+ pg.setProgress(90);
+
+ for (String uuid : imagesList) {
+ try {
+ chap.getParagraphs().add(new Paragraph(images.get(uuid)));
+ } catch (Exception e) {
+ Instance.getTraceHandler().error(e);
+ }
+ }
+
+ if (meta.getCover() == null && !images.isEmpty()) {
+ meta.setCover(images.get(imagesList.get(0)));
+ }
+
+ pg.setProgress(100);