Περιηγηθείτε στα Προϊόντα μας

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

Εγκατάσταση

Το πακέτο είναι available στο pypi.org και μπορεί να εγκατασταθεί μέσω pip εκτελώντας την παρακάτω εντολή:

pip install groupdocs-annotation-cloud

PyPI - Version PyPI - Downloads Python-GroupDocsCloud


Ξεκινώντας GroupDocs.Annotation Cloud Python SDK

Απαιτήσεις

Python 2.7 ή 3.4+

Εγκατάσταση

Εγκαθιστώ groupdocs-annotation-cloud με PIP από PyPI by:

pip install groupdocs-annotation-cloud

Ή κλώνος repository και εγκαταστήστε το μέσω 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 Μοντέλα δεδομένων API Cloud

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

Δείγμα κώδικα Python 1: Προσθήκη σχολιασμού κειμένου

Αυτό το δείγμα κώδικα δείχνει πώς μπορείτε να προσθέσετε έναν σχολιασμό κειμένου σε ένα έγγραφο χρησιμοποιώντας το GroupDocs.Annotation Cloud SDK για 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


 Ελληνικά