Pārlūkot izejas kodu

PDFTool(Android) - 压缩新增加载圈,优化注释旋转、内容编辑文本删除会删除markup注释

liuxiaolong 1 nedēļu atpakaļ
vecāks
revīzija
13c2a60702
24 mainītis faili ar 522 papildinājumiem un 251 dzēšanām
  1. BIN
      ComPDFKit_Repo/compdfkit-ui/ComPDFKit-UI.aar
  2. BIN
      ComPDFKit_Repo/compdfkit/ComPDFKit.aar
  3. 6 4
      ComPDFKit_Tools/build.gradle
  4. 2 0
      ComPDFKit_Tools/src/main/assets/tools_default_configuration.json
  5. 1 1
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/contextmenu/impl/CScreenShotContextMenuView.java
  6. 3 1
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/contextmenu/impl/CStampContextMenuView.java
  7. 24 4
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/pdf/CPDFApplyConfigUtil.java
  8. 10 0
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/pdf/CPDFConfigurationUtils.java
  9. 17 4
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/pdf/CPDFDocumentFragment.java
  10. 6 1
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/pdf/config/ReaderViewConfig.java
  11. 1 0
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/pdf/config/ToolbarConfig.java
  12. 1 1
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/utils/animation/ConstraintSetUtils.java
  13. 1 1
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/views/pdfview/CPDFPageIndicatorView.java
  14. 1 1
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/views/pdfview/CPDFSliderBarView.java
  15. 304 228
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/compress/CPDFCompressDialog.java
  16. 81 0
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/compress/CPDFCompressLoadingDialog.java
  17. 1 1
      ComPDFKit_Tools/src/main/java/com/compdfkit/tools/contenteditor/CEditToolbar.java
  18. 6 0
      ComPDFKit_Tools/src/main/res/drawable/tools_compress_loading_dialog_bg.xml
  19. 1 0
      ComPDFKit_Tools/src/main/res/layout/tools_compress_dialog.xml
  20. 51 0
      ComPDFKit_Tools/src/main/res/layout/tools_compress_loading_dialog.xml
  21. 2 0
      ComPDFKit_Tools/src/main/res/values-zh-rCN/tools_strings.xml
  22. 1 2
      ComPDFKit_Tools/src/main/res/values/tools_strings.xml
  23. 1 1
      compdfkit-tools-mavencentral.gradle
  24. 1 1
      settings.gradle

BIN
ComPDFKit_Repo/compdfkit-ui/ComPDFKit-UI.aar


BIN
ComPDFKit_Repo/compdfkit/ComPDFKit.aar


+ 6 - 4
ComPDFKit_Tools/build.gradle

@@ -52,11 +52,13 @@ dependencies {
 
     api fileTree(include: ['*.jar'], dir: 'libs')
     // use this
-//    api project(path:':ComPDFKit_Repo:compdfkit')
-//    api project(path:':ComPDFKit_Repo:compdfkit-ui')
+    api project(path:':ComPDFKit_Repo:compdfkit')
+    api project(path:':ComPDFKit_Repo:compdfkit-ui')
     // or use
-    api ('com.compdf:compdfkit:2.1.4')
-    api ('com.compdf:compdfkit-ui:2.1.4')
+//    api ('com.compdf:compdfkit:2.1.4')
+//    api ('com.compdf:compdfkit-ui:2.2.0-SNAPSHOT')
+//    api project(path: ':ComPDFKit')
+//    api project(path: ':ComPDFKit-UI')
     api 'com.github.bumptech.glide:glide:4.15.1'
     annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
     api 'androidx.documentfile:documentfile:1.0.1'

+ 2 - 0
ComPDFKit_Tools/src/main/assets/tools_default_configuration.json

@@ -11,6 +11,7 @@
     ]
   },
   "toolbarConfig": {
+    "mainToolbarVisible" : true,
     "androidAvailableActions": [
       "thumbnail",
       "search",
@@ -257,6 +258,7 @@
     "enableSliderBar": true,
     "enablePageIndicator": true,
     "pageSpacing": 10,
+    "margins" : [0,0,0,0],
     "pageScale": 1.0,
     "pageSameWidth": true
   },

+ 1 - 1
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/contextmenu/impl/CScreenShotContextMenuView.java

@@ -66,7 +66,7 @@ public class CScreenShotContextMenuView implements ContextMenuScreenShotProvider
             CPDFEditManager editManager = readerView.getEditManager();
             if (editManager != null && !editManager.isEditMode()) {
                 editManager.enable();
-                editManager.beginEdit(CPDFEditPage.LoadTextImage);
+                editManager.beginEdit(CPDFEditPage.LoadTextImage | CPDFEditPage.LoadPath);
             }
         }else {
             readerView.setTouchMode(CPDFReaderView.TouchMode.BROWSE);

+ 3 - 1
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/contextmenu/impl/CStampContextMenuView.java

@@ -55,7 +55,9 @@ public class CStampContextMenuView implements ContextMenuStampProvider {
             pageView.deleteAnnotation(stampAnnotImpl);
             helper.dismissContextMenu();
         });
