PHP code example of expectedbehavior / php-docraptor
1. Go to this page and download the library: Download expectedbehavior/php-docraptor library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
expectedbehavior / php-docraptor example snippets
$docRaptor = new DocRaptor\ApiWrapper("YOUR_API_KEY_HERE"); // Or omit the API key and pass it in via setter
$docRaptor->setDocumentContent('<h1>Hello!</h1>')->setDocumentType('pdf')->setTest(true)->setName('output.pdf');
$file = $docRaptor->fetchDocument();
$config = new DocRaptor\Config(false);
$httpClient = new DocRaptor\HttpClient($config);
$docRaptor = new DocRaptor\ApiWrapper("YOUR_API_KEY_HERE", $httpClient, $config);
// or
$config = new DocRaptor\Config(false);
$docRaptor = new DocRaptor\ApiWrapper("YOUR_API_KEY_HERE", null, $config); // will use HttpClient by default
$httpClient = new DocRaptor\HttpClient();
$docRaptor = new DocRaptor\ApiWrapper("YOUR_API_KEY_HERE", $httpClient);
javascript
"tedbehavior/php-docraptor": "1.3.0"
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.