{"id":27300818,"url":"https://github.com/zerox-dg/easypdf","last_synced_at":"2025-09-02T15:37:02.058Z","repository":{"id":57150495,"uuid":"124495131","full_name":"ZeroX-DG/EasyPDF","owner":"ZeroX-DG","description":"A simple library that use PDF.js for rendering pdf file on electron","archived":false,"fork":false,"pushed_at":"2019-04-11T04:35:22.000Z","size":4222,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T11:49:33.011Z","etag":null,"topics":["electron","javascript","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/ZeroX-DG.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":"2018-03-09T06:02:00.000Z","updated_at":"2019-10-30T06:15:01.000Z","dependencies_parsed_at":"2022-09-03T16:50:19.675Z","dependency_job_id":null,"html_url":"https://github.com/ZeroX-DG/EasyPDF","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroX-DG%2FEasyPDF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroX-DG%2FEasyPDF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroX-DG%2FEasyPDF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroX-DG%2FEasyPDF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZeroX-DG","download_url":"https://codeload.github.com/ZeroX-DG/EasyPDF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248502986,"owners_count":21114919,"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":["electron","javascript","pdf"],"created_at":"2025-04-12T01:26:12.942Z","updated_at":"2025-04-12T01:26:13.672Z","avatar_url":"https://github.com/ZeroX-DG.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyPDF\n*A simple library that use PDF.js for rendering pdf file on electron*\n\nAuthor: Hung Nguyen\n\n## About this project\nThis library will help you render your pdf file using [pdf.js](https://github.com/mozilla/pdf.js/) on your electron app with minimal effort.\n\n## Documentation\nCheck out the documentation [here](api.md)\n\n## Example\nFirst you need to install the library using the command\n```\nnpm install easypdf\n```\n\nThen include it in your js file (I named mine index.js)\n```js\nlet easypdf = require('easypdf');\n// example pdf file\nlet pdf_file = 'http://www.africau.edu/images/default/sample.pdf';\n\n// load the pdf file and set the container\nlet container = easypdf(pdf_file).setContainer('#pdf-container');\n\n// render the pdf\ncontainer.render();\n```\n\nThen include it the html file\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eEasyPDF demo\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cstyle\u003e\n    body, html {padding: 0; margin: 0}\n    #pdf-container {\n      width: 100%;\n      height: 100%;\n      position: fixed;\n    }\n  \u003c/style\u003e\n  \u003cbody\u003e\n    \u003c!-- The container of the pdf --\u003e\n    \u003cdiv id=\"pdf-container\"\u003e\u003c/div\u003e\n  \u003c/body\u003e\n  \u003c!-- The file contains our code above --\u003e\n  \u003cscript src=\"index.js\"\u003e\u003c/script\u003e\n\u003c/html\u003e\n```\n\nFinally, load the html file to electron browser window and here is what we get\n\n![result](https://media.giphy.com/media/TITLlBd68poAr5SOg4/giphy.gif)\n\nWant more example? checkout the [test folder](/test)\n\n## Contributing\nTo getting started, you can fork and clone this repo. After that run the command bellow to install all dependencies\n```\nnpm install\n``` \n\nThen edit your code in the [src folder](/src) and send me a PR :)\n\n## Contact\nIf you have any questions, you can find me at:\n\nFacebook: https://fb.com/ZeroXCEH \u003cbr\u003e\nTwitter: https://twitter.com/ZeroX_Hung \u003cbr\u003e\nEmail: viethungax@gmail.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerox-dg%2Feasypdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzerox-dg%2Feasypdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerox-dg%2Feasypdf/lists"}