{"id":16229963,"url":"https://github.com/martinjagodic/netlify-plugin-generate-pdf","last_synced_at":"2025-07-26T18:06:32.414Z","repository":{"id":65456929,"uuid":"343126177","full_name":"martinjagodic/netlify-plugin-generate-pdf","owner":"martinjagodic","description":"Generate a PDF from HTML at the provided URL and save it to publish directory.","archived":false,"fork":false,"pushed_at":"2021-03-07T20:41:36.000Z","size":1612,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T17:08:32.068Z","etag":null,"topics":["html-to-pdf","netlify","netlify-plugin","pdf"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/martinjagodic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-28T14:33:38.000Z","updated_at":"2024-06-05T15:05:57.000Z","dependencies_parsed_at":"2023-01-24T12:01:04.839Z","dependency_job_id":null,"html_url":"https://github.com/martinjagodic/netlify-plugin-generate-pdf","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"netlify/build-plugin-template","purl":"pkg:github/martinjagodic/netlify-plugin-generate-pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinjagodic%2Fnetlify-plugin-generate-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinjagodic%2Fnetlify-plugin-generate-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinjagodic%2Fnetlify-plugin-generate-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinjagodic%2Fnetlify-plugin-generate-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinjagodic","download_url":"https://codeload.github.com/martinjagodic/netlify-plugin-generate-pdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinjagodic%2Fnetlify-plugin-generate-pdf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261577970,"owners_count":23179765,"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":["html-to-pdf","netlify","netlify-plugin","pdf"],"created_at":"2024-10-10T12:59:39.893Z","updated_at":"2025-06-30T16:38:38.568Z","avatar_url":"https://github.com/martinjagodic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Netlify Plugin Generate PDF\n\nGenerate a PDF from the provided URL and save it to publish directory.\n\n## Install\n\n`npm install -D netlify-plugin-generate-pdf`\n\nAnd add this to your `netlify.toml`\n\n```toml\n[[plugins]]\n  package = \"netlify-plugin-generate-pdf\"\n\n  [plugins.inputs]\n  # It has to begin with http\n  url=\"https://your-site.netlify.app/\"\n```\n\n## Configuration\n\nThe following `inputs` options are available.\n\n| Name                | Type    | Description                                        | Default value                                            | Required |\n| ------------------- | ------- | -------------------------------------------------- | -------------------------------------------------------- | -------- |\n| url                 | string  | abosulte path to generate PDF from                 | -                                                        | true     |\n| fileName            | string  | name of generated PDF file                         | index.pdf                                                | false    |\n| format              | string  | Print format                                       | A4                                                       | false    |\n| printBackground     | boolean | Enable if you want to print images and backgrounds | true                                                     | false    |\n| displayHeaderFooter | boolean | Add a header and footer to each page               | false                                                    | false    |\n| headerTemplate      | string  | HTML for page header                               | -                                                        | false    |\n| footerTemplate      | string  | HTML for page footer                               | -                                                        | false    |\n| margin              | object  | Page margin                                        | { top: '1cm', right: '1cm', bottom: '1cm', left: '1cm' } | false    |\n\n### Example\n\n```toml\n[[plugins]]\n  package = \"netlify-plugin-generate-pdf\"\n  [plugins.inputs]\n  url=\"https://google.com/\"\n  fileName = \"google.pdf\"\n  format = \"A4\"\n  printBackground = \"true\"\n  displayHeaderFooter = \"true\"\n  headerTemplate = \"\u003cdiv\u003eHello from PDF page header\u003c/div\u003e\"\n  footerTemplate = \"\u003cdiv\u003eHello from PDF page footer\u003c/div\u003e\"\n  [plugins.inputs.margin]\n    top = '2cm'\n    right = '2cm'\n    bottom = '2cm'\n    left = '2cm'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinjagodic%2Fnetlify-plugin-generate-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinjagodic%2Fnetlify-plugin-generate-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinjagodic%2Fnetlify-plugin-generate-pdf/lists"}