修复图片转pdf的正式版bug

This commit is contained in:
ocean 2025-12-15 17:32:17 +08:00
parent 5bd33845e1
commit 3ad4c5e916
4 changed files with 11 additions and 22 deletions

View File

@ -40,7 +40,6 @@ android {
versionName = "1.0.6"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
setProperty("archivesBaseName", "${getAppNameFromStringsFile()}-$versionName($versionCode)-${timestamp}")
}

View File

@ -32,13 +32,6 @@
-dontwarn com.yalantis.ucrop**
-keep class com.yalantis.ucrop** { *; }
-keep interface com.yalantis.ucrop** { *; }
# 禁用 JPXDecodeJPEG2000避免调用 JP2Decoder
-assumenosideeffects class com.tom_roush.pdfbox.filter.JPXFilter {
*;
}
# 防止缺少 gemalto JP2Decoder 报错
-dontwarn com.gemalto.jp2.**
-dontwarn com.tom_roush.pdfbox.filter.JPXFilter
# 保留所有 Parcelable
-keep class * implements android.os.Parcelable { *; }
@ -47,3 +40,14 @@
public static final android.os.Parcelable$Creator *;
}
# ===== PDFBox 全保留 =====
-keep class com.tom_roush.pdfbox.** { *; }
# 防止缺少 gemalto JP2Decoder 报错
-dontwarn com.tom_roush.pdfbox.filter.JPXFilter
-dontwarn com.gemalto.jp2.**
# ===== 属性 =====
-keepattributes *Annotation*
-keepattributes Signature
-keepattributes InnerClasses

View File

@ -166,13 +166,6 @@ class PdfToImageActivity : BaseActivity() {
inputFile = file,
password = password,
onError = { e ->
runOnUiThread {
ToastUtils.show(
this@PdfToImageActivity,
getString(R.string.file_not_pdf_or_corrupted)
)
finish()
}
}
).collect { pageItem ->

View File

@ -201,13 +201,6 @@ class SplitPdfActivity : BaseActivity() {
inputFile = file,
password = password,
onError = { e ->
runOnUiThread {
ToastUtils.show(
this@SplitPdfActivity,
getString(R.string.file_not_pdf_or_corrupted)
)
finish()
}
}
).collect { pageItem ->
logDebug("splitPdfToPageItemsFlow pageItem->$pageItem")