{"id":26013277,"url":"https://github.com/kiklop74/moodle-local_dompdf","last_synced_at":"2026-05-18T09:05:31.037Z","repository":{"id":63891296,"uuid":"190043581","full_name":"kiklop74/moodle-local_dompdf","owner":"kiklop74","description":"Provides DomPdf library for Moodle","archived":false,"fork":false,"pushed_at":"2024-07-17T16:07:45.000Z","size":4499,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T15:16:51.081Z","etag":null,"topics":["moodle","moodle-local","moodle-plugin","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiklop74.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":"2019-06-03T16:37:17.000Z","updated_at":"2024-07-17T16:05:17.000Z","dependencies_parsed_at":"2024-07-17T19:38:32.288Z","dependency_job_id":"6cce5075-a664-4056-948c-43a9ac95bacc","html_url":"https://github.com/kiklop74/moodle-local_dompdf","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/kiklop74/moodle-local_dompdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiklop74%2Fmoodle-local_dompdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiklop74%2Fmoodle-local_dompdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiklop74%2Fmoodle-local_dompdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiklop74%2Fmoodle-local_dompdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiklop74","download_url":"https://codeload.github.com/kiklop74/moodle-local_dompdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiklop74%2Fmoodle-local_dompdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33172173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["moodle","moodle-local","moodle-plugin","php"],"created_at":"2025-03-06T01:28:04.303Z","updated_at":"2026-05-18T09:05:31.000Z","avatar_url":"https://github.com/kiklop74.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Dompdf\n======\n\n**Dompdf is an HTML to PDF converter**\n\nAt its heart, dompdf is (mostly) a [CSS 2.1](http://www.w3.org/TR/CSS2/) compliant\nHTML layout and rendering engine written in PHP. It is a style-driven renderer:\nit will download and read external stylesheets, inline style tags, and the style\nattributes of individual HTML elements. It also supports most presentational\nHTML attributes.\n\n## Requirements\n\n* PHP 7.1+\n* Moodle 3.5+\n* MBString extension\n\n### Recommendations\n\n * OPcache (OPcache, XCache, APC, etc.): improves performance\n * IMagick or GMagick extension: improves image processing performance\n\nVisit the wiki for more information:\nhttps://github.com/dompdf/dompdf/wiki/Requirements\n\n### Internal settings\n\nBy default whenever a PDF is generated systems uses `$CFG-\u003elocalcachedir/dompdf` to store temporary data.\n\n### Usage\n\nTo create new instance of the PDF class use following code:\n\n    $pdf = \\local_dompdf\\api\\pdf::createnew();\n\nThis gives you an instance of `\\Dompdf\\Dompdf` class and you just use it as outlined in the \nofficial [library documentation](https://github.com/dompdf/dompdf/wiki).\n\n#### Images stored in Moodle HTML editor.\n\nIn case you want to convert to PDF HTML that does contain images coming from Moodle internal file systems you \nneed to employ the image recoding for each specific field.\n\nFor example if you have a place where you can set the image in HTML editor when you retrieve it from database \nto display it on screen you use this code:\n\n    $rawtext = $DB-\u003eget_field('sometable', 'somefield', ['id' =\u003e 123]);\n    $options = [\n        'noclean' =\u003e true, 'para' =\u003e false, 'filter' =\u003e true,\n        'context' =\u003e $context, 'overflowdiv' =\u003e true\n    ];\n    $intro = file_rewrite_pluginfile_urls(\n        $rawtext, 'pluginfile.php', $context-\u003eid, $component, $filearea, $itemid\n    );\n    $value = format_text($intro, $format, $options, null);\n\nFor Dmpdf this does not work. There is a specific rewrite method that encode's images directly into html\nand makes them usable by library:\n\n    $rawtext = $DB-\u003eget_field('sometable', 'somefield', ['id' =\u003e 123]);\n    $options = [\n        'noclean' =\u003e true, 'para' =\u003e false, 'filter' =\u003e true,\n        'context' =\u003e $context, 'overflowdiv' =\u003e true\n    ];\n    $intro = \\local_dompdf\\api\\pdf::file_rewrite_image_urls(\n        $rawtext, $itemid, $filearea, $contextid, $component \n    );\n    $value = format_text($intro, $format, $options, null);\n\n### Examples\n\nExamples are located in examples directory of the plugin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiklop74%2Fmoodle-local_dompdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiklop74%2Fmoodle-local_dompdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiklop74%2Fmoodle-local_dompdf/lists"}