diff --git a/app/core/src/main/java/stirling/software/SPDF/utils/text/TextDecodingHelper.java b/app/core/src/main/java/stirling/software/SPDF/utils/text/TextDecodingHelper.java index 8c7e4cfbe..00c3db099 100644 --- a/app/core/src/main/java/stirling/software/SPDF/utils/text/TextDecodingHelper.java +++ b/app/core/src/main/java/stirling/software/SPDF/utils/text/TextDecodingHelper.java @@ -123,7 +123,7 @@ public class TextDecodingHelper { } } catch (Exception ignored) { } - if (!isPrintable(ch)) { + if (ch == null || !isPrintable(ch)) { // Handle problematic character codes specifically ch = "�"; }