liuxiaolong 5882add722 PDFTool(Android) - 压缩功能新增翻译、云朵边框时不可调节线条间隔 2 dní pred
..
screenshots f9f372bcdf PDFTool(Android) - tool模块补充README文档说明 2 mesiacov pred
src 5882add722 PDFTool(Android) - 压缩功能新增翻译、云朵边框时不可调节线条间隔 21 hodín pred
.gitignore 2f0eeaea11 PDFTools(Android) - 1.修改包名、工程名称、应用名称 1 rok pred
README.md 451aa918e9 PDFTool(Android) - v2.1.3 release 1 mesiac pred
build.gradle b826700eb7 PDFTool(Android) - 修复打开文件被重新加密bug,导入注释恢复markup内容 21 hodín pred
consumer-rules.pro 2f0eeaea11 PDFTools(Android) - 1.修改包名、工程名称、应用名称 1 rok pred
proguard-rules.pro efe3216a0a PDFTool(Android) - 优化混淆,不混淆方法参数名,删除无效文件、引用 2 mesiacov pred

README.md

ComPDFKit SDK Tools

Overview

The ComPDFKit_Tools module is an integrated part of the ComPDFKit SDK, offering a complete set of common PDF functionalities for quick PDF viewing and editing. If the interface provided by the ComPDFKit_Tools module does not meet your product requirements, you can also integrate the ComPDFKit SDK yourself to achieve the desired UI. Please note that the functionalities presented by this module do not represent all the capabilities of the ComPDFKit SDK. If you cannot find the feature you need, please contact our sales team.

Add the ComPDFKit PDF SDK Package

In addition to the ComPDFKit_Tools module source code, we also provide a Gradle-based integration option. To ensure compatibility, please make sure the tools module version matches the ComPDFKit SDK version.

dependencies {
  implementation 'com.compdf:compdfkit:2.1.3'
  implementation 'com.compdf:compdfkit-ui:2.1.3'
+  implementation 'com.compdf:compdfkit-tools:2.1.3'
}

Usage

The ComPDFKit_Tools module provides two main components: CPDFDocumentActivity and CPDFDocumentFragment.java. These components enable you to easily implement PDF functionalities.

  • CPDFDocumentActivity.java

Use CPDFDocumentActivity to display a PDF document:

CPDFConfiguration configuration = CPDFConfigurationUtils.normalConfig(fragment.getContext(), "tools_default_configuration.json");

// Example 1:
CPDFDocumentActivity.startActivity(context, uri, password, configuration);

// Example 2:
CPDFDocumentActivity.startActivity(context, filePath, password, configuration);
  • CPDFDocumentFragment.java

Use CPDFDocumentFragment to load a PDF document into a Fragment:

CPDFConfiguration configuration = CPDFConfigurationUtils.normalConfig(fragment.getContext(), "tools_default_configuration.json");

// Example 1:
CPDFDocumentFragment documentFragment = CPDFDocumentFragment.newInstance(
  filePath,
  password,
  configuration);

// Example 2:
CPDFDocumentFragment documentFragment = CPDFDocumentFragment.newInstance(
  uri,
  password,
  configuration);