-        menuView.addItem(R.string.tools_close, v -> {
+        menuView.addItem(R.string.tools_edit_image_property_rotate, v -> {
+            stampAnnotImpl.setEnableRotate(true);
+            pageView.invalidate();
             helper.dismissContextMenu();
         });
         return menuView;

+ 24 - 4
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/pdf/CPDFApplyConfigUtil.java

@@ -11,6 +11,7 @@ package com.compdfkit.tools.common.pdf;
 
 
 import android.content.Context;
+import android.view.Gravity;
 import android.view.View;
 
 import androidx.core.content.ContextCompat;
@@ -46,6 +47,7 @@ import com.compdfkit.tools.common.views.pdfproperties.pdfstyle.CStyleType;
 import com.compdfkit.tools.common.views.pdfproperties.pdfstyle.manager.CStyleManager;
 import com.compdfkit.tools.common.views.pdfview.CPreviewMode;
 import com.compdfkit.ui.reader.CPDFReaderView;
+import java.util.ArrayList;
 
 public class CPDFApplyConfigUtil {
 
@@ -132,6 +134,17 @@ public class CPDFApplyConfigUtil {
             }
             readerView.setPageSpacing(readerViewConfig.pageSpacing);
             readerView.setScale(readerViewConfig.pageScale);
+            ArrayList<Integer> margins = readerViewConfig.margins;
+            if (margins != null && margins.size() == 4){
+                int left = margins.get(0);
+                int top = margins.get(1);
+                int right = margins.get(2);
+                int bottom = margins.get(3);
+                readerView.setReaderViewHorizontalMargin(left, right);
+                readerView.setFixReaderViewHorizontalMargin(false);
+                readerView.setReaderViewTopMargin(top);
+                readerView.setReaderViewBottomMargin(bottom);
+            }
             CPDFDocument document = fragment.pdfView.getCPdfReaderView().getPDFDocument();
             if (document != null) {
                 fragment.pdfView.enableSliderBar(readerViewConfig.enableSliderBar);
@@ -165,11 +178,18 @@ public class CPDFApplyConfigUtil {
                     }
                 });
             }
-            if (modeConfig.readerOnly) {
-                fragment.flTool.setVisibility(View.GONE);
-                fragment.flBottomToolBar.setVisibility(View.GONE);
-            }
+
+        }
+    }
+
+    public void appleUiConfig(CPDFDocumentFragment fragment, CPDFConfiguration configuration){
+        ModeConfig modeConfig = configuration.modeConfig;
+        if (modeConfig.readerOnly) {
+            fragment.flTool.setVisibility(View.GONE);
+            fragment.flBottomToolBar.setVisibility(View.GONE);
         }
+        boolean showMainToolbar = configuration.toolbarConfig.mainToolbarEnable;
+        fragment.flTool.setVisibility(showMainToolbar ? View.VISIBLE : View.GONE);
     }
 
     private void applyAnnotationConfig(CPDFDocumentFragment fragment, CPDFConfiguration configuration) {

+ 10 - 0
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/pdf/CPDFConfigurationUtils.java

@@ -44,6 +44,7 @@ import com.compdfkit.tools.common.utils.CLog;
 import com.compdfkit.tools.common.views.pdfproperties.CAnnotationType;
 import com.compdfkit.tools.common.views.pdfview.CPreviewMode;
 
+import java.util.Arrays;
 import org.json.JSONArray;
 import org.json.JSONObject;
 
@@ -131,6 +132,7 @@ public class CPDFConfigurationUtils {
             }
         }
         toolbarConfig.availableMenus = menuActionList;
+        toolbarConfig.mainToolbarEnable = jsonObject.optBoolean("mainToolbarEnable", true);
         return toolbarConfig;
     }
 
@@ -175,6 +177,14 @@ public class CPDFConfigurationUtils {
         readerViewConfig.pageSpacing = jsonObject.optInt("pageSpacing", 10);
         readerViewConfig.pageScale = Math.max((float) jsonObject.optDouble("pageScale", 1.0), 1.0F);
         readerViewConfig.pageSameWidth = jsonObject.optBoolean("pageSameWidth", true);
+        JSONArray marginsJsonArray = jsonObject.optJSONArray("margins");
+        if (marginsJsonArray != null && marginsJsonArray.length() == 4) {
+            int left = marginsJsonArray.optInt(0, 0);
+            int top = marginsJsonArray.optInt(1, 0);
+            int right = marginsJsonArray.optInt(2, 0);
+            int bottom = marginsJsonArray.optInt(3, 0);
+            readerViewConfig.margins = new ArrayList<>(Arrays.asList(left, top, right, bottom));
+        }
         return readerViewConfig;
     }
 

+ 17 - 4
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/pdf/CPDFDocumentFragment.java

@@ -241,6 +241,7 @@ public class CPDFDocumentFragment extends CBasicPDFFragment {
         formToolBar = rootView.findViewById(R.id.form_tool_bar);
         signatureToolBar = rootView.findViewById(R.id.signature_tool_bar);
         blockView = rootView.findViewById(R.id.block_view);
+        CPDFApplyConfigUtil.getInstance().appleUiConfig(this, cpdfConfiguration);
         return rootView;
     }
 
@@ -357,7 +358,7 @@ public class CPDFDocumentFragment extends CBasicPDFFragment {
             readerView.setViewMode(CPDFReaderView.ViewMode.PDFEDIT);
             if (editManager != null && !editManager.isEditMode()) {
                 editManager.enable();
-                editManager.beginEdit(CPDFEditPage.LoadTextImage);
+                editManager.beginEdit(CPDFEditPage.LoadTextImage | CPDFEditPage.LoadPath);
             }
         } else {
 
@@ -395,7 +396,10 @@ public class CPDFDocumentFragment extends CBasicPDFFragment {
                         });
                         break;
                     case Thumbnail:
