|
|
@@ -77,8 +77,7 @@ public class FileContentUtils {
|
|
|
*/
|
|
|
public static String getContentPdf(byte[] data) {
|
|
|
StringBuilder result = new StringBuilder();
|
|
|
- try {
|
|
|
- PDDocument load = PDDocument.load(data);
|
|
|
+ try (PDDocument load = PDDocument.load(data)) {
|
|
|
PDFTextStripper stripper = new PDFTextStripper();
|
|
|
stripper.setSortByPosition(true);
|
|
|
for (int i = 1; i < load.getNumberOfPages() + 1; i++) {
|