{"id":19156044,"url":"https://github.com/markkimsal/dompdf-server","last_synced_at":"2026-04-19T02:31:31.846Z","repository":{"id":66691775,"uuid":"458546943","full_name":"markkimsal/dompdf-server","owner":"markkimsal","description":"Docker server for converting html to PDF","archived":false,"fork":false,"pushed_at":"2022-02-14T20:54:31.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T12:35:50.691Z","etag":null,"topics":["docker-compose","dompdf","pdf-converter","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markkimsal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-02-12T14:37:21.000Z","updated_at":"2022-02-12T16:33:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"14b160c4-a191-4c07-8e73-5e4cded64ffa","html_url":"https://github.com/markkimsal/dompdf-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markkimsal/dompdf-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markkimsal%2Fdompdf-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markkimsal%2Fdompdf-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markkimsal%2Fdompdf-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markkimsal%2Fdompdf-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markkimsal","download_url":"https://codeload.github.com/markkimsal/dompdf-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markkimsal%2Fdompdf-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31991954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["docker-compose","dompdf","pdf-converter","php"],"created_at":"2024-11-09T08:33:03.936Z","updated_at":"2026-04-19T02:31:31.825Z","avatar_url":"https://github.com/markkimsal.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# INSTALLATION\n\nrun `composer run new-env` to install a new environment.\n\nrun `composer run update-versions` to install pre-packaged dompdf releases into vendor_dompdf.\n\n# Usage\nPOST your HTML to `/convert/html` and get back binary PDF.\n\n```php\n\u003c?php\nuse GuzzleHttp\\Client;\n\n$client = new Client([\n  'base_uri' =\u003e 'http://localhost:3001',\n]);\n\n$payload = file_get_contents('/my-report-or-document.html');\n\n$response = $client-\u003erequest('POST', '/convert/html', [\n    'debug' =\u003e FALSE,\n    'multipart' =\u003e [\n        [\n            'headers' =\u003e [\n                'Content-Type' =\u003e 'text/html',\n            ],\n            'name' =\u003e 'my_document',\n            'filename' =\u003e 'my_document.html',  // must include filename for laravel/lumen/symfony/php?\n            'contents' =\u003e $payload,\n        ]\n    ]\n]);\n\n$body = $response-\u003egetBody();\necho $body;\n```\n\n# Advanced Usage\n\nYou can submit multiple document requests in a single API request, specifying different page orientations\nand sizes per document.  The resulting documents will be merged with FPDI/FPDF to form one final document.\n\nThis is achieved by specifying key,value pairs in the \"name\" field of the API multipart request.  The `name` field\ncorresponds to the name of the form input if this were coming from an HTML document.\n\n```php\n\u003c?php\nuse GuzzleHttp\\Client;\n\n$client = new Client([\n  'base_uri' =\u003e 'http://localhost:3001',\n]);\n\n$payload = file_get_contents('/my-report-or-document.html');\n\n$response = $client-\u003erequest('POST', '/convert/html', [\n    'debug' =\u003e FALSE,\n    'multipart' =\u003e [\n        [\n            'headers' =\u003e [\n                'Content-Type' =\u003e 'text/html',\n            ],\n            'name' =\u003e 'paper=A4,orientation=portrait',\n            'filename' =\u003e 'my_document.html',\n            'contents' =\u003e $payload,\n        ],\n        [\n            'headers' =\u003e [\n                'Content-Type' =\u003e 'text/html',\n            ],\n            'name' =\u003e 'paper=letter,orientation=landscape',\n            'filename' =\u003e 'my_document_2.html',\n            'contents' =\u003e $payload,\n        ]\n    ]\n]);\n\necho $response-\u003egetBody();\n```\n![image](https://user-images.githubusercontent.com/54099/153879095-a6cdb51f-e622-4501-af1a-b305022d1a69.png)\n\n\n# SVGs\n\nDompdf requires that any SVG be base64 encoded and placed into an image tag.  This server will\nuse a regular expression to scan your document for any `\u003csvg\u003e` tags and do this automatically.\n\nIf the regex fails for you, you can manually bas64 encode your SVGs and place them into an\n`\u003cimg\u003e` tag like this:\n\n```\n\u003cimg src=\"data:imagesvg;base64, ...\"\u003e\n```\n\n# TESTING\n\n`sh ./scripts/test-curl.sh`\n\nor visit\n\n[http://localhost:3001/convert/html](http://localhost:3001/convert/html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkkimsal%2Fdompdf-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkkimsal%2Fdompdf-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkkimsal%2Fdompdf-server/lists"}