|
1 | | -# PDF TO IMAGE |
| 1 | +# PHP SIMPLE SPARK |
2 | 2 |
|
3 | | -[](https://github.com/gunantos/pdftoimage-php/actions/workflows/php.yml) |
4 | | - |
5 | | - |
6 | | - |
7 | | -<br> |
8 | 3 | <a href="https://sponsor.app-kita.net" target="_blank"><img src="https://img.shields.io/github/sponsors/gunantos?logo=gunantos&style=for-the-badge" title="Pay Coffe" /></a><br> |
9 | | -Pdf to image library using Imagick<br> |
| 4 | +PHP Create Spark Serve<br> |
10 | 5 |
|
11 | | -### INSTALATION |
12 | | - |
13 | | -- Imagick |
14 | | - |
15 | | - 1. Check PHP Version `php -i|find "PHP Version"` |
16 | | - 2. Check PHP is Thread Safety `php -i|find "Thread Safety"` |
17 | | - 3. Check PHP Architecture `php -i|find "Architecture"` |
18 | | - 4. Download imagick from [Imagick](https://pecl.php.net/package/imagick) |
19 | | - 5. Once you downloaded the correct files: |
| 6 | +```php |
| 7 | +<?php |
| 8 | +$serve = new Appkita\SPARK\Serve; |
| 9 | +$serve->run(); |
| 10 | +``` |
20 | 11 |
|
21 | | - - Extract from `php_imagick-….zip` the `php_imagick.dll `file, and save it to the ext directory of your PHP installation |
22 | | - - Extract from `ImageMagick-….zip` the DLL files located in the bin folder that start with `CORE_RL` or `IM_MOD_RL`, and save them to the PHP root directory `(where you have php.exe)`, or to a directory in your PATH variable |
23 | | - - Add this line to your `php.ini` file: `extension=php_imagick.dll` |
24 | | - - Restart the Apache/NGINX Windows service (if applicable) |
25 | | - |
26 | | - 6. To test if the extension works, you can run this PHP code: |
| 12 | +### INSTALATION |
27 | 13 |
|
28 | | - ```php |
29 | | - <?php |
30 | | - $image = new Imagick(); |
31 | | - $image->newImage(1, 1, new ImagickPixel('#ffffff')); |
32 | | - $image->setImageFormat('png'); |
33 | | - $pngData = $image->getImagesBlob(); |
34 | | - echo strpos($pngData, "\x89PNG\r\n\x1a\n") === 0 ? 'Ok' : 'Failed'; |
35 | | - ``` |
| 14 | +```php |
| 15 | +<?php |
| 16 | +$serve = new Appkita\SPARK\Serve; |
| 17 | +$serve->run(); |
| 18 | +``` |
36 | 19 |
|
37 | 20 | - Library |
38 | 21 | `composer install appkita/pdftoimage` |
39 | 22 |
|
40 | 23 | ### Lear More |
41 | 24 |
|
42 | 25 | - [php](https://www.php.net/manual/en) |
43 | | -- [Imagick](https://www.php.net/manual/en/book.imagick.php) |
44 | 26 |
|
45 | 27 | ### Chat |
46 | 28 |
|
|
0 commit comments