浏览我们的产品 Toggle navigation
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.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.
安装该软件包在 pypi.org 上 可用,可以通过执行以下命令通过 pip 安装:pip install groupdocs-annotation-cloud
该软件包在 pypi.org 上 可用,可以通过执行以下命令通过 pip 安装:
pip
pip install groupdocs-annotation-cloud
### 要求
Python 2.7 或 3.4+
### 安装
通过以下方式从 PyPI 安装 groupdocs-annotation-cloud 和 PIP:
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))
FilesUploadResult、Error、ErrorDetails、FilesList、StorageFile、StorageExist、ObjectExist、DiscUsage、FileVersions、FileVersion、AnnotationInfo、 Rectangle、Point、AnnotationReplyInfo、FileInfo、AnnotationApiLink、Link、RemoveOptions、AnnotateOptions、FormatsResult、Format、 DocumentInfo、PageInfo、ConsumptionResult、PageImages、PageImage、LinkElement、PreviewOptions
FilesUploadResult
Error
ErrorDetails
FilesList
StorageFile
StorageExist
ObjectExist
DiscUsage
FileVersions
FileVersion
AnnotationInfo
Rectangle
Point
AnnotationReplyInfo
FileInfo
AnnotationApiLink
Link
RemoveOptions
AnnotateOptions
FormatsResult
Format
DocumentInfo
PageInfo
ConsumptionResult
PageImages
PageImage
LinkElement
PreviewOptions
此代码示例演示如何使用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'])
此代码示例演示如何添加区域注释(突出显示文档的一部分)。
# 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'])
此代码示例演示如何从文档中删除注释。
# 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'])