Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JanSlabon committed Nov 16, 2022
1 parent 59d00ff commit 6a7ce6d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,32 @@ Its constructor requires the following arguments:
Additionally, the module offers a `setDocumentName()` method. This method allows you to define the document name related
to the hash send to the SAFE API. By default, the document name is set to "document.pdf".

### The `Batch` class

This class allows you to digital sign several PDF files in a single signature flow.

Its constructor requires the following arguments:

- `$accessToken` - The access token which is passed with the custom header SAFEAuthorization.
- `$client` - An instance of the `Client` class.
- `$credentialId` - The id of the credentials (can be received as demoed in [list-credentials.php](examples/list-credentials.php))
- `$processId` - A process id (a new Globally Unique Identifier (GUID) for each invocation).
- `$clientName` - The value for the clientName field.

You can pass several files as an array to the `sign($files)` method:

```php
$files = [
[
'in' => string|SetaPDF_Core_Reader_ReaderInterface,
'out' => 'path/to/result.pdf'
]
];
```

Additionally, the `sign()` method accepts callbacks to e.g. add individual signature
appearances or signature properties. For an example see the [batch-complex.php](examples/batch-complex.php) demo.

## License

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

0 comments on commit 6a7ce6d

Please sign in to comment.