Skip to content

Instantly share code, notes, and snippets.

@morenoh149
Created November 28, 2022 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morenoh149/ea8f5a4f70c83fb7ce81f24f1bfd9a0c to your computer and use it in GitHub Desktop.
Save morenoh149/ea8f5a4f70c83fb7ce81f24f1bfd9a0c to your computer and use it in GitHub Desktop.

How do I do something like options kwarg JazzCore/python-pdfkit#222

options = {
      "enable-local-file-access": True,
      ...
}
pdfkit.from_string(html_file, pdf_file, options=options, ...)

if I have

params = dict()
if self.stylesheet is not None:
    params.update(dict(css=[self._get_stylesheet(self.stylesheet), ]))

return pdfkit.from_string(rendered_html, **params)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment