-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
//include the autoloader | ||
require_once('../vendor/autoload.php'); | ||
//if manual installation has been used comment line that requires the autoload and uncomment this line: | ||
//require_once('../init.php'); | ||
|
||
use Ilovepdf\OfficepdfTask; | ||
|
||
|
||
// you can call task class directly | ||
// to get your key pair, please visit https://developer.ilovepdf.com/user/projects | ||
$myTask = new OfficepdfTask('project_public_id','project_secret_key'); | ||
|
||
// file var keeps info about server file id, name... | ||
// it can be used latter to cancel file | ||
$file = $myTask->addFile('/path/to/file/document.docx'); | ||
|
||
// process files | ||
$myTask->execute(); | ||
|
||
// and finally download file. If no path is set, it will be downloaded on current folder | ||
$myTask->download(); |