diff --git a/android/src/main/java/com/anyline/RNImageToPDF/CreatePDFAsyncTask.java b/android/src/main/java/com/anyline/RNImageToPDF/CreatePDFAsyncTask.java index 1debc33..2def7ab 100644 --- a/android/src/main/java/com/anyline/RNImageToPDF/CreatePDFAsyncTask.java +++ b/android/src/main/java/com/anyline/RNImageToPDF/CreatePDFAsyncTask.java @@ -14,7 +14,6 @@ import java.io.File; import java.io.FileOutputStream; -import java.io.IOException; import static java.lang.String.format; @@ -84,7 +83,7 @@ protected WritableMap doInBackground(Void... ignored) { document.writeTo(new FileOutputStream(filePath)); result.putString("filePath", filePath.getAbsolutePath()); - } catch (IOException e) { + } catch (Exception e) { document.close(); return null; } diff --git a/package.json b/package.json index 2224856..81baed2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-image-to-pdf", - "version": "1.3.0", + "version": "1.3.1", "description": "Converts images to a PDF file", "main": "index.js", "scripts": {