Skip to content

Commit

Permalink
fixed issue 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mika committed Feb 9, 2021
1 parent 5ad5421 commit 7781c18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pdfy/pdfy.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __path_to_url(self, path):
def html_to_pdf(self, html_path, pdf_path = None, options={"paperWidth": 8.3, "paperHeight":11.7, "marginTop": 0, "marginBottom":0, "marginLeft":0, "marginRight":0}):
self.chrome.Page.navigate(url=self.__resolve_path(html_path))
self.chrome.wait_event("Page.frameStoppedLoading", timeout=60)
pdf_data = self.chrome.Page.printToPDF(**options)["result"]["data"]
pdf_data = self.chrome.Page.printToPDF(**options)[0]["result"]["data"]
if pdf_path is None:
return pdf_data
else:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setuptools.setup(
name="pdfy",
version="1.0.50",
version="1.1.0",
author="Mika Hämäläinen",
author_email="mika@rootroo.com",
description="A library for converting HTML files into PDF. The tool uses Chrome to render the HTML and print it into a pdf file.",
Expand All @@ -16,7 +16,7 @@
packages=setuptools.find_packages(),
install_requires=[
'selenium',
"PyChromeDevTools"
"PyChromeDevTools>=0.3"
],
classifiers=(
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit 7781c18

Please sign in to comment.