Skip to content

Commit

Permalink
Remove print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
wm3ndez committed Sep 30, 2023
1 parent de0b69d commit c93c329
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions html_to_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ def to_pdf(html: str) -> bytes:
)
except Exception as e:
logger.error(e)
print(e)
return b""

try:
driver.get(f"data:text/html;base64,{html_b64}")
pdf = driver.execute_cdp_cmd("Page.printToPDF", {"printBackground": True})
except Exception as e:
logger.error(e)
print(e)
return b""
finally:
driver.close()
Expand Down

0 comments on commit c93c329

Please sign in to comment.