-                        pdfToolBar.addAction(R.drawable.tools_ic_thumbnail, v -> showPageEdit(pdfView, false, () -> restoreEdit()));
+                        pdfToolBar.addAction(R.drawable.tools_ic_thumbnail, v -> {
+                            showPageEdit(pdfView, false, () -> restoreEdit());
+//                            CLog.e("ComPDFKit", "hasChanged:" + pdfView.getCPdfReaderView().getPDFDocument().hasChanges());
+                        });
                         break;
                     case Search:
                         pdfToolBar.addAction(R.drawable.tools_ic_search, v -> {
@@ -551,7 +555,6 @@ public class CPDFDocumentFragment extends CBasicPDFFragment {
                 .setFormPreviewPaint(paint)
                 .setRotateAnnotationDrawableRes(R.drawable.tools_ic_watermark_control)
                 .build();
-
         pdfView.getCPdfReaderView().getEditManager().updateEditConfig(editConfig);
 
         editToolBar.setEditPropertyBtnClickListener((view) -> {
@@ -880,10 +883,20 @@ public class CPDFDocumentFragment extends CBasicPDFFragment {
     @Override
     public void onConfigurationChanged(@NonNull Configuration newConfig) {
         super.onConfigurationChanged(newConfig);
+        boolean pageSameWidth = cpdfConfiguration.readerViewConfig.pageSameWidth;
+        CPDFReaderView readerView = pdfView.getCPdfReaderView();
         if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
             pdfSearchToolBarView.showSearchReplaceContextMenu();
+            if (pageSameWidth && !readerView.isContinueMode()){
+                readerView.setPageSameWidth(false);
+                readerView.invalidateAllChildren();
+            }
         } else if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
             pdfSearchToolBarView.showSearchReplaceContextMenu();
+            if (!readerView.isContinueMode()){
+                readerView.setPageSameWidth(pageSameWidth);
+                readerView.invalidateAllChildren();
+            }
         }
     }
 
@@ -902,7 +915,7 @@ public class CPDFDocumentFragment extends CBasicPDFFragment {
             CPDFEditManager editManager = readerView.getEditManager();
             if (editManager != null && !editManager.isEditMode()) {
                 editManager.enable();
-                editManager.beginEdit(CPDFEditPage.LoadTextImage);
+                editManager.beginEdit(CPDFEditPage.LoadTextImage | CPDFEditPage.LoadPath);
             }
         }else {
             readerView.setTouchMode(CPDFReaderView.TouchMode.BROWSE);

+ 6 - 1
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/pdf/config/ReaderViewConfig.java

@@ -12,6 +12,8 @@ package com.compdfkit.tools.common.pdf.config;
 import androidx.annotation.NonNull;
 
 import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
 
 
 public class ReaderViewConfig implements Serializable {
@@ -40,6 +42,8 @@ public class ReaderViewConfig implements Serializable {
 
     public boolean pageSameWidth = true;
 
+    public ArrayList<Integer> margins = new ArrayList<>();
+
     @NonNull
     @Override
     public String toString() {
@@ -55,7 +59,8 @@ public class ReaderViewConfig implements Serializable {
                 "enablePageIndicator:" + enablePageIndicator + ", " +
                 "pageSpacing:" + pageSpacing + ", " +
                 "pageScale:" + pageScale + ", " +
-                "pageSameWidth:" + pageSameWidth + ", ";
+                "pageSameWidth:" + pageSameWidth + ", " +
+                "margins:" + margins.toString();
         return stringBuilder;
     }
 

+ 1 - 0
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/pdf/config/ToolbarConfig.java

@@ -84,6 +84,7 @@ public class ToolbarConfig implements Serializable {
             }
         }
     }
+    public boolean mainToolbarEnable = true;
 
     public List<ToolbarAction> androidAvailableActions;
 

+ 1 - 1
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/utils/animation/ConstraintSetUtils.java

@@ -63,7 +63,7 @@ public class ConstraintSetUtils {
     }
 
     private void fullVertical(ConstraintSet constraintSet, View view){
-        constraintSet.connect(view.getId(), ConstraintSet.TOP, view.getId(), ConstraintSet.PARENT_ID, ConstraintSet.TOP);
+        constraintSet.connect(view.getId(), ConstraintSet.TOP,  ConstraintSet.PARENT_ID, ConstraintSet.TOP);
         constraintSet.connect(view.getId(), ConstraintSet.BOTTOM, view.getId(), ConstraintSet.PARENT_ID, ConstraintSet.BOTTOM);
     }
 

+ 1 - 1
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/views/pdfview/CPDFPageIndicatorView.java

@@ -77,7 +77,7 @@ public class CPDFPageIndicatorView extends LinearLayout {
         // set text color to white
         tvPageIndicator.setTextColor(Color.WHITE);
         tvPageIndicator.setGravity(Gravity.CENTER);
-        tvPageIndicator.setMinimumWidth(CDimensUtils.dp2px(getContext(), 35));
+        tvPageIndicator.setMinimumWidth(CDimensUtils.dp2px(getContext(), 45));
         // add the text view to the layout
         addView(tvPageIndicator, currentPageLayoutParams);
         // set background resource for the layout

+ 1 - 1
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/views/pdfview/CPDFSliderBarView.java

@@ -55,7 +55,7 @@ public class CPDFSliderBarView extends CPDFSlideBar implements CPDFSlideBar.OnSc
         sliderBarThumbnailWidth = thumbnailWidth;
         sliderBarThumbnailHeight = thumbnailHeight;
         showThumbnail(false);
-        onlyShowPageIndex(true, 100);
+        onlyShowPageIndex(true, 150);
         setSlideBarBitmap(R.drawable.tools_ic_pdf_slider_bar);
         setSlideBarPosition(position);
         setTextBackgroundColor(ContextCompat.getColor(getContext(), R.color.tools_page_indicator_bg_color));

+ 304 - 228
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/compress/CPDFCompressDialog.java

@@ -3,13 +3,15 @@
  * <p>
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
- * This notice may not be removed from this file.
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES. This notice
+ * may not be removed from this file.
  */
 
 package com.compdfkit.tools.compress;
 
+import android.Manifest;
 import android.net.Uri;
+import android.os.Build;
 import android.os.Environment;
 import android.text.InputFilter;
 import android.text.TextUtils;
@@ -24,11 +26,15 @@ import androidx.appcompat.widget.AppCompatRadioButton;
 import androidx.appcompat.widget.AppCompatTextView;
 
 import com.compdfkit.core.document.CPDFDocument;
+import com.compdfkit.core.document.CPDFDocument.CompressListener;
 import com.compdfkit.tools.R;
 import com.compdfkit.tools.common.basic.fragment.CBasicBottomSheetDialogFragment;
 import com.compdfkit.tools.common.utils.CFileUtils;
+import com.compdfkit.tools.common.utils.CLog;
+import com.compdfkit.tools.common.utils.CPermissionUtil;
 import com.compdfkit.tools.common.utils.CToastUtil;
 import com.compdfkit.tools.common.utils.CUriUtil;
+import com.compdfkit.tools.common.utils.activitycontracts.CMultiplePermissionResultLauncher;
 import com.compdfkit.tools.common.utils.activitycontracts.CSelectPDFDocumentResultContract;
 import com.compdfkit.tools.common.utils.threadpools.CThreadPoolUtils;
 import com.compdfkit.tools.common.utils.viewutils.CViewUtils;
@@ -44,267 +50,337 @@ import java.util.Arrays;
 import java.util.List;
 
 
-public class CPDFCompressDialog extends CBasicBottomSheetDialogFragment implements View.OnClickListener,
-        CompoundButton.OnCheckedChangeListener {
+public class CPDFCompressDialog extends CBasicBottomSheetDialogFragment implements
+    View.OnClickListener,
+    CompoundButton.OnCheckedChangeListener {
 
-    private AppCompatTextView tvFileName;
+  private AppCompatTextView tvFileName;
 
-    private AppCompatTextView tvFilePath;
+  private AppCompatTextView tvFilePath;
 
-    private CToolBar toolBar;
+  private CToolBar toolBar;
 
-    private AppCompatTextView tvSwap;
+  private AppCompatTextView tvSwap;
 
-    private AppCompatRadioButton rbQualityLow;
+  private AppCompatRadioButton rbQualityLow;
 
-    private AppCompatRadioButton rbQualityStandard;
+  private AppCompatRadioButton rbQualityStandard;
 
-    private AppCompatRadioButton rbQualityHigh;
+  private AppCompatRadioButton rbQualityHigh;
 
-    private AppCompatRadioButton rbQualityCustom;
+  private AppCompatRadioButton rbQualityCustom;
 
-    private AppCompatEditText etCustomQuality;
+  private AppCompatEditText etCustomQuality;
 
-    private View savePathView;
+  private View savePathView;
 
-    private AppCompatButton btnCancel;
+  private AppCompatButton btnCancel;
 
-    private AppCompatButton btnCompress;
+  private AppCompatButton btnCompress;
 
-    private AppCompatTextView tvSavePath;
+  private AppCompatTextView tvSavePath;
 
-    private CPDFDocument document;
+  private CPDFDocument document;
 
-    private List<AppCompatRadioButton> radioButtons = new ArrayList<>();
+  private List<AppCompatRadioButton> radioButtons = new ArrayList<>();
+  protected CMultiplePermissionResultLauncher multiplePermissionResultLauncher = new CMultiplePermissionResultLauncher(this);
 
-    private String savePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath();
+  private String savePath = Environment.getExternalStoragePublicDirectory(
+      Environment.DIRECTORY_DOWNLOADS).getAbsolutePath();
 
-    private COnCompressDocumentListener compressDocumentListener;
+  private COnCompressDocumentListener compressDocumentListener;
 
-    private ActivityResultLauncher<Void> selectDocumentLauncher = registerForActivityResult(new CSelectPDFDocumentResultContract(), uri -> {
+  private ActivityResultLauncher<Void> selectDocumentLauncher = registerForActivityResult(
+      new CSelectPDFDocumentResultContract(), uri -> {
         if (uri != null) {
-            verifyDocument(uri, document -> {
-                this.document = document;
-                setDocumentInfo();
-            });
+          verifyDocument(uri, document -> {
+            this.document = document;
+            setDocumentInfo();
+          });
         }
-    });
-
-    public void setDocument(CPDFDocument document) {
-        this.document = document;
-    }
-
-    @Override
-    protected int getStyle() {
-        int styleId = CViewUtils.getThemeAttrResourceId(getContext().getTheme(), R.attr.compdfkit_BottomSheetDialog_Theme);
-        if (styleId == 0) {
-            styleId = R.style.ComPDFKit_Theme_BottomSheetDialog_Light_Transparent;
-        }
-        return styleId;
-    }
-
-    @Override
-    protected float dimAmount() {
-        return CViewUtils.isLandScape(getContext()) ? 0.2F : 0F;
-    }
-
-    @Override
-    protected boolean draggable() {
-        return false;
+      });
+  private CPDFCompressLoadingDialog loadingDialog;
+
+  public void setDocument(CPDFDocument document) {
+    this.document = document;
+  }
+
+  @Override
+  protected int getStyle() {
+    int styleId = CViewUtils.getThemeAttrResourceId(getContext().getTheme(),
+        R.attr.compdfkit_BottomSheetDialog_Theme);
+    if (styleId == 0) {
+      styleId = R.style.ComPDFKit_Theme_BottomSheetDialog_Light_Transparent;
     }
+    return styleId;
+  }
+
+  @Override
+  protected float dimAmount() {
+    return CViewUtils.isLandScape(getContext()) ? 0.2F : 0F;
+  }
+
+  @Override
+  protected boolean draggable() {
+    return false;
+  }
+
+  @Override
+  protected boolean fullScreen() {
+    return true;
+  }
+
+
+  @Override
+  protected int layoutId() {
+    return R.layout.tools_compress_dialog;
+  }
+
+  @Override
+  protected void onCreateView(View rootView) {
+    toolBar = rootView.findViewById(R.id.tool_bar);
+    tvSwap = rootView.findViewById(R.id.tv_swap);
+    tvFileName = rootView.findViewById(R.id.tv_title);
+    tvFilePath = rootView.findViewById(R.id.tv_desc);
+    rbQualityLow = rootView.findViewById(R.id.rb_quality_low);
+    rbQualityStandard = rootView.findViewById(R.id.rb_quality_standard);
+    rbQualityHigh = rootView.findViewById(R.id.rb_quality_high);
+    rbQualityCustom = rootView.findViewById(R.id.rb_quality_custom);
+    etCustomQuality = rootView.findViewById(R.id.et_custom_quality);
+    savePathView = rootView.findViewById(R.id.view_save_path);
+    btnCancel = rootView.findViewById(R.id.btn_cancel);
+    btnCompress = rootView.findViewById(R.id.btn_compress);
+    tvSavePath = rootView.findViewById(R.id.tv_save_path);
+    tvSwap.setOnClickListener(this);
+    btnCompress.setOnClickListener(this);
+    btnCancel.setOnClickListener(this);
+    savePathView.setOnClickListener(this);
+    toolBar.setBackBtnClickListener(v -> {
+      dismiss();
+    });
+    rbQualityLow.setOnCheckedChangeListener(this);
+    rbQualityStandard.setOnCheckedChangeListener(this);
+    rbQualityHigh.setOnCheckedChangeListener(this);
+    rbQualityCustom.setOnCheckedChangeListener(this);
+    radioButtons.addAll(
+        Arrays.asList(rbQualityLow, rbQualityStandard, rbQualityHigh, rbQualityCustom));
+    etCustomQuality.setFilters(new InputFilter[]{EditTextUtils.inputRangeFilter(1, 120)});
+  }
+
+  @Override
+  protected void onViewCreate() {
+    setDocumentInfo();
+    setSavePath(savePath);
+  }
+
+  @Override
+  public void onClick(View v) {
+    if (v.getId() == R.id.tv_swap) {
+      selectDocumentLauncher.launch(null);
+    } else if (v.getId() == R.id.btn_cancel) {
+      dismiss();
+    } else if (v.getId() == R.id.btn_compress) {
+      if (Build.VERSION.SDK_INT < CPermissionUtil.VERSION_R) {
+        multiplePermissionResultLauncher.launch(CPermissionUtil.STORAGE_PERMISSIONS, result -> {
+          if (CPermissionUtil.hasStoragePermissions(getContext())) {
+            startCompress();
+          } else {
+            if (!CPermissionUtil.shouldShowRequestPermissionRationale(requireActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
+              CPermissionUtil.showPermissionsRequiredDialog(getChildFragmentManager(), getContext());
+            }
+          }
+        });
+      }else {
+        startCompress();
+      }
+
+    } else if (v.getId() == R.id.view_save_path) {
+
+      if (Build.VERSION.SDK_INT < CPermissionUtil.VERSION_R) {
+        multiplePermissionResultLauncher.launch(CPermissionUtil.STORAGE_PERMISSIONS, result -> {
+          if (CPermissionUtil.hasStoragePermissions(getContext())) {
+            showSelectDirDialog();
+          } else {
+            if (!CPermissionUtil.shouldShowRequestPermissionRationale(requireActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
+              CPermissionUtil.showPermissionsRequiredDialog(getChildFragmentManager(), getContext());
+            }
+          }
+        });
+      }else {
+        showSelectDirDialog();
+      }
 
-    @Override
-    protected boolean fullScreen() {
-        return true;
-    }
-
-
-    @Override
-    protected int layoutId() {
-        return R.layout.tools_compress_dialog;
     }
-
-    @Override
-    protected void onCreateView(View rootView) {
-        toolBar = rootView.findViewById(R.id.tool_bar);
-        tvSwap = rootView.findViewById(R.id.tv_swap);
-        tvFileName = rootView.findViewById(R.id.tv_title);
-        tvFilePath = rootView.findViewById(R.id.tv_desc);
-        rbQualityLow = rootView.findViewById(R.id.rb_quality_low);
-        rbQualityStandard = rootView.findViewById(R.id.rb_quality_standard);
-        rbQualityHigh = rootView.findViewById(R.id.rb_quality_high);
-        rbQualityCustom = rootView.findViewById(R.id.rb_quality_custom);
-        etCustomQuality = rootView.findViewById(R.id.et_custom_quality);
-        savePathView = rootView.findViewById(R.id.view_save_path);
-        btnCancel = rootView.findViewById(R.id.btn_cancel);
-        btnCompress = rootView.findViewById(R.id.btn_compress);
-        tvSavePath = rootView.findViewById(R.id.tv_save_path);
-        tvSwap.setOnClickListener(this);
-        btnCompress.setOnClickListener(this);
-        btnCancel.setOnClickListener(this);
-        savePathView.setOnClickListener(this);
-        toolBar.setBackBtnClickListener(v -> {
-            dismiss();
+  }
+
+  private void startCompress(){
+    CThreadPoolUtils.getInstance().executeIO(() -> {
+      compressPDF((result, path) -> {
+        CThreadPoolUtils.getInstance().executeMain(() -> {
+          if (compressDocumentListener != null) {
+            compressDocumentListener.compress(result, path);
+          }
         });
-        rbQualityLow.setOnCheckedChangeListener(this);
-        rbQualityStandard.setOnCheckedChangeListener(this);
-        rbQualityHigh.setOnCheckedChangeListener(this);
-        rbQualityCustom.setOnCheckedChangeListener(this);
-        radioButtons.addAll(Arrays.asList(rbQualityLow, rbQualityStandard, rbQualityHigh, rbQualityCustom));
-        etCustomQuality.setFilters(new InputFilter[]{EditTextUtils.inputRangeFilter(1, 120)});
-    }
-
-    @Override
-    protected void onViewCreate() {
-        setDocumentInfo();
-        setSavePath(savePath);
+      });
+    });
+  }
+
+  private void showSelectDirDialog(){
+    String rootDir = Environment.getExternalStorageDirectory().getAbsolutePath();
+    CFileDirectoryDialog dialog = CFileDirectoryDialog.newInstance(rootDir,
+        getContext().getString(R.string.tools_select_folder),
+        getContext().getString(R.string.tools_save_to_this_directory));
+    dialog.setSelectFolderListener(this::setSavePath);
+    dialog.show(getChildFragmentManager(), "fileDirectoryDialog");
+  }
+  @Override
+  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+    if (isChecked) {
+      updateRadioButtonStatus(buttonView);
+      if (buttonView.getId() == R.id.rb_quality_custom) {
+        etCustomQuality.setEnabled(true);
+        etCustomQuality.setFocusableInTouchMode(true);
+        etCustomQuality.requestFocus();
+        CViewUtils.showKeyboard(etCustomQuality);
+      } else {
+        etCustomQuality.setFocusableInTouchMode(false);
+        etCustomQuality.setEnabled(false);
+        etCustomQuality.setText("");
+      }
     }
-
-    @Override
-    public void onClick(View v) {
-        if (v.getId() == R.id.tv_swap) {
-            selectDocumentLauncher.launch(null);
-        } else if (v.getId() == R.id.btn_cancel) {
-            dismiss();
-        } else if (v.getId() == R.id.btn_compress) {
-            CThreadPoolUtils.getInstance().executeIO(()->{
-                compressPDF((result, path) -> {
-                    CThreadPoolUtils.getInstance().executeMain(()->{
-                        if (compressDocumentListener != null) {
-                            compressDocumentListener.compress(result, path);
-                        }
-                    });
-                });
-            });
-        } else if (v.getId() == R.id.view_save_path) {
-            String rootDir = Environment.getExternalStorageDirectory().getAbsolutePath();
-            CFileDirectoryDialog dialog = CFileDirectoryDialog.newInstance(rootDir,
-                    getContext().getString(R.string.tools_select_folder),
-                    getContext().getString(R.string.tools_save_to_this_directory));
-            dialog.setSelectFolderListener(this::setSavePath);
-            dialog.show(getChildFragmentManager(), "fileDirectoryDialog");
-        }
+  }
+
+  private void updateRadioButtonStatus(CompoundButton checkButton) {
+    checkButton.setChecked(true);
+    for (AppCompatRadioButton radioButton : radioButtons) {
+      if (radioButton.getId() != checkButton.getId()) {
+        radioButton.setChecked(false);
+      }
     }
+  }
 
-    @Override
-    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-        if (isChecked) {
-            updateRadioButtonStatus(buttonView);
-            if (buttonView.getId() == R.id.rb_quality_custom) {
-                etCustomQuality.setEnabled(true);
-                etCustomQuality.setFocusableInTouchMode(true);
-                etCustomQuality.requestFocus();
-                CViewUtils.showKeyboard(etCustomQuality);
-            } else {
-                etCustomQuality.setFocusableInTouchMode(false);
-                etCustomQuality.setEnabled(false);
-                etCustomQuality.setText("");
-            }
-        }
+  private void setDocumentInfo() {
+    if (document == null) {
+      return;
     }
-
-    private void updateRadioButtonStatus(CompoundButton checkButton) {
-        checkButton.setChecked(true);
-        for (AppCompatRadioButton radioButton : radioButtons) {
-            if (radioButton.getId() != checkButton.getId()) {
-                radioButton.setChecked(false);
-            }
-        }
+    tvFileName.setText(document.getFileName());
+    String filePath = document.getAbsolutePath();
+    if (TextUtils.isEmpty(filePath)) {
+      if (document.getUri() != null) {
+        filePath = CUriUtil.getUriData(getContext(), document.getUri());
+      }
     }
-
-    private void setDocumentInfo() {
-        if (document == null) {
-            return;
-        }
-        tvFileName.setText(document.getFileName());
-        String filePath = document.getAbsolutePath();
-        if (TextUtils.isEmpty(filePath)) {
-            if (document.getUri() != null) {
-                filePath = CUriUtil.getUriData(getContext(), document.getUri());
+    tvFilePath.setText(filePath);
+  }
+
+  private void setSavePath(String path) {
+    this.savePath = path;
+    tvSavePath.setText(savePath);
+  }
+
+  private void compressPDF(COnCompressDocumentListener listener) {
+    String newSavePath = CFileUtils.renameNameSuffix(
+            new File(savePath + File.separator + document.getFileName()))
+        .getAbsolutePath();
+
+    if (rbQualityCustom.isChecked()) {
+      if (TextUtils.isEmpty(etCustomQuality.getText())) {
+        CToastUtil.showLongToast(getContext(), R.string.tools_please_enter_percentage);
+        listener.compress(false, null);
+        return;
+      }
+      int quality = Integer.parseInt(etCustomQuality.getText().toString());
+      loadingDialog = CPDFCompressLoadingDialog.newInstance(
+          document.getPageCount());
+      loadingDialog.show(getParentFragmentManager(), "compressLoadingDialog");
+      try {
+        CLog.e("ComPDFKit", "Compress:quality:" + quality);
+        boolean result = document.saveAsCompressOptimize(newSavePath, quality, pageIndex -> {
+            if (loadingDialog != null) {
+              loadingDialog.setCompressProgress(pageIndex);
             }
-        }
-        tvFilePath.setText(filePath);
-    }
-
-    private void setSavePath(String path) {
-        this.savePath = path;
-        tvSavePath.setText(savePath);
-    }
-
-    private void compressPDF(COnCompressDocumentListener listener) {
-            String newSavePath = CFileUtils.renameNameSuffix(new File(savePath + File.separator + document.getFileName()))
-                    .getAbsolutePath();
-
-            if (rbQualityCustom.isChecked()) {
-                if (TextUtils.isEmpty(etCustomQuality.getText())) {
-                    CToastUtil.showLongToast(getContext(), R.string.tools_please_enter_percentage);
-                    listener.compress(false, null);
-                    return;
-                }
-                int quality = Integer.parseInt(etCustomQuality.getText().toString());
-                try {
-                    boolean result = document.saveAsCompressOptimize(newSavePath, quality);
-                    listener.compress(result, newSavePath);
-                } catch (Exception e) {
-                    listener.compress(false, null);
-                }
-            } else {
-                CPDFDocument.PDFDocumentCompressLevel level;
-                if (rbQualityLow.isChecked()) {
-                    level = CPDFDocument.PDFDocumentCompressLevel.MICRO;
-                } else if (rbQualityStandard.isChecked()) {
-                    level = CPDFDocument.PDFDocumentCompressLevel.STANDARD;
-                } else if (rbQualityHigh.isChecked()) {
-                    level = CPDFDocument.PDFDocumentCompressLevel.HIGH;
-                } else {
-                    level = CPDFDocument.PDFDocumentCompressLevel.STANDARD;
-                }
-                try {
-                    boolean result = document.saveAsCompressOptimize(newSavePath, level);
-                    listener.compress(result, newSavePath);
-                } catch (Exception e) {
-                    listener.compress(false, null);
+        });
+        loadingDialog.dismiss();
+        listener.compress(result, newSavePath);
+      } catch (Exception e) {
+        loadingDialog.dismiss();
+        listener.compress(false, null);
+      }
+    } else {
+      CPDFDocument.PDFDocumentCompressLevel level;
+      if (rbQualityLow.isChecked()) {
+        level = CPDFDocument.PDFDocumentCompressLevel.MICRO;
+      } else if (rbQualityStandard.isChecked()) {
+        level = CPDFDocument.PDFDocumentCompressLevel.STANDARD;
+      } else if (rbQualityHigh.isChecked()) {
+        level = CPDFDocument.PDFDocumentCompressLevel.HIGH;
+      } else {
+        level = CPDFDocument.PDFDocumentCompressLevel.STANDARD;
+      }
+      CLog.e("ComPDFKit", "Compress:level:" + level.name());
+      loadingDialog = CPDFCompressLoadingDialog.newInstance(
+          document.getPageCount());
+      loadingDialog.show(getParentFragmentManager(), "compressLoadingDialog");
+      try {
+
+        boolean result = document.saveAsCompressOptimize(newSavePath, level,
+            pageIndex -> {
+                if (loadingDialog != null) {
+                  loadingDialog.setCompressProgress(pageIndex);
                 }
-            }
+            });
+        loadingDialog.dismiss();
+        listener.compress(result, newSavePath);
+      } catch (Exception e) {
+        loadingDialog.dismiss();
+        listener.compress(false, null);
+      }
     }
-
-
-    private void verifyDocument(Uri uri, CVerifyPasswordDialogFragment.CVerifyCompleteListener listener) {
-        CPDFDocument document = new CPDFDocument(getContext());
-        CPDFDocument.PDFDocumentError error = document.open(uri);
-        if (error == CPDFDocument.PDFDocumentError.PDFDocumentErrorSuccess) {
-            if (listener != null) {
-                listener.complete(document);
-            }
-        } else if (error == CPDFDocument.PDFDocumentError.PDFDocumentErrorPassword) {
-            showVerifyPasswordDialog(document, uri, listener);
-        }
+  }
+
+
+  private void verifyDocument(Uri uri,
+      CVerifyPasswordDialogFragment.CVerifyCompleteListener listener) {
+    CPDFDocument document = new CPDFDocument(getContext());
+    CPDFDocument.PDFDocumentError error = document.open(uri);
+    if (error == CPDFDocument.PDFDocumentError.PDFDocumentErrorSuccess) {
+      if (listener != null) {
+        listener.complete(document);
+      }
+    } else if (error == CPDFDocument.PDFDocumentError.PDFDocumentErrorPassword) {
+      showVerifyPasswordDialog(document, uri, listener);
     }
-
-    private void showVerifyPasswordDialog(CPDFDocument document, Uri uri, CVerifyPasswordDialogFragment.CVerifyCompleteListener documentListener) {
-        CVerifyPasswordDialogFragment verifyPasswordDialogFragment;
-        verifyPasswordDialogFragment = CVerifyPasswordDialogFragment.newInstance(document, "", uri);
-        verifyPasswordDialogFragment.setVerifyCompleteListener(document1 -> {
-            if (documentListener != null) {
-                documentListener.complete(document1);
-            }
-        });
-        verifyPasswordDialogFragment.show(getChildFragmentManager(), "verifyPasswordDialog");
+  }
+
+  private void showVerifyPasswordDialog(CPDFDocument document, Uri uri,
+      CVerifyPasswordDialogFragment.CVerifyCompleteListener documentListener) {
+    CVerifyPasswordDialogFragment verifyPasswordDialogFragment;
+    verifyPasswordDialogFragment = CVerifyPasswordDialogFragment.newInstance(document, "", uri);
+    verifyPasswordDialogFragment.setVerifyCompleteListener(document1 -> {
+      if (documentListener != null) {
+        documentListener.complete(document1);
+      }
+    });
+    verifyPasswordDialogFragment.show(getChildFragmentManager(), "verifyPasswordDialog");
+  }
+
+  @Override
+  public void onDestroy() {
+    loadingDialog = null;
+    if (document != null) {
+      document.close();
+      document = null;
     }
+    compressDocumentListener = null;
+    super.onDestroy();
+  }
 
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-        if (document != null) {
-            document.close();
-        }
-    }
+  public interface COnCompressDocumentListener {
 
-    public interface COnCompressDocumentListener {
-        void compress(boolean result, String path);
-    }
+    void compress(boolean result, String path);
+  }
 
-    public void setCompressDocumentListener(COnCompressDocumentListener compressDocumentListener) {
-        this.compressDocumentListener = compressDocumentListener;
-    }
+  public void setCompressDocumentListener(COnCompressDocumentListener compressDocumentListener) {
+    this.compressDocumentListener = compressDocumentListener;
+  }
 }

+ 81 - 0
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/compress/CPDFCompressLoadingDialog.java

@@ -0,0 +1,81 @@
+/**
+ * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ *
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+ * This notice may not be removed from this file.
+ */
+
+package com.compdfkit.tools.compress;
+
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.appcompat.widget.AppCompatTextView;
+import androidx.fragment.app.DialogFragment;
+import com.compdfkit.core.document.CPDFDocument.CompressListener;
+import com.compdfkit.tools.R;
+
+
+public class CPDFCompressLoadingDialog extends DialogFragment {
+
+  private AppCompatTextView tvProgress;
+
+  private int currentPageIndex;
+
+  private int totalPage;
+
+  public static CPDFCompressLoadingDialog newInstance(int totalPage) {
+
+    Bundle args = new Bundle();
+    args.putInt("extra_total_page", totalPage);
+    CPDFCompressLoadingDialog fragment = new CPDFCompressLoadingDialog();
+    fragment.setArguments(args);
+    return fragment;
+  }
+
+
+  @Override
+  public void onStart() {
+    super.onStart();
+    if (getDialog() != null) {
+      getDialog().setCanceledOnTouchOutside(false);
+    }
+  }
+
+  @Nullable
+  @Override
+  public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
+      @Nullable Bundle savedInstanceState) {
+    if (getDialog() != null){
+      getDialog().getWindow().setBackgroundDrawableResource(R.drawable.tools_dialog_background);
+    }
+    View rootView = LayoutInflater.from(getContext()).inflate(R.layout.tools_compress_loading_dialog, container, false);
+    tvProgress = rootView.findViewById(R.id.tv_progress);
+    return rootView;
+  }
+
+  @Override
+  public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
+    super.onViewCreated(view, savedInstanceState);
+    totalPage = getArguments().getInt("extra_total_page", 0);
+    tvProgress.setText((currentPageIndex + 1) + "/" + totalPage);
+  }
+
+  public void setCompressProgress(int currentPageIndex) {
+    if (tvProgress != null) {
+      this.currentPageIndex = currentPageIndex + 1;
+      tvProgress.post(()->{
+        tvProgress.setText(this.currentPageIndex + "/" + totalPage);
+      });
+    }
+  }
+
+
+}

+ 1 - 1
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/contenteditor/CEditToolbar.java

@@ -222,7 +222,7 @@ public class CEditToolbar extends RelativeLayout implements View.OnClickListener
             }
         });
         if (beginedit) {
-            editManager.beginEdit(CPDFEditPage.LoadTextImage);
+            editManager.beginEdit(CPDFEditPage.LoadTextImage | CPDFEditPage.LoadPath);
         }
     }
 

+ 6 - 0
ComPDFKit_Tools/src/main/res/drawable/tools_compress_loading_dialog_bg.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+  <solid android:color="#B3222429"/>
+  <corners android:radius="10dp"/>
+</shape>

+ 1 - 0
ComPDFKit_Tools/src/main/res/layout/tools_compress_dialog.xml

@@ -196,6 +196,7 @@
                         android:layout_height="wrap_content"
                         android:text="%"
                         android:textStyle="bold"
+                       android:textColor="@color/tools_radio_btn_text_status_color"
                         app:layout_constraintBaseline_toBaselineOf="@id/et_custom_quality"
                         app:layout_constraintStart_toEndOf="@id/et_custom_quality" />
 

+ 51 - 0
ComPDFKit_Tools/src/main/res/layout/tools_compress_loading_dialog.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+  xmlns:app="http://schemas.android.com/apk/res-auto"
+  xmlns:tools="http://schemas.android.com/tools"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent"
+  android:gravity="center_horizontal"
+  >
+
+  <LinearLayout
+    android:layout_width="175dp"
+    android:layout_height="172dp"
+    android:layout_gravity="center"
+    android:gravity="center_horizontal"
+    android:orientation="vertical">
+
+    <androidx.core.widget.ContentLoadingProgressBar
+      android:id="@+id/progress_bar"
+      style="?android:attr/progressBarStyleLarge"
+      android:layout_width="64dp"
+      android:layout_height="64dp"
+      android:layout_marginTop="24dp"
+      android:progressTint="?android:attr/colorAccent"
+      app:layout_constraintEnd_toEndOf="parent"
+      app:layout_constraintStart_toStartOf="parent"
+      app:layout_constraintTop_toTopOf="parent" />
+
+
+    <androidx.appcompat.widget.AppCompatTextView
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_marginTop="16dp"
+      android:text="@string/compressing_"
+      android:textColor="@android:color/white"
+      android:textSize="14sp"
+      app:layout_constraintEnd_toEndOf="parent"
+      app:layout_constraintStart_toStartOf="parent"
+      app:layout_constraintTop_toBottomOf="@id/progress_bar" />
+
+    <androidx.appcompat.widget.AppCompatTextView
+      android:id="@+id/tv_progress"
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_marginTop="8dp"
+      android:textColor="@android:color/white"
+      tools:text="2/35" />
+
+
+  </LinearLayout>
+
+</FrameLayout>

+ 2 - 0
ComPDFKit_Tools/src/main/res/values-zh-rCN/tools_strings.xml

@@ -530,4 +530,6 @@
     <string name="tools_please_enter_percentage">请输入百分比</string>
     <string name="tools_save_path">文件存储路径</string>
     <string name="tools_compressed_successfully">压缩成功</string>
+    <string name="compressing_">正在压缩&#8230;</string>
+
 </resources>

+ 1 - 2
ComPDFKit_Tools/src/main/res/values/tools_strings.xml

@@ -541,8 +541,7 @@
     <string name="tools_please_enter_percentage">Please enter percentage</string>
     <string name="tools_save_path">Saving Path</string>
     <string name="tools_compressed_successfully">Compressed successfully!</string>
-
-
+    <string name="compressing_">Compressing&#8230;</string>
 
 
 </resources>

+ 1 - 1
compdfkit-tools-mavencentral.gradle

@@ -1,7 +1,7 @@
 apply plugin: 'maven-publish'
 apply plugin: 'signing'
 
-def PUBLISH_VERSION = '2.1.3'
+def PUBLISH_VERSION = '2.2.0-SNAPSHOT'
 def PUBLISH_GROUP_ID = 'com.compdf'
 def PUBLISH_ARTIFACT_ID = 'compdfkit-tools'
 

+ 1 - 1
settings.gradle

@@ -12,7 +12,7 @@ dependencyResolutionManagement {
         google()
         mavenCentral()
         maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
-
+        mavenLocal()
     }
 }
 rootProject.name = "compdfkit_android_demo"