浏览我们的产品

If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.


Docs Swagger Examples Blog Support Release Notes Dashboard

安装

该软件包在 pypi.org 上 可用,可以通过执行以下命令通过 pip 安装:

pip install groupdocs-annotation-cloud

PyPI - Version PyPI - Downloads Python-GroupDocsCloud


云文档标注Python SDK

GroupDocs.Annotation Cloud API 提供了全面的 Python SDK,用于无缝文档注释。在 Python 应用程序中轻松集成功能,例如向各种文档格式(包括 PDF、Word、Excel 和 PowerPoint)添加注释、突出显示、水印和修订。


文档注释

文本注释 - 在文本中添加评论或解释。
区域注释 - 突出显示文档的特定区域以获取详细注释。
点注释 - 标记文档中的特定兴趣点。
箭头注释 - 使用箭头标记将观看者的注意力引导到特定元素。
删除线/下划线注释 - 通过删除线或下划线突出显示文本,以便于参考。

标记功能

突出显示 - 用突出显示标记文本的重要部分。
编辑 - 完全隐藏或审查文档中的敏感内容。
水印 - 通过添加水印来指示所有权来保护文档。

注释管理

编辑注释 - 修改或更新文档中的现有注释。
删除注释 - 删除不必要或过时的注释。
导出注释 - 提取注释以​​单独存储或与其他人共享。

协作功能

评论 - 通过基于线程的评论功能启用多用户协作。
版本控制 - 使用版本控制工具跟踪对注释所做的更改。
实时更新 - 当多个用户编辑同一文档时实施更新。

安全特性

访问控制 - 通过基于用户的访问控制来保护文档注释。
基于角色的权限 - 为用户分配不同的权限级别以保护敏感注释。
加密 - 确保数据在文档传输和存储过程中加密。

高级功能

组合注释 - 将多个注释合并到一个文档中。
分层注释 - 操作分层注释以进行灵活的编辑和标记。
自定义注释样式 - 设置注释的自定义颜色、不透明度和大小。
API 集成 - 使用 REST API 与其他系统集成。
可扩展基础设施 - 通过可扩展架构支持高负载环境。

支持的注释类型和功能

区域注释

  • 用矩形标记文档页面内的区域。
    • 允许用户突出显示文档上的特定区域。
    • 盒子尺寸可以定制以适合感兴趣的区域。
    • 支持回复注释以进行协作审阅。
    • 区域注释可以包括附加注释。

距离注释

  • 测量文档中对象之间的距离。
    • 实现文档内容的精确测量。
    • 可以定义坐标和尺寸以进行精确测量。
    • 对于距离测量至关重要的建筑和工程文档很有用。

椭圆注释

  • 在文档页面上绘制椭圆注释。
    • 使用户能够突出显示圆形或椭圆形区域。
    • 可定制的半径、颜色和不透明度,以实现清晰的可见性。
    • 支持对标记区域添加评论进行多条回复。

图像注释

  • 将图像添加到文档的特定区域。
    • 在文档页面中插入图像以供视觉参考。
    • 支持图像的定位和调整大小。
    • 用于添加徽标、印记或视觉标记。

链接注释

  • 添加文档的超链接。
    • 将文档的特定文本或区域链接到外部 URL。
    • 提供对网络导航或引用其他资源的支持。
    • 可以使用不同的颜色来区分文本。

多重注释

  • 允许同时添加多种类型的注释。
    • 支持一次添加注释组合(例如文本、图像、形状)。
    • 对于审阅同一页面上需要不同注释类型的文档非常有用。
    • 多个注释可以分组或单独处理。

点注释

  • 将注释粘贴到文档中的特定点。
    • 注释与文档中的特定点或位置相关联。
    • 非常适合需要精确反馈的协作文档审阅。
    • 支持颜色和尺寸调整以获得更好的可见性。

折线注释

  • 在文档中绘制连接线以形成多段线。
    • 用于绘制复杂的形状或在文档中标记特定路径。
    • 支持通过直线连接多个点。
    • 允许自定义线条粗细、颜色和不透明度。

资源编辑注释

  • 在固定位置填充黑色矩形以隐藏敏感信息。
    • 有效地编辑文档中的机密信息。
    • 黑匣子可以调整大小并放置在任何敏感数据上。
    • 通常用于法律文件、财务报表或个人识别码 (PIN)。

波浪形注释

  • 添加波浪下划线来标​​记文本。
    • 用波浪形下划线突出显示文本以引起注意。
    • 非常适合标记拼写或语法错误。
    • 可以调整颜色和线条样式以区别于其他注释。

支持的注释格式

File FormatDescriptionAnnotate
DOC, DOCXWord® Document✔️
OTTOpen Document Standard Format✔️
ODTOpen Document Text File Format✔️
DOCMMicrosoft Word® Open XML Macro-Enabled Document✔️
DOTWord® Document Template File✔️
DOTXWord® Open XML Document Template✔️
DOTMWord® Open XML Macro-Enabled Template File✔️
RTFRich Text File Format✔️
TXTPlain Text File Format✔️
PDFPortable Document Format✔️
PPT, PPTXPresentation Document Format✔️
PPSXPowerPoint Open XML Slide Show✔️
ODPOpenDocument Presentation File Format✔️
OTPOpenDocument Presentation Template✔️
XLS, XLSXCells Document Format✔️
XLSBMicrosoft Excel® Binary Spreadsheet File✔️
XLSXMicrosoft Excel® Open XML Spreadsheet✔️
DICOMDigital Imaging and Communication in Medicine✔️
DJVUDjVu Format✔️
EMF/WMFEnhanced MetaFile / Windows MetaFile✔️
CADComputer-Aided Design✔️
EML/EMLXEmail Markup Language✔️
HTMLHypertext Markup Language✔️
MHTMLMIME HTML File✔️
JPEGJoint Photographic Experts Group✔️
TIFFTagged Image File Format✔️
BMPBitmap✔️
GIF (static images without animation)Graphics Interchange Format✔️
VSDMicrosoft Visio® Drawing✔️
VDXMicrosoft Visio® XML File Format✔️
VSSMicrosoft Visio® Stencil File Format✔️
VSDMMicrosoft Visio® Macro-Enabled Drawing File✔️
MSGEmail Message✔️

开始使用 GroupDocs.Annotation Cloud Python SDK

### 要求

Python 2.7 或 3.4+

### 安装

通过以下方式从 PyPI 安装 groupdocs-annotation-cloudPIP

pip install groupdocs-annotation-cloud

或者克隆存储库并通过Setuptools安装它:

python setup.py install

请按照安装过程进行操作,然后运行以下命令:

# Import module
import groupdocs_annotation_cloud

# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required).
app_sid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
app_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

# Create instance of the API
api = groupdocs_annotation_cloud.InfoApi.from_keys(app_sid, app_key)

try:
    # Retrieve supported file-formats
    response = api.get_supported_file_formats()

    # Print out supported file-formats
    print("Supported file-formats:")
    for format in response.formats:
        print('{0} ({1})'.format(format.file_format, format.extension))
except groupdocs_annotation_cloud.ApiException as e:
    print("Exception when calling get_supported_file_formats: {0}".format(e.message))

GroupDocs.Annotation Cloud API 数据模型

FilesUploadResultErrorErrorDetailsFilesListStorageFileStorageExistObjectExistDiscUsageFileVersionsFileVersionAnnotationInfoRectanglePointAnnotationReplyInfoFileInfoAnnotationApiLinkLinkRemoveOptionsAnnotateOptionsFormatsResultFormatDocumentInfoPageInfoConsumptionResultPageImagesPageImageLinkElementPreviewOptions

Python 代码示例 1:添加文本注释

此代码示例演示如何使用GroupDocs.Annotation Cloud SDK for Python向文档添加文本注释。文本注释可在位置、字体和颜色方面进行自定义。

# For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-python-samples
import groupdocs_annotation_cloud
 
app_sid = "XXXX-XXXX-XXXX-XXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
app_key = "XXXXXXXXXXXXXXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
  
api = groupdocs_annotation_cloud.AnnotateApi.from_keys(app_sid, app_key)
 
a1 = groupdocs_annotation_cloud.AnnotationInfo()
a1.annotation_position = groupdocs_annotation_cloud.Point()
a1.annotation_position.x = 1
a1.annotation_position.y = 1
a1.box = groupdocs_annotation_cloud.Rectangle()
a1.box.x = 100
a1.box.y = 100
a1.box.width = 200
a1.box.height = 100
a1.page_number = 0
a1.font_color = 1201033
a1.font_size = 12
a1.opacity = 0.7
a1.type = "TextField"           
a1.text = "Text field text"
a1.creator_name = "Anonym A."
 
file_info = FileInfo()
file_info.file_path = "annotationdocs\\one-page.docx"
options = AnnotateOptions()
options.file_info = file_info
options.annotations = [a1]
options.output_path = "Output\\output.docx"
 
request = AnnotateRequest(options)
result = api.annotate(request)         
 
print("AddTextFieldAnnotation: Text Field Annotation added: " + result['href'])

Python 代码示例 2:添加区域注释

此代码示例演示如何添加区域注释(突出显示文档的一部分)。

# For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-python-samples
import groupdocs_annotation_cloud
 
app_sid = "XXXX-XXXX-XXXX-XXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
app_key = "XXXXXXXXXXXXXXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
  
api = groupdocs_annotation_cloud.AnnotateApi.from_keys(app_sid, app_key)
 
a1 = groupdocs_annotation_cloud.AnnotationInfo()
a1.annotation_position = groupdocs_annotation_cloud.Point()
a1.annotation_position.x = 1
a1.annotation_position.y = 1
a1.box = groupdocs_annotation_cloud.Rectangle()
a1.box.x = 100
a1.box.y = 100
a1.box.width = 200
a1.box.height = 100
a1.page_number = 0
a1.pen_color = 1201033
a1.pen_style = "Solid"
a1.pen_width = 1
a1.opacity = 0.7
a1.type = "Area"
a1.text = "This is area annotation"
a1.creator_name = "Anonym A."
 
file_info = FileInfo()
file_info.file_path = "annotationdocs\\one-page.docx"
options = AnnotateOptions()
options.file_info = file_info
options.annotations = [a1]
options.output_path = "Output\\output.docx"
 
request = AnnotateRequest(options)
result = api.annotate(request)         
 
print("AddAreaAnnotation: Area Annotation added: " + result['href'])

Python 代码示例 3:删除注释

此代码示例演示如何从文档中删除注释。

# For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-python-samples
import groupdocs_annotation_cloud
 
app_sid = "XXXX-XXXX-XXXX-XXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
app_key = "XXXXXXXXXXXXXXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
  
api = groupdocs_annotation_cloud.AnnotateApi.from_keys(app_sid, app_key)
 
file_info = FileInfo()
file_info.file_path = "annotationdocs\\input.docx"
options = RemoveOptions()
options.file_info = file_info
options.annotation_ids = [1, 2, 3]
options.output_path = "Output\\output.docx"
 
request = RemoveAnnotationsRequest(options)
result = api.remove_annotations(request)
 
print("RemoveAnnotations: Annotations removed: " + result['href'])

Docs Swagger Examples Blog Support Release Notes Dashboard



 简体中文