Skip to content

Need a way to finish the spawned process if wkhtmltopdf never responds #96

@keithrz

Description

@keithrz

Use case: We're using wkhtmltopdf (version 0.12.4 w/patched qt) with --window-status argument. If the page loaded by wkhtmltopdf never emits the proper window status, wkhtmltopdf never finishes. Logged against wkhtmltopdf as wkhtmltopdf/wkhtmltopdf#2490

Justification for using --window-status: We're using wkhtmltopdf to print web pages that run a lot of JavaScript & make a lot of long-running requests before the pages are ready to print.

With this wrapper (version 0.3.4), running into wkhtmltopdf issue 2490, the child processes never finish: the /bin/sh wkhtmltopdf process nor the wkhtmltopdf process (running on Linux or Mac OS X.)

Either we need a reference to the spawned child process returned from wkhtmltopdf, or we need an option included like "processTimeout", which specifies how many milliseconds to wait until the child process is killed (if it is still there). Ideally, the read stream is also closed at that point.

Thoughts? If you point me in the right direction, my coworker and/or I may be able to work on a pull request.

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