Код: Выделить всё
Map documentList = new TreeMap();
....
PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
pdfMergerUtility.setDestinationStream(outputStream);
documentList.forEach((key, value) ->
pdfMergerUtility.addSource(new ByteArrayInputStream(value)));
Подробнее здесь: https://stackoverflow.com/questions/797 ... ccept-byte
Мобильная версия