Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot pass file list to from_file module #239

Open
TorhamDev opened this issue Nov 18, 2022 · 0 comments
Open

Cannot pass file list to from_file module #239

TorhamDev opened this issue Nov 18, 2022 · 0 comments

Comments

@TorhamDev
Copy link

Hello.

When I try to use a list of files to create a PDF, I get the following error:

OSError: wkhtmltopdf exited with non-zero code 1. error:
Exit with code 1, due to unknown error.

my code :

from glob import glob
import pdfkit




options = {
    "enable-local-file-access": "",
    "margin-top": "0",
    "margin-bottom": "0",
    "margin-left": "0",
    "margin-right": "0",
    'page-size': 'Letter',
    'encoding': "UTF-8",

}
pdfkit.from_file(glob("*.html"), "out.pdf", options=options) # or ["1.html", "2.html"]

pdfkit : 1.0.0
python : 3.6.13
wkhtmltopdf : 0.12.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant