{"id":32255382,"url":"https://github.com/hearsid/ng-html-to-pdf-save","last_synced_at":"2026-02-21T18:33:30.155Z","repository":{"id":58234056,"uuid":"56577994","full_name":"hearsid/ng-html-to-pdf-save","owner":"hearsid","description":"Save HTML as pdf file on the browser with angularjs .","archived":false,"fork":false,"pushed_at":"2018-09-23T17:27:46.000Z","size":2780,"stargazers_count":28,"open_issues_count":11,"forks_count":35,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-22T09:38:44.563Z","etag":null,"topics":["angularjs","converts","html","pdf"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/hearsid.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}},"created_at":"2016-04-19T08:14:55.000Z","updated_at":"2024-06-14T03:35:11.000Z","dependencies_parsed_at":"2022-08-30T18:20:07.370Z","dependency_job_id":null,"html_url":"https://github.com/hearsid/ng-html-to-pdf-save","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hearsid/ng-html-to-pdf-save","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hearsid%2Fng-html-to-pdf-save","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hearsid%2Fng-html-to-pdf-save/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hearsid%2Fng-html-to-pdf-save/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hearsid%2Fng-html-to-pdf-save/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hearsid","download_url":"https://codeload.github.com/hearsid/ng-html-to-pdf-save/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hearsid%2Fng-html-to-pdf-save/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280420452,"owners_count":26327861,"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-22T02:00:06.515Z","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":["angularjs","converts","html","pdf"],"created_at":"2025-10-22T18:45:13.056Z","updated_at":"2025-10-22T18:45:13.937Z","avatar_url":"https://github.com/hearsid.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Angularjs save HTML as PDF in your browser\n\nThis is an angularjs module to save HTML as PDF \u003ca target=\"_blank\" href=\"http://hearsid.github.io/angular-html-to-pdf-save/demo/index.html\"\u003eDEMO\u003c/a\u003e, it basically converts the HTML to HTML5 canvas and captures the same and converts it to PDF and saves it in your browser .\n\n\u003cbr/\u003e\nHere are the steps :\n\u003cbr/\u003e\n1) bower install angular-save-html-to-pdf\n\u003cbr/\u003eOR\u003cbr/\u003e\nnpm install angular-save-html-to-pdf\n\n 2) Link the JS files in your HTML file :\n\n ```\n\t\u003cscript src=\"../bower_components/angular/angular.js\"\u003e\u003c/script\u003e\n\t\u003cscript src=\"../bower_components/jquery/dist/jquery.min.js\"\u003e\u003c/script\u003e\n\t\u003cscript src=\"https://cdn.rawgit.com/niklasvh/html2canvas/0.5.0-alpha2/dist/html2canvas.min.js\"\u003e\u003c/script\u003e\n\t\u003cscript src=\"../bower_components/jsPDF/dist/jspdf.debug.js\"\u003e\u003c/script\u003e\n\t\u003cscript src=\"../dist/saveHtmlToPdf.min.js\"\u003e\u003c/script\u003e\n\n ```\n\n 3) Add this module to your angular app :\n ```\n var app = angular.module('app' , ['htmlToPdfSave']) ;\n ```\n 4) Use the directives in your app , here is a code snippet from a working copy in demo folder :\n  ```\n  \u003cbutton pdf-save-button=\"idOne\" pdf-name=\"someone.pdf\" class=\"btn\"\u003eHello Someone\u003c/button\u003e\n  \t\u003c!-- below block will be saved as pdf --\u003e\n\n  \t\u003cdiv pdf-save-content=\"idOne\" \u003e\n  \t\tHello Someone\n  \t\u003c/div\u003e\n\n  \t\u003cbutton pdf-save-button=\"idOneGraph\" pdf-name=\"hello.pdf\" class=\"btn\"\u003eHello World\u003c/button\u003e\n\n \t\u003c!-- below block will be saved as pdf --\u003e\n\n  \t\u003cdiv pdf-save-content=\"idOneGraph\" \u003e\n  \t\tHello World\n  \t\u003c/div\u003e\n  ```\n\n  To allow addition of multiple pdf save button and linking them to the pdf save content block every pdf-save-button and pdf-save-content directive is associated with an ID , the pdf-save-button will match the ID with pdf-save-content block and the matching HTML block will be saved .\n  \u003cbr/\u003e\n  \u003cbr/\u003e\n\n  ### Developer instructions:\n  If you would like to run the project locally, you can download the repo and run :\u003cbr/\u003e\n  1)\n  ```\n    \u003e gulp concat\n    \u003e gulp compress\n    ```\n  commands to create the bundled file which is then used in the demo/index.html file.\n\n  2)  demo/index.html file can be served easily by any static web server to test the project, I use and thus recommend python server which you can start by writing\n     ``` python -m SimpleHTTPServer 9090 ```\n     9090 can be replaced by your prefered port. \u003cbr/\u003e\n  NOTE : This is a new repository and has been tested with basic HTML and google graphs , please create github issues if you find it is not working with something and consider contributing. Cheers .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhearsid%2Fng-html-to-pdf-save","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhearsid%2Fng-html-to-pdf-save","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhearsid%2Fng-html-to-pdf-save/lists"}