{ "info": { "author": "Mika H\u00e4m\u00e4l\u00e4inen", "author_email": "mika.hamalainen@helsinki.fi", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "# Pdfy #\n\nPdfy is a Python library for converting HTML (and anything Chrome can render) into PDF. It uses Chrome printing functionality, so the PDFs will be rendered exactly as printed in the browser.\n\n## Installation ##\n\nTo install the library, you need to run.\n\n pip install pdfy\n\nAdditionally, [you will need to install Chrome Driver](http://chromedriver.chromium.org/getting-started). \n\n## Usage ##\n\nUsing the library is as easy as:\n\n from pdfy import Pdfy\n p = Pdfy()\n p.html_to_pdf(\"html_file.htm\", pdf_path=\"pdf_file.pdf\")\n\n### More control over the PDF layout ###\n\nIf you need to have more control over the layout, you can pass additional parameters to html_to_pdf\n\n options = {\"paperWidth\": 8.3, \"paperHeight\":11.7}\n p.html_to_pdf(\"html_file.htm\", pdf_path=\"pdf_file.pdf\" options=options)\n\nThe full list of parameters is available on [Chrome's Developer site](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF).\n\n### Not saving the PDF ###\n\nIn the absence of the pdf_path argument, the html_to_pdf function will return the PDF as a base64 encoded string.\n\n pdf = p.html_to_pdf(\"html_file.htm\")\n\n\n### Multiple instances ###\n\nThe library will run Chrome in the background in the remote debug mode. This means that if your project requires multiple initialized Pdfy objects, you might need to change the port used for debugging. This can be done by passing the port number to Pdfy() as follows:\n\n p = Pdfy(debug_port=9222) #9222 is the default port\n\n## Credits ##\n\nThis library is released under [the Apache 2.0 License](https://opensource.org/licenses/Apache-2.0).\n\n(C) Copyright 2018 [Mika H\u00e4m\u00e4l\u00e4inen](https://mikakalevi.com)\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mikahama/pdfy", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pdfy", "package_url": "https://pypi.org/project/pdfy/", "platform": "", "project_url": "https://pypi.org/project/pdfy/", "project_urls": { "Homepage": "https://github.com/mikahama/pdfy" }, "release_url": "https://pypi.org/project/pdfy/1.0.30/", "requires_dist": [ "selenium", "PyChromeDevTools" ], "requires_python": "", "summary": "A library for converting HTML files into PDF. The tool uses Chrome to render the HTML and print it into a pdf file.", "version": "1.0.30" }, "last_serial": 5949490, "releases": { "1.0.10": [ { "comment_text": "", "digests": { "md5": "b8dacccdb71af42c28a33ca7b1c3e58b", "sha256": "a5ef0db79d40181aaa2dfb1ac00c4005f38b338a9b721e0b1c947ff82b04d492" }, "downloads": -1, "filename": "pdfy-1.0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "b8dacccdb71af42c28a33ca7b1c3e58b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3057, "upload_time": "2018-07-30T22:25:28", "url": "https://files.pythonhosted.org/packages/cb/ae/2c799b25f6727c6f46ddb902f1ee1fc7f85d958f5fd4295073b8eebf8a7a/pdfy-1.0.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "48fa8a79741c7d63a8b9bd9bfe05fc03", "sha256": "393cdfc32bbdcd5a3a27686db02c10f3ba4f099752bcfd00d3965454f98a9b1a" }, "downloads": -1, "filename": "pdfy-1.0.10.tar.gz", "has_sig": false, "md5_digest": "48fa8a79741c7d63a8b9bd9bfe05fc03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2690, "upload_time": "2018-07-30T22:25:30", "url": "https://files.pythonhosted.org/packages/8d/4d/1c1b07107fcf927b4c25498c7f4fe5705e723d7ab1601be3926b97070552/pdfy-1.0.10.tar.gz" } ], "1.0.20": [ { "comment_text": "", "digests": { "md5": "4f9c19ee2f9b567596c89a7259a2eaac", "sha256": "2f6c13086637bc3ab080eb7a1661c7a47c38bf58e4d4a1a2b238dde1a2042d9c" }, "downloads": -1, "filename": "pdfy-1.0.20-py3-none-any.whl", "has_sig": false, "md5_digest": "4f9c19ee2f9b567596c89a7259a2eaac", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3083, "upload_time": "2018-07-30T22:37:33", "url": "https://files.pythonhosted.org/packages/4d/f8/bb615cefd91a35b41d691b3c03a8f247b8855c8a2607a0344fde2c60378a/pdfy-1.0.20-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e671825f757aece1aaddad458fbb2c1f", "sha256": "894c4e67e68fa40474c9052b2cbd79ec6570057f25137b5bc75df10acae249cc" }, "downloads": -1, "filename": "pdfy-1.0.20.tar.gz", "has_sig": false, "md5_digest": "e671825f757aece1aaddad458fbb2c1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2743, "upload_time": "2018-07-30T22:37:34", "url": "https://files.pythonhosted.org/packages/82/9e/fcec650e2a582adad21734bbad2e9ff8d9d55c6d4d590841eae60848a00a/pdfy-1.0.20.tar.gz" } ], "1.0.30": [ { "comment_text": "", "digests": { "md5": "effef1c437b31dab470b5a0d148fc168", "sha256": "ff0fd28158301fccb0d7f0cda9cba91107b637b54388b7ccd333937ec6c6e679" }, "downloads": -1, "filename": "pdfy-1.0.30-py3-none-any.whl", "has_sig": false, "md5_digest": "effef1c437b31dab470b5a0d148fc168", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3155, "upload_time": "2019-10-09T12:29:54", "url": "https://files.pythonhosted.org/packages/48/44/67fa454d03da079cb9788475e977bfcad82e5c5db685fca6704b66b1e568/pdfy-1.0.30-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7cfeb166dc0008d4d87c32daf3e29755", "sha256": "e68c2e311eadba29b04c9c2af6e4c0e35d1f1995c3a6231b263362529da722b2" }, "downloads": -1, "filename": "pdfy-1.0.30.tar.gz", "has_sig": false, "md5_digest": "7cfeb166dc0008d4d87c32daf3e29755", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2821, "upload_time": "2019-10-09T12:29:56", "url": "https://files.pythonhosted.org/packages/71/3f/34d584faab7864c2185862852811233c5db26cd09aa77e47db8bd05248e4/pdfy-1.0.30.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "effef1c437b31dab470b5a0d148fc168", "sha256": "ff0fd28158301fccb0d7f0cda9cba91107b637b54388b7ccd333937ec6c6e679" }, "downloads": -1, "filename": "pdfy-1.0.30-py3-none-any.whl", "has_sig": false, "md5_digest": "effef1c437b31dab470b5a0d148fc168", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3155, "upload_time": "2019-10-09T12:29:54", "url": "https://files.pythonhosted.org/packages/48/44/67fa454d03da079cb9788475e977bfcad82e5c5db685fca6704b66b1e568/pdfy-1.0.30-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7cfeb166dc0008d4d87c32daf3e29755", "sha256": "e68c2e311eadba29b04c9c2af6e4c0e35d1f1995c3a6231b263362529da722b2" }, "downloads": -1, "filename": "pdfy-1.0.30.tar.gz", "has_sig": false, "md5_digest": "7cfeb166dc0008d4d87c32daf3e29755", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2821, "upload_time": "2019-10-09T12:29:56", "url": "https://files.pythonhosted.org/packages/71/3f/34d584faab7864c2185862852811233c5db26cd09aa77e47db8bd05248e4/pdfy-1.0.30.tar.gz" } ] }