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

OSError: wkhtmltoimage exited with non-zero code 1. error: Unknown long argument --orientation #38

Open
Taukurade opened this issue Jan 1, 2020 · 2 comments

Comments

@Taukurade
Copy link

Im using code from example

body = """
<html>
  <head>
    <meta name="imgkit-format" content="png"/>
    <meta name="imgkit-orientation" content="Landscape"/>
  </head>
  Hello World!
  </html>
"""
	imgkit.from_string(body,'name.jpg')

and i get error:

OSError: wkhtmltoimage exited with non-zero code 1. error:
Unknown long argument --orientation

Name:
  wkhtmltoimage 0.12.5 (with patched qt)

Synopsis:
  wkhtmltoimage [OPTIONS]... <input file> <output file>

Description:
  Converts an HTML page into an image,

General Options:
      --crop-h <int>                  Set height for cropping
      --crop-w <int>                  Set width for cropping
      --crop-x <int>                  Set x coordinate for cropping
      --crop-y <int>                  Set y coordinate for cropping
  -H, --extended-help                 Display more extensive help, detailing
                                  less common command switches
  -f, --format <format>               Output file format (default png)
      --height <int>                  Set screen height (default is calculated
                                    from page content) (default 0)
  -h, --help                          Display help
      --license                       Output license information and exit
      --log-level <level>             Set log level to: none, error, warn or
                                  info (default info)
      --quality <int>                 Output image quality (between 0 and 100)
                                    (default 94)
  -q, --quiet                         Be less verbose, maintained for backwards
                                     compatibility; Same as using --log-level
                                   none
  -V, --version                       Output version information and exit
      --width <int>                   Set screen width, note that this is used
                                    only as a guide line. Use
                   --disable-smart-width to make it strict.
                 (default 1024)
Contact:
  If you experience bugs or want to request new features please visit
  <https://github.com/wkhtmltopdf/wkhtmltopdf/issues>

@gil-opplane
Copy link

I'm having the same problem, with the same input.

@chenjinzhi1990
Copy link

delete name values

body = """
<html>
  <head>
    <meta  content="png"/>
    <meta  content="Landscape"/>
  </head>
  Hello World!
  </html>
"""
imgkit.from_string(body,'name.jpg')

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

3 participants