Skip to content

Commit

Permalink
sample
Browse files Browse the repository at this point in the history
  • Loading branch information
maztch committed Oct 1, 2021
1 parent 3de1e1f commit 407ba7b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions samples/officepdf_basic.php
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();

0 comments on commit 407ba7b

Please sign in to comment.