Skip to content

Commit

Permalink
Updated sources
Browse files Browse the repository at this point in the history
  • Loading branch information
product-team committed May 5, 2021
1 parent 6eddab8 commit 7d995ff
Show file tree
Hide file tree
Showing 114 changed files with 3,011 additions and 283 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2003-2020 Aspose Pty Ltd
Copyright (c) 2003-2018 Aspose Pty Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
113 changes: 44 additions & 69 deletions README.md
@@ -1,58 +1,21 @@
![](https://img.shields.io/badge/api-v2.0-lightgrey) ![Packagist Version](https://img.shields.io/packagist/v/groupdocscloud/groupdocs-signature-cloud) ![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/groupdocscloud/groupdocs-signature-cloud) [![GitHub license](https://img.shields.io/github/license/groupdocs-signature-cloud/groupdocs-signature-cloud-php)](https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-php/blob/master/LICENSE)
# GroupDocs.Signature Cloud SDK for PHP
This repository contains GroupDocs.Signature Cloud SDK for PHP source code. This SDK allows you to work with GroupDocs.Signature Cloud REST APIs in your PHP applications.

# PHP SDK to Document Signature REST API
## Dependencies
- PHP 5.5 or later

[GroupDocs.Signature Cloud SDK for PHP](https://products.groupdocs.cloud/signature/php) wraps GroupDocs.Signature RESTful API so you may integrate Document Signing features in your own apps with zero initial cost.

GroupDocs.Signature Cloud API allows the developers to create, remove, verify and search different types of signature objects in a number of different formats including Word documents, Excel spreadsheets, PowerPoint presentations, PDF, OpenDocument formats & images.

## Manage Digital Signatures in the Cloud

- [Support for 55+ document & image formats](https://docs.groupdocs.cloud/signature/supported-document-formats/).
- Add stamp, text, barcode, QR-code, image and digital signatures.
- Search & verify signatures.
- Update & delete signatures by ID.
- Extract document properties like size, creation & update dates, page count and so on.
- Get a list of supported document formats.
- Get a list of supported barcode & QR-Code encode types.

Check out the [Developer's Guide](https://docs.groupdocs.cloud/signature/developer-guide/) to know more about GroupDocs.Signature REST API.

## Supported Signature Types

- **Text Signature**
- **Image Signature**
- **Barcode Signature**
- **QR-Code Signature**
- **Digital Signature**
- **Stamp Signature**

## Microsoft Office Formats

**Microsoft Word:** DOC, DOCM, DOCX, DOT, DOTM, DOTX\
**Microsoft Excel:** XLS, XLSB, XLSM, XLSX\
**Microsoft PowerPoint:** POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX

## Other Document Formats

**Portable:** PDF\
**OpenDocument:** ODT, OTT, ODP, OTP\
**Images:** BMP, PNG, JPG, JPEG, TIFF, GIF, CDR, CGM, CMX, DCM, DJVU, DNG, EMF, WMF, EPS, ICO, JP2, ODG, PCL, PS, PSD, SVG, WEBP\
**Others:** TXT, RTF, CSV, TSV

## Get Started with GroupDocs.Signature Cloud SDK for PHP

First create an account at [GroupDocs for Cloud](https://dashboard.groupdocs.cloud/) and get your application information. Next, follow the installation steps as given below.
## Authorization
To use SDK you need AppSID and AppKey authorization keys. You can your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).

## Installation & Usage
### Composer

The package is available at [Packagist](https://packagist.org/packages/groupdocscloud/groupdocs-signature-cloud) and it can be installed via [Composer](http://getcomposer.org/) by executing the following command.

The package is available at [Packagist](https://packagist.org/) and it can be installed via [Composer](http://getcomposer.org/) by executing following command:
```
composer require groupdocscloud/signature-sdk-php
```
```

You can also install the SDK via Composer directly from this repository. Please add the following to `composer.json` to get the package from GitHub, then run `composer install`.
Or you can install SDK via [Composer](http://getcomposer.org/) directly from this repository, add the following to `composer.json`:

```
{
Expand All @@ -68,6 +31,8 @@ You can also install the SDK via Composer directly from this repository. Please
}
```

Then run `composer install`

### Manual Installation

Clone or download this repository, then run `composer install` in the root directory to install dependencies and include `autoload.php` into your code file:
Expand All @@ -78,44 +43,54 @@ require_once('/path/to/groupdocs-signature-cloud-php/vendor/autoload.php');

## Tests

Set your AppSID and AppKey in [json.config](tests/GroupDocs/Signature/config.json) and execute following commands to run the unit tests.
To run the unit tests set your AppSID and AppKey in [json.config](tests/GroupDocs/Signature/config.json) and execute following commands:

```
composer install
./vendor/bin/phpunit
```

## Get Supported Document Formats
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:

```php
use GroupDocs\Signature\Model;
use GroupDocs\Signature\Model\Requests;
<?php

//Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
$myClientId = "";
$myClientSecret = "";
require_once(__DIR__ . '/vendor/autoload.php');

// Create instance of the API
//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
$configuration = new GroupDocs\Signature\Configuration();
$configuration->setAppSid($myClientId);
$configuration->setAppKey($myClientSecret);
$signatureApi = new GroupDocs\Signature\CompareApi($configuration);
$configuration->setAppSid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
$configuration->setAppKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

$signatureApi = new GroupDocs\Signature\SignatureApi($configuration);
$signatureApi = new GroupDocs\Signature\SignatureApi($configuration);

$request = new GroupDocs\Signature\Model\Requests\GetSupportedFileFormatsRequest();
$response = $signatureApi->getSupportedFileFormats($request);
try {
$request = new GroupDocs\Signature\Model\Requests\GetSupportedFileFormatsRequest();
$response = $signatureApi->getSupportedFileFormats($request);

foreach ($response->getFormats() as $key => $format) {
echo $format->getFileFormat() . " - " . $format->getExtension(), "\n";
foreach ($response->getFormats() as $key => $format) {
echo $format->getFileFormat() . " - " . $format->getExtension(), "\n";
}
} catch (Exception $e) {
echo "Something went wrong: ", $e->getMessage(), "\n";
PHP_EOL;
}

?>
```

## GroupDocs.Signature Cloud SDKs in Popular Languages
## Licensing
GroupDocs.Signature for Cloud SDK for PHP is licensed under [MIT License](LICENSE).

## Resources
+ [**Website**](https://www.groupdocs.cloud)
+ [**Product Home**](https://products.groupdocs.cloud/signature)
+ [**Documentation**](https://wiki.groupdocs.cloud/display/signaturecloud/Home)
+ [**Free Support Forum**](https://forum.groupdocs.cloud/c/signature)
+ [**Blog**](https://blog.groupdocs.cloud/category/signature)


| .NET | Java | PHP | Python | Ruby | Node.js |
|---|---|---|---|---|---|
| [GitHub](https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-dotnet) | [GitHub](https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-java) | [GitHub](https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-php) | [GitHub](https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-python) | [GitHub](https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-ruby) | [GitHub](https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-node) |
| [NuGet](https://www.nuget.org/packages/GroupDocs.Signature-Cloud/) | [Maven](https://repository.groupdocs.cloud/webapp/#/artifacts/browse/tree/General/repo/com/groupdocs/groupdocs-signature-cloud) | [Composer](https://packagist.org/packages/groupdocscloud/groupdocs-signature-cloud) | [PIP](https://pypi.org/project/groupdocs-signature-cloud/) | [GEM](https://rubygems.org/gems/groupdocs_signature_cloud) | [NPM](https://www.npmjs.com/package/groupdocs-signature-cloud) |

[Home](https://www.groupdocs.cloud/) | [Product Page](https://products.groupdocs.cloud/signature/php) | [Documentation](https://docs.groupdocs.cloud/signature/) | [Live Demo](https://products.groupdocs.app/signature/total) | [API Reference](https://apireference.groupdocs.cloud/signature/) | [Code Samples](https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-php-samples) | [Blog](https://blog.groupdocs.cloud/category/signature/) | [Free Support](https://forum.groupdocs.cloud/c/signature) | [Free Trial](https://dashboard.groupdocs.cloud)
## Contact Us
Your feedback is very important to us. Please feel free to contact us using our [Support Forums](https://forum.groupdocs.cloud/c/signature).
2 changes: 1 addition & 1 deletion composer.json
@@ -1,7 +1,7 @@
{
"description": "This repository contains GroupDocs.Signature for Cloud SDK for PHP source code.",
"name": "groupdocscloud/groupdocs-signature-cloud",
"version": "20.7",
"version": "21.5",
"license": "MIT",
"type": "library",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/GroupDocs/Signature/ApiException.php
Expand Up @@ -2,7 +2,7 @@
/**
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose Pty Ltd" file="ApiException.php">
* Copyright (c) 2003-2020 Aspose Pty Ltd
* Copyright (c) 2003-2021 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
8 changes: 4 additions & 4 deletions src/GroupDocs/Signature/Configuration.php
Expand Up @@ -2,7 +2,7 @@
/*
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose Pty Ltd" file="Configuration.php">
* Copyright (c) 2003-2020 Aspose Pty Ltd
* Copyright (c) 2003-2021 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -95,7 +95,7 @@ class Configuration
* Version of client SDK
*
*/
protected $clientVersion = '20.7';
protected $clientVersion = '21.5';

/*
* Constructor
Expand Down Expand Up @@ -290,7 +290,7 @@ public function getClientName()
}

/*
* Gets client version, default value is '20.7'
* Gets client version, default value is '21.5'
*
*/
public function getClientVersion()
Expand All @@ -308,7 +308,7 @@ public static function toDebugReport()
$report = 'PHP SDK (GroupDocs\Signature) Debug Report:' . PHP_EOL;
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' SDK Package Version: 20.7' . PHP_EOL;
$report .= ' SDK Package Version: 21.5' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
42 changes: 21 additions & 21 deletions src/GroupDocs/Signature/FileApi.php
Expand Up @@ -2,7 +2,7 @@
/*
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose Pty Ltd" file="FileApi.php">
* Copyright (c) 2003-2020 Aspose Pty Ltd
* Copyright (c) 2003-2021 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -129,9 +129,9 @@ public function copyFileWithHttpInfo(Requests\copyFileRequest $request)
$error = json_decode($content);

$errorCode = $e->getCode();
$errorMessage = $error->Error != null && $error->Error->Message != null
? $error->Error->Message
: $e->getMessage();
$errorMessage = $error != null && $error->message != null
? $error->message
: ($error != null && $error->error != null && $error->error->message != null ? $error->error->message : $e->getMessage());

throw new ApiException($errorMessage, $errorCode);
}
Expand Down Expand Up @@ -400,9 +400,9 @@ public function deleteFileWithHttpInfo(Requests\deleteFileRequest $request)
$error = json_decode($content);

$errorCode = $e->getCode();
$errorMessage = $error->Error != null && $error->Error->Message != null
? $error->Error->Message
: $e->getMessage();
$errorMessage = $error != null && $error->message != null
? $error->message
: ($error != null && $error->error != null && $error->error->message != null ? $error->error->message : $e->getMessage());

throw new ApiException($errorMessage, $errorCode);
}
Expand Down Expand Up @@ -648,9 +648,9 @@ public function downloadFileWithHttpInfo(Requests\downloadFileRequest $request)
$error = json_decode($content);

$errorCode = $e->getCode();
$errorMessage = $error->Error != null && $error->Error->Message != null
? $error->Error->Message
: $e->getMessage();
$errorMessage = $error != null && $error->message != null
? $error->message
: ($error != null && $error->error != null && $error->error->message != null ? $error->error->message : $e->getMessage());

throw new ApiException($errorMessage, $errorCode);
}
Expand Down Expand Up @@ -935,9 +935,9 @@ public function moveFileWithHttpInfo(Requests\moveFileRequest $request)
$error = json_decode($content);

$errorCode = $e->getCode();
$errorMessage = $error->Error != null && $error->Error->Message != null
? $error->Error->Message
: $e->getMessage();
$errorMessage = $error != null && $error->message != null
? $error->message
: ($error != null && $error->error != null && $error->error->message != null ? $error->error->message : $e->getMessage());

throw new ApiException($errorMessage, $errorCode);
}
Expand Down Expand Up @@ -1207,9 +1207,9 @@ public function uploadFileWithHttpInfo(Requests\uploadFileRequest $request)
$error = json_decode($content);

$errorCode = $e->getCode();
$errorMessage = $error->Error != null && $error->Error->Message != null
? $error->Error->Message
: $e->getMessage();
$errorMessage = $error != null && $error->message != null
? $error->message
: ($error != null && $error->error != null && $error->error->message != null ? $error->error->message : $e->getMessage());

throw new ApiException($errorMessage, $errorCode);
}
Expand Down Expand Up @@ -1557,7 +1557,7 @@ private function _requestToken()
/*
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose Pty Ltd" file="copyFileRequest.php">
* Copyright (c) 2003-2020 Aspose Pty Ltd
* Copyright (c) 2003-2021 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -1634,7 +1634,7 @@ public function __construct($srcPath, $destPath, $srcStorageName = null, $destSt
/*
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose Pty Ltd" file="deleteFileRequest.php">
* Copyright (c) 2003-2020 Aspose Pty Ltd
* Copyright (c) 2003-2021 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -1697,7 +1697,7 @@ public function __construct($path, $storageName = null, $versionId = null)
/*
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose Pty Ltd" file="downloadFileRequest.php">
* Copyright (c) 2003-2020 Aspose Pty Ltd
* Copyright (c) 2003-2021 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -1760,7 +1760,7 @@ public function __construct($path, $storageName = null, $versionId = null)
/*
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose Pty Ltd" file="moveFileRequest.php">
* Copyright (c) 2003-2020 Aspose Pty Ltd
* Copyright (c) 2003-2021 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -1837,7 +1837,7 @@ public function __construct($srcPath, $destPath, $srcStorageName = null, $destSt
/*
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose Pty Ltd" file="uploadFileRequest.php">
* Copyright (c) 2003-2020 Aspose Pty Ltd
* Copyright (c) 2003-2021 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down

0 comments on commit 7d995ff

Please sign in to comment.