{"id":16423376,"url":"https://github.com/ngekoding/office-to-pdf","last_synced_at":"2025-10-23T23:35:23.598Z","repository":{"id":62530029,"uuid":"439200142","full_name":"ngekoding/office-to-pdf","owner":"ngekoding","description":"Convert any office files to pdf format","archived":false,"fork":false,"pushed_at":"2024-05-31T02:44:55.000Z","size":8,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T08:14:43.244Z","etag":null,"topics":["doc-to-pdf","document-converter","office-to-pdf"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/ngekoding/office-to-pdf","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/ngekoding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-17T03:32:39.000Z","updated_at":"2025-01-28T10:10:03.000Z","dependencies_parsed_at":"2024-05-31T03:44:49.412Z","dependency_job_id":"e4012cef-8556-4999-b42f-7f47b467da50","html_url":"https://github.com/ngekoding/office-to-pdf","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ngekoding/office-to-pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngekoding%2Foffice-to-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngekoding%2Foffice-to-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngekoding%2Foffice-to-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngekoding%2Foffice-to-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngekoding","download_url":"https://codeload.github.com/ngekoding/office-to-pdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngekoding%2Foffice-to-pdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280711633,"owners_count":26378013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"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":["doc-to-pdf","document-converter","office-to-pdf"],"created_at":"2024-10-11T07:39:37.160Z","updated_at":"2025-10-23T23:35:23.558Z","avatar_url":"https://github.com/ngekoding.png","language":"PHP","readme":"# office-to-pdf\n\nConvert any office files to PDF format.\n\nThis library use LibreOffice power to convert any office files to PDF format. So, please make sure you have installed LibreOffice on your environment!\n\n## Requirements\n- PHP 5.6 or above\n- LibreOffice\n\n## Installation\n\n```bash\ncomposer require ngekoding/office-to-pdf\n```\n\n## Usage\n\n### Simple usage\n\n```php\n\u003c?php\n\n// Include autoloader\nrequire 'vendor/autoload.php';\n\nuse Ngekoding\\OfficeToPdf\\Converter;\n\n$converter = new Converter();\n$converter-\u003econvert('path/to/file.docx');\n```\n\nYou can also convert other file type (not only .docx), feel free to convert any office file like `.pptx`, `.xlsx`, etc...\n\n### Setting process timeout\n\nBy default processes have a timeout of 60 seconds, but you can change it passing a different timeout (in seconds) to the `setTimeout()` method:\n\n```php\n$converter = new Converter();\n$converter-\u003esetTimeout(3600);\n```\n\nDocs: [Symfony Process Timeout](https://symfony.com/doc/3.x/components/process.html#process-timeout)\n\n### Setting manually LibreOffice executable path\n\nBy default the library will try to find LibreOffice executable based on current operating system.\n\n```php\n$converter = new Converter('path/to/libreoffice');\n```\n\n### Setting destination folder\n\nBy default the PDF result will generated in the same directory as the source file. You can define the destination folder by passing the second parameter.\n\n```php\n$converter = new Converter();\n$converter-\u003econvert('path/to/file.docx', './pdf-outputs');\n```\n\nBy default the PDF filename will same with the source file, you can define the output filename by setting the destination folder with filename.\n\n```php\n// The result filename will be result.pdf in the same directory as the source file\n$converter-\u003econvert('path/to/file.docx', 'result.pdf');\n\n// Or save to spesific directory\n$converter-\u003econvert('path/to/file.docx', './pdf-outputs/result.pdf');\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngekoding%2Foffice-to-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngekoding%2Foffice-to-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngekoding%2Foffice-to-pdf/lists"}