Sitelet https://github.com/JazzCore/python-pdfkit/issues/239
Skip to content

Cannot pass file list to from_file module #239

Description

@TorhamDev

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions