{"id":22141565,"url":"https://github.com/bearddan2000/javascript-web-html-cavas-to-pdf","last_synced_at":"2025-07-01T18:05:13.593Z","repository":{"id":234056595,"uuid":"752476295","full_name":"bearddan2000/javascript-web-html-cavas-to-pdf","owner":"bearddan2000","description":"A demo of html rendering to pdf. In this demo","archived":false,"fork":false,"pushed_at":"2024-02-04T00:18:43.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T11:24:36.355Z","etag":null,"topics":["cavas","html","htmltocanvas","javascript","jspdf","pdf","promise","to","web"],"latest_commit_sha":null,"homepage":"https://github.com/bearddan2000/javascript-web-html-cavas-to-pdf","language":"HTML","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/bearddan2000.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}},"created_at":"2024-02-04T00:18:41.000Z","updated_at":"2024-02-04T00:18:46.000Z","dependencies_parsed_at":"2024-04-18T03:45:00.061Z","dependency_job_id":null,"html_url":"https://github.com/bearddan2000/javascript-web-html-cavas-to-pdf","commit_stats":null,"previous_names":["bearddan2000/javascript-web-html-cavas-to-pdf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bearddan2000/javascript-web-html-cavas-to-pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearddan2000%2Fjavascript-web-html-cavas-to-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearddan2000%2Fjavascript-web-html-cavas-to-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearddan2000%2Fjavascript-web-html-cavas-to-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearddan2000%2Fjavascript-web-html-cavas-to-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bearddan2000","download_url":"https://codeload.github.com/bearddan2000/javascript-web-html-cavas-to-pdf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearddan2000%2Fjavascript-web-html-cavas-to-pdf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263013708,"owners_count":23399813,"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","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":["cavas","html","htmltocanvas","javascript","jspdf","pdf","promise","to","web"],"created_at":"2024-12-01T21:13:56.111Z","updated_at":"2025-07-01T18:05:13.544Z","avatar_url":"https://github.com/bearddan2000.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# javascript-web-html-cavas-to-pdf\n\n## Description\nA demo of html rendering to pdf. In this demo\nthe entire body of the html page in rendered to\na canvas tag then passed to pdf lib. The rendering is basicaly\nan image so it will be uneditable. \n\nThere is some security issue\nwith htmltocanvas, so that html fragments are not rendered.\nA workaround to this issue is to have a seperate pdf page for each\nhtml page then merge the pdfs. [Workaround](https://stackoverflow.com/questions/47632710/html2canvas-creating-multiple-divs)\n\nAnother issue in htmltocanvas lib is bootstrap, rendering to a web page is fine but when using htmltocanvas the css is wrong.\nA workaround to this issue is to customize boostrap by removing the print media type. This was tested for boostrap v3.7 and later v5.3 both should this issue. [Remove print media type](https://stackoverflow.com/questions/16858954/how-to-properly-use-jspdf-library)\n\n## Tech stack\n- htmltocanvas\n- jspdf\n- promise\n\n## Docker stack\n- httpd:latest\n\n## To run\n`sudo ./install.sh -u`\n- Available at http://localhost\n\n## To stop\n`sudo ./install.sh -d`\n\n## To see help\n`sudo ./install.sh -h`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbearddan2000%2Fjavascript-web-html-cavas-to-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbearddan2000%2Fjavascript-web-html-cavas-to-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbearddan2000%2Fjavascript-web-html-cavas-to-pdf/lists"}