{"id":20120563,"url":"https://github.com/gunantos/pdftoimage-php","last_synced_at":"2026-06-09T17:31:04.188Z","repository":{"id":56949520,"uuid":"370055362","full_name":"gunantos/pdftoimage-php","owner":"gunantos","description":"PHP library PDF to image using Imagick","archived":false,"fork":false,"pushed_at":"2021-06-15T04:51:23.000Z","size":240,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-30T07:50:04.296Z","etag":null,"topics":["ghostscri","image","imagick","imagickphp","library","pdf","pdflib","pdftoimage","php"],"latest_commit_sha":null,"homepage":"https://app-kita.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gunantos.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://sponsor.app-kita.net"]}},"created_at":"2021-05-23T13:06:17.000Z","updated_at":"2022-09-11T08:00:33.000Z","dependencies_parsed_at":"2022-08-21T08:20:13.570Z","dependency_job_id":null,"html_url":"https://github.com/gunantos/pdftoimage-php","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gunantos/pdftoimage-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunantos%2Fpdftoimage-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunantos%2Fpdftoimage-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunantos%2Fpdftoimage-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunantos%2Fpdftoimage-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gunantos","download_url":"https://codeload.github.com/gunantos/pdftoimage-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunantos%2Fpdftoimage-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34118750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ghostscri","image","imagick","imagickphp","library","pdf","pdflib","pdftoimage","php"],"created_at":"2024-11-13T19:21:26.777Z","updated_at":"2026-06-09T17:31:04.167Z","avatar_url":"https://github.com/gunantos.png","language":"PHP","funding_links":["https://sponsor.app-kita.net"],"categories":[],"sub_categories":[],"readme":"# PDF TO IMAGE\n\n[![PHP Composer](https://github.com/gunantos/pdftoimage-php/actions/workflows/php.yml/badge.svg)](https://github.com/gunantos/pdftoimage-php/actions/workflows/php.yml)\n![Discord](https://img.shields.io/discord/846036920811126844?style=plastic)\n![Travis (.org)](https://img.shields.io/travis/gunantos/pdftoimage-php?style=plastic)\n![GitHub branch checks state](https://img.shields.io/github/checks-status/gunantos/pdftoimage-php/main?style=plastic)\n![Bitbucket Pipelines](https://img.shields.io/bitbucket/pipelines/andtho89/pdftoimage-php/main)\u003cbr\u003e\n\u003ca href=\"https://sponsor.app-kita.net\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/sponsors/gunantos?logo=gunantos\u0026style=for-the-badge\" title=\"Pay Coffe\" /\u003e\u003c/a\u003e\u003cbr\u003e\nPdf to image library using Imagick\u003cbr\u003e\n\nInstallation\n\n- composer\n  `composer install appkita/pdftoimage`\n- download [Github](https://github.com/gunantos/pdftoimage-php/releases)\n\n## NEW Version 3.0 (BETA)\n\n- add convert using ghostscript\n\n### INSTALLATION EXTENSION\n\n1. Windows\n   a. Ghostscript\n   download from [ghostscript](https://www.ghostscript.com/download/gsdnld.html)\n   add your gs bin folder to PATH Environment\n   b. Imagick\n\n   - Check PHP Version `php -i|find \"PHP Version\"`\n   - Check PHP is Thread Safety `php -i|find \"Thread Safety\"`\n   - Check PHP Architecture `php -i|find \"Architecture\"`\n   - Download imagick from [Imagick](https://pecl.php.net/package/imagick)\n   - Once you downloaded the correct files:\n     - Extract from `php_imagick-….zip` the `php_imagick.dll `file, and save it to the ext directory of your PHP installation\n     - 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\n     - Add this line to your `php.ini` file: `extension=php_imagick.dll`\n     - Restart the Apache/NGINX Windows service (if applicable)\n   - To test if the extension works, you can run this PHP code:\n     ```php\n     \u003c?php\n     $image = new Imagick();\n     $image-\u003enewImage(1, 1, new ImagickPixel('#ffffff'));\n     $image-\u003esetImageFormat('png');\n     $pngData = $image-\u003egetImagesBlob();\n     echo strpos($pngData, \"\\x89PNG\\r\\n\\x1a\\n\") === 0 ? 'Ok' : 'Failed';\n     ```\n\n2. Linux\n\n   - Ghostscript\n     download from [ghostscript](https://www.ghostscript.com/download/gsdnld.html)\n   - Imagick\n\n     - Centos\n       ```sh\n         sudo yum install php-imagick\n         php -m | grep imagick\n       ```\n     - Debian\n\n     ```sh\n       sudo apt-get install php-imagick\n       php -m | grep imagick\n     ```\n\n### Use\n\n```php\n $file = '\u003c\u003cpdf file\u003e\u003e';\n //or\n $file = 'URL FILE';\n //configuration\n $option = [\n   'path' =\u003e '\u003c\u003cresult path\u003e\u003e', //default empty\n   'format' =\u003e 'png', //set image format output\n   'resolution' =\u003e 'set resultion image',\n   'prefix'=\u003e 'convert', //set prefix name image\n   'layer_method'=\u003eImagick::LAYERMETHOD_FLATTEN, //follow Imagick Layer Method\n   'colosrpace'=\u003e null, //follow Imagick colorspace\n   'quality'=\u003e null, //follow imagick result quality\n ];\n $spesific_page = null;\n $convert = new  \\Appkita\\PDFtoImage\\Convert($file, $option);\n $result = $convert-\u003erun(); //set null if you wont\n  //or\n  $result = $convert-\u003erun($spesific_page);\n\n /**\n  * Or\n  */\n  $convert = new \\Appkita\\PDFtoImage\\Convert($file);\n  $convert-\u003epath = '\u003c\u003cyour path\u003e\u003e';\n  $convert-\u003eformat = 'jpg';\n  $convert-\u003erun($spesific_page);\n /**\n  * Or\n  */\n  $convert = new \\Appkita\\PDFtoImage\\Convert();\n  $result = $convert-\u003esetFile($filepdf)-\u003erun($spesific_page, $options); // if is_string $options return $path output\n```\n\n2. URL\n\n### Lear More\n\n- [php](https://www.php.net/manual/en)\n- [Imagick](https://www.php.net/manual/en/book.imagick.php)'\n- [Ghostscript](https://www.ghostscript.com/download/gsdnld.html)\n\n### Chat\n\n[Discord](https://discord.gg/bXUWCSaw)\n\n### Sponsor\n\n[Pay Coffe](https://sponsor.app-kita.net)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunantos%2Fpdftoimage-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgunantos%2Fpdftoimage-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunantos%2Fpdftoimage-php/lists"}