{"id":19745721,"url":"https://github.com/unickz/website2pdf","last_synced_at":"2025-10-29T03:05:58.436Z","repository":{"id":65186662,"uuid":"585580471","full_name":"uNickz/WebSite2PDF","owner":"uNickz","description":"Simple and Fast Python framework to convert HTML files or Web Site to PDF","archived":false,"fork":false,"pushed_at":"2023-12-23T13:02:35.000Z","size":548,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-29T02:48:44.934Z","etag":null,"topics":["convert","converter","html","htmltopdf","pdf","python","python3","site","sitetopdf","url","urltopdf","website","websitetopdf"],"latest_commit_sha":null,"homepage":"","language":"Python","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/uNickz.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":"2023-01-05T14:35:05.000Z","updated_at":"2025-07-23T03:08:56.000Z","dependencies_parsed_at":"2024-12-03T18:23:33.560Z","dependency_job_id":"196e142b-a698-45bf-a345-70f90885ba03","html_url":"https://github.com/uNickz/WebSite2PDF","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/uNickz/WebSite2PDF","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uNickz%2FWebSite2PDF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uNickz%2FWebSite2PDF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uNickz%2FWebSite2PDF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uNickz%2FWebSite2PDF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uNickz","download_url":"https://codeload.github.com/uNickz/WebSite2PDF/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uNickz%2FWebSite2PDF/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271281433,"owners_count":24732182,"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-08-20T02:00:09.606Z","response_time":69,"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":["convert","converter","html","htmltopdf","pdf","python","python3","site","sitetopdf","url","urltopdf","website","websitetopdf"],"created_at":"2024-11-12T02:11:01.609Z","updated_at":"2025-10-29T03:05:58.359Z","avatar_url":"https://github.com/uNickz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align = \"center\"\u003e\n    \u003ca href = \"https://github.com/uNickz/WebSite2PDF\"\u003e\n        \u003cimg src = \"https://raw.githubusercontent.com/uNickz/WebSite2PDF/main/.github/graphics/GitHub-Banner-WebSite2PDF.png\" width = \"500px\" alt = \"WebSite2PDF Logo\"\u003e\n    \u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/uNickz/WebSite2PDF/tree/main/Example\"\u003eExamples\u003c/a\u003e\n    •\n    \u003ca href=\"https://github.com/uNickz/WebSite2PDF/blob/main/README.md\"\u003eDocumentation\u003c/a\u003e\n    •\n    \u003ca href=\"https://pypi.org/project/WebSite2PDF/\"\u003ePyPi\u003c/a\u003e\n    •\n    \u003ca href=\"https://t.me/uNickzProjects\"\u003eNews\u003c/a\u003e\n    •\n    \u003ca href=\"https://github.com/uNickz/WebSite2PDF/discussions\"\u003eChat\u003c/a\u003e\n\u003c/p\u003e\n\n# WebSite2PDF\n\u003e Simple and Fast Python framework to convert HTML files or Web Site to PDF\n\n### Installing with pip\n\n``` bash\npip3 install WebSite2PDF\n```\nor\n``` bash\npip3 install git+https://github.com/uNickz/WebSite2PDF\n```\n\n### Installing with python\n\n``` bash\npython3 -m pip install WebSite2PDF\n```\nor\n``` bash\npython3 -m pip install git+https://github.com/uNickz/WebSite2PDF\n```\n\n### Dependencies\n\n - [Selenium Chrome WebDriver](https://chromedriver.chromium.org/downloads) (If [Chrome](https://www.google.com/chrome/) is installed on the machine you won't need to install the chrome driver)\n\n## Example\n\n### Using a url\n\n``` python\nimport WebSite2PDF\n\nurl = \"https://pypi.org\"\n\nc = WebSite2PDF.Client()\nwith open(\"file_name.pdf\", \"wb+\") as file:\n    file.write(c.pdf(url))\n```\nor\n``` python\nimport WebSite2PDF\n\nurl = \"https://pypi.org\"\n\nc = WebSite2PDF.Client()\nc.pdf(url, filename = \"file_name.pdf\")\n```\n\n### Using a file HTML\n\n``` python\nimport WebSite2PDF\n\nfile_path = \"C:\\Users\\uNickz\\index.html\"\n\nc = WebSite2PDF.Client()\nwith open(\"file_name.pdf\", \"wb+\") as file:\n    file.write(c.pdf(f\"file:///{file_path}\"))\n```\nor\n``` python\nimport WebSite2PDF\n\nfile_path = \"C:\\Users\\uNickz\\index.html\"\n\nc = WebSite2PDF.Client()\nc.pdf(f\"file:///{file_path}\", filename = \"file_name.pdf\")\n```\n\n### Using multiple urls or files HTML\n\n``` python\nimport WebSite2PDF\n\nurls_or_path = [\"https://pypi.org\", \"file:///C:\\Users\\uNickz\\index.html\", \"https://github.com/\"]\n\nc = WebSite2PDF.Client()\nc.pdf(urls_or_path, filename = [\"pypi.pdf\", \"index.pdf\", \"github.pdf\"])\n```\nor\n``` python\nimport WebSite2PDF\n\nurls_or_path = [\"https://pypi.org\", \"file:///C:\\Users\\uNickz\\index.html\", \"https://github.com/\"]\nfile_name = [\"pypi.pdf\", \"index.pdf\", \"github.pdf\"]\n\nc = WebSite2PDF.Client()\ndata = c.pdf(urls_or_path)\nfor name, data in zip(name, data):\n    with open(name, \"wb+\") as file:\n        file.write(data)\n```\n\n### Using a delay (in seconds) before create PDF\n\n``` python\nimport WebSite2PDF\n\nurl = \"https://pypi.org\"\n\nc = WebSite2PDF.Client()\nc.pdf(url, filename = \"file_name.pdf\", delay = 3)\n```\n\n### Using global [PDF Options](https://github.com/uNickz/WebSite2PDF/blob/main/PDF%20Page%20Options.md)\n\n``` python\nimport WebSite2PDF\n\nurl = \"https://pypi.org\"\n\nc = WebSite2PDF.Client(\n    pdfOptions = {\n        \"landscape\" = True,\n        \"displayHeaderFooter\": True,\n        \"printBackground\": True,\n        \"preferCSSPageSize\": True,\n    }\n)\nc.pdf(url, filename = \"file_name.pdf\")\n```\n\n### Using specific [PDF Options](https://github.com/uNickz/WebSite2PDF/blob/main/PDF%20Page%20Options.md) for a PDF\n\n``` python\nimport WebSite2PDF\n\nurl = \"https://pypi.org\"\n\nc = WebSite2PDF.Client(\n    pdfOptions = {\n        \"landscape\" = True,\n        \"displayHeaderFooter\": True,\n        \"printBackground\": True,\n        \"preferCSSPageSize\": True,\n    }\n)\nc.pdf(url, filename = \"file_name.pdf\", pdfOptions = {\n    \"landscape\" = False,\n    \"displayHeaderFooter\": True,\n})\n```\n\n### Using global [Selenium ChromeDriver Options](https://github.com/uNickz/WebSite2PDF/blob/main/Selenium%20ChromeDriver%20Options.md)\n\n``` python\nimport WebSite2PDF\n\nurl = \"https://pypi.org\"\n\nc = WebSite2PDF.Client(\n    pdfOptions = {\n        \"landscape\" = True,\n        \"displayHeaderFooter\": True,\n        \"printBackground\": True,\n        \"preferCSSPageSize\": True,\n    }, seleniumOptions = [\n        \"--no-sandbox\",\n        \"--headless\",\n    ]\n)\nc.pdf(url, filename = \"file_name.pdf\")\n```\n\n### Using specific [Selenium ChromeDriver Options](https://github.com/uNickz/WebSite2PDF/blob/main/Selenium%20ChromeDriver%20Options.md) for a PDF\n\n``` python\nimport WebSite2PDF\n\nurl = \"https://pypi.org\"\n\nc = WebSite2PDF.Client(\n    pdfOptions = {\n        \"landscape\" = True,\n        \"displayHeaderFooter\": True,\n        \"printBackground\": True,\n        \"preferCSSPageSize\": True,\n    }, seleniumOptions = [\n        \"--no-sandbox\",\n        \"--headless\",\n    ]\n)\nc.pdf(url, filename = \"file_name.pdf\", pdfOptions = {\n        \"landscape\" = False,\n        \"displayHeaderFooter\": True,\n    }, seleniumOptions = [\n        \"--no-sandbox\",\n        \"--disable-gpu\",\n])\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funickz%2Fwebsite2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funickz%2Fwebsite2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funickz%2Fwebsite2pdf/lists